From 728b2a7e160768bdd97dbe8ae270fe1ac6c19a31 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 21 Sep 2021 05:39:38 +0000 Subject: [PATCH] CodeGen from PR 16089 in Azure/azure-rest-api-specs Merge cf2673bac6a051f1bbd4d78acc8c60d13c7e82b4 into afd16a96232b181f8723fad99bfa658e51590631 --- .../CHANGELOG.md | 3 +- .../README.md | 4 +- .../pom.xml | 2 +- .../videoanalyzer/VideoAnalyzerManager.java | 157 +- .../fluent/AccessPoliciesClient.java | 36 +- .../fluent/EdgeModulesClient.java | 28 +- .../LivePipelineOperationStatusesClient.java | 47 + .../fluent/LivePipelinesClient.java | 305 +++ .../PipelineJobOperationStatusesClient.java | 47 + .../fluent/PipelineJobsClient.java | 241 +++ .../fluent/PipelineTopologiesClient.java | 191 ++ .../PrivateEndpointConnectionsClient.java | 139 ++ .../fluent/PrivateLinkResourcesClient.java | 73 + .../fluent/VideoAnalyzerManagementClient.java | 75 +- .../VideoAnalyzerOperationResultsClient.java | 41 + .../VideoAnalyzerOperationStatusesClient.java | 41 + .../fluent/VideoAnalyzersClient.java | 44 +- .../videoanalyzer/fluent/VideosClient.java | 60 +- .../models/AccessPolicyEntityInner.java | 2 +- .../fluent/models/LivePipelineInner.java | 191 ++ .../LivePipelineOperationStatusInner.java | 70 + .../fluent/models/PipelineJobInner.java | 194 ++ .../PipelineJobOperationStatusInner.java | 70 + .../fluent/models/PipelineTopologyInner.java | 287 +++ .../PrivateEndpointConnectionInner.java | 107 + ...vateEndpointConnectionListResultInner.java | 54 + .../models/PrivateLinkResourceInner.java | 84 + .../PrivateLinkResourceListResultInner.java | 54 + .../fluent/models/VideoAnalyzerInner.java | 137 +- .../VideoAnalyzerOperationStatusInner.java | 193 ++ ...Inner.java => VideoContentTokenInner.java} | 22 +- .../fluent/models/VideoEntityInner.java | 74 +- .../AccessPoliciesClientImpl.java | 94 +- .../implementation/EdgeModulesClientImpl.java | 105 +- .../implementation/EdgeModulesImpl.java | 4 +- .../implementation/LivePipelineImpl.java | 198 ++ .../LivePipelineOperationStatusImpl.java | 42 + ...vePipelineOperationStatusesClientImpl.java | 257 +++ .../LivePipelineOperationStatusesImpl.java | 66 + .../LivePipelinesClientImpl.java | 1720 +++++++++++++++++ .../implementation/LivePipelinesImpl.java | 211 ++ .../implementation/PipelineJobImpl.java | 190 ++ .../PipelineJobOperationStatusImpl.java | 42 + ...ipelineJobOperationStatusesClientImpl.java | 255 +++ .../PipelineJobOperationStatusesImpl.java | 64 + .../PipelineJobsClientImpl.java | 1435 ++++++++++++++ .../implementation/PipelineJobsImpl.java | 203 ++ .../PipelineTopologiesClientImpl.java | 1187 ++++++++++++ .../PipelineTopologiesImpl.java | 204 ++ .../implementation/PipelineTopologyImpl.java | 227 +++ .../PrivateEndpointConnectionImpl.java | 155 ++ ...ivateEndpointConnectionListResultImpl.java | 48 + .../PrivateEndpointConnectionsClientImpl.java | 781 ++++++++ .../PrivateEndpointConnectionsImpl.java | 221 +++ .../PrivateLinkResourceImpl.java | 65 + .../PrivateLinkResourceListResultImpl.java | 48 + .../PrivateLinkResourcesClientImpl.java | 401 ++++ .../PrivateLinkResourcesImpl.java | 88 + .../implementation/VideoAnalyzerImpl.java | 84 +- .../VideoAnalyzerManagementClientImpl.java | 154 +- ...deoAnalyzerOperationResultsClientImpl.java | 220 +++ .../VideoAnalyzerOperationResultsImpl.java | 60 + .../VideoAnalyzerOperationStatusImpl.java | 54 + ...eoAnalyzerOperationStatusesClientImpl.java | 222 +++ .../VideoAnalyzerOperationStatusesImpl.java | 61 + .../VideoAnalyzersClientImpl.java | 221 +-- .../implementation/VideoAnalyzersImpl.java | 10 - ...enImpl.java => VideoContentTokenImpl.java} | 14 +- .../implementation/VideoEntityImpl.java | 33 +- .../implementation/VideosClientImpl.java | 167 +- .../implementation/VideosImpl.java | 19 +- .../videoanalyzer/models/AccessPolicies.java | 28 +- .../videoanalyzer/models/AudioEncoderAac.java | 36 + .../models/AudioEncoderBase.java | 60 + .../models/CertificateSource.java | 35 + .../videoanalyzer/models/CredentialsBase.java | 37 + .../videoanalyzer/models/EdgeModules.java | 29 +- .../models/EncoderCustomPreset.java | 88 + .../models/EncoderPresetBase.java | 36 + .../models/EncoderProcessor.java | 78 + .../models/EncoderSystemPreset.java | 61 + .../models/EncoderSystemPresetType.java | 40 + .../videoanalyzer/models/EndpointBase.java | 126 ++ .../models/GroupLevelAccessControl.java | 53 + .../videoanalyzer/models/IotHub.java | 102 + .../videoanalyzer/models/Kind.java | 34 + .../videoanalyzer/models/LivePipeline.java | 320 +++ .../models/LivePipelineCollection.java | 84 + .../models/LivePipelineOperationStatus.java | 39 + .../models/LivePipelineOperationStatuses.java | 42 + .../models/LivePipelineState.java | 40 + .../videoanalyzer/models/LivePipelines.java | 207 ++ .../models/NetworkAccessControl.java | 111 ++ .../videoanalyzer/models/NodeBase.java | 68 + .../videoanalyzer/models/NodeInput.java | 58 + .../models/ParameterDeclaration.java | 144 ++ .../models/ParameterDefinition.java | 84 + .../videoanalyzer/models/ParameterType.java | 43 + .../models/PemCertificateList.java | 62 + .../videoanalyzer/models/PipelineJob.java | 280 +++ .../models/PipelineJobCollection.java | 84 + .../models/PipelineJobError.java | 76 + .../models/PipelineJobOperationStatus.java | 39 + .../models/PipelineJobOperationStatuses.java | 42 + .../models/PipelineJobState.java | 40 + .../videoanalyzer/models/PipelineJobs.java | 178 ++ .../models/PipelineTopologies.java | 161 ++ .../models/PipelineTopology.java | 366 ++++ .../models/PipelineTopologyCollection.java | 84 + ...ageKeysInput.java => PrivateEndpoint.java} | 27 +- .../models/PrivateEndpointConnection.java | 193 ++ .../PrivateEndpointConnectionListResult.java | 26 + ...teEndpointConnectionProvisioningState.java | 41 + .../models/PrivateEndpointConnections.java | 144 ++ ...pointConnectionsCreateOrUpdateHeaders.java | 103 + ...ointConnectionsCreateOrUpdateResponse.java | 38 + ...rivateEndpointServiceConnectionStatus.java | 38 + .../models/PrivateLinkResource.java | 60 + .../models/PrivateLinkResourceListResult.java | 25 + .../models/PrivateLinkResources.java | 65 + .../PrivateLinkServiceConnectionState.java | 108 ++ .../models/ProcessorNodeBase.java | 80 + .../models/ProvisioningState.java | 37 + .../models/PublicNetworkAccess.java | 34 + .../videoanalyzer/models/RtspSource.java | 110 ++ .../videoanalyzer/models/RtspTransport.java | 34 + .../models/SecureIotDeviceRemoteTunnel.java | 94 + .../videoanalyzer/models/SinkNodeBase.java | 80 + .../videoanalyzer/models/Sku.java | 69 + .../videoanalyzer/models/SkuName.java | 34 + .../videoanalyzer/models/SourceNodeBase.java | 45 + .../videoanalyzer/models/StorageAccount.java | 7 +- .../videoanalyzer/models/Tier.java | 31 + .../models/TimeSequenceBase.java | 37 + .../videoanalyzer/models/TlsEndpoint.java | 119 ++ .../models/TlsValidationOptions.java | 82 + .../videoanalyzer/models/TunnelBase.java | 37 + .../models/UnsecuredEndpoint.java | 53 + .../models/UserAssignedManagedIdentity.java | 9 +- .../models/UsernamePasswordCredentials.java | 100 + .../videoanalyzer/models/VideoAnalyzer.java | 142 +- .../models/VideoAnalyzerIdentity.java | 2 + .../models/VideoAnalyzerOperationResults.java | 36 + .../models/VideoAnalyzerOperationStatus.java | 60 + .../VideoAnalyzerOperationStatuses.java | 36 + .../models/VideoAnalyzerProperties.java | 27 +- .../models/VideoAnalyzerPropertiesBase.java | 222 +++ .../models/VideoAnalyzerPropertiesUpdate.java | 94 +- .../models/VideoAnalyzerUpdate.java | 127 +- .../videoanalyzer/models/VideoAnalyzers.java | 27 - .../VideoAnalyzersCreateOrUpdateHeaders.java | 102 + .../VideoAnalyzersCreateOrUpdateResponse.java | 38 + .../models/VideoAnalyzersUpdateHeaders.java | 102 + .../models/VideoAnalyzersUpdateResponse.java | 37 + .../videoanalyzer/models/VideoArchival.java | 64 + ...amingToken.java => VideoContentToken.java} | 15 +- .../models/VideoContentUrls.java | 191 ++ .../models/VideoCreationProperties.java | 160 ++ .../models/VideoEncoderBase.java | 115 ++ .../models/VideoEncoderH264.java | 50 + .../videoanalyzer/models/VideoEntity.java | 87 +- .../videoanalyzer/models/VideoFlags.java | 30 +- .../models/VideoPreviewImageUrls.java | 106 + .../models/VideoPublishingOptions.java | 109 ++ .../videoanalyzer/models/VideoScale.java | 102 + .../videoanalyzer/models/VideoScaleMode.java | 37 + .../VideoSequenceAbsoluteTimeMarkers.java | 69 + .../videoanalyzer/models/VideoSink.java | 147 ++ .../videoanalyzer/models/VideoSource.java | 101 + .../videoanalyzer/models/VideoStreaming.java | 77 - .../videoanalyzer/models/VideoType.java | 3 + .../videoanalyzer/models/Videos.java | 46 +- 172 files changed, 19775 insertions(+), 944 deletions(-) create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LivePipelineOperationStatusesClient.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LivePipelinesClient.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineJobOperationStatusesClient.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineJobsClient.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineTopologiesClient.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PrivateEndpointConnectionsClient.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PrivateLinkResourcesClient.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationResultsClient.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationStatusesClient.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineInner.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineOperationStatusInner.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobInner.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobOperationStatusInner.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineTopologyInner.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionInner.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionListResultInner.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceInner.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceListResultInner.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerOperationStatusInner.java rename sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/{VideoStreamingTokenInner.java => VideoContentTokenInner.java} (62%) create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusesClientImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusesImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelinesClientImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelinesImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusesClientImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusesImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobsClientImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobsImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologiesClientImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologiesImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologyImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionListResultImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionsClientImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionsImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourceImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourceListResultImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourcesClientImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourcesImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsClientImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesClientImpl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesImpl.java rename sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/{VideoStreamingTokenImpl.java => VideoContentTokenImpl.java} (72%) create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderAac.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderBase.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CertificateSource.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CredentialsBase.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderCustomPreset.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderPresetBase.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderProcessor.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderSystemPreset.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderSystemPresetType.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EndpointBase.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/GroupLevelAccessControl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/IotHub.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Kind.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipeline.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineCollection.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineOperationStatus.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineOperationStatuses.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineState.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelines.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NetworkAccessControl.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NodeBase.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NodeInput.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterDeclaration.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterDefinition.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterType.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PemCertificateList.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJob.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobCollection.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobError.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobOperationStatus.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobOperationStatuses.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobState.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobs.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologies.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopology.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologyCollection.java rename sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/{SyncStorageKeysInput.java => PrivateEndpoint.java} (55%) create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnection.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionListResult.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionProvisioningState.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnections.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionsCreateOrUpdateHeaders.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionsCreateOrUpdateResponse.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointServiceConnectionStatus.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResource.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResourceListResult.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResources.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkServiceConnectionState.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ProcessorNodeBase.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ProvisioningState.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PublicNetworkAccess.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RtspSource.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RtspTransport.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SecureIotDeviceRemoteTunnel.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SinkNodeBase.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Sku.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SkuName.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SourceNodeBase.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Tier.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TimeSequenceBase.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TlsEndpoint.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TlsValidationOptions.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TunnelBase.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UnsecuredEndpoint.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UsernamePasswordCredentials.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationResults.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationStatus.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationStatuses.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerPropertiesBase.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersCreateOrUpdateHeaders.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersCreateOrUpdateResponse.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersUpdateHeaders.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersUpdateResponse.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoArchival.java rename sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/{VideoStreamingToken.java => VideoContentToken.java} (59%) create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoContentUrls.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoCreationProperties.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEncoderBase.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEncoderH264.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoPreviewImageUrls.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoPublishingOptions.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoScale.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoScaleMode.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSequenceAbsoluteTimeMarkers.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSink.java create mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSource.java delete mode 100644 sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoStreaming.java diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/CHANGELOG.md b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/CHANGELOG.md index 4c5aa3aa98394..a6835820fc030 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/CHANGELOG.md +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2021-09-21) +- Azure Resource Manager Video Analyzer client library for Java. This package contains Microsoft Azure SDK for Video Analyzer Management SDK. Azure Video Analyzer provides a platform for you to build intelligent video applications that span the edge and the cloud. Package tag package-preview-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.2 (2021-05-25) diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/README.md b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/README.md index c1aa0e1779b9b..0a93268b9ae07 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/README.md +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Video Analyzer client library for Java. -This package contains Microsoft Azure SDK for Video Analyzer Management SDK. Azure Video Analyzer provides a platform for you to build intelligent video applications that span the edge and the cloud. Package tag package-2021-05-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Video Analyzer Management SDK. Azure Video Analyzer provides a platform for you to build intelligent video applications that span the edge and the cloud. Package tag package-preview-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-videoanalyzer - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/pom.xml b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/pom.xml index 2bb39ed76fe0a..4adce7439e7b0 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/pom.xml +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for Video Analyzer Management - This package contains Microsoft Azure SDK for Video Analyzer Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Video Analyzer provides a platform for you to build intelligent video applications that span the edge and the cloud. Package tag package-2021-05-01-preview. + This package contains Microsoft Azure SDK for Video Analyzer Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Video Analyzer provides a platform for you to build intelligent video applications that span the edge and the cloud. Package tag package-preview-2021-11. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/VideoAnalyzerManager.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/VideoAnalyzerManager.java index 937fee1e696ea..f8c000f7a10f7 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/VideoAnalyzerManager.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/VideoAnalyzerManager.java @@ -9,7 +9,6 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -17,21 +16,40 @@ import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzerManagementClient; import com.azure.resourcemanager.videoanalyzer.implementation.AccessPoliciesImpl; import com.azure.resourcemanager.videoanalyzer.implementation.EdgeModulesImpl; +import com.azure.resourcemanager.videoanalyzer.implementation.LivePipelineOperationStatusesImpl; +import com.azure.resourcemanager.videoanalyzer.implementation.LivePipelinesImpl; import com.azure.resourcemanager.videoanalyzer.implementation.LocationsImpl; import com.azure.resourcemanager.videoanalyzer.implementation.OperationsImpl; +import com.azure.resourcemanager.videoanalyzer.implementation.PipelineJobOperationStatusesImpl; +import com.azure.resourcemanager.videoanalyzer.implementation.PipelineJobsImpl; +import com.azure.resourcemanager.videoanalyzer.implementation.PipelineTopologiesImpl; +import com.azure.resourcemanager.videoanalyzer.implementation.PrivateEndpointConnectionsImpl; +import com.azure.resourcemanager.videoanalyzer.implementation.PrivateLinkResourcesImpl; import com.azure.resourcemanager.videoanalyzer.implementation.VideoAnalyzerManagementClientBuilder; +import com.azure.resourcemanager.videoanalyzer.implementation.VideoAnalyzerOperationResultsImpl; +import com.azure.resourcemanager.videoanalyzer.implementation.VideoAnalyzerOperationStatusesImpl; import com.azure.resourcemanager.videoanalyzer.implementation.VideoAnalyzersImpl; import com.azure.resourcemanager.videoanalyzer.implementation.VideosImpl; import com.azure.resourcemanager.videoanalyzer.models.AccessPolicies; import com.azure.resourcemanager.videoanalyzer.models.EdgeModules; +import com.azure.resourcemanager.videoanalyzer.models.LivePipelineOperationStatuses; +import com.azure.resourcemanager.videoanalyzer.models.LivePipelines; import com.azure.resourcemanager.videoanalyzer.models.Locations; import com.azure.resourcemanager.videoanalyzer.models.Operations; +import com.azure.resourcemanager.videoanalyzer.models.PipelineJobOperationStatuses; +import com.azure.resourcemanager.videoanalyzer.models.PipelineJobs; +import com.azure.resourcemanager.videoanalyzer.models.PipelineTopologies; +import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnections; +import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkResources; +import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerOperationResults; +import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerOperationStatuses; import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzers; import com.azure.resourcemanager.videoanalyzer.models.Videos; import java.time.Duration; @@ -45,13 +63,31 @@ * applications that span the edge and the cloud. */ public final class VideoAnalyzerManager { + private EdgeModules edgeModules; + + private PipelineTopologies pipelineTopologies; + + private LivePipelines livePipelines; + + private PipelineJobs pipelineJobs; + + private LivePipelineOperationStatuses livePipelineOperationStatuses; + + private PipelineJobOperationStatuses pipelineJobOperationStatuses; + private Operations operations; private VideoAnalyzers videoAnalyzers; - private Locations locations; + private PrivateLinkResources privateLinkResources; - private EdgeModules edgeModules; + private PrivateEndpointConnections privateEndpointConnections; + + private VideoAnalyzerOperationStatuses videoAnalyzerOperationStatuses; + + private VideoAnalyzerOperationResults videoAnalyzerOperationResults; + + private Locations locations; private Videos videos; @@ -100,6 +136,7 @@ public static final class Configurable { private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; private Duration defaultPollInterval; @@ -139,6 +176,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) { return this; } + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + /** * Sets the retry policy to the HTTP pipeline. * @@ -181,7 +229,7 @@ public VideoAnalyzerManager authenticate(TokenCredential credential, AzureProfil .append("-") .append("com.azure.resourcemanager.videoanalyzer") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -195,6 +243,9 @@ public VideoAnalyzerManager authenticate(TokenCredential credential, AzureProfil userAgentBuilder.append(" (auto-generated)"); } + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } if (retryPolicy == null) { retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); } @@ -204,10 +255,7 @@ public VideoAnalyzerManager authenticate(TokenCredential credential, AzureProfil HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); @@ -220,6 +268,56 @@ public VideoAnalyzerManager authenticate(TokenCredential credential, AzureProfil } } + /** @return Resource collection API of EdgeModules. */ + public EdgeModules edgeModules() { + if (this.edgeModules == null) { + this.edgeModules = new EdgeModulesImpl(clientObject.getEdgeModules(), this); + } + return edgeModules; + } + + /** @return Resource collection API of PipelineTopologies. */ + public PipelineTopologies pipelineTopologies() { + if (this.pipelineTopologies == null) { + this.pipelineTopologies = new PipelineTopologiesImpl(clientObject.getPipelineTopologies(), this); + } + return pipelineTopologies; + } + + /** @return Resource collection API of LivePipelines. */ + public LivePipelines livePipelines() { + if (this.livePipelines == null) { + this.livePipelines = new LivePipelinesImpl(clientObject.getLivePipelines(), this); + } + return livePipelines; + } + + /** @return Resource collection API of PipelineJobs. */ + public PipelineJobs pipelineJobs() { + if (this.pipelineJobs == null) { + this.pipelineJobs = new PipelineJobsImpl(clientObject.getPipelineJobs(), this); + } + return pipelineJobs; + } + + /** @return Resource collection API of LivePipelineOperationStatuses. */ + public LivePipelineOperationStatuses livePipelineOperationStatuses() { + if (this.livePipelineOperationStatuses == null) { + this.livePipelineOperationStatuses = + new LivePipelineOperationStatusesImpl(clientObject.getLivePipelineOperationStatuses(), this); + } + return livePipelineOperationStatuses; + } + + /** @return Resource collection API of PipelineJobOperationStatuses. */ + public PipelineJobOperationStatuses pipelineJobOperationStatuses() { + if (this.pipelineJobOperationStatuses == null) { + this.pipelineJobOperationStatuses = + new PipelineJobOperationStatusesImpl(clientObject.getPipelineJobOperationStatuses(), this); + } + return pipelineJobOperationStatuses; + } + /** @return Resource collection API of Operations. */ public Operations operations() { if (this.operations == null) { @@ -236,6 +334,41 @@ public VideoAnalyzers videoAnalyzers() { return videoAnalyzers; } + /** @return Resource collection API of PrivateLinkResources. */ + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + } + return privateLinkResources; + } + + /** @return Resource collection API of PrivateEndpointConnections. */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections = + new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + } + return privateEndpointConnections; + } + + /** @return Resource collection API of VideoAnalyzerOperationStatuses. */ + public VideoAnalyzerOperationStatuses videoAnalyzerOperationStatuses() { + if (this.videoAnalyzerOperationStatuses == null) { + this.videoAnalyzerOperationStatuses = + new VideoAnalyzerOperationStatusesImpl(clientObject.getVideoAnalyzerOperationStatuses(), this); + } + return videoAnalyzerOperationStatuses; + } + + /** @return Resource collection API of VideoAnalyzerOperationResults. */ + public VideoAnalyzerOperationResults videoAnalyzerOperationResults() { + if (this.videoAnalyzerOperationResults == null) { + this.videoAnalyzerOperationResults = + new VideoAnalyzerOperationResultsImpl(clientObject.getVideoAnalyzerOperationResults(), this); + } + return videoAnalyzerOperationResults; + } + /** @return Resource collection API of Locations. */ public Locations locations() { if (this.locations == null) { @@ -244,14 +377,6 @@ public Locations locations() { return locations; } - /** @return Resource collection API of EdgeModules. */ - public EdgeModules edgeModules() { - if (this.edgeModules == null) { - this.edgeModules = new EdgeModulesImpl(clientObject.getEdgeModules(), this); - } - return edgeModules; - } - /** @return Resource collection API of Videos. */ public Videos videos() { if (this.videos == null) { diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/AccessPoliciesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/AccessPoliciesClient.java index 4363b528b5f3a..63c62679ead9d 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/AccessPoliciesClient.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/AccessPoliciesClient.java @@ -14,7 +14,7 @@ /** An instance of this class provides access to all the operations defined in AccessPoliciesClient. */ public interface AccessPoliciesClient { /** - * List all existing access policy resources for the specified account. + * List all existing access policy resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -27,7 +27,7 @@ public interface AccessPoliciesClient { PagedIterable list(String resourceGroupName, String accountName); /** - * List all existing access policy resources for the specified account. + * List all existing access policy resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -44,30 +44,30 @@ PagedIterable list( String resourceGroupName, String accountName, Integer top, Context context); /** - * Retrieves an existing access policy resource from an account by name. + * Retrieves an existing access policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to retrieve. + * @param accessPolicyName The Access Policy name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessPolicyEntityInner get(String resourceGroupName, String accountName, String accessPolicyName); /** - * Retrieves an existing access policy resource from an account by name. + * Retrieves an existing access policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to retrieve. + * @param accessPolicyName The Access Policy name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -78,12 +78,12 @@ Response getWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to create or update. + * @param accessPolicyName The Access Policy name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessPolicyEntityInner createOrUpdate( @@ -94,13 +94,13 @@ AccessPolicyEntityInner createOrUpdate( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to create or update. + * @param accessPolicyName The Access Policy name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -115,7 +115,7 @@ Response createOrUpdateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to delete. + * @param accessPolicyName The Access Policy name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -128,7 +128,7 @@ Response createOrUpdateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to delete. + * @param accessPolicyName The Access Policy name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -144,12 +144,12 @@ Response deleteWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to update. + * @param accessPolicyName The Access Policy name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AccessPolicyEntityInner update( @@ -160,13 +160,13 @@ AccessPolicyEntityInner update( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to update. + * @param accessPolicyName The Access Policy name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/EdgeModulesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/EdgeModulesClient.java index 4e55f02e312f4..6908e2c1bfff0 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/EdgeModulesClient.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/EdgeModulesClient.java @@ -16,7 +16,7 @@ /** An instance of this class provides access to all the operations defined in EdgeModulesClient. */ public interface EdgeModulesClient { /** - * List all of the existing edge module resources for a given Video Analyzer account. + * List all existing edge module resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -29,14 +29,12 @@ public interface EdgeModulesClient { PagedIterable list(String resourceGroupName, String accountName); /** - * List all of the existing edge module resources for a given Video Analyzer account. + * List all existing edge module resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. * @param top 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. - * @param orderby Specifies the key by which the result collection should be ordered. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -45,14 +43,14 @@ public interface EdgeModulesClient { */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( - String resourceGroupName, String accountName, String filter, Integer top, String orderby, Context context); + String resourceGroupName, String accountName, Integer top, Context context); /** - * Retrieves a specific existing edge module resource in the given Video Analyzer account. + * Retrieves an existing edge module resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to retrieve. + * @param edgeModuleName The Edge Module name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -62,11 +60,11 @@ PagedIterable list( EdgeModuleEntityInner get(String resourceGroupName, String accountName, String edgeModuleName); /** - * Retrieves a specific existing edge module resource in the given Video Analyzer account. + * Retrieves an existing edge module resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to retrieve. + * @param edgeModuleName The Edge Module name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -87,7 +85,7 @@ Response getWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to create or update. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -108,7 +106,7 @@ EdgeModuleEntityInner createOrUpdate( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to create or update. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +129,7 @@ Response createOrUpdateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to be deleted. + * @param edgeModuleName The Edge Module name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -146,7 +144,7 @@ Response createOrUpdateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to be deleted. + * @param edgeModuleName The Edge Module name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -167,7 +165,7 @@ Response deleteWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module used to create a new provisioning token. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -188,7 +186,7 @@ EdgeModuleProvisioningTokenInner listProvisioningToken( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module used to create a new provisioning token. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LivePipelineOperationStatusesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LivePipelineOperationStatusesClient.java new file mode 100644 index 0000000000000..7104eed37a52d --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LivePipelineOperationStatusesClient.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineOperationStatusInner; + +/** An instance of this class provides access to all the operations defined in LivePipelineOperationStatusesClient. */ +public interface LivePipelineOperationStatusesClient { + /** + * Get the operation status of a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param operationId The operation ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a live pipeline. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LivePipelineOperationStatusInner get( + String resourceGroupName, String accountName, String livePipelineName, String operationId); + + /** + * Get the operation status of a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param operationId The operation ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a live pipeline. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String accountName, String livePipelineName, String operationId, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LivePipelinesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LivePipelinesClient.java new file mode 100644 index 0000000000000..57da6b92659b1 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LivePipelinesClient.java @@ -0,0 +1,305 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineInner; + +/** An instance of this class provides access to all the operations defined in LivePipelinesClient. */ +public interface LivePipelinesClient { + /** + * Retrieves a list of live pipeline that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of LivePipeline items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String accountName); + + /** + * Retrieves a list of live pipeline that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of LivePipeline items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String accountName, String filter, Integer top, Context context); + + /** + * Retrieves a Live Pipeline by name. If a live pipeline with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LivePipelineInner get(String resourceGroupName, String accountName, String livePipelineName); + + /** + * Retrieves a Live Pipeline by name. If a live pipeline with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String accountName, String livePipelineName, Context context); + + /** + * Creates a new live pipeline or updates an existing one, with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LivePipelineInner createOrUpdate( + String resourceGroupName, String accountName, String livePipelineName, LivePipelineInner parameters); + + /** + * Creates a new live pipeline or updates an existing one, with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String accountName, + String livePipelineName, + LivePipelineInner parameters, + Context context); + + /** + * Deletes a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String livePipelineName); + + /** + * Deletes a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String accountName, String livePipelineName, Context context); + + /** + * Updates the live pipeline entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LivePipelineInner update( + String resourceGroupName, String accountName, String livePipelineName, LivePipelineInner parameters); + + /** + * Updates the live pipeline entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String accountName, + String livePipelineName, + LivePipelineInner parameters, + Context context); + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginActivate( + String resourceGroupName, String accountName, String livePipelineName); + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginActivate( + String resourceGroupName, String accountName, String livePipelineName, Context context); + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void activate(String resourceGroupName, String accountName, String livePipelineName); + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void activate(String resourceGroupName, String accountName, String livePipelineName, Context context); + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDeactivate( + String resourceGroupName, String accountName, String livePipelineName); + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDeactivate( + String resourceGroupName, String accountName, String livePipelineName, Context context); + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deactivate(String resourceGroupName, String accountName, String livePipelineName); + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deactivate(String resourceGroupName, String accountName, String livePipelineName, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineJobOperationStatusesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineJobOperationStatusesClient.java new file mode 100644 index 0000000000000..082189dffbc24 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineJobOperationStatusesClient.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobOperationStatusInner; + +/** An instance of this class provides access to all the operations defined in PipelineJobOperationStatusesClient. */ +public interface PipelineJobOperationStatusesClient { + /** + * Get the operation status of a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param operationId The operation ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PipelineJobOperationStatusInner get( + String resourceGroupName, String accountName, String pipelineJobName, String operationId); + + /** + * Get the operation status of a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param operationId The operation ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String accountName, String pipelineJobName, String operationId, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineJobsClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineJobsClient.java new file mode 100644 index 0000000000000..56a9897b8acce --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineJobsClient.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobInner; + +/** An instance of this class provides access to all the operations defined in PipelineJobsClient. */ +public interface PipelineJobsClient { + /** + * Retrieves a list of pipeline jobs that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineJob items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String accountName); + + /** + * Retrieves a list of pipeline jobs that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineJob items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String accountName, String filter, Integer top, Context context); + + /** + * Retrieves a pipeline job by name. If a pipeline job with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PipelineJobInner get(String resourceGroupName, String accountName, String pipelineJobName); + + /** + * Retrieves a pipeline job by name. If a pipeline job with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String accountName, String pipelineJobName, Context context); + + /** + * Creates a new pipeline job or updates an existing one, with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PipelineJobInner createOrUpdate( + String resourceGroupName, String accountName, String pipelineJobName, PipelineJobInner parameters); + + /** + * Creates a new pipeline job or updates an existing one, with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String accountName, + String pipelineJobName, + PipelineJobInner parameters, + Context context); + + /** + * Deletes a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String pipelineJobName); + + /** + * Deletes a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String accountName, String pipelineJobName, Context context); + + /** + * Updates the pipeline job entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PipelineJobInner update( + String resourceGroupName, String accountName, String pipelineJobName, PipelineJobInner parameters); + + /** + * Updates the pipeline job entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String accountName, + String pipelineJobName, + PipelineJobInner parameters, + Context context); + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginCancel( + String resourceGroupName, String accountName, String pipelineJobName); + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginCancel( + String resourceGroupName, String accountName, String pipelineJobName, Context context); + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void cancel(String resourceGroupName, String accountName, String pipelineJobName); + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void cancel(String resourceGroupName, String accountName, String pipelineJobName, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineTopologiesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineTopologiesClient.java new file mode 100644 index 0000000000000..f972c3419d0e0 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineTopologiesClient.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyInner; + +/** An instance of this class provides access to all the operations defined in PipelineTopologiesClient. */ +public interface PipelineTopologiesClient { + /** + * Retrieves a list of pipeline topologies that have been added. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineTopology items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String accountName); + + /** + * Retrieves a list of pipeline topologies that have been added. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineTopology items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String accountName, String filter, Integer top, Context context); + + /** + * Retrieves a pipeline topology by name. If a topology with that name has been previously created, the call will + * return the JSON representation of that topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PipelineTopologyInner get(String resourceGroupName, String accountName, String pipelineTopologyName); + + /** + * Retrieves a pipeline topology by name. If a topology with that name has been previously created, the call will + * return the JSON representation of that topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String accountName, String pipelineTopologyName, Context context); + + /** + * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology is a + * blueprint defining what nodes are in a pipeline, and how they are interconnected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PipelineTopologyInner createOrUpdate( + String resourceGroupName, String accountName, String pipelineTopologyName, PipelineTopologyInner parameters); + + /** + * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology is a + * blueprint defining what nodes are in a pipeline, and how they are interconnected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String accountName, + String pipelineTopologyName, + PipelineTopologyInner parameters, + Context context); + + /** + * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology + * have been stopped and deleted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String pipelineTopologyName); + + /** + * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology + * have been stopped and deleted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String accountName, String pipelineTopologyName, Context context); + + /** + * Updates the pipeline topology entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PipelineTopologyInner update( + String resourceGroupName, String accountName, String pipelineTopologyName, PipelineTopologyInner parameters); + + /** + * Updates the pipeline topology entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String accountName, + String pipelineTopologyName, + PipelineTopologyInner parameters, + Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PrivateEndpointConnectionsClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PrivateEndpointConnectionsClient.java new file mode 100644 index 0000000000000..d93f8f53220e2 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PrivateEndpointConnectionsClient.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionListResultInner; +import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnectionsCreateOrUpdateResponse; + +/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +public interface PrivateEndpointConnectionsClient { + /** + * Get all private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all private endpoint connections. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionListResultInner list(String resourceGroupName, String accountName); + + /** + * Get all private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all private endpoint connections. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse( + String resourceGroupName, String accountName, Context context); + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, String name); + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String accountName, String name, Context context); + + /** + * Update private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner createOrUpdate( + String resourceGroupName, String accountName, String name, PrivateEndpointConnectionInner parameters); + + /** + * Update private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionsCreateOrUpdateResponse createOrUpdateWithResponse( + String resourceGroupName, + String accountName, + String name, + PrivateEndpointConnectionInner parameters, + Context context); + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String name); + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String accountName, String name, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PrivateLinkResourcesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PrivateLinkResourcesClient.java new file mode 100644 index 0000000000000..7b22abb290183 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PrivateLinkResourcesClient.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceListResultInner; + +/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +public interface PrivateLinkResourcesClient { + /** + * Get list of group IDs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of group IDs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourceListResultInner list(String resourceGroupName, String accountName); + + /** + * Get list of group IDs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of group IDs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse( + String resourceGroupName, String accountName, Context context); + + /** + * Get group ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return group ID. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourceInner get(String resourceGroupName, String accountName, String name); + + /** + * Get group ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return group ID. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String accountName, String name, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerManagementClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerManagementClient.java index 6aa827630d122..1c072ea7149d3 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerManagementClient.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerManagementClient.java @@ -44,6 +44,48 @@ public interface VideoAnalyzerManagementClient { */ Duration getDefaultPollInterval(); + /** + * Gets the EdgeModulesClient object to access its operations. + * + * @return the EdgeModulesClient object. + */ + EdgeModulesClient getEdgeModules(); + + /** + * Gets the PipelineTopologiesClient object to access its operations. + * + * @return the PipelineTopologiesClient object. + */ + PipelineTopologiesClient getPipelineTopologies(); + + /** + * Gets the LivePipelinesClient object to access its operations. + * + * @return the LivePipelinesClient object. + */ + LivePipelinesClient getLivePipelines(); + + /** + * Gets the PipelineJobsClient object to access its operations. + * + * @return the PipelineJobsClient object. + */ + PipelineJobsClient getPipelineJobs(); + + /** + * Gets the LivePipelineOperationStatusesClient object to access its operations. + * + * @return the LivePipelineOperationStatusesClient object. + */ + LivePipelineOperationStatusesClient getLivePipelineOperationStatuses(); + + /** + * Gets the PipelineJobOperationStatusesClient object to access its operations. + * + * @return the PipelineJobOperationStatusesClient object. + */ + PipelineJobOperationStatusesClient getPipelineJobOperationStatuses(); + /** * Gets the OperationsClient object to access its operations. * @@ -59,18 +101,39 @@ public interface VideoAnalyzerManagementClient { VideoAnalyzersClient getVideoAnalyzers(); /** - * Gets the LocationsClient object to access its operations. + * Gets the PrivateLinkResourcesClient object to access its operations. * - * @return the LocationsClient object. + * @return the PrivateLinkResourcesClient object. */ - LocationsClient getLocations(); + PrivateLinkResourcesClient getPrivateLinkResources(); /** - * Gets the EdgeModulesClient object to access its operations. + * Gets the PrivateEndpointConnectionsClient object to access its operations. * - * @return the EdgeModulesClient object. + * @return the PrivateEndpointConnectionsClient object. */ - EdgeModulesClient getEdgeModules(); + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + + /** + * Gets the VideoAnalyzerOperationStatusesClient object to access its operations. + * + * @return the VideoAnalyzerOperationStatusesClient object. + */ + VideoAnalyzerOperationStatusesClient getVideoAnalyzerOperationStatuses(); + + /** + * Gets the VideoAnalyzerOperationResultsClient object to access its operations. + * + * @return the VideoAnalyzerOperationResultsClient object. + */ + VideoAnalyzerOperationResultsClient getVideoAnalyzerOperationResults(); + + /** + * Gets the LocationsClient object to access its operations. + * + * @return the LocationsClient object. + */ + LocationsClient getLocations(); /** * Gets the VideosClient object to access its operations. diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationResultsClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationResultsClient.java new file mode 100644 index 0000000000000..315374a905215 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationResultsClient.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; + +/** An instance of this class provides access to all the operations defined in VideoAnalyzerOperationResultsClient. */ +public interface VideoAnalyzerOperationResultsClient { + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VideoAnalyzerInner get(String locationName, String name); + + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String locationName, String name, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationStatusesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationStatusesClient.java new file mode 100644 index 0000000000000..a05f232ef8c7a --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationStatusesClient.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerOperationStatusInner; + +/** An instance of this class provides access to all the operations defined in VideoAnalyzerOperationStatusesClient. */ +public interface VideoAnalyzerOperationStatusesClient { + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VideoAnalyzerOperationStatusInner get(String locationName, String name); + + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String locationName, String name, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzersClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzersClient.java index 5ec25091dc134..6061934ec79d9 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzersClient.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzersClient.java @@ -10,8 +10,9 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerCollectionInner; import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; -import com.azure.resourcemanager.videoanalyzer.models.SyncStorageKeysInput; import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerUpdate; +import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzersCreateOrUpdateResponse; +import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzersUpdateResponse; /** An instance of this class provides access to all the operations defined in VideoAnalyzersClient. */ public interface VideoAnalyzersClient { @@ -77,7 +78,7 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) VideoAnalyzerInner createOrUpdate(String resourceGroupName, String accountName, VideoAnalyzerInner parameters); @@ -92,10 +93,10 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + VideoAnalyzersCreateOrUpdateResponse createOrUpdateWithResponse( String resourceGroupName, String accountName, VideoAnalyzerInner parameters, Context context); /** @@ -133,7 +134,7 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) VideoAnalyzerInner update(String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters); @@ -148,40 +149,11 @@ Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Video Analyzer account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters, Context context); - - /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void syncStorageKeys(String resourceGroupName, String accountName, SyncStorageKeysInput parameters); - - /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response syncStorageKeysWithResponse( - String resourceGroupName, String accountName, SyncStorageKeysInput parameters, Context context); + VideoAnalyzersUpdateResponse updateWithResponse( + String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters, Context context); /** * Lists the Video Analyzer accounts in the specific subscription. diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideosClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideosClient.java index d06b85291a4cc..ba248e0bdb87a 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideosClient.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideosClient.java @@ -9,13 +9,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoContentTokenInner; import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoEntityInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoStreamingTokenInner; /** An instance of this class provides access to all the operations defined in VideosClient. */ public interface VideosClient { /** - * List all existing video resources in the specified account. + * List all existing video resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -28,7 +28,7 @@ public interface VideosClient { PagedIterable list(String resourceGroupName, String accountName); /** - * List all existing video resources in the specified account. + * List all existing video resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -44,63 +44,63 @@ public interface VideosClient { PagedIterable list(String resourceGroupName, String accountName, Integer top, Context context); /** - * Retrieves an existing video resource within an account with a given name. + * Retrieves an existing video resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to retrieve. + * @param videoName The Video name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) VideoEntityInner get(String resourceGroupName, String accountName, String videoName); /** - * Retrieves an existing video resource within an account with a given name. + * Retrieves an existing video resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to retrieve. + * @param videoName The Video name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( String resourceGroupName, String accountName, String videoName, Context context); /** - * Creates a new video resource or updates an existing one in an account. + * Creates a new video resource or updates an existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to create or update. + * @param videoName The Video name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) VideoEntityInner createOrUpdate( String resourceGroupName, String accountName, String videoName, VideoEntityInner parameters); /** - * Creates a new video resource or updates an existing one in an account. + * Creates a new video resource or updates an existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to create or update. + * @param videoName The Video name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -111,7 +111,7 @@ Response createOrUpdateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to delete. + * @param videoName The Video name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -124,7 +124,7 @@ Response createOrUpdateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to delete. + * @param videoName The Video name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -139,12 +139,12 @@ Response createOrUpdateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to update. + * @param videoName The Video name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) VideoEntityInner update( @@ -155,47 +155,45 @@ VideoEntityInner update( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to update. + * @param videoName The Video name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( String resourceGroupName, String accountName, String videoName, VideoEntityInner parameters, Context context); /** - * Generates a streaming token used for authenticating video playback. + * Generates a streaming token which can be used for accessing content from video content URLs. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to generate a token for playback. + * @param videoName The Video name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video streaming token grants access to the video streaming URLs which can be used by an compatible HLS or - * DASH player. + * @return "Video content token grants access to the video content URLs.". */ @ServiceMethod(returns = ReturnType.SINGLE) - VideoStreamingTokenInner listStreamingToken(String resourceGroupName, String accountName, String videoName); + VideoContentTokenInner listContentToken(String resourceGroupName, String accountName, String videoName); /** - * Generates a streaming token used for authenticating video playback. + * Generates a streaming token which can be used for accessing content from video content URLs. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to generate a token for playback. + * @param videoName The Video name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video streaming token grants access to the video streaming URLs which can be used by an compatible HLS or - * DASH player. + * @return "Video content token grants access to the video content URLs.". */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listStreamingTokenWithResponse( + Response listContentTokenWithResponse( String resourceGroupName, String accountName, String videoName, Context context); } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/AccessPolicyEntityInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/AccessPolicyEntityInner.java index 4c760bf1c1407..029ea2eefcec1 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/AccessPolicyEntityInner.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/AccessPolicyEntityInner.java @@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -/** Policy that determines how a video can be accessed. */ +/** The AccessPolicyEntity model. */ @JsonFlatten @Fluent public class AccessPolicyEntityInner extends ProxyResource { diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineInner.java new file mode 100644 index 0000000000000..15b15cfd37e0e --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineInner.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.models.LivePipelineState; +import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Live Pipeline represents an unique instance of a pipeline topology which is used for real-time content ingestion and + * analysis. + */ +@JsonFlatten +@Fluent +public class LivePipelineInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LivePipelineInner.class); + + /* + * The system metadata relating to this resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * The reference to an existing pipeline topology defined for real-time + * content processing. When activated, this live pipeline will process + * content according to the pipeline topology definition. + */ + @JsonProperty(value = "properties.topologyName") + private String topologyName; + + /* + * An optional description for the pipeline. + */ + @JsonProperty(value = "properties.description") + private String description; + + /* + * Bitrate capacity in kbps for the live pipeline. The support bit rate is + * between 500 to 3000 kbps. + */ + @JsonProperty(value = "properties.bitrateKbps") + private Integer bitrateKbps; + + /* + * Current pipeline state (read-only). + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private LivePipelineState state; + + /* + * List of the instance level parameter values for the user-defined + * topology parameters. A pipeline can only define or override parameters + * values for parameters which have been declared in the referenced + * topology. Topology parameters without a default value must be defined. + * Topology parameters with a default value can be optionally be + * overridden. + */ + @JsonProperty(value = "properties.parameters") + private List parameters; + + /** + * Get the systemData property: The system metadata relating to this resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the topologyName property: The reference to an existing pipeline topology defined for real-time content + * processing. When activated, this live pipeline will process content according to the pipeline topology + * definition. + * + * @return the topologyName value. + */ + public String topologyName() { + return this.topologyName; + } + + /** + * Set the topologyName property: The reference to an existing pipeline topology defined for real-time content + * processing. When activated, this live pipeline will process content according to the pipeline topology + * definition. + * + * @param topologyName the topologyName value to set. + * @return the LivePipelineInner object itself. + */ + public LivePipelineInner withTopologyName(String topologyName) { + this.topologyName = topologyName; + return this; + } + + /** + * Get the description property: An optional description for the pipeline. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: An optional description for the pipeline. + * + * @param description the description value to set. + * @return the LivePipelineInner object itself. + */ + public LivePipelineInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the bitrateKbps property: Bitrate capacity in kbps for the live pipeline. The support bit rate is between 500 + * to 3000 kbps. + * + * @return the bitrateKbps value. + */ + public Integer bitrateKbps() { + return this.bitrateKbps; + } + + /** + * Set the bitrateKbps property: Bitrate capacity in kbps for the live pipeline. The support bit rate is between 500 + * to 3000 kbps. + * + * @param bitrateKbps the bitrateKbps value to set. + * @return the LivePipelineInner object itself. + */ + public LivePipelineInner withBitrateKbps(Integer bitrateKbps) { + this.bitrateKbps = bitrateKbps; + return this; + } + + /** + * Get the state property: Current pipeline state (read-only). + * + * @return the state value. + */ + public LivePipelineState state() { + return this.state; + } + + /** + * Get the parameters property: List of the instance level parameter values for the user-defined topology + * parameters. A pipeline can only define or override parameters values for parameters which have been declared in + * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a + * default value can be optionally be overridden. + * + * @return the parameters value. + */ + public List parameters() { + return this.parameters; + } + + /** + * Set the parameters property: List of the instance level parameter values for the user-defined topology + * parameters. A pipeline can only define or override parameters values for parameters which have been declared in + * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a + * default value can be optionally be overridden. + * + * @param parameters the parameters value to set. + * @return the LivePipelineInner object itself. + */ + public LivePipelineInner withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (parameters() != null) { + parameters().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineOperationStatusInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineOperationStatusInner.java new file mode 100644 index 0000000000000..fc37efd1f9701 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineOperationStatusInner.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The LivePipelineOperationStatus model. */ +@Immutable +public final class LivePipelineOperationStatusInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LivePipelineOperationStatusInner.class); + + /* + * The name of the live pipeline operation. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The status of the live pipeline operation. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private String status; + + /* + * The error details for the live pipeline operation. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private ManagementError error; + + /** + * Get the name property: The name of the live pipeline operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: The status of the live pipeline operation. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the error property: The error details for the live pipeline operation. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobInner.java new file mode 100644 index 0000000000000..3ae58bdf49b74 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobInner.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; +import com.azure.resourcemanager.videoanalyzer.models.PipelineJobError; +import com.azure.resourcemanager.videoanalyzer.models.PipelineJobState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Represents a pipeline job. */ +@JsonFlatten +@Fluent +public class PipelineJobInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PipelineJobInner.class); + + /* + * The system metadata relating to this resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * The reference to an existing pipeline topology defined for real-time + * content processing. When activated, this live pipeline will process + * content according to the pipeline topology definition. + */ + @JsonProperty(value = "properties.topologyName") + private String topologyName; + + /* + * An optional description for the pipeline. + */ + @JsonProperty(value = "properties.description") + private String description; + + /* + * Current pipeline state (read-only). + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private PipelineJobState state; + + /* + * The expiration time when the pipeline job will be automatically deleted. + */ + @JsonProperty(value = "properties.expiration", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expiration; + + /* + * An optional error information about the pipeline job failure. + */ + @JsonProperty(value = "properties.error", access = JsonProperty.Access.WRITE_ONLY) + private PipelineJobError error; + + /* + * List of the instance level parameter values for the user-defined + * topology parameters. A pipeline can only define or override parameters + * values for parameters which have been declared in the referenced + * topology. Topology parameters without a default value must be defined. + * Topology parameters with a default value can be optionally be + * overridden. + */ + @JsonProperty(value = "properties.parameters") + private List parameters; + + /** + * Get the systemData property: The system metadata relating to this resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the topologyName property: The reference to an existing pipeline topology defined for real-time content + * processing. When activated, this live pipeline will process content according to the pipeline topology + * definition. + * + * @return the topologyName value. + */ + public String topologyName() { + return this.topologyName; + } + + /** + * Set the topologyName property: The reference to an existing pipeline topology defined for real-time content + * processing. When activated, this live pipeline will process content according to the pipeline topology + * definition. + * + * @param topologyName the topologyName value to set. + * @return the PipelineJobInner object itself. + */ + public PipelineJobInner withTopologyName(String topologyName) { + this.topologyName = topologyName; + return this; + } + + /** + * Get the description property: An optional description for the pipeline. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: An optional description for the pipeline. + * + * @param description the description value to set. + * @return the PipelineJobInner object itself. + */ + public PipelineJobInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the state property: Current pipeline state (read-only). + * + * @return the state value. + */ + public PipelineJobState state() { + return this.state; + } + + /** + * Get the expiration property: The expiration time when the pipeline job will be automatically deleted. + * + * @return the expiration value. + */ + public OffsetDateTime expiration() { + return this.expiration; + } + + /** + * Get the error property: An optional error information about the pipeline job failure. + * + * @return the error value. + */ + public PipelineJobError error() { + return this.error; + } + + /** + * Get the parameters property: List of the instance level parameter values for the user-defined topology + * parameters. A pipeline can only define or override parameters values for parameters which have been declared in + * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a + * default value can be optionally be overridden. + * + * @return the parameters value. + */ + public List parameters() { + return this.parameters; + } + + /** + * Set the parameters property: List of the instance level parameter values for the user-defined topology + * parameters. A pipeline can only define or override parameters values for parameters which have been declared in + * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a + * default value can be optionally be overridden. + * + * @param parameters the parameters value to set. + * @return the PipelineJobInner object itself. + */ + public PipelineJobInner withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (error() != null) { + error().validate(); + } + if (parameters() != null) { + parameters().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobOperationStatusInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobOperationStatusInner.java new file mode 100644 index 0000000000000..4c5eebd62d71e --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobOperationStatusInner.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PipelineJobOperationStatus model. */ +@Immutable +public final class PipelineJobOperationStatusInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PipelineJobOperationStatusInner.class); + + /* + * The name of the pipeline job operation. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * The status of the pipeline job operation. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private String status; + + /* + * The error details for the pipeline job operation. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private ManagementError error; + + /** + * Get the name property: The name of the pipeline job operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: The status of the pipeline job operation. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the error property: The error details for the pipeline job operation. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineTopologyInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineTopologyInner.java new file mode 100644 index 0000000000000..77edc7b566359 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineTopologyInner.java @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.models.Kind; +import com.azure.resourcemanager.videoanalyzer.models.ParameterDeclaration; +import com.azure.resourcemanager.videoanalyzer.models.ProcessorNodeBase; +import com.azure.resourcemanager.videoanalyzer.models.SinkNodeBase; +import com.azure.resourcemanager.videoanalyzer.models.Sku; +import com.azure.resourcemanager.videoanalyzer.models.SourceNodeBase; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Pipeline topology describes the processing steps to be applied when processing media for a particular outcome. The + * topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances + * which share the same processing characteristics. For instance, a pipeline topology which acquires data from a RTSP + * camera, process it with an specific AI model and stored the data on the cloud can be reused across many different + * cameras, as long as the same processing should be applied across all the cameras. Individual instance properties can + * be defined through the use of user-defined parameters, which allow for a topology to be parameterized, thus allowing + * individual pipelines to refer to different values, such as individual cameras RTSP endpoints and credentials. Overall + * a topology is composed of the following:\r\n\r\n - Parameters: list of user defined parameters that can be references + * across the topology nodes.\r\n - Sources: list of one or more data sources nodes such as an RTSP source which allows + * for media to be ingested from cameras.\r\n - Processors: list of nodes which perform data analysis or + * transformations.\r\n -Sinks: list of one or more data sinks which allow for data to be stored or exported to other + * destinations. + */ +@JsonFlatten +@Fluent +public class PipelineTopologyInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PipelineTopologyInner.class); + + /* + * The system metadata relating to this resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * Topology kind. + */ + @JsonProperty(value = "kind", required = true) + private Kind kind; + + /* + * The SKU details. + */ + @JsonProperty(value = "sku", required = true) + private Sku sku; + + /* + * An optional description of the pipeline topology. It is recommended that + * the expected use of the topology to be described here. + */ + @JsonProperty(value = "properties.description") + private String description; + + /* + * List of the topology parameter declarations. Parameters declared here + * can be referenced throughout the topology nodes through the use of + * \"${PARAMETER_NAME}\" string pattern. Parameters can have optional + * default values and can later be defined in individual instances of the + * pipeline. + */ + @JsonProperty(value = "properties.parameters") + private List parameters; + + /* + * List of the topology source nodes. Source nodes enable external data to + * be ingested by the pipeline. + */ + @JsonProperty(value = "properties.sources") + private List sources; + + /* + * List of the topology processor nodes. Processor nodes enable pipeline + * data to be analyzed, processed or transformed. + */ + @JsonProperty(value = "properties.processors") + private List processors; + + /* + * List of the topology sink nodes. Sink nodes allow pipeline data to be + * stored or exported. + */ + @JsonProperty(value = "properties.sinks") + private List sinks; + + /** + * Get the systemData property: The system metadata relating to this resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the kind property: Topology kind. + * + * @return the kind value. + */ + public Kind kind() { + return this.kind; + } + + /** + * Set the kind property: Topology kind. + * + * @param kind the kind value to set. + * @return the PipelineTopologyInner object itself. + */ + public PipelineTopologyInner withKind(Kind kind) { + this.kind = kind; + return this; + } + + /** + * Get the sku property: The SKU details. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: The SKU details. + * + * @param sku the sku value to set. + * @return the PipelineTopologyInner object itself. + */ + public PipelineTopologyInner withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the description property: An optional description of the pipeline topology. It is recommended that the + * expected use of the topology to be described here. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: An optional description of the pipeline topology. It is recommended that the + * expected use of the topology to be described here. + * + * @param description the description value to set. + * @return the PipelineTopologyInner object itself. + */ + public PipelineTopologyInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the parameters property: List of the topology parameter declarations. Parameters declared here can be + * referenced throughout the topology nodes through the use of \"${PARAMETER_NAME}\" string pattern. Parameters can + * have optional default values and can later be defined in individual instances of the pipeline. + * + * @return the parameters value. + */ + public List parameters() { + return this.parameters; + } + + /** + * Set the parameters property: List of the topology parameter declarations. Parameters declared here can be + * referenced throughout the topology nodes through the use of \"${PARAMETER_NAME}\" string pattern. Parameters can + * have optional default values and can later be defined in individual instances of the pipeline. + * + * @param parameters the parameters value to set. + * @return the PipelineTopologyInner object itself. + */ + public PipelineTopologyInner withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get the sources property: List of the topology source nodes. Source nodes enable external data to be ingested by + * the pipeline. + * + * @return the sources value. + */ + public List sources() { + return this.sources; + } + + /** + * Set the sources property: List of the topology source nodes. Source nodes enable external data to be ingested by + * the pipeline. + * + * @param sources the sources value to set. + * @return the PipelineTopologyInner object itself. + */ + public PipelineTopologyInner withSources(List sources) { + this.sources = sources; + return this; + } + + /** + * Get the processors property: List of the topology processor nodes. Processor nodes enable pipeline data to be + * analyzed, processed or transformed. + * + * @return the processors value. + */ + public List processors() { + return this.processors; + } + + /** + * Set the processors property: List of the topology processor nodes. Processor nodes enable pipeline data to be + * analyzed, processed or transformed. + * + * @param processors the processors value to set. + * @return the PipelineTopologyInner object itself. + */ + public PipelineTopologyInner withProcessors(List processors) { + this.processors = processors; + return this; + } + + /** + * Get the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. + * + * @return the sinks value. + */ + public List sinks() { + return this.sinks; + } + + /** + * Set the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. + * + * @param sinks the sinks value to set. + * @return the PipelineTopologyInner object itself. + */ + public PipelineTopologyInner withSinks(List sinks) { + this.sinks = sinks; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kind() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property kind in model PipelineTopologyInner")); + } + if (sku() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property sku in model PipelineTopologyInner")); + } else { + sku().validate(); + } + if (parameters() != null) { + parameters().forEach(e -> e.validate()); + } + if (sources() != null) { + sources().forEach(e -> e.validate()); + } + if (processors() != null) { + processors().forEach(e -> e.validate()); + } + if (sinks() != null) { + sinks().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionInner.java new file mode 100644 index 0000000000000..a55d15c793e7b --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionInner.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpoint; +import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Private Endpoint Connection resource. */ +@JsonFlatten +@Fluent +public class PrivateEndpointConnectionInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); + + /* + * The resource of private end point. + */ + @JsonProperty(value = "properties.privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /* + * A collection of information about the state of the connection between + * service consumer and provider. + */ + @JsonProperty(value = "properties.privateLinkServiceConnectionState") + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /* + * The provisioning state of the private endpoint connection resource. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointConnectionProvisioningState provisioningState; + + /** + * Get the privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: The resource of private end point. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() != null) { + privateLinkServiceConnectionState().validate(); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionListResultInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionListResultInner.java new file mode 100644 index 0000000000000..5d0c9ae4b56e7 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionListResultInner.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of private endpoint connection associated with the specified storage account. */ +@Fluent +public final class PrivateEndpointConnectionListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionListResultInner.class); + + /* + * Array of private endpoint connections + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: Array of private endpoint connections. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of private endpoint connections. + * + * @param value the value value to set. + * @return the PrivateEndpointConnectionListResultInner object itself. + */ + public PrivateEndpointConnectionListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceInner.java new file mode 100644 index 0000000000000..b677b6149fc91 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceInner.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A private link resource. */ +@JsonFlatten +@Fluent +public class PrivateLinkResourceInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class); + + /* + * The private link resource group id. + */ + @JsonProperty(value = "properties.groupId", access = JsonProperty.Access.WRITE_ONLY) + private String groupId; + + /* + * The private link resource required member names. + */ + @JsonProperty(value = "properties.requiredMembers", access = JsonProperty.Access.WRITE_ONLY) + private List requiredMembers; + + /* + * The private link resource Private link DNS zone name. + */ + @JsonProperty(value = "properties.requiredZoneNames") + private List requiredZoneNames; + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Get the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + + /** + * Set the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @param requiredZoneNames the requiredZoneNames value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) { + this.requiredZoneNames = requiredZoneNames; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceListResultInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceListResultInner.java new file mode 100644 index 0000000000000..40685bdb25109 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceListResultInner.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A list of private link resources. */ +@Fluent +public final class PrivateLinkResourceListResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceListResultInner.class); + + /* + * Array of private link resources + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: Array of private link resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of private link resources. + * + * @param value the value value to set. + * @return the PrivateLinkResourceListResultInner object itself. + */ + public PrivateLinkResourceListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerInner.java index 7c26bb5db0fd0..ce6375271c930 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerInner.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerInner.java @@ -11,6 +11,10 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.videoanalyzer.models.AccountEncryption; import com.azure.resourcemanager.videoanalyzer.models.Endpoint; +import com.azure.resourcemanager.videoanalyzer.models.IotHub; +import com.azure.resourcemanager.videoanalyzer.models.NetworkAccessControl; +import com.azure.resourcemanager.videoanalyzer.models.ProvisioningState; +import com.azure.resourcemanager.videoanalyzer.models.PublicNetworkAccess; import com.azure.resourcemanager.videoanalyzer.models.StorageAccount; import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerIdentity; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -18,7 +22,7 @@ import java.util.List; import java.util.Map; -/** A Video Analyzer account. */ +/** The VideoAnalyzer model. */ @JsonFlatten @Fluent public class VideoAnalyzerInner extends Resource { @@ -31,8 +35,7 @@ public class VideoAnalyzerInner extends Resource { private SystemData systemData; /* - * The set of managed identities associated with the Video Analyzer - * resource. + * The identities associated to the Video Analyzer resource. */ @JsonProperty(value = "identity") private VideoAnalyzerIdentity identity; @@ -44,7 +47,7 @@ public class VideoAnalyzerInner extends Resource { private List storageAccounts; /* - * The list of endpoints associated with this resource. + * The endpoints associated with this resource. */ @JsonProperty(value = "properties.endpoints", access = JsonProperty.Access.WRITE_ONLY) private List endpoints; @@ -55,6 +58,37 @@ public class VideoAnalyzerInner extends Resource { @JsonProperty(value = "properties.encryption") private AccountEncryption encryption; + /* + * The IoT Hubs for this resource. + */ + @JsonProperty(value = "properties.iotHubs") + private List iotHubs; + + /* + * Whether or not public network access is allowed for resources under the + * Video Analyzer account. + */ + @JsonProperty(value = "properties.publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + + /* + * Network access control for Video Analyzer. + */ + @JsonProperty(value = "properties.networkAccessControl") + private NetworkAccessControl networkAccessControl; + + /* + * Provisioning state of the Video Analyzer account. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Private Endpoint Connections created under Video Analyzer account. + */ + @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + /** * Get the systemData property: The system data of the Video Analyzer account. * @@ -65,7 +99,7 @@ public SystemData systemData() { } /** - * Get the identity property: The set of managed identities associated with the Video Analyzer resource. + * Get the identity property: The identities associated to the Video Analyzer resource. * * @return the identity value. */ @@ -74,7 +108,7 @@ public VideoAnalyzerIdentity identity() { } /** - * Set the identity property: The set of managed identities associated with the Video Analyzer resource. + * Set the identity property: The identities associated to the Video Analyzer resource. * * @param identity the identity value to set. * @return the VideoAnalyzerInner object itself. @@ -105,7 +139,7 @@ public VideoAnalyzerInner withStorageAccounts(List storageAccoun } /** - * Get the endpoints property: The list of endpoints associated with this resource. + * Get the endpoints property: The endpoints associated with this resource. * * @return the endpoints value. */ @@ -133,6 +167,86 @@ public VideoAnalyzerInner withEncryption(AccountEncryption encryption) { return this; } + /** + * Get the iotHubs property: The IoT Hubs for this resource. + * + * @return the iotHubs value. + */ + public List iotHubs() { + return this.iotHubs; + } + + /** + * Set the iotHubs property: The IoT Hubs for this resource. + * + * @param iotHubs the iotHubs value to set. + * @return the VideoAnalyzerInner object itself. + */ + public VideoAnalyzerInner withIotHubs(List iotHubs) { + this.iotHubs = iotHubs; + return this; + } + + /** + * Get the publicNetworkAccess property: Whether or not public network access is allowed for resources under the + * Video Analyzer account. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Whether or not public network access is allowed for resources under the + * Video Analyzer account. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the VideoAnalyzerInner object itself. + */ + public VideoAnalyzerInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the networkAccessControl property: Network access control for Video Analyzer. + * + * @return the networkAccessControl value. + */ + public NetworkAccessControl networkAccessControl() { + return this.networkAccessControl; + } + + /** + * Set the networkAccessControl property: Network access control for Video Analyzer. + * + * @param networkAccessControl the networkAccessControl value to set. + * @return the VideoAnalyzerInner object itself. + */ + public VideoAnalyzerInner withNetworkAccessControl(NetworkAccessControl networkAccessControl) { + this.networkAccessControl = networkAccessControl; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the Video Analyzer account. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the privateEndpointConnections property: Private Endpoint Connections created under Video Analyzer account. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + /** {@inheritDoc} */ @Override public VideoAnalyzerInner withLocation(String location) { @@ -165,5 +279,14 @@ public void validate() { if (encryption() != null) { encryption().validate(); } + if (iotHubs() != null) { + iotHubs().forEach(e -> e.validate()); + } + if (networkAccessControl() != null) { + networkAccessControl().validate(); + } + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } } } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerOperationStatusInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerOperationStatusInner.java new file mode 100644 index 0000000000000..3badbc6173876 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerOperationStatusInner.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The VideoAnalyzerOperationStatus model. */ +@Fluent +public final class VideoAnalyzerOperationStatusInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoAnalyzerOperationStatusInner.class); + + /* + * The name property. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The id property. + */ + @JsonProperty(value = "id") + private String id; + + /* + * The startTime property. + */ + @JsonProperty(value = "startTime") + private String startTime; + + /* + * The endTime property. + */ + @JsonProperty(value = "endTime") + private String endTime; + + /* + * The status property. + */ + @JsonProperty(value = "status", required = true) + private String status; + + /* + * The error detail. + */ + @JsonProperty(value = "error") + private ManagementError error; + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the VideoAnalyzerOperationStatusInner object itself. + */ + public VideoAnalyzerOperationStatusInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the id property: The id property. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The id property. + * + * @param id the id value to set. + * @return the VideoAnalyzerOperationStatusInner object itself. + */ + public VideoAnalyzerOperationStatusInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the startTime property: The startTime property. + * + * @return the startTime value. + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The startTime property. + * + * @param startTime the startTime value to set. + * @return the VideoAnalyzerOperationStatusInner object itself. + */ + public VideoAnalyzerOperationStatusInner withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: The endTime property. + * + * @return the endTime value. + */ + public String endTime() { + return this.endTime; + } + + /** + * Set the endTime property: The endTime property. + * + * @param endTime the endTime value to set. + * @return the VideoAnalyzerOperationStatusInner object itself. + */ + public VideoAnalyzerOperationStatusInner withEndTime(String endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the status property: The status property. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: The status property. + * + * @param status the status value to set. + * @return the VideoAnalyzerOperationStatusInner object itself. + */ + public VideoAnalyzerOperationStatusInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the error property: The error detail. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Set the error property: The error detail. + * + * @param error the error value to set. + * @return the VideoAnalyzerOperationStatusInner object itself. + */ + public VideoAnalyzerOperationStatusInner withError(ManagementError error) { + this.error = error; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property name in model VideoAnalyzerOperationStatusInner")); + } + if (status() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property status in model VideoAnalyzerOperationStatusInner")); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoStreamingTokenInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoContentTokenInner.java similarity index 62% rename from sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoStreamingTokenInner.java rename to sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoContentTokenInner.java index 65dccf47fd0d3..2fa78d10fb2d8 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoStreamingTokenInner.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoContentTokenInner.java @@ -10,32 +10,28 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** - * Video streaming token grants access to the video streaming URLs which can be used by an compatible HLS or DASH - * player. - */ +/** "Video content token grants access to the video content URLs.". */ @Immutable -public final class VideoStreamingTokenInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoStreamingTokenInner.class); +public final class VideoContentTokenInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoContentTokenInner.class); /* - * The streaming token expiration date in ISO8601 format (eg. + * The content token expiration date in ISO8601 format (eg. * 2021-01-01T00:00:00Z). */ @JsonProperty(value = "expirationDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime expirationDate; /* - * The streaming token value to be added to the video streaming URL as the - * value for a "token" query string parameter. The token is specific to a + * The content token value to be added to the video content URL as the + * value for the "token" query string parameter. The token is specific to a * single video. */ @JsonProperty(value = "token", access = JsonProperty.Access.WRITE_ONLY) private String token; /** - * Get the expirationDate property: The streaming token expiration date in ISO8601 format (eg. - * 2021-01-01T00:00:00Z). + * Get the expirationDate property: The content token expiration date in ISO8601 format (eg. 2021-01-01T00:00:00Z). * * @return the expirationDate value. */ @@ -44,8 +40,8 @@ public OffsetDateTime expirationDate() { } /** - * Get the token property: The streaming token value to be added to the video streaming URL as the value for a - * "token" query string parameter. The token is specific to a single video. + * Get the token property: The content token value to be added to the video content URL as the value for the "token" + * query string parameter. The token is specific to a single video. * * @return the token value. */ diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoEntityInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoEntityInner.java index f7b6ad736ba49..0ea773e698e69 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoEntityInner.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoEntityInner.java @@ -9,14 +9,15 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.models.VideoArchival; +import com.azure.resourcemanager.videoanalyzer.models.VideoContentUrls; import com.azure.resourcemanager.videoanalyzer.models.VideoFlags; import com.azure.resourcemanager.videoanalyzer.models.VideoMediaInfo; -import com.azure.resourcemanager.videoanalyzer.models.VideoStreaming; import com.azure.resourcemanager.videoanalyzer.models.VideoType; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -/** The representation of a single video in a Video Analyzer account. */ +/** The VideoEntity model. */ @JsonFlatten @Fluent public class VideoEntityInner extends ProxyResource { @@ -43,10 +44,10 @@ public class VideoEntityInner extends ProxyResource { private String description; /* - * Type of the video archive. Different archive formats provide different - * capabilities. + * Video content type. Different content types are suitable for different + * applications and scenarios. */ - @JsonProperty(value = "properties.type", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.type") private VideoType typePropertiesType; /* @@ -57,10 +58,10 @@ public class VideoEntityInner extends ProxyResource { private VideoFlags flags; /* - * Video streaming holds information about video streaming URLs. + * Set of URLs to the video content. */ - @JsonProperty(value = "properties.streaming", access = JsonProperty.Access.WRITE_ONLY) - private VideoStreaming streaming; + @JsonProperty(value = "properties.contentUrls", access = JsonProperty.Access.WRITE_ONLY) + private VideoContentUrls contentUrls; /* * Contains information about the video and audio content. @@ -68,6 +69,12 @@ public class VideoEntityInner extends ProxyResource { @JsonProperty(value = "properties.mediaInfo", access = JsonProperty.Access.WRITE_ONLY) private VideoMediaInfo mediaInfo; + /* + * Video archival properties. + */ + @JsonProperty(value = "properties.archival") + private VideoArchival archival; + /** * Get the systemData property: The system metadata relating to this resource. * @@ -120,8 +127,8 @@ public VideoEntityInner withDescription(String description) { } /** - * Get the typePropertiesType property: Type of the video archive. Different archive formats provide different - * capabilities. + * Get the typePropertiesType property: Video content type. Different content types are suitable for different + * applications and scenarios. * * @return the typePropertiesType value. */ @@ -129,6 +136,18 @@ public VideoType typePropertiesType() { return this.typePropertiesType; } + /** + * Set the typePropertiesType property: Video content type. Different content types are suitable for different + * applications and scenarios. + * + * @param typePropertiesType the typePropertiesType value to set. + * @return the VideoEntityInner object itself. + */ + public VideoEntityInner withTypePropertiesType(VideoType typePropertiesType) { + this.typePropertiesType = typePropertiesType; + return this; + } + /** * Get the flags property: Video flags contain information about the available video actions and its dynamic * properties based on the current video state. @@ -140,12 +159,12 @@ public VideoFlags flags() { } /** - * Get the streaming property: Video streaming holds information about video streaming URLs. + * Get the contentUrls property: Set of URLs to the video content. * - * @return the streaming value. + * @return the contentUrls value. */ - public VideoStreaming streaming() { - return this.streaming; + public VideoContentUrls contentUrls() { + return this.contentUrls; } /** @@ -157,6 +176,26 @@ public VideoMediaInfo mediaInfo() { return this.mediaInfo; } + /** + * Get the archival property: Video archival properties. + * + * @return the archival value. + */ + public VideoArchival archival() { + return this.archival; + } + + /** + * Set the archival property: Video archival properties. + * + * @param archival the archival value to set. + * @return the VideoEntityInner object itself. + */ + public VideoEntityInner withArchival(VideoArchival archival) { + this.archival = archival; + return this; + } + /** * Validates the instance. * @@ -166,11 +205,14 @@ public void validate() { if (flags() != null) { flags().validate(); } - if (streaming() != null) { - streaming().validate(); + if (contentUrls() != null) { + contentUrls().validate(); } if (mediaInfo() != null) { mediaInfo().validate(); } + if (archival() != null) { + archival().validate(); + } } } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPoliciesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPoliciesClientImpl.java index 5e2e4a13ff088..5582a68a1a50c 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPoliciesClientImpl.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPoliciesClientImpl.java @@ -157,7 +157,7 @@ Mono> listNext( } /** - * List all existing access policy resources for the specified account. + * List all existing access policy resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -217,7 +217,7 @@ private Mono> listSinglePageAsync( } /** - * List all existing access policy resources for the specified account. + * List all existing access policy resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -275,7 +275,7 @@ private Mono> listSinglePageAsync( } /** - * List all existing access policy resources for the specified account. + * List all existing access policy resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -294,7 +294,7 @@ private PagedFlux listAsync(String resourceGroupName, S } /** - * List all existing access policy resources for the specified account. + * List all existing access policy resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -312,7 +312,7 @@ private PagedFlux listAsync(String resourceGroupName, S } /** - * List all existing access policy resources for the specified account. + * List all existing access policy resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -333,7 +333,7 @@ private PagedFlux listAsync( } /** - * List all existing access policy resources for the specified account. + * List all existing access policy resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -349,7 +349,7 @@ public PagedIterable list(String resourceGroupName, Str } /** - * List all existing access policy resources for the specified account. + * List all existing access policy resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -368,15 +368,15 @@ public PagedIterable list( } /** - * Retrieves an existing access policy resource from an account by name. + * Retrieves an existing access policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to retrieve. + * @param accessPolicyName The Access Policy name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -422,16 +422,16 @@ private Mono> getWithResponseAsync( } /** - * Retrieves an existing access policy resource from an account by name. + * Retrieves an existing access policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to retrieve. + * @param accessPolicyName The Access Policy name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -474,15 +474,15 @@ private Mono> getWithResponseAsync( } /** - * Retrieves an existing access policy resource from an account by name. + * Retrieves an existing access policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to retrieve. + * @param accessPolicyName The Access Policy name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -499,15 +499,15 @@ private Mono getAsync( } /** - * Retrieves an existing access policy resource from an account by name. + * Retrieves an existing access policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to retrieve. + * @param accessPolicyName The Access Policy name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessPolicyEntityInner get(String resourceGroupName, String accountName, String accessPolicyName) { @@ -515,16 +515,16 @@ public AccessPolicyEntityInner get(String resourceGroupName, String accountName, } /** - * Retrieves an existing access policy resource from an account by name. + * Retrieves an existing access policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to retrieve. + * @param accessPolicyName The Access Policy name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -537,12 +537,12 @@ public Response getWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to create or update. + * @param accessPolicyName The Access Policy name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -598,13 +598,13 @@ private Mono> createOrUpdateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to create or update. + * @param accessPolicyName The Access Policy name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -661,12 +661,12 @@ private Mono> createOrUpdateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to create or update. + * @param accessPolicyName The Access Policy name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -687,12 +687,12 @@ private Mono createOrUpdateAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to create or update. + * @param accessPolicyName The Access Policy name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessPolicyEntityInner createOrUpdate( @@ -705,13 +705,13 @@ public AccessPolicyEntityInner createOrUpdate( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to create or update. + * @param accessPolicyName The Access Policy name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -729,7 +729,7 @@ public Response createOrUpdateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to delete. + * @param accessPolicyName The Access Policy name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -783,7 +783,7 @@ private Mono> deleteWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to delete. + * @param accessPolicyName The Access Policy name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -835,7 +835,7 @@ private Mono> deleteWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to delete. + * @param accessPolicyName The Access Policy name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -852,7 +852,7 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to delete. + * @param accessPolicyName The Access Policy name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -867,7 +867,7 @@ public void delete(String resourceGroupName, String accountName, String accessPo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to delete. + * @param accessPolicyName The Access Policy name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -885,12 +885,12 @@ public Response deleteWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to update. + * @param accessPolicyName The Access Policy name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -946,13 +946,13 @@ private Mono> updateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to update. + * @param accessPolicyName The Access Policy name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1009,12 +1009,12 @@ private Mono> updateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to update. + * @param accessPolicyName The Access Policy name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1035,12 +1035,12 @@ private Mono updateAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to update. + * @param accessPolicyName The Access Policy name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AccessPolicyEntityInner update( @@ -1053,13 +1053,13 @@ public AccessPolicyEntityInner update( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to update. + * @param accessPolicyName The Access Policy name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModulesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModulesClientImpl.java index 365236138976e..f3876d31c01cc 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModulesClientImpl.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModulesClientImpl.java @@ -77,9 +77,7 @@ Mono> list( @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, - @QueryParam("$orderby") String orderby, @HeaderParam("Accept") String accept, Context context); @@ -161,14 +159,12 @@ Mono> listNext( } /** - * List all of the existing edge module resources for a given Video Analyzer account. + * List all existing edge module resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. * @param top 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. - * @param orderby Specifies the key by which the result collection should be ordered. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -176,7 +172,7 @@ Mono> listNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String accountName, String filter, Integer top, String orderby) { + String resourceGroupName, String accountName, Integer top) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -207,9 +203,7 @@ private Mono> listSinglePageAsync( resourceGroupName, accountName, this.client.getApiVersion(), - filter, top, - orderby, accept, context)) .>map( @@ -225,14 +219,12 @@ private Mono> listSinglePageAsync( } /** - * List all of the existing edge module resources for a given Video Analyzer account. + * List all existing edge module resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. * @param top 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. - * @param orderby Specifies the key by which the result collection should be ordered. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -241,7 +233,7 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( - String resourceGroupName, String accountName, String filter, Integer top, String orderby, Context context) { + String resourceGroupName, String accountName, Integer top, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -270,9 +262,7 @@ private Mono> listSinglePageAsync( resourceGroupName, accountName, this.client.getApiVersion(), - filter, top, - orderby, accept, context) .map( @@ -287,29 +277,26 @@ private Mono> listSinglePageAsync( } /** - * List all of the existing edge module resources for a given Video Analyzer account. + * List all existing edge module resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. * @param top 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. - * @param orderby Specifies the key by which the result collection should be ordered. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a collection of EdgeModuleEntity items. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String accountName, String filter, Integer top, String orderby) { + private PagedFlux listAsync(String resourceGroupName, String accountName, Integer top) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName, filter, top, orderby), + () -> listSinglePageAsync(resourceGroupName, accountName, top), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List all of the existing edge module resources for a given Video Analyzer account. + * List all existing edge module resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -320,23 +307,19 @@ private PagedFlux listAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName) { - final String filter = null; final Integer top = null; - final String orderby = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName, filter, top, orderby), + () -> listSinglePageAsync(resourceGroupName, accountName, top), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List all of the existing edge module resources for a given Video Analyzer account. + * List all existing edge module resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. * @param top 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. - * @param orderby Specifies the key by which the result collection should be ordered. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -345,14 +328,14 @@ private PagedFlux listAsync(String resourceGroupName, Str */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( - String resourceGroupName, String accountName, String filter, Integer top, String orderby, Context context) { + String resourceGroupName, String accountName, Integer top, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName, filter, top, orderby, context), + () -> listSinglePageAsync(resourceGroupName, accountName, top, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List all of the existing edge module resources for a given Video Analyzer account. + * List all existing edge module resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -363,21 +346,17 @@ private PagedFlux listAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName) { - final String filter = null; final Integer top = null; - final String orderby = null; - return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, top, orderby)); + return new PagedIterable<>(listAsync(resourceGroupName, accountName, top)); } /** - * List all of the existing edge module resources for a given Video Analyzer account. + * List all existing edge module resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. * @param top 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. - * @param orderby Specifies the key by which the result collection should be ordered. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -386,16 +365,16 @@ public PagedIterable list(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( - String resourceGroupName, String accountName, String filter, Integer top, String orderby, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, top, orderby, context)); + String resourceGroupName, String accountName, Integer top, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, accountName, top, context)); } /** - * Retrieves a specific existing edge module resource in the given Video Analyzer account. + * Retrieves an existing edge module resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to retrieve. + * @param edgeModuleName The Edge Module name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -444,11 +423,11 @@ private Mono> getWithResponseAsync( } /** - * Retrieves a specific existing edge module resource in the given Video Analyzer account. + * Retrieves an existing edge module resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to retrieve. + * @param edgeModuleName The Edge Module name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -495,11 +474,11 @@ private Mono> getWithResponseAsync( } /** - * Retrieves a specific existing edge module resource in the given Video Analyzer account. + * Retrieves an existing edge module resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to retrieve. + * @param edgeModuleName The Edge Module name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -519,11 +498,11 @@ private Mono getAsync(String resourceGroupName, String ac } /** - * Retrieves a specific existing edge module resource in the given Video Analyzer account. + * Retrieves an existing edge module resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to retrieve. + * @param edgeModuleName The Edge Module name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -535,11 +514,11 @@ public EdgeModuleEntityInner get(String resourceGroupName, String accountName, S } /** - * Retrieves a specific existing edge module resource in the given Video Analyzer account. + * Retrieves an existing edge module resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to retrieve. + * @param edgeModuleName The Edge Module name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -562,7 +541,7 @@ public Response getWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to create or update. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -627,7 +606,7 @@ private Mono> createOrUpdateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to create or update. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -694,7 +673,7 @@ private Mono> createOrUpdateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to create or update. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -725,7 +704,7 @@ private Mono createOrUpdateAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to create or update. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -748,7 +727,7 @@ public EdgeModuleEntityInner createOrUpdate( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to create or update. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -774,7 +753,7 @@ public Response createOrUpdateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to be deleted. + * @param edgeModuleName The Edge Module name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -829,7 +808,7 @@ private Mono> deleteWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to be deleted. + * @param edgeModuleName The Edge Module name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -882,7 +861,7 @@ private Mono> deleteWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to be deleted. + * @param edgeModuleName The Edge Module name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -901,7 +880,7 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to be deleted. + * @param edgeModuleName The Edge Module name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -918,7 +897,7 @@ public void delete(String resourceGroupName, String accountName, String edgeModu * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to be deleted. + * @param edgeModuleName The Edge Module name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -941,7 +920,7 @@ public Response deleteWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module used to create a new provisioning token. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1006,7 +985,7 @@ private Mono> listProvisioningTokenWi * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module used to create a new provisioning token. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1073,7 +1052,7 @@ private Mono> listProvisioningTokenWi * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module used to create a new provisioning token. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1104,7 +1083,7 @@ private Mono listProvisioningTokenAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module used to create a new provisioning token. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1127,7 +1106,7 @@ public EdgeModuleProvisioningTokenInner listProvisioningToken( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module used to create a new provisioning token. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModulesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModulesImpl.java index 6996efd199ee3..36f3c273d9999 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModulesImpl.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModulesImpl.java @@ -37,9 +37,9 @@ public PagedIterable list(String resourceGroupName, String acc } public PagedIterable list( - String resourceGroupName, String accountName, String filter, Integer top, String orderby, Context context) { + String resourceGroupName, String accountName, Integer top, Context context) { PagedIterable inner = - this.serviceClient().list(resourceGroupName, accountName, filter, top, orderby, context); + this.serviceClient().list(resourceGroupName, accountName, top, context); return Utils.mapPage(inner, inner1 -> new EdgeModuleEntityImpl(inner1, this.manager())); } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineImpl.java new file mode 100644 index 0000000000000..e6afe5a3b1ebc --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineImpl.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineInner; +import com.azure.resourcemanager.videoanalyzer.models.LivePipeline; +import com.azure.resourcemanager.videoanalyzer.models.LivePipelineState; +import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; +import java.util.Collections; +import java.util.List; + +public final class LivePipelineImpl implements LivePipeline, LivePipeline.Definition, LivePipeline.Update { + private LivePipelineInner innerObject; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String topologyName() { + return this.innerModel().topologyName(); + } + + public String description() { + return this.innerModel().description(); + } + + public Integer bitrateKbps() { + return this.innerModel().bitrateKbps(); + } + + public LivePipelineState state() { + return this.innerModel().state(); + } + + public List parameters() { + List inner = this.innerModel().parameters(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public LivePipelineInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String livePipelineName; + + public LivePipelineImpl withExistingVideoAnalyzer(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + public LivePipeline create() { + this.innerObject = + serviceManager + .serviceClient() + .getLivePipelines() + .createOrUpdateWithResponse( + resourceGroupName, accountName, livePipelineName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public LivePipeline create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getLivePipelines() + .createOrUpdateWithResponse( + resourceGroupName, accountName, livePipelineName, this.innerModel(), context) + .getValue(); + return this; + } + + LivePipelineImpl(String name, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerObject = new LivePipelineInner(); + this.serviceManager = serviceManager; + this.livePipelineName = name; + } + + public LivePipelineImpl update() { + return this; + } + + public LivePipeline apply() { + this.innerObject = + serviceManager + .serviceClient() + .getLivePipelines() + .updateWithResponse(resourceGroupName, accountName, livePipelineName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public LivePipeline apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getLivePipelines() + .updateWithResponse(resourceGroupName, accountName, livePipelineName, this.innerModel(), context) + .getValue(); + return this; + } + + LivePipelineImpl( + LivePipelineInner innerObject, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = Utils.getValueFromIdByName(innerObject.id(), "videoAnalyzers"); + this.livePipelineName = Utils.getValueFromIdByName(innerObject.id(), "livePipelines"); + } + + public LivePipeline refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getLivePipelines() + .getWithResponse(resourceGroupName, accountName, livePipelineName, Context.NONE) + .getValue(); + return this; + } + + public LivePipeline refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getLivePipelines() + .getWithResponse(resourceGroupName, accountName, livePipelineName, context) + .getValue(); + return this; + } + + public void activate() { + serviceManager.livePipelines().activate(resourceGroupName, accountName, livePipelineName); + } + + public void activate(Context context) { + serviceManager.livePipelines().activate(resourceGroupName, accountName, livePipelineName, context); + } + + public void deactivate() { + serviceManager.livePipelines().deactivate(resourceGroupName, accountName, livePipelineName); + } + + public void deactivate(Context context) { + serviceManager.livePipelines().deactivate(resourceGroupName, accountName, livePipelineName, context); + } + + public LivePipelineImpl withTopologyName(String topologyName) { + this.innerModel().withTopologyName(topologyName); + return this; + } + + public LivePipelineImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public LivePipelineImpl withBitrateKbps(Integer bitrateKbps) { + this.innerModel().withBitrateKbps(bitrateKbps); + return this; + } + + public LivePipelineImpl withParameters(List parameters) { + this.innerModel().withParameters(parameters); + return this; + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusImpl.java new file mode 100644 index 0000000000000..090be21afb2d8 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusImpl.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineOperationStatusInner; +import com.azure.resourcemanager.videoanalyzer.models.LivePipelineOperationStatus; + +public final class LivePipelineOperationStatusImpl implements LivePipelineOperationStatus { + private LivePipelineOperationStatusInner innerObject; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + LivePipelineOperationStatusImpl( + LivePipelineOperationStatusInner innerObject, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public LivePipelineOperationStatusInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusesClientImpl.java new file mode 100644 index 0000000000000..64e18e558b3ee --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusesClientImpl.java @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.LivePipelineOperationStatusesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineOperationStatusInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in LivePipelineOperationStatusesClient. */ +public final class LivePipelineOperationStatusesClientImpl implements LivePipelineOperationStatusesClient { + private final ClientLogger logger = new ClientLogger(LivePipelineOperationStatusesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final LivePipelineOperationStatusesService service; + + /** The service client containing this operation class. */ + private final VideoAnalyzerManagementClientImpl client; + + /** + * Initializes an instance of LivePipelineOperationStatusesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LivePipelineOperationStatusesClientImpl(VideoAnalyzerManagementClientImpl client) { + this.service = + RestProxy + .create( + LivePipelineOperationStatusesService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for VideoAnalyzerManagementClientLivePipelineOperationStatuses to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "VideoAnalyzerManagem") + private interface LivePipelineOperationStatusesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/operationStatuses/{operationId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("livePipelineName") String livePipelineName, + @PathParam("operationId") String operationId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get the operation status of a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param operationId The operation ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a live pipeline. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String livePipelineName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (livePipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + livePipelineName, + operationId, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the operation status of a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param operationId The operation ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a live pipeline. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String livePipelineName, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (livePipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + livePipelineName, + operationId, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get the operation status of a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param operationId The operation ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a live pipeline. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String accountName, String livePipelineName, String operationId) { + return getWithResponseAsync(resourceGroupName, accountName, livePipelineName, operationId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get the operation status of a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param operationId The operation ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a live pipeline. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LivePipelineOperationStatusInner get( + String resourceGroupName, String accountName, String livePipelineName, String operationId) { + return getAsync(resourceGroupName, accountName, livePipelineName, operationId).block(); + } + + /** + * Get the operation status of a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param operationId The operation ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a live pipeline. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String accountName, String livePipelineName, String operationId, Context context) { + return getWithResponseAsync(resourceGroupName, accountName, livePipelineName, operationId, context).block(); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusesImpl.java new file mode 100644 index 0000000000000..5271d88f755f5 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineOperationStatusesImpl.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.LivePipelineOperationStatusesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineOperationStatusInner; +import com.azure.resourcemanager.videoanalyzer.models.LivePipelineOperationStatus; +import com.azure.resourcemanager.videoanalyzer.models.LivePipelineOperationStatuses; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class LivePipelineOperationStatusesImpl implements LivePipelineOperationStatuses { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LivePipelineOperationStatusesImpl.class); + + private final LivePipelineOperationStatusesClient innerClient; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + public LivePipelineOperationStatusesImpl( + LivePipelineOperationStatusesClient innerClient, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public LivePipelineOperationStatus get( + String resourceGroupName, String accountName, String livePipelineName, String operationId) { + LivePipelineOperationStatusInner inner = + this.serviceClient().get(resourceGroupName, accountName, livePipelineName, operationId); + if (inner != null) { + return new LivePipelineOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String accountName, String livePipelineName, String operationId, Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, accountName, livePipelineName, operationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new LivePipelineOperationStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private LivePipelineOperationStatusesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelinesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelinesClientImpl.java new file mode 100644 index 0000000000000..33e16e356a362 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelinesClientImpl.java @@ -0,0 +1,1720 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.videoanalyzer.fluent.LivePipelinesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineInner; +import com.azure.resourcemanager.videoanalyzer.models.LivePipelineCollection; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in LivePipelinesClient. */ +public final class LivePipelinesClientImpl implements LivePipelinesClient { + private final ClientLogger logger = new ClientLogger(LivePipelinesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final LivePipelinesService service; + + /** The service client containing this operation class. */ + private final VideoAnalyzerManagementClientImpl client; + + /** + * Initializes an instance of LivePipelinesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LivePipelinesClientImpl(VideoAnalyzerManagementClientImpl client) { + this.service = + RestProxy.create(LivePipelinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for VideoAnalyzerManagementClientLivePipelines to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "VideoAnalyzerManagem") + private interface LivePipelinesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/livePipelines") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("livePipelineName") String livePipelineName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("livePipelineName") String livePipelineName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LivePipelineInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("livePipelineName") String livePipelineName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("livePipelineName") String livePipelineName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LivePipelineInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/activate") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> activate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("livePipelineName") String livePipelineName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/deactivate") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deactivate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("livePipelineName") String livePipelineName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Retrieves a list of live pipeline that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of LivePipeline items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String accountName, String filter, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + this.client.getApiVersion(), + filter, + top, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves a list of live pipeline that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of LivePipeline items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String accountName, String filter, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + this.client.getApiVersion(), + filter, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Retrieves a list of live pipeline that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of LivePipeline items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String accountName, String filter, Integer top) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, accountName, filter, top), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Retrieves a list of live pipeline that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of LivePipeline items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String accountName) { + final String filter = null; + final Integer top = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, accountName, filter, top), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Retrieves a list of live pipeline that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of LivePipeline items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String accountName, String filter, Integer top, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, accountName, filter, top, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Retrieves a list of live pipeline that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of LivePipeline items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String accountName) { + final String filter = null; + final Integer top = null; + return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, top)); + } + + /** + * Retrieves a list of live pipeline that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of LivePipeline items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String accountName, String filter, Integer top, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, top, context)); + } + + /** + * Retrieves a Live Pipeline by name. If a live pipeline with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String livePipelineName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (livePipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + livePipelineName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves a Live Pipeline by name. If a live pipeline with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String livePipelineName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (livePipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + livePipelineName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Retrieves a Live Pipeline by name. If a live pipeline with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, String livePipelineName) { + return getWithResponseAsync(resourceGroupName, accountName, livePipelineName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Retrieves a Live Pipeline by name. If a live pipeline with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LivePipelineInner get(String resourceGroupName, String accountName, String livePipelineName) { + return getAsync(resourceGroupName, accountName, livePipelineName).block(); + } + + /** + * Retrieves a Live Pipeline by name. If a live pipeline with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String accountName, String livePipelineName, Context context) { + return getWithResponseAsync(resourceGroupName, accountName, livePipelineName, context).block(); + } + + /** + * Creates a new live pipeline or updates an existing one, with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String accountName, String livePipelineName, LivePipelineInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (livePipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + livePipelineName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a new live pipeline or updates an existing one, with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String accountName, + String livePipelineName, + LivePipelineInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (livePipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + livePipelineName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Creates a new live pipeline or updates an existing one, with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String accountName, String livePipelineName, LivePipelineInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, accountName, livePipelineName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates a new live pipeline or updates an existing one, with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LivePipelineInner createOrUpdate( + String resourceGroupName, String accountName, String livePipelineName, LivePipelineInner parameters) { + return createOrUpdateAsync(resourceGroupName, accountName, livePipelineName, parameters).block(); + } + + /** + * Creates a new live pipeline or updates an existing one, with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String accountName, + String livePipelineName, + LivePipelineInner parameters, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, accountName, livePipelineName, parameters, context) + .block(); + } + + /** + * Deletes a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String accountName, String livePipelineName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (livePipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + livePipelineName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String accountName, String livePipelineName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (livePipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + livePipelineName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Deletes a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String accountName, String livePipelineName) { + return deleteWithResponseAsync(resourceGroupName, accountName, livePipelineName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String livePipelineName) { + deleteAsync(resourceGroupName, accountName, livePipelineName).block(); + } + + /** + * Deletes a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String accountName, String livePipelineName, Context context) { + return deleteWithResponseAsync(resourceGroupName, accountName, livePipelineName, context).block(); + } + + /** + * Updates the live pipeline entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String accountName, String livePipelineName, LivePipelineInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (livePipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + livePipelineName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the live pipeline entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String accountName, + String livePipelineName, + LivePipelineInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (livePipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + livePipelineName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Updates the live pipeline entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String accountName, String livePipelineName, LivePipelineInner parameters) { + return updateWithResponseAsync(resourceGroupName, accountName, livePipelineName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Updates the live pipeline entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LivePipelineInner update( + String resourceGroupName, String accountName, String livePipelineName, LivePipelineInner parameters) { + return updateAsync(resourceGroupName, accountName, livePipelineName, parameters).block(); + } + + /** + * Updates the live pipeline entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, + String accountName, + String livePipelineName, + LivePipelineInner parameters, + Context context) { + return updateWithResponseAsync(resourceGroupName, accountName, livePipelineName, parameters, context).block(); + } + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> activateWithResponseAsync( + String resourceGroupName, String accountName, String livePipelineName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (livePipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .activate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + livePipelineName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> activateWithResponseAsync( + String resourceGroupName, String accountName, String livePipelineName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (livePipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .activate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + livePipelineName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginActivateAsync( + String resourceGroupName, String accountName, String livePipelineName) { + Mono>> mono = + activateWithResponseAsync(resourceGroupName, accountName, livePipelineName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginActivateAsync( + String resourceGroupName, String accountName, String livePipelineName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + activateWithResponseAsync(resourceGroupName, accountName, livePipelineName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginActivate( + String resourceGroupName, String accountName, String livePipelineName) { + return beginActivateAsync(resourceGroupName, accountName, livePipelineName).getSyncPoller(); + } + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginActivate( + String resourceGroupName, String accountName, String livePipelineName, Context context) { + return beginActivateAsync(resourceGroupName, accountName, livePipelineName, context).getSyncPoller(); + } + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono activateAsync(String resourceGroupName, String accountName, String livePipelineName) { + return beginActivateAsync(resourceGroupName, accountName, livePipelineName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono activateAsync( + String resourceGroupName, String accountName, String livePipelineName, Context context) { + return beginActivateAsync(resourceGroupName, accountName, livePipelineName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void activate(String resourceGroupName, String accountName, String livePipelineName) { + activateAsync(resourceGroupName, accountName, livePipelineName).block(); + } + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void activate(String resourceGroupName, String accountName, String livePipelineName, Context context) { + activateAsync(resourceGroupName, accountName, livePipelineName, context).block(); + } + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deactivateWithResponseAsync( + String resourceGroupName, String accountName, String livePipelineName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (livePipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .deactivate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + livePipelineName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deactivateWithResponseAsync( + String resourceGroupName, String accountName, String livePipelineName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (livePipelineName == null) { + return Mono + .error(new IllegalArgumentException("Parameter livePipelineName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .deactivate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + livePipelineName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeactivateAsync( + String resourceGroupName, String accountName, String livePipelineName) { + Mono>> mono = + deactivateWithResponseAsync(resourceGroupName, accountName, livePipelineName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeactivateAsync( + String resourceGroupName, String accountName, String livePipelineName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deactivateWithResponseAsync(resourceGroupName, accountName, livePipelineName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDeactivate( + String resourceGroupName, String accountName, String livePipelineName) { + return beginDeactivateAsync(resourceGroupName, accountName, livePipelineName).getSyncPoller(); + } + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDeactivate( + String resourceGroupName, String accountName, String livePipelineName, Context context) { + return beginDeactivateAsync(resourceGroupName, accountName, livePipelineName, context).getSyncPoller(); + } + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deactivateAsync(String resourceGroupName, String accountName, String livePipelineName) { + return beginDeactivateAsync(resourceGroupName, accountName, livePipelineName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deactivateAsync( + String resourceGroupName, String accountName, String livePipelineName, Context context) { + return beginDeactivateAsync(resourceGroupName, accountName, livePipelineName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deactivate(String resourceGroupName, String accountName, String livePipelineName) { + deactivateAsync(resourceGroupName, accountName, livePipelineName).block(); + } + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deactivate(String resourceGroupName, String accountName, String livePipelineName, Context context) { + deactivateAsync(resourceGroupName, accountName, livePipelineName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of LivePipeline items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of LivePipeline items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelinesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelinesImpl.java new file mode 100644 index 0000000000000..85f3817d4e681 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelinesImpl.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.LivePipelinesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineInner; +import com.azure.resourcemanager.videoanalyzer.models.LivePipeline; +import com.azure.resourcemanager.videoanalyzer.models.LivePipelines; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class LivePipelinesImpl implements LivePipelines { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LivePipelinesImpl.class); + + private final LivePipelinesClient innerClient; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + public LivePipelinesImpl( + LivePipelinesClient innerClient, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String accountName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); + return Utils.mapPage(inner, inner1 -> new LivePipelineImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String accountName, String filter, Integer top, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, accountName, filter, top, context); + return Utils.mapPage(inner, inner1 -> new LivePipelineImpl(inner1, this.manager())); + } + + public LivePipeline get(String resourceGroupName, String accountName, String livePipelineName) { + LivePipelineInner inner = this.serviceClient().get(resourceGroupName, accountName, livePipelineName); + if (inner != null) { + return new LivePipelineImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String accountName, String livePipelineName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, accountName, livePipelineName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new LivePipelineImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String livePipelineName) { + this.serviceClient().delete(resourceGroupName, accountName, livePipelineName); + } + + public Response deleteWithResponse( + String resourceGroupName, String accountName, String livePipelineName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, livePipelineName, context); + } + + public void activate(String resourceGroupName, String accountName, String livePipelineName) { + this.serviceClient().activate(resourceGroupName, accountName, livePipelineName); + } + + public void activate(String resourceGroupName, String accountName, String livePipelineName, Context context) { + this.serviceClient().activate(resourceGroupName, accountName, livePipelineName, context); + } + + public void deactivate(String resourceGroupName, String accountName, String livePipelineName) { + this.serviceClient().deactivate(resourceGroupName, accountName, livePipelineName); + } + + public void deactivate(String resourceGroupName, String accountName, String livePipelineName, Context context) { + this.serviceClient().deactivate(resourceGroupName, accountName, livePipelineName, context); + } + + public LivePipeline getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String livePipelineName = Utils.getValueFromIdByName(id, "livePipelines"); + if (livePipelineName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'livePipelines'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, livePipelineName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String livePipelineName = Utils.getValueFromIdByName(id, "livePipelines"); + if (livePipelineName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'livePipelines'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, livePipelineName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String livePipelineName = Utils.getValueFromIdByName(id, "livePipelines"); + if (livePipelineName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'livePipelines'.", id))); + } + this.deleteWithResponse(resourceGroupName, accountName, livePipelineName, Context.NONE).getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String livePipelineName = Utils.getValueFromIdByName(id, "livePipelines"); + if (livePipelineName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'livePipelines'.", id))); + } + return this.deleteWithResponse(resourceGroupName, accountName, livePipelineName, context); + } + + private LivePipelinesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } + + public LivePipelineImpl define(String name) { + return new LivePipelineImpl(name, this.manager()); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobImpl.java new file mode 100644 index 0000000000000..7e4298b6dcf6e --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobImpl.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobInner; +import com.azure.resourcemanager.videoanalyzer.models.ParameterDefinition; +import com.azure.resourcemanager.videoanalyzer.models.PipelineJob; +import com.azure.resourcemanager.videoanalyzer.models.PipelineJobError; +import com.azure.resourcemanager.videoanalyzer.models.PipelineJobState; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class PipelineJobImpl implements PipelineJob, PipelineJob.Definition, PipelineJob.Update { + private PipelineJobInner innerObject; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String topologyName() { + return this.innerModel().topologyName(); + } + + public String description() { + return this.innerModel().description(); + } + + public PipelineJobState state() { + return this.innerModel().state(); + } + + public OffsetDateTime expiration() { + return this.innerModel().expiration(); + } + + public PipelineJobError error() { + return this.innerModel().error(); + } + + public List parameters() { + List inner = this.innerModel().parameters(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PipelineJobInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String pipelineJobName; + + public PipelineJobImpl withExistingVideoAnalyzer(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + public PipelineJob create() { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineJobs() + .createOrUpdateWithResponse( + resourceGroupName, accountName, pipelineJobName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public PipelineJob create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineJobs() + .createOrUpdateWithResponse(resourceGroupName, accountName, pipelineJobName, this.innerModel(), context) + .getValue(); + return this; + } + + PipelineJobImpl(String name, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerObject = new PipelineJobInner(); + this.serviceManager = serviceManager; + this.pipelineJobName = name; + } + + public PipelineJobImpl update() { + return this; + } + + public PipelineJob apply() { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineJobs() + .updateWithResponse(resourceGroupName, accountName, pipelineJobName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public PipelineJob apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineJobs() + .updateWithResponse(resourceGroupName, accountName, pipelineJobName, this.innerModel(), context) + .getValue(); + return this; + } + + PipelineJobImpl( + PipelineJobInner innerObject, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = Utils.getValueFromIdByName(innerObject.id(), "videoAnalyzers"); + this.pipelineJobName = Utils.getValueFromIdByName(innerObject.id(), "pipelineJobs"); + } + + public PipelineJob refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineJobs() + .getWithResponse(resourceGroupName, accountName, pipelineJobName, Context.NONE) + .getValue(); + return this; + } + + public PipelineJob refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineJobs() + .getWithResponse(resourceGroupName, accountName, pipelineJobName, context) + .getValue(); + return this; + } + + public void cancel() { + serviceManager.pipelineJobs().cancel(resourceGroupName, accountName, pipelineJobName); + } + + public void cancel(Context context) { + serviceManager.pipelineJobs().cancel(resourceGroupName, accountName, pipelineJobName, context); + } + + public PipelineJobImpl withTopologyName(String topologyName) { + this.innerModel().withTopologyName(topologyName); + return this; + } + + public PipelineJobImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public PipelineJobImpl withParameters(List parameters) { + this.innerModel().withParameters(parameters); + return this; + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusImpl.java new file mode 100644 index 0000000000000..e9ba0f65af9b3 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusImpl.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobOperationStatusInner; +import com.azure.resourcemanager.videoanalyzer.models.PipelineJobOperationStatus; + +public final class PipelineJobOperationStatusImpl implements PipelineJobOperationStatus { + private PipelineJobOperationStatusInner innerObject; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + PipelineJobOperationStatusImpl( + PipelineJobOperationStatusInner innerObject, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public PipelineJobOperationStatusInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusesClientImpl.java new file mode 100644 index 0000000000000..8c05ca028a050 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusesClientImpl.java @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.PipelineJobOperationStatusesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobOperationStatusInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in PipelineJobOperationStatusesClient. */ +public final class PipelineJobOperationStatusesClientImpl implements PipelineJobOperationStatusesClient { + private final ClientLogger logger = new ClientLogger(PipelineJobOperationStatusesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final PipelineJobOperationStatusesService service; + + /** The service client containing this operation class. */ + private final VideoAnalyzerManagementClientImpl client; + + /** + * Initializes an instance of PipelineJobOperationStatusesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PipelineJobOperationStatusesClientImpl(VideoAnalyzerManagementClientImpl client) { + this.service = + RestProxy + .create( + PipelineJobOperationStatusesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for VideoAnalyzerManagementClientPipelineJobOperationStatuses to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "VideoAnalyzerManagem") + private interface PipelineJobOperationStatusesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/operationStatuses/{operationId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("pipelineJobName") String pipelineJobName, + @PathParam("operationId") String operationId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get the operation status of a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param operationId The operation ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String pipelineJobName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineJobName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineJobName, + operationId, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the operation status of a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param operationId The operation ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String pipelineJobName, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineJobName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineJobName, + operationId, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get the operation status of a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param operationId The operation ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String accountName, String pipelineJobName, String operationId) { + return getWithResponseAsync(resourceGroupName, accountName, pipelineJobName, operationId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get the operation status of a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param operationId The operation ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PipelineJobOperationStatusInner get( + String resourceGroupName, String accountName, String pipelineJobName, String operationId) { + return getAsync(resourceGroupName, accountName, pipelineJobName, operationId).block(); + } + + /** + * Get the operation status of a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param operationId The operation ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String accountName, String pipelineJobName, String operationId, Context context) { + return getWithResponseAsync(resourceGroupName, accountName, pipelineJobName, operationId, context).block(); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusesImpl.java new file mode 100644 index 0000000000000..b7de3114116c7 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobOperationStatusesImpl.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.PipelineJobOperationStatusesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobOperationStatusInner; +import com.azure.resourcemanager.videoanalyzer.models.PipelineJobOperationStatus; +import com.azure.resourcemanager.videoanalyzer.models.PipelineJobOperationStatuses; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class PipelineJobOperationStatusesImpl implements PipelineJobOperationStatuses { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PipelineJobOperationStatusesImpl.class); + + private final PipelineJobOperationStatusesClient innerClient; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + public PipelineJobOperationStatusesImpl( + PipelineJobOperationStatusesClient innerClient, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PipelineJobOperationStatus get( + String resourceGroupName, String accountName, String pipelineJobName, String operationId) { + PipelineJobOperationStatusInner inner = + this.serviceClient().get(resourceGroupName, accountName, pipelineJobName, operationId); + if (inner != null) { + return new PipelineJobOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String accountName, String pipelineJobName, String operationId, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, accountName, pipelineJobName, operationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PipelineJobOperationStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private PipelineJobOperationStatusesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobsClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobsClientImpl.java new file mode 100644 index 0000000000000..bbbdc4bab1c2a --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobsClientImpl.java @@ -0,0 +1,1435 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.videoanalyzer.fluent.PipelineJobsClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobInner; +import com.azure.resourcemanager.videoanalyzer.models.PipelineJobCollection; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in PipelineJobsClient. */ +public final class PipelineJobsClientImpl implements PipelineJobsClient { + private final ClientLogger logger = new ClientLogger(PipelineJobsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final PipelineJobsService service; + + /** The service client containing this operation class. */ + private final VideoAnalyzerManagementClientImpl client; + + /** + * Initializes an instance of PipelineJobsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PipelineJobsClientImpl(VideoAnalyzerManagementClientImpl client) { + this.service = + RestProxy.create(PipelineJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for VideoAnalyzerManagementClientPipelineJobs to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "VideoAnalyzerManagem") + private interface PipelineJobsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/pipelineJobs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("pipelineJobName") String pipelineJobName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("pipelineJobName") String pipelineJobName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PipelineJobInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("pipelineJobName") String pipelineJobName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("pipelineJobName") String pipelineJobName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PipelineJobInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/cancel") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> cancel( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("pipelineJobName") String pipelineJobName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Retrieves a list of pipeline jobs that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineJob items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String accountName, String filter, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + this.client.getApiVersion(), + filter, + top, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves a list of pipeline jobs that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineJob items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String accountName, String filter, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + this.client.getApiVersion(), + filter, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Retrieves a list of pipeline jobs that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineJob items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String accountName, String filter, Integer top) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, accountName, filter, top), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Retrieves a list of pipeline jobs that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineJob items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String accountName) { + final String filter = null; + final Integer top = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, accountName, filter, top), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Retrieves a list of pipeline jobs that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineJob items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String accountName, String filter, Integer top, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, accountName, filter, top, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Retrieves a list of pipeline jobs that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineJob items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String accountName) { + final String filter = null; + final Integer top = null; + return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, top)); + } + + /** + * Retrieves a list of pipeline jobs that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineJob items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String accountName, String filter, Integer top, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, top, context)); + } + + /** + * Retrieves a pipeline job by name. If a pipeline job with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String pipelineJobName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineJobName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineJobName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves a pipeline job by name. If a pipeline job with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String pipelineJobName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineJobName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineJobName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Retrieves a pipeline job by name. If a pipeline job with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, String pipelineJobName) { + return getWithResponseAsync(resourceGroupName, accountName, pipelineJobName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Retrieves a pipeline job by name. If a pipeline job with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PipelineJobInner get(String resourceGroupName, String accountName, String pipelineJobName) { + return getAsync(resourceGroupName, accountName, pipelineJobName).block(); + } + + /** + * Retrieves a pipeline job by name. If a pipeline job with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String accountName, String pipelineJobName, Context context) { + return getWithResponseAsync(resourceGroupName, accountName, pipelineJobName, context).block(); + } + + /** + * Creates a new pipeline job or updates an existing one, with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String accountName, String pipelineJobName, PipelineJobInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineJobName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineJobName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a new pipeline job or updates an existing one, with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String accountName, + String pipelineJobName, + PipelineJobInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineJobName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineJobName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Creates a new pipeline job or updates an existing one, with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String accountName, String pipelineJobName, PipelineJobInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, accountName, pipelineJobName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates a new pipeline job or updates an existing one, with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PipelineJobInner createOrUpdate( + String resourceGroupName, String accountName, String pipelineJobName, PipelineJobInner parameters) { + return createOrUpdateAsync(resourceGroupName, accountName, pipelineJobName, parameters).block(); + } + + /** + * Creates a new pipeline job or updates an existing one, with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String accountName, + String pipelineJobName, + PipelineJobInner parameters, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, accountName, pipelineJobName, parameters, context) + .block(); + } + + /** + * Deletes a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String accountName, String pipelineJobName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineJobName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineJobName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String accountName, String pipelineJobName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineJobName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineJobName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Deletes a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String accountName, String pipelineJobName) { + return deleteWithResponseAsync(resourceGroupName, accountName, pipelineJobName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String pipelineJobName) { + deleteAsync(resourceGroupName, accountName, pipelineJobName).block(); + } + + /** + * Deletes a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String accountName, String pipelineJobName, Context context) { + return deleteWithResponseAsync(resourceGroupName, accountName, pipelineJobName, context).block(); + } + + /** + * Updates the pipeline job entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String accountName, String pipelineJobName, PipelineJobInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineJobName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineJobName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the pipeline job entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String accountName, + String pipelineJobName, + PipelineJobInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineJobName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineJobName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Updates the pipeline job entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String accountName, String pipelineJobName, PipelineJobInner parameters) { + return updateWithResponseAsync(resourceGroupName, accountName, pipelineJobName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Updates the pipeline job entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PipelineJobInner update( + String resourceGroupName, String accountName, String pipelineJobName, PipelineJobInner parameters) { + return updateAsync(resourceGroupName, accountName, pipelineJobName, parameters).block(); + } + + /** + * Updates the pipeline job entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, + String accountName, + String pipelineJobName, + PipelineJobInner parameters, + Context context) { + return updateWithResponseAsync(resourceGroupName, accountName, pipelineJobName, parameters, context).block(); + } + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> cancelWithResponseAsync( + String resourceGroupName, String accountName, String pipelineJobName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineJobName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .cancel( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineJobName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> cancelWithResponseAsync( + String resourceGroupName, String accountName, String pipelineJobName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineJobName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineJobName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .cancel( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineJobName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginCancelAsync( + String resourceGroupName, String accountName, String pipelineJobName) { + Mono>> mono = + cancelWithResponseAsync(resourceGroupName, accountName, pipelineJobName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginCancelAsync( + String resourceGroupName, String accountName, String pipelineJobName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + cancelWithResponseAsync(resourceGroupName, accountName, pipelineJobName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginCancel( + String resourceGroupName, String accountName, String pipelineJobName) { + return beginCancelAsync(resourceGroupName, accountName, pipelineJobName).getSyncPoller(); + } + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginCancel( + String resourceGroupName, String accountName, String pipelineJobName, Context context) { + return beginCancelAsync(resourceGroupName, accountName, pipelineJobName, context).getSyncPoller(); + } + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono cancelAsync(String resourceGroupName, String accountName, String pipelineJobName) { + return beginCancelAsync(resourceGroupName, accountName, pipelineJobName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono cancelAsync( + String resourceGroupName, String accountName, String pipelineJobName, Context context) { + return beginCancelAsync(resourceGroupName, accountName, pipelineJobName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void cancel(String resourceGroupName, String accountName, String pipelineJobName) { + cancelAsync(resourceGroupName, accountName, pipelineJobName).block(); + } + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void cancel(String resourceGroupName, String accountName, String pipelineJobName, Context context) { + cancelAsync(resourceGroupName, accountName, pipelineJobName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineJob items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineJob items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobsImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobsImpl.java new file mode 100644 index 0000000000000..bd5baf5d11eb0 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobsImpl.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.PipelineJobsClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobInner; +import com.azure.resourcemanager.videoanalyzer.models.PipelineJob; +import com.azure.resourcemanager.videoanalyzer.models.PipelineJobs; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class PipelineJobsImpl implements PipelineJobs { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PipelineJobsImpl.class); + + private final PipelineJobsClient innerClient; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + public PipelineJobsImpl( + PipelineJobsClient innerClient, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String accountName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); + return Utils.mapPage(inner, inner1 -> new PipelineJobImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String accountName, String filter, Integer top, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, accountName, filter, top, context); + return Utils.mapPage(inner, inner1 -> new PipelineJobImpl(inner1, this.manager())); + } + + public PipelineJob get(String resourceGroupName, String accountName, String pipelineJobName) { + PipelineJobInner inner = this.serviceClient().get(resourceGroupName, accountName, pipelineJobName); + if (inner != null) { + return new PipelineJobImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String accountName, String pipelineJobName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, accountName, pipelineJobName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PipelineJobImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String pipelineJobName) { + this.serviceClient().delete(resourceGroupName, accountName, pipelineJobName); + } + + public Response deleteWithResponse( + String resourceGroupName, String accountName, String pipelineJobName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, pipelineJobName, context); + } + + public void cancel(String resourceGroupName, String accountName, String pipelineJobName) { + this.serviceClient().cancel(resourceGroupName, accountName, pipelineJobName); + } + + public void cancel(String resourceGroupName, String accountName, String pipelineJobName, Context context) { + this.serviceClient().cancel(resourceGroupName, accountName, pipelineJobName, context); + } + + public PipelineJob getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String pipelineJobName = Utils.getValueFromIdByName(id, "pipelineJobs"); + if (pipelineJobName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'pipelineJobs'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, pipelineJobName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String pipelineJobName = Utils.getValueFromIdByName(id, "pipelineJobs"); + if (pipelineJobName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'pipelineJobs'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, pipelineJobName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String pipelineJobName = Utils.getValueFromIdByName(id, "pipelineJobs"); + if (pipelineJobName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'pipelineJobs'.", id))); + } + this.deleteWithResponse(resourceGroupName, accountName, pipelineJobName, Context.NONE).getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String pipelineJobName = Utils.getValueFromIdByName(id, "pipelineJobs"); + if (pipelineJobName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'pipelineJobs'.", id))); + } + return this.deleteWithResponse(resourceGroupName, accountName, pipelineJobName, context); + } + + private PipelineJobsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } + + public PipelineJobImpl define(String name) { + return new PipelineJobImpl(name, this.manager()); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologiesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologiesClientImpl.java new file mode 100644 index 0000000000000..82e53a09fa5dd --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologiesClientImpl.java @@ -0,0 +1,1187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.PipelineTopologiesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyInner; +import com.azure.resourcemanager.videoanalyzer.models.PipelineTopologyCollection; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in PipelineTopologiesClient. */ +public final class PipelineTopologiesClientImpl implements PipelineTopologiesClient { + private final ClientLogger logger = new ClientLogger(PipelineTopologiesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final PipelineTopologiesService service; + + /** The service client containing this operation class. */ + private final VideoAnalyzerManagementClientImpl client; + + /** + * Initializes an instance of PipelineTopologiesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PipelineTopologiesClientImpl(VideoAnalyzerManagementClientImpl client) { + this.service = + RestProxy.create(PipelineTopologiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for VideoAnalyzerManagementClientPipelineTopologies to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "VideoAnalyzerManagem") + private interface PipelineTopologiesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/pipelineTopologies") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, + @QueryParam("$top") Integer top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("pipelineTopologyName") String pipelineTopologyName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("pipelineTopologyName") String pipelineTopologyName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PipelineTopologyInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("pipelineTopologyName") String pipelineTopologyName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("pipelineTopologyName") String pipelineTopologyName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PipelineTopologyInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Retrieves a list of pipeline topologies that have been added. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineTopology items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String accountName, String filter, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + this.client.getApiVersion(), + filter, + top, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves a list of pipeline topologies that have been added. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineTopology items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String accountName, String filter, Integer top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + this.client.getApiVersion(), + filter, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Retrieves a list of pipeline topologies that have been added. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineTopology items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String accountName, String filter, Integer top) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, accountName, filter, top), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Retrieves a list of pipeline topologies that have been added. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineTopology items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String accountName) { + final String filter = null; + final Integer top = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, accountName, filter, top), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Retrieves a list of pipeline topologies that have been added. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineTopology items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String accountName, String filter, Integer top, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, accountName, filter, top, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Retrieves a list of pipeline topologies that have been added. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineTopology items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String accountName) { + final String filter = null; + final Integer top = null; + return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, top)); + } + + /** + * Retrieves a list of pipeline topologies that have been added. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineTopology items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String accountName, String filter, Integer top, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, accountName, filter, top, context)); + } + + /** + * Retrieves a pipeline topology by name. If a topology with that name has been previously created, the call will + * return the JSON representation of that topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String pipelineTopologyName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineTopologyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineTopologyName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves a pipeline topology by name. If a topology with that name has been previously created, the call will + * return the JSON representation of that topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String pipelineTopologyName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineTopologyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineTopologyName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Retrieves a pipeline topology by name. If a topology with that name has been previously created, the call will + * return the JSON representation of that topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String accountName, String pipelineTopologyName) { + return getWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Retrieves a pipeline topology by name. If a topology with that name has been previously created, the call will + * return the JSON representation of that topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PipelineTopologyInner get(String resourceGroupName, String accountName, String pipelineTopologyName) { + return getAsync(resourceGroupName, accountName, pipelineTopologyName).block(); + } + + /** + * Retrieves a pipeline topology by name. If a topology with that name has been previously created, the call will + * return the JSON representation of that topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String accountName, String pipelineTopologyName, Context context) { + return getWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName, context).block(); + } + + /** + * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology is a + * blueprint defining what nodes are in a pipeline, and how they are interconnected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String accountName, String pipelineTopologyName, PipelineTopologyInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineTopologyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineTopologyName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology is a + * blueprint defining what nodes are in a pipeline, and how they are interconnected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String accountName, + String pipelineTopologyName, + PipelineTopologyInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineTopologyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineTopologyName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology is a + * blueprint defining what nodes are in a pipeline, and how they are interconnected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String accountName, String pipelineTopologyName, PipelineTopologyInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology is a + * blueprint defining what nodes are in a pipeline, and how they are interconnected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PipelineTopologyInner createOrUpdate( + String resourceGroupName, String accountName, String pipelineTopologyName, PipelineTopologyInner parameters) { + return createOrUpdateAsync(resourceGroupName, accountName, pipelineTopologyName, parameters).block(); + } + + /** + * Creates a new pipeline topology or updates an existing one, with the given name. A pipeline topology is a + * blueprint defining what nodes are in a pipeline, and how they are interconnected. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String accountName, + String pipelineTopologyName, + PipelineTopologyInner parameters, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, accountName, pipelineTopologyName, parameters, context) + .block(); + } + + /** + * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology + * have been stopped and deleted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String accountName, String pipelineTopologyName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineTopologyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineTopologyName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology + * have been stopped and deleted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String accountName, String pipelineTopologyName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineTopologyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineTopologyName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology + * have been stopped and deleted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String accountName, String pipelineTopologyName) { + return deleteWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology + * have been stopped and deleted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String pipelineTopologyName) { + deleteAsync(resourceGroupName, accountName, pipelineTopologyName).block(); + } + + /** + * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology + * have been stopped and deleted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String accountName, String pipelineTopologyName, Context context) { + return deleteWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName, context).block(); + } + + /** + * Updates the pipeline topology entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String accountName, String pipelineTopologyName, PipelineTopologyInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineTopologyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineTopologyName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the pipeline topology entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String accountName, + String pipelineTopologyName, + PipelineTopologyInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (pipelineTopologyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter pipelineTopologyName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + pipelineTopologyName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Updates the pipeline topology entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String accountName, String pipelineTopologyName, PipelineTopologyInner parameters) { + return updateWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Updates the pipeline topology entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PipelineTopologyInner update( + String resourceGroupName, String accountName, String pipelineTopologyName, PipelineTopologyInner parameters) { + return updateAsync(resourceGroupName, accountName, pipelineTopologyName, parameters).block(); + } + + /** + * Updates the pipeline topology entity. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, + String accountName, + String pipelineTopologyName, + PipelineTopologyInner parameters, + Context context) { + return updateWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName, parameters, context) + .block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineTopology items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineTopology items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologiesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologiesImpl.java new file mode 100644 index 0000000000000..5eb0e0de43fca --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologiesImpl.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.PipelineTopologiesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyInner; +import com.azure.resourcemanager.videoanalyzer.models.PipelineTopologies; +import com.azure.resourcemanager.videoanalyzer.models.PipelineTopology; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class PipelineTopologiesImpl implements PipelineTopologies { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PipelineTopologiesImpl.class); + + private final PipelineTopologiesClient innerClient; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + public PipelineTopologiesImpl( + PipelineTopologiesClient innerClient, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String accountName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); + return Utils.mapPage(inner, inner1 -> new PipelineTopologyImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String accountName, String filter, Integer top, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, accountName, filter, top, context); + return Utils.mapPage(inner, inner1 -> new PipelineTopologyImpl(inner1, this.manager())); + } + + public PipelineTopology get(String resourceGroupName, String accountName, String pipelineTopologyName) { + PipelineTopologyInner inner = this.serviceClient().get(resourceGroupName, accountName, pipelineTopologyName); + if (inner != null) { + return new PipelineTopologyImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String accountName, String pipelineTopologyName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, accountName, pipelineTopologyName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PipelineTopologyImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String pipelineTopologyName) { + this.serviceClient().delete(resourceGroupName, accountName, pipelineTopologyName); + } + + public Response deleteWithResponse( + String resourceGroupName, String accountName, String pipelineTopologyName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, pipelineTopologyName, context); + } + + public PipelineTopology getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String pipelineTopologyName = Utils.getValueFromIdByName(id, "pipelineTopologies"); + if (pipelineTopologyName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'pipelineTopologies'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, pipelineTopologyName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String pipelineTopologyName = Utils.getValueFromIdByName(id, "pipelineTopologies"); + if (pipelineTopologyName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'pipelineTopologies'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, pipelineTopologyName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String pipelineTopologyName = Utils.getValueFromIdByName(id, "pipelineTopologies"); + if (pipelineTopologyName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'pipelineTopologies'.", id))); + } + this.deleteWithResponse(resourceGroupName, accountName, pipelineTopologyName, Context.NONE).getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String pipelineTopologyName = Utils.getValueFromIdByName(id, "pipelineTopologies"); + if (pipelineTopologyName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'pipelineTopologies'.", id))); + } + return this.deleteWithResponse(resourceGroupName, accountName, pipelineTopologyName, context); + } + + private PipelineTopologiesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } + + public PipelineTopologyImpl define(String name) { + return new PipelineTopologyImpl(name, this.manager()); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologyImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologyImpl.java new file mode 100644 index 0000000000000..c5a7c796b89b2 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologyImpl.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyInner; +import com.azure.resourcemanager.videoanalyzer.models.Kind; +import com.azure.resourcemanager.videoanalyzer.models.ParameterDeclaration; +import com.azure.resourcemanager.videoanalyzer.models.PipelineTopology; +import com.azure.resourcemanager.videoanalyzer.models.ProcessorNodeBase; +import com.azure.resourcemanager.videoanalyzer.models.SinkNodeBase; +import com.azure.resourcemanager.videoanalyzer.models.Sku; +import com.azure.resourcemanager.videoanalyzer.models.SourceNodeBase; +import java.util.Collections; +import java.util.List; + +public final class PipelineTopologyImpl + implements PipelineTopology, PipelineTopology.Definition, PipelineTopology.Update { + private PipelineTopologyInner innerObject; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Kind kind() { + return this.innerModel().kind(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public String description() { + return this.innerModel().description(); + } + + public List parameters() { + List inner = this.innerModel().parameters(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List sources() { + List inner = this.innerModel().sources(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List processors() { + List inner = this.innerModel().processors(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List sinks() { + List inner = this.innerModel().sinks(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PipelineTopologyInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String pipelineTopologyName; + + public PipelineTopologyImpl withExistingVideoAnalyzer(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + public PipelineTopology create() { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineTopologies() + .createOrUpdateWithResponse( + resourceGroupName, accountName, pipelineTopologyName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public PipelineTopology create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineTopologies() + .createOrUpdateWithResponse( + resourceGroupName, accountName, pipelineTopologyName, this.innerModel(), context) + .getValue(); + return this; + } + + PipelineTopologyImpl(String name, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerObject = new PipelineTopologyInner(); + this.serviceManager = serviceManager; + this.pipelineTopologyName = name; + } + + public PipelineTopologyImpl update() { + return this; + } + + public PipelineTopology apply() { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineTopologies() + .updateWithResponse( + resourceGroupName, accountName, pipelineTopologyName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public PipelineTopology apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineTopologies() + .updateWithResponse(resourceGroupName, accountName, pipelineTopologyName, this.innerModel(), context) + .getValue(); + return this; + } + + PipelineTopologyImpl( + PipelineTopologyInner innerObject, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = Utils.getValueFromIdByName(innerObject.id(), "videoAnalyzers"); + this.pipelineTopologyName = Utils.getValueFromIdByName(innerObject.id(), "pipelineTopologies"); + } + + public PipelineTopology refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineTopologies() + .getWithResponse(resourceGroupName, accountName, pipelineTopologyName, Context.NONE) + .getValue(); + return this; + } + + public PipelineTopology refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineTopologies() + .getWithResponse(resourceGroupName, accountName, pipelineTopologyName, context) + .getValue(); + return this; + } + + public PipelineTopologyImpl withKind(Kind kind) { + this.innerModel().withKind(kind); + return this; + } + + public PipelineTopologyImpl withSku(Sku sku) { + this.innerModel().withSku(sku); + return this; + } + + public PipelineTopologyImpl withDescription(String description) { + this.innerModel().withDescription(description); + return this; + } + + public PipelineTopologyImpl withParameters(List parameters) { + this.innerModel().withParameters(parameters); + return this; + } + + public PipelineTopologyImpl withSources(List sources) { + this.innerModel().withSources(sources); + return this; + } + + public PipelineTopologyImpl withProcessors(List processors) { + this.innerModel().withProcessors(processors); + return this; + } + + public PipelineTopologyImpl withSinks(List sinks) { + this.innerModel().withSinks(sinks); + return this; + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 0000000000000..f8f1085b31348 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionImpl.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpoint; +import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnection; +import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkServiceConnectionState; + +public final class PrivateEndpointConnectionImpl + implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update { + private PrivateEndpointConnectionInner innerObject; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public PrivateEndpoint privateEndpoint() { + return this.innerModel().privateEndpoint(); + } + + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.innerModel().privateLinkServiceConnectionState(); + } + + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public PrivateEndpointConnectionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String name; + + public PrivateEndpointConnectionImpl withExistingVideoAnalyzer(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + public PrivateEndpointConnection create() { + this.innerObject = + serviceManager + .serviceClient() + .getPrivateEndpointConnections() + .createOrUpdateWithResponse(resourceGroupName, accountName, name, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public PrivateEndpointConnection create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPrivateEndpointConnections() + .createOrUpdateWithResponse(resourceGroupName, accountName, name, this.innerModel(), context) + .getValue(); + return this; + } + + PrivateEndpointConnectionImpl( + String name, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerObject = new PrivateEndpointConnectionInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public PrivateEndpointConnectionImpl update() { + return this; + } + + public PrivateEndpointConnection apply() { + this.innerObject = + serviceManager + .serviceClient() + .getPrivateEndpointConnections() + .createOrUpdateWithResponse(resourceGroupName, accountName, name, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public PrivateEndpointConnection apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPrivateEndpointConnections() + .createOrUpdateWithResponse(resourceGroupName, accountName, name, this.innerModel(), context) + .getValue(); + return this; + } + + PrivateEndpointConnectionImpl( + PrivateEndpointConnectionInner innerObject, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = Utils.getValueFromIdByName(innerObject.id(), "videoAnalyzers"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); + } + + public PrivateEndpointConnection refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, accountName, name, Context.NONE) + .getValue(); + return this; + } + + public PrivateEndpointConnection refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, accountName, name, context) + .getValue(); + return this; + } + + public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.innerModel().withPrivateEndpoint(privateEndpoint); + return this; + } + + public PrivateEndpointConnectionImpl withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.innerModel().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionListResultImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionListResultImpl.java new file mode 100644 index 0000000000000..2ce39bd659e7a --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionListResultImpl.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionListResultInner; +import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnection; +import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnectionListResult; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class PrivateEndpointConnectionListResultImpl implements PrivateEndpointConnectionListResult { + private PrivateEndpointConnectionListResultInner innerObject; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + PrivateEndpointConnectionListResultImpl( + PrivateEndpointConnectionListResultInner innerObject, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public PrivateEndpointConnectionListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionsClientImpl.java new file mode 100644 index 0000000000000..cd4eaf3a98130 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionsClientImpl.java @@ -0,0 +1,781 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionListResultInner; +import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnectionsCreateOrUpdateResponse; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { + private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final PrivateEndpointConnectionsService service; + + /** The service client containing this operation class. */ + private final VideoAnalyzerManagementClientImpl client; + + /** + * Initializes an instance of PrivateEndpointConnectionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrivateEndpointConnectionsClientImpl(VideoAnalyzerManagementClientImpl client) { + this.service = + RestProxy + .create( + PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for VideoAnalyzerManagementClientPrivateEndpointConnections to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "VideoAnalyzerManagem") + private interface PrivateEndpointConnectionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/privateEndpointConnections") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/privateEndpointConnections/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/privateEndpointConnections/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/privateEndpointConnections/{name}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get all private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all private endpoint connections. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync( + String resourceGroupName, String accountName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get all private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all private endpoint connections. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync( + String resourceGroupName, String accountName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get all private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all private endpoint connections. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAsync(String resourceGroupName, String accountName) { + return listWithResponseAsync(resourceGroupName, accountName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get all private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all private endpoint connections. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionListResultInner list(String resourceGroupName, String accountName) { + return listAsync(resourceGroupName, accountName).block(); + } + + /** + * Get all private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all private endpoint connections. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse( + String resourceGroupName, String accountName, Context context) { + return listWithResponseAsync(resourceGroupName, accountName, context).block(); + } + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + name, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + name, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, String name) { + return getWithResponseAsync(resourceGroupName, accountName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, String name) { + return getAsync(resourceGroupName, accountName, name).block(); + } + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String accountName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, accountName, name, context).block(); + } + + /** + * Update private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateWithResponseAsync( + String resourceGroupName, String accountName, String name, PrivateEndpointConnectionInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + name, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateWithResponseAsync( + String resourceGroupName, + String accountName, + String name, + PrivateEndpointConnectionInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + name, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Update private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String accountName, String name, PrivateEndpointConnectionInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, accountName, name, parameters) + .flatMap( + (PrivateEndpointConnectionsCreateOrUpdateResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Update private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param parameters The request parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner createOrUpdate( + String resourceGroupName, String accountName, String name, PrivateEndpointConnectionInner parameters) { + return createOrUpdateAsync(resourceGroupName, accountName, name, parameters).block(); + } + + /** + * Update private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param parameters The request parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionsCreateOrUpdateResponse createOrUpdateWithResponse( + String resourceGroupName, + String accountName, + String name, + PrivateEndpointConnectionInner parameters, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, accountName, name, parameters, context).block(); + } + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + name, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String accountName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + name, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String accountName, String name) { + return deleteWithResponseAsync(resourceGroupName, accountName, name) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String name) { + deleteAsync(resourceGroupName, accountName, name).block(); + } + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String accountName, String name, Context context) { + return deleteWithResponseAsync(resourceGroupName, accountName, name, context).block(); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionsImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionsImpl.java new file mode 100644 index 0000000000000..b2d3f86bac69b --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionsImpl.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionListResultInner; +import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnection; +import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnections; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsImpl.class); + + private final PrivateEndpointConnectionsClient innerClient; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + public PrivateEndpointConnectionsImpl( + PrivateEndpointConnectionsClient innerClient, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PrivateEndpointConnectionListResult list(String resourceGroupName, String accountName) { + PrivateEndpointConnectionListResultInner inner = this.serviceClient().list(resourceGroupName, accountName); + if (inner != null) { + return new PrivateEndpointConnectionListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listWithResponse( + String resourceGroupName, String accountName, Context context) { + Response inner = + this.serviceClient().listWithResponse(resourceGroupName, accountName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateEndpointConnectionListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateEndpointConnection get(String resourceGroupName, String accountName, String name) { + PrivateEndpointConnectionInner inner = this.serviceClient().get(resourceGroupName, accountName, name); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String accountName, String name, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, accountName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String name) { + this.serviceClient().delete(resourceGroupName, accountName, name); + } + + public Response deleteWithResponse( + String resourceGroupName, String accountName, String name, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, name, context); + } + + public PrivateEndpointConnection getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String name = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", + id))); + } + return this.getWithResponse(resourceGroupName, accountName, name, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String name = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", + id))); + } + return this.getWithResponse(resourceGroupName, accountName, name, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String name = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", + id))); + } + this.deleteWithResponse(resourceGroupName, accountName, name, Context.NONE).getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = Utils.getValueFromIdByName(id, "videoAnalyzers"); + if (accountName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'videoAnalyzers'.", id))); + } + String name = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", + id))); + } + return this.deleteWithResponse(resourceGroupName, accountName, name, context); + } + + private PrivateEndpointConnectionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } + + public PrivateEndpointConnectionImpl define(String name) { + return new PrivateEndpointConnectionImpl(name, this.manager()); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourceImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourceImpl.java new file mode 100644 index 0000000000000..5a07491464a07 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourceImpl.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkResource; +import java.util.Collections; +import java.util.List; + +public final class PrivateLinkResourceImpl implements PrivateLinkResource { + private PrivateLinkResourceInner innerObject; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + PrivateLinkResourceImpl( + PrivateLinkResourceInner innerObject, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String groupId() { + return this.innerModel().groupId(); + } + + public List requiredMembers() { + List inner = this.innerModel().requiredMembers(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List requiredZoneNames() { + List inner = this.innerModel().requiredZoneNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PrivateLinkResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourceListResultImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourceListResultImpl.java new file mode 100644 index 0000000000000..95fbca1779867 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourceListResultImpl.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceListResultInner; +import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkResource; +import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkResourceListResult; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class PrivateLinkResourceListResultImpl implements PrivateLinkResourceListResult { + private PrivateLinkResourceListResultInner innerObject; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + PrivateLinkResourceListResultImpl( + PrivateLinkResourceListResultInner innerObject, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public PrivateLinkResourceListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourcesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourcesClientImpl.java new file mode 100644 index 0000000000000..87aa4366a3236 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourcesClientImpl.java @@ -0,0 +1,401 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceListResultInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { + private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final PrivateLinkResourcesService service; + + /** The service client containing this operation class. */ + private final VideoAnalyzerManagementClientImpl client; + + /** + * Initializes an instance of PrivateLinkResourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrivateLinkResourcesClientImpl(VideoAnalyzerManagementClientImpl client) { + this.service = + RestProxy + .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for VideoAnalyzerManagementClientPrivateLinkResources to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "VideoAnalyzerManagem") + private interface PrivateLinkResourcesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/privateLinkResources") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/privateLinkResources/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get list of group IDs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of group IDs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync( + String resourceGroupName, String accountName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get list of group IDs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of group IDs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync( + String resourceGroupName, String accountName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get list of group IDs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of group IDs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAsync(String resourceGroupName, String accountName) { + return listWithResponseAsync(resourceGroupName, accountName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get list of group IDs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of group IDs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourceListResultInner list(String resourceGroupName, String accountName) { + return listAsync(resourceGroupName, accountName).block(); + } + + /** + * Get list of group IDs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of group IDs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse( + String resourceGroupName, String accountName, Context context) { + return listWithResponseAsync(resourceGroupName, accountName, context).block(); + } + + /** + * Get group ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return group ID. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + name, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get group ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return group ID. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + accountName, + name, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get group ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return group ID. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, String name) { + return getWithResponseAsync(resourceGroupName, accountName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get group ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return group ID. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourceInner get(String resourceGroupName, String accountName, String name) { + return getAsync(resourceGroupName, accountName, name).block(); + } + + /** + * Get group ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return group ID. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String accountName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, accountName, name, context).block(); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourcesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourcesImpl.java new file mode 100644 index 0000000000000..417bffb81645e --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourcesImpl.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceListResultInner; +import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkResource; +import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkResourceListResult; +import com.azure.resourcemanager.videoanalyzer.models.PrivateLinkResources; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class PrivateLinkResourcesImpl implements PrivateLinkResources { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesImpl.class); + + private final PrivateLinkResourcesClient innerClient; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + public PrivateLinkResourcesImpl( + PrivateLinkResourcesClient innerClient, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PrivateLinkResourceListResult list(String resourceGroupName, String accountName) { + PrivateLinkResourceListResultInner inner = this.serviceClient().list(resourceGroupName, accountName); + if (inner != null) { + return new PrivateLinkResourceListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listWithResponse( + String resourceGroupName, String accountName, Context context) { + Response inner = + this.serviceClient().listWithResponse(resourceGroupName, accountName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateLinkResourceListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateLinkResource get(String resourceGroupName, String accountName, String name) { + PrivateLinkResourceInner inner = this.serviceClient().get(resourceGroupName, accountName, name); + if (inner != null) { + return new PrivateLinkResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String accountName, String name, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, accountName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateLinkResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private PrivateLinkResourcesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerImpl.java index 71744e06dc0f3..2c621c4d5c01d 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerImpl.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerImpl.java @@ -4,21 +4,26 @@ package com.azure.resourcemanager.videoanalyzer.implementation; -import com.azure.core.http.rest.Response; import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; import com.azure.resourcemanager.videoanalyzer.models.AccountEncryption; import com.azure.resourcemanager.videoanalyzer.models.Endpoint; +import com.azure.resourcemanager.videoanalyzer.models.IotHub; +import com.azure.resourcemanager.videoanalyzer.models.NetworkAccessControl; +import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnection; +import com.azure.resourcemanager.videoanalyzer.models.ProvisioningState; +import com.azure.resourcemanager.videoanalyzer.models.PublicNetworkAccess; import com.azure.resourcemanager.videoanalyzer.models.StorageAccount; -import com.azure.resourcemanager.videoanalyzer.models.SyncStorageKeysInput; import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzer; import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerIdentity; import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerUpdate; import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; public final class VideoAnalyzerImpl implements VideoAnalyzer, VideoAnalyzer.Definition, VideoAnalyzer.Update { private VideoAnalyzerInner innerObject; @@ -80,6 +85,41 @@ public AccountEncryption encryption() { return this.innerModel().encryption(); } + public List iotHubs() { + List inner = this.innerModel().iotHubs(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PublicNetworkAccess publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public NetworkAccessControl networkAccessControl() { + return this.innerModel().networkAccessControl(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public List privateEndpointConnections() { + List inner = this.innerModel().privateEndpointConnections(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + public Region region() { return Region.fromName(this.regionName()); } @@ -186,16 +226,6 @@ public VideoAnalyzer refresh(Context context) { return this; } - public void syncStorageKeys(SyncStorageKeysInput parameters) { - serviceManager.videoAnalyzers().syncStorageKeys(resourceGroupName, accountName, parameters); - } - - public Response syncStorageKeysWithResponse(SyncStorageKeysInput parameters, Context context) { - return serviceManager - .videoAnalyzers() - .syncStorageKeysWithResponse(resourceGroupName, accountName, parameters, context); - } - public VideoAnalyzerImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -246,6 +276,36 @@ public VideoAnalyzerImpl withEncryption(AccountEncryption encryption) { } } + public VideoAnalyzerImpl withIotHubs(List iotHubs) { + if (isInCreateMode()) { + this.innerModel().withIotHubs(iotHubs); + return this; + } else { + this.updateParameters.withIotHubs(iotHubs); + return this; + } + } + + public VideoAnalyzerImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + if (isInCreateMode()) { + this.innerModel().withPublicNetworkAccess(publicNetworkAccess); + return this; + } else { + this.updateParameters.withPublicNetworkAccess(publicNetworkAccess); + return this; + } + } + + public VideoAnalyzerImpl withNetworkAccessControl(NetworkAccessControl networkAccessControl) { + if (isInCreateMode()) { + this.innerModel().withNetworkAccessControl(networkAccessControl); + return this; + } else { + this.updateParameters.withNetworkAccessControl(networkAccessControl); + return this; + } + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerManagementClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerManagementClientImpl.java index 11c0ac7d09d7f..3388b0cb55daf 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerManagementClientImpl.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerManagementClientImpl.java @@ -23,9 +23,18 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.videoanalyzer.fluent.AccessPoliciesClient; import com.azure.resourcemanager.videoanalyzer.fluent.EdgeModulesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.LivePipelineOperationStatusesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.LivePipelinesClient; import com.azure.resourcemanager.videoanalyzer.fluent.LocationsClient; import com.azure.resourcemanager.videoanalyzer.fluent.OperationsClient; +import com.azure.resourcemanager.videoanalyzer.fluent.PipelineJobOperationStatusesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.PipelineJobsClient; +import com.azure.resourcemanager.videoanalyzer.fluent.PipelineTopologiesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.videoanalyzer.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzerManagementClient; +import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzerOperationResultsClient; +import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzerOperationStatusesClient; import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzersClient; import com.azure.resourcemanager.videoanalyzer.fluent.VideosClient; import java.io.IOException; @@ -115,6 +124,78 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** The EdgeModulesClient object to access its operations. */ + private final EdgeModulesClient edgeModules; + + /** + * Gets the EdgeModulesClient object to access its operations. + * + * @return the EdgeModulesClient object. + */ + public EdgeModulesClient getEdgeModules() { + return this.edgeModules; + } + + /** The PipelineTopologiesClient object to access its operations. */ + private final PipelineTopologiesClient pipelineTopologies; + + /** + * Gets the PipelineTopologiesClient object to access its operations. + * + * @return the PipelineTopologiesClient object. + */ + public PipelineTopologiesClient getPipelineTopologies() { + return this.pipelineTopologies; + } + + /** The LivePipelinesClient object to access its operations. */ + private final LivePipelinesClient livePipelines; + + /** + * Gets the LivePipelinesClient object to access its operations. + * + * @return the LivePipelinesClient object. + */ + public LivePipelinesClient getLivePipelines() { + return this.livePipelines; + } + + /** The PipelineJobsClient object to access its operations. */ + private final PipelineJobsClient pipelineJobs; + + /** + * Gets the PipelineJobsClient object to access its operations. + * + * @return the PipelineJobsClient object. + */ + public PipelineJobsClient getPipelineJobs() { + return this.pipelineJobs; + } + + /** The LivePipelineOperationStatusesClient object to access its operations. */ + private final LivePipelineOperationStatusesClient livePipelineOperationStatuses; + + /** + * Gets the LivePipelineOperationStatusesClient object to access its operations. + * + * @return the LivePipelineOperationStatusesClient object. + */ + public LivePipelineOperationStatusesClient getLivePipelineOperationStatuses() { + return this.livePipelineOperationStatuses; + } + + /** The PipelineJobOperationStatusesClient object to access its operations. */ + private final PipelineJobOperationStatusesClient pipelineJobOperationStatuses; + + /** + * Gets the PipelineJobOperationStatusesClient object to access its operations. + * + * @return the PipelineJobOperationStatusesClient object. + */ + public PipelineJobOperationStatusesClient getPipelineJobOperationStatuses() { + return this.pipelineJobOperationStatuses; + } + /** The OperationsClient object to access its operations. */ private final OperationsClient operations; @@ -139,28 +220,64 @@ public VideoAnalyzersClient getVideoAnalyzers() { return this.videoAnalyzers; } - /** The LocationsClient object to access its operations. */ - private final LocationsClient locations; + /** The PrivateLinkResourcesClient object to access its operations. */ + private final PrivateLinkResourcesClient privateLinkResources; /** - * Gets the LocationsClient object to access its operations. + * Gets the PrivateLinkResourcesClient object to access its operations. * - * @return the LocationsClient object. + * @return the PrivateLinkResourcesClient object. */ - public LocationsClient getLocations() { - return this.locations; + public PrivateLinkResourcesClient getPrivateLinkResources() { + return this.privateLinkResources; } - /** The EdgeModulesClient object to access its operations. */ - private final EdgeModulesClient edgeModules; + /** The PrivateEndpointConnectionsClient object to access its operations. */ + private final PrivateEndpointConnectionsClient privateEndpointConnections; /** - * Gets the EdgeModulesClient object to access its operations. + * Gets the PrivateEndpointConnectionsClient object to access its operations. * - * @return the EdgeModulesClient object. + * @return the PrivateEndpointConnectionsClient object. */ - public EdgeModulesClient getEdgeModules() { - return this.edgeModules; + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** The VideoAnalyzerOperationStatusesClient object to access its operations. */ + private final VideoAnalyzerOperationStatusesClient videoAnalyzerOperationStatuses; + + /** + * Gets the VideoAnalyzerOperationStatusesClient object to access its operations. + * + * @return the VideoAnalyzerOperationStatusesClient object. + */ + public VideoAnalyzerOperationStatusesClient getVideoAnalyzerOperationStatuses() { + return this.videoAnalyzerOperationStatuses; + } + + /** The VideoAnalyzerOperationResultsClient object to access its operations. */ + private final VideoAnalyzerOperationResultsClient videoAnalyzerOperationResults; + + /** + * Gets the VideoAnalyzerOperationResultsClient object to access its operations. + * + * @return the VideoAnalyzerOperationResultsClient object. + */ + public VideoAnalyzerOperationResultsClient getVideoAnalyzerOperationResults() { + return this.videoAnalyzerOperationResults; + } + + /** The LocationsClient object to access its operations. */ + private final LocationsClient locations; + + /** + * Gets the LocationsClient object to access its operations. + * + * @return the LocationsClient object. + */ + public LocationsClient getLocations() { + return this.locations; } /** The VideosClient object to access its operations. */ @@ -209,11 +326,20 @@ public AccessPoliciesClient getAccessPolicies() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-05-01-preview"; + this.apiVersion = "2021-11-01-preview"; + this.edgeModules = new EdgeModulesClientImpl(this); + this.pipelineTopologies = new PipelineTopologiesClientImpl(this); + this.livePipelines = new LivePipelinesClientImpl(this); + this.pipelineJobs = new PipelineJobsClientImpl(this); + this.livePipelineOperationStatuses = new LivePipelineOperationStatusesClientImpl(this); + this.pipelineJobOperationStatuses = new PipelineJobOperationStatusesClientImpl(this); this.operations = new OperationsClientImpl(this); this.videoAnalyzers = new VideoAnalyzersClientImpl(this); + this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.videoAnalyzerOperationStatuses = new VideoAnalyzerOperationStatusesClientImpl(this); + this.videoAnalyzerOperationResults = new VideoAnalyzerOperationResultsClientImpl(this); this.locations = new LocationsClientImpl(this); - this.edgeModules = new EdgeModulesClientImpl(this); this.videos = new VideosClientImpl(this); this.accessPolicies = new AccessPoliciesClientImpl(this); } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsClientImpl.java new file mode 100644 index 0000000000000..e617aee6b1b59 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsClientImpl.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzerOperationResultsClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in VideoAnalyzerOperationResultsClient. */ +public final class VideoAnalyzerOperationResultsClientImpl implements VideoAnalyzerOperationResultsClient { + private final ClientLogger logger = new ClientLogger(VideoAnalyzerOperationResultsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final VideoAnalyzerOperationResultsService service; + + /** The service client containing this operation class. */ + private final VideoAnalyzerManagementClientImpl client; + + /** + * Initializes an instance of VideoAnalyzerOperationResultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + VideoAnalyzerOperationResultsClientImpl(VideoAnalyzerManagementClientImpl client) { + this.service = + RestProxy + .create( + VideoAnalyzerOperationResultsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for VideoAnalyzerManagementClientVideoAnalyzerOperationResults to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "VideoAnalyzerManagem") + private interface VideoAnalyzerOperationResultsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}" + + "/videoAnalyzerOperationResults/{name}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String locationName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + locationName, + name, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String locationName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + locationName, + name, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String locationName, String name) { + return getWithResponseAsync(locationName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VideoAnalyzerInner get(String locationName, String name) { + return getAsync(locationName, name).block(); + } + + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String locationName, String name, Context context) { + return getWithResponseAsync(locationName, name, context).block(); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsImpl.java new file mode 100644 index 0000000000000..fdcdef450590e --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsImpl.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzerOperationResultsClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; +import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzer; +import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerOperationResults; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class VideoAnalyzerOperationResultsImpl implements VideoAnalyzerOperationResults { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoAnalyzerOperationResultsImpl.class); + + private final VideoAnalyzerOperationResultsClient innerClient; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + public VideoAnalyzerOperationResultsImpl( + VideoAnalyzerOperationResultsClient innerClient, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public VideoAnalyzer get(String locationName, String name) { + VideoAnalyzerInner inner = this.serviceClient().get(locationName, name); + if (inner != null) { + return new VideoAnalyzerImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse(String locationName, String name, Context context) { + Response inner = this.serviceClient().getWithResponse(locationName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VideoAnalyzerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private VideoAnalyzerOperationResultsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusImpl.java new file mode 100644 index 0000000000000..bc2674d549411 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusImpl.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerOperationStatusInner; +import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerOperationStatus; + +public final class VideoAnalyzerOperationStatusImpl implements VideoAnalyzerOperationStatus { + private VideoAnalyzerOperationStatusInner innerObject; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + VideoAnalyzerOperationStatusImpl( + VideoAnalyzerOperationStatusInner innerObject, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public String id() { + return this.innerModel().id(); + } + + public String startTime() { + return this.innerModel().startTime(); + } + + public String endTime() { + return this.innerModel().endTime(); + } + + public String status() { + return this.innerModel().status(); + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public VideoAnalyzerOperationStatusInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesClientImpl.java new file mode 100644 index 0000000000000..40aa4ae2c0a1b --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesClientImpl.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzerOperationStatusesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerOperationStatusInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in VideoAnalyzerOperationStatusesClient. */ +public final class VideoAnalyzerOperationStatusesClientImpl implements VideoAnalyzerOperationStatusesClient { + private final ClientLogger logger = new ClientLogger(VideoAnalyzerOperationStatusesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final VideoAnalyzerOperationStatusesService service; + + /** The service client containing this operation class. */ + private final VideoAnalyzerManagementClientImpl client; + + /** + * Initializes an instance of VideoAnalyzerOperationStatusesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + VideoAnalyzerOperationStatusesClientImpl(VideoAnalyzerManagementClientImpl client) { + this.service = + RestProxy + .create( + VideoAnalyzerOperationStatusesService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for VideoAnalyzerManagementClientVideoAnalyzerOperationStatuses to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "VideoAnalyzerManagem") + private interface VideoAnalyzerOperationStatusesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}" + + "/videoAnalyzerOperationStatuses/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String locationName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + locationName, + name, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String locationName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + locationName, + name, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String locationName, String name) { + return getWithResponseAsync(locationName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VideoAnalyzerOperationStatusInner get(String locationName, String name) { + return getAsync(locationName, name).block(); + } + + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String locationName, String name, Context context) { + return getWithResponseAsync(locationName, name, context).block(); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesImpl.java new file mode 100644 index 0000000000000..003333b9dd620 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzerOperationStatusesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerOperationStatusInner; +import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerOperationStatus; +import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerOperationStatuses; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class VideoAnalyzerOperationStatusesImpl implements VideoAnalyzerOperationStatuses { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoAnalyzerOperationStatusesImpl.class); + + private final VideoAnalyzerOperationStatusesClient innerClient; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + public VideoAnalyzerOperationStatusesImpl( + VideoAnalyzerOperationStatusesClient innerClient, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public VideoAnalyzerOperationStatus get(String locationName, String name) { + VideoAnalyzerOperationStatusInner inner = this.serviceClient().get(locationName, name); + if (inner != null) { + return new VideoAnalyzerOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse(String locationName, String name, Context context) { + Response inner = + this.serviceClient().getWithResponse(locationName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VideoAnalyzerOperationStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private VideoAnalyzerOperationStatusesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzersClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzersClientImpl.java index de323b7667a43..b85c7da4ee654 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzersClientImpl.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzersClientImpl.java @@ -14,7 +14,6 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -30,8 +29,9 @@ import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzersClient; import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerCollectionInner; import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; -import com.azure.resourcemanager.videoanalyzer.models.SyncStorageKeysInput; import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerUpdate; +import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzersCreateOrUpdateResponse; +import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzersUpdateResponse; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in VideoAnalyzersClient. */ @@ -97,7 +97,7 @@ Mono> getByResourceGroup( + "/videoAnalyzers/{accountName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( + Mono createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -126,9 +126,9 @@ Mono> delete( @Patch( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + "/videoAnalyzers/{accountName}") - @ExpectedResponses({200}) + @ExpectedResponses({202}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( + Mono update( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -138,22 +138,6 @@ Mono> update( @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/syncStorageKeys") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> syncStorageKeys( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SyncStorageKeysInput parameters, - @HeaderParam("Accept") String accept, - Context context); - @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Media/videoAnalyzers") @ExpectedResponses({200}) @@ -458,10 +442,10 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( + private Mono createOrUpdateWithResponseAsync( String resourceGroupName, String accountName, VideoAnalyzerInner parameters) { if (this.client.getEndpoint() == null) { return Mono @@ -514,10 +498,10 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( + private Mono createOrUpdateWithResponseAsync( String resourceGroupName, String accountName, VideoAnalyzerInner parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -566,14 +550,14 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( String resourceGroupName, String accountName, VideoAnalyzerInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters) .flatMap( - (Response res) -> { + (VideoAnalyzersCreateOrUpdateResponse res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -591,7 +575,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public VideoAnalyzerInner createOrUpdate( @@ -609,10 +593,10 @@ public VideoAnalyzerInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public VideoAnalyzersCreateOrUpdateResponse createOrUpdateWithResponse( String resourceGroupName, String accountName, VideoAnalyzerInner parameters, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters, context).block(); } @@ -764,10 +748,10 @@ public Response deleteWithResponse(String resourceGroupName, String accoun * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( + private Mono updateWithResponseAsync( String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters) { if (this.client.getEndpoint() == null) { return Mono @@ -820,10 +804,10 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( + private Mono updateWithResponseAsync( String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -872,14 +856,14 @@ private Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters) { return updateWithResponseAsync(resourceGroupName, accountName, parameters) .flatMap( - (Response res) -> { + (VideoAnalyzersUpdateResponse res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -897,7 +881,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public VideoAnalyzerInner update(String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters) { @@ -914,173 +898,14 @@ public VideoAnalyzerInner update(String resourceGroupName, String accountName, V * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( + public VideoAnalyzersUpdateResponse updateWithResponse( String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters, Context context) { return updateWithResponseAsync(resourceGroupName, accountName, parameters, context).block(); } - /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> syncStorageKeysWithResponseAsync( - String resourceGroupName, String accountName, SyncStorageKeysInput parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .syncStorageKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - this.client.getApiVersion(), - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> syncStorageKeysWithResponseAsync( - String resourceGroupName, String accountName, SyncStorageKeysInput parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .syncStorageKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - accountName, - this.client.getApiVersion(), - parameters, - accept, - context); - } - - /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono syncStorageKeysAsync( - String resourceGroupName, String accountName, SyncStorageKeysInput parameters) { - return syncStorageKeysWithResponseAsync(resourceGroupName, accountName, parameters) - .flatMap((Response res) -> Mono.empty()); - } - - /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void syncStorageKeys(String resourceGroupName, String accountName, SyncStorageKeysInput parameters) { - syncStorageKeysAsync(resourceGroupName, accountName, parameters).block(); - } - - /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response syncStorageKeysWithResponse( - String resourceGroupName, String accountName, SyncStorageKeysInput parameters, Context context) { - return syncStorageKeysWithResponseAsync(resourceGroupName, accountName, parameters, context).block(); - } - /** * Lists the Video Analyzer accounts in the specific subscription. * diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzersImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzersImpl.java index 23bd7e1c45fe7..3c6153f5ff657 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzersImpl.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzersImpl.java @@ -11,7 +11,6 @@ import com.azure.resourcemanager.videoanalyzer.fluent.VideoAnalyzersClient; import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerCollectionInner; import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; -import com.azure.resourcemanager.videoanalyzer.models.SyncStorageKeysInput; import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzer; import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerCollection; import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzers; @@ -85,15 +84,6 @@ public Response deleteWithResponse(String resourceGroupName, String accoun return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, context); } - public void syncStorageKeys(String resourceGroupName, String accountName, SyncStorageKeysInput parameters) { - this.serviceClient().syncStorageKeys(resourceGroupName, accountName, parameters); - } - - public Response syncStorageKeysWithResponse( - String resourceGroupName, String accountName, SyncStorageKeysInput parameters, Context context) { - return this.serviceClient().syncStorageKeysWithResponse(resourceGroupName, accountName, parameters, context); - } - public VideoAnalyzerCollection listBySubscription() { VideoAnalyzerCollectionInner inner = this.serviceClient().listBySubscription(); if (inner != null) { diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoStreamingTokenImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoContentTokenImpl.java similarity index 72% rename from sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoStreamingTokenImpl.java rename to sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoContentTokenImpl.java index ce902b7fc0d6b..75d2dfc6f7cb7 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoStreamingTokenImpl.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoContentTokenImpl.java @@ -4,17 +4,17 @@ package com.azure.resourcemanager.videoanalyzer.implementation; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoStreamingTokenInner; -import com.azure.resourcemanager.videoanalyzer.models.VideoStreamingToken; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoContentTokenInner; +import com.azure.resourcemanager.videoanalyzer.models.VideoContentToken; import java.time.OffsetDateTime; -public final class VideoStreamingTokenImpl implements VideoStreamingToken { - private VideoStreamingTokenInner innerObject; +public final class VideoContentTokenImpl implements VideoContentToken { + private VideoContentTokenInner innerObject; private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; - VideoStreamingTokenImpl( - VideoStreamingTokenInner innerObject, + VideoContentTokenImpl( + VideoContentTokenInner innerObject, com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -28,7 +28,7 @@ public String token() { return this.innerModel().token(); } - public VideoStreamingTokenInner innerModel() { + public VideoContentTokenInner innerModel() { return this.innerObject; } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoEntityImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoEntityImpl.java index 8c067469a3868..753c073ed3147 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoEntityImpl.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoEntityImpl.java @@ -8,11 +8,12 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoEntityInner; +import com.azure.resourcemanager.videoanalyzer.models.VideoArchival; +import com.azure.resourcemanager.videoanalyzer.models.VideoContentToken; +import com.azure.resourcemanager.videoanalyzer.models.VideoContentUrls; import com.azure.resourcemanager.videoanalyzer.models.VideoEntity; import com.azure.resourcemanager.videoanalyzer.models.VideoFlags; import com.azure.resourcemanager.videoanalyzer.models.VideoMediaInfo; -import com.azure.resourcemanager.videoanalyzer.models.VideoStreaming; -import com.azure.resourcemanager.videoanalyzer.models.VideoStreamingToken; import com.azure.resourcemanager.videoanalyzer.models.VideoType; public final class VideoEntityImpl implements VideoEntity, VideoEntity.Definition, VideoEntity.Update { @@ -52,14 +53,18 @@ public VideoFlags flags() { return this.innerModel().flags(); } - public VideoStreaming streaming() { - return this.innerModel().streaming(); + public VideoContentUrls contentUrls() { + return this.innerModel().contentUrls(); } public VideoMediaInfo mediaInfo() { return this.innerModel().mediaInfo(); } + public VideoArchival archival() { + return this.innerModel().archival(); + } + public VideoEntityInner innerModel() { return this.innerObject; } @@ -159,14 +164,12 @@ public VideoEntity refresh(Context context) { return this; } - public VideoStreamingToken listStreamingToken() { - return serviceManager.videos().listStreamingToken(resourceGroupName, accountName, videoName); + public VideoContentToken listContentToken() { + return serviceManager.videos().listContentToken(resourceGroupName, accountName, videoName); } - public Response listStreamingTokenWithResponse(Context context) { - return serviceManager - .videos() - .listStreamingTokenWithResponse(resourceGroupName, accountName, videoName, context); + public Response listContentTokenWithResponse(Context context) { + return serviceManager.videos().listContentTokenWithResponse(resourceGroupName, accountName, videoName, context); } public VideoEntityImpl withTitle(String title) { @@ -178,4 +181,14 @@ public VideoEntityImpl withDescription(String description) { this.innerModel().withDescription(description); return this; } + + public VideoEntityImpl withTypePropertiesType(VideoType typePropertiesType) { + this.innerModel().withTypePropertiesType(typePropertiesType); + return this; + } + + public VideoEntityImpl withArchival(VideoArchival archival) { + this.innerModel().withArchival(archival); + return this; + } } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideosClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideosClientImpl.java index 0ac41f10f7d8a..a9cbeac381d33 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideosClientImpl.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideosClientImpl.java @@ -32,8 +32,8 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.videoanalyzer.fluent.VideosClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoContentTokenInner; import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoEntityInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoStreamingTokenInner; import com.azure.resourcemanager.videoanalyzer.models.VideoEntityCollection; import reactor.core.publisher.Mono; @@ -149,10 +149,10 @@ Mono> update( @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" - + "/videoAnalyzers/{accountName}/videos/{videoName}/listStreamingToken") + + "/videoAnalyzers/{accountName}/videos/{videoName}/listContentToken") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listStreamingToken( + Mono> listContentToken( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -174,7 +174,7 @@ Mono> listNext( } /** - * List all existing video resources in the specified account. + * List all existing video resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -234,7 +234,7 @@ private Mono> listSinglePageAsync( } /** - * List all existing video resources in the specified account. + * List all existing video resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -292,7 +292,7 @@ private Mono> listSinglePageAsync( } /** - * List all existing video resources in the specified account. + * List all existing video resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -311,7 +311,7 @@ private PagedFlux listAsync(String resourceGroupName, String a } /** - * List all existing video resources in the specified account. + * List all existing video resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -329,7 +329,7 @@ private PagedFlux listAsync(String resourceGroupName, String a } /** - * List all existing video resources in the specified account. + * List all existing video resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -350,7 +350,7 @@ private PagedFlux listAsync( } /** - * List all existing video resources in the specified account. + * List all existing video resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -366,7 +366,7 @@ public PagedIterable list(String resourceGroupName, String acc } /** - * List all existing video resources in the specified account. + * List all existing video resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -385,15 +385,15 @@ public PagedIterable list( } /** - * Retrieves an existing video resource within an account with a given name. + * Retrieves an existing video resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to retrieve. + * @param videoName The Video name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -438,16 +438,16 @@ private Mono> getWithResponseAsync( } /** - * Retrieves an existing video resource within an account with a given name. + * Retrieves an existing video resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to retrieve. + * @param videoName The Video name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -489,15 +489,15 @@ private Mono> getWithResponseAsync( } /** - * Retrieves an existing video resource within an account with a given name. + * Retrieves an existing video resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to retrieve. + * @param videoName The Video name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String videoName) { @@ -513,15 +513,15 @@ private Mono getAsync(String resourceGroupName, String account } /** - * Retrieves an existing video resource within an account with a given name. + * Retrieves an existing video resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to retrieve. + * @param videoName The Video name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public VideoEntityInner get(String resourceGroupName, String accountName, String videoName) { @@ -529,16 +529,16 @@ public VideoEntityInner get(String resourceGroupName, String accountName, String } /** - * Retrieves an existing video resource within an account with a given name. + * Retrieves an existing video resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to retrieve. + * @param videoName The Video name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -547,16 +547,16 @@ public Response getWithResponse( } /** - * Creates a new video resource or updates an existing one in an account. + * Creates a new video resource or updates an existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to create or update. + * @param videoName The Video name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -607,17 +607,17 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates a new video resource or updates an existing one in an account. + * Creates a new video resource or updates an existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to create or update. + * @param videoName The Video name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -665,16 +665,16 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates a new video resource or updates an existing one in an account. + * Creates a new video resource or updates an existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to create or update. + * @param videoName The Video name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -691,16 +691,16 @@ private Mono createOrUpdateAsync( } /** - * Creates a new video resource or updates an existing one in an account. + * Creates a new video resource or updates an existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to create or update. + * @param videoName The Video name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public VideoEntityInner createOrUpdate( @@ -709,17 +709,17 @@ public VideoEntityInner createOrUpdate( } /** - * Creates a new video resource or updates an existing one in an account. + * Creates a new video resource or updates an existing one. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to create or update. + * @param videoName The Video name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -732,7 +732,7 @@ public Response createOrUpdateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to delete. + * @param videoName The Video name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -785,7 +785,7 @@ private Mono> deleteWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to delete. + * @param videoName The Video name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -836,7 +836,7 @@ private Mono> deleteWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to delete. + * @param videoName The Video name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -853,7 +853,7 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to delete. + * @param videoName The Video name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -868,7 +868,7 @@ public void delete(String resourceGroupName, String accountName, String videoNam * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to delete. + * @param videoName The Video name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -886,12 +886,12 @@ public Response deleteWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to update. + * @param videoName The Video name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -946,13 +946,13 @@ private Mono> updateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to update. + * @param videoName The Video name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -1004,12 +1004,12 @@ private Mono> updateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to update. + * @param videoName The Video name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -1030,12 +1030,12 @@ private Mono updateAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to update. + * @param videoName The Video name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public VideoEntityInner update( @@ -1048,13 +1048,13 @@ public VideoEntityInner update( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to update. + * @param videoName The Video name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -1063,19 +1063,18 @@ public Response updateWithResponse( } /** - * Generates a streaming token used for authenticating video playback. + * Generates a streaming token which can be used for accessing content from video content URLs. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to generate a token for playback. + * @param videoName The Video name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video streaming token grants access to the video streaming URLs which can be used by an compatible HLS or - * DASH player. + * @return "Video content token grants access to the video content URLs.". */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listStreamingTokenWithResponseAsync( + private Mono> listContentTokenWithResponseAsync( String resourceGroupName, String accountName, String videoName) { if (this.client.getEndpoint() == null) { return Mono @@ -1104,7 +1103,7 @@ private Mono> listStreamingTokenWithResponseA .withContext( context -> service - .listStreamingToken( + .listContentToken( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1117,20 +1116,19 @@ private Mono> listStreamingTokenWithResponseA } /** - * Generates a streaming token used for authenticating video playback. + * Generates a streaming token which can be used for accessing content from video content URLs. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to generate a token for playback. + * @param videoName The Video name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video streaming token grants access to the video streaming URLs which can be used by an compatible HLS or - * DASH player. + * @return "Video content token grants access to the video content URLs.". */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listStreamingTokenWithResponseAsync( + private Mono> listContentTokenWithResponseAsync( String resourceGroupName, String accountName, String videoName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -1157,7 +1155,7 @@ private Mono> listStreamingTokenWithResponseA final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listStreamingToken( + .listContentToken( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1169,23 +1167,22 @@ private Mono> listStreamingTokenWithResponseA } /** - * Generates a streaming token used for authenticating video playback. + * Generates a streaming token which can be used for accessing content from video content URLs. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to generate a token for playback. + * @param videoName The Video name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video streaming token grants access to the video streaming URLs which can be used by an compatible HLS or - * DASH player. + * @return "Video content token grants access to the video content URLs.". */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listStreamingTokenAsync( + private Mono listContentTokenAsync( String resourceGroupName, String accountName, String videoName) { - return listStreamingTokenWithResponseAsync(resourceGroupName, accountName, videoName) + return listContentTokenWithResponseAsync(resourceGroupName, accountName, videoName) .flatMap( - (Response res) -> { + (Response res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -1195,39 +1192,37 @@ private Mono listStreamingTokenAsync( } /** - * Generates a streaming token used for authenticating video playback. + * Generates a streaming token which can be used for accessing content from video content URLs. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to generate a token for playback. + * @param videoName The Video name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video streaming token grants access to the video streaming URLs which can be used by an compatible HLS or - * DASH player. + * @return "Video content token grants access to the video content URLs.". */ @ServiceMethod(returns = ReturnType.SINGLE) - public VideoStreamingTokenInner listStreamingToken(String resourceGroupName, String accountName, String videoName) { - return listStreamingTokenAsync(resourceGroupName, accountName, videoName).block(); + public VideoContentTokenInner listContentToken(String resourceGroupName, String accountName, String videoName) { + return listContentTokenAsync(resourceGroupName, accountName, videoName).block(); } /** - * Generates a streaming token used for authenticating video playback. + * Generates a streaming token which can be used for accessing content from video content URLs. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to generate a token for playback. + * @param videoName The Video name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video streaming token grants access to the video streaming URLs which can be used by an compatible HLS or - * DASH player. + * @return "Video content token grants access to the video content URLs.". */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listStreamingTokenWithResponse( + public Response listContentTokenWithResponse( String resourceGroupName, String accountName, String videoName, Context context) { - return listStreamingTokenWithResponseAsync(resourceGroupName, accountName, videoName, context).block(); + return listContentTokenWithResponseAsync(resourceGroupName, accountName, videoName, context).block(); } /** diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideosImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideosImpl.java index ec857b05c12fa..5fb28da902080 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideosImpl.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideosImpl.java @@ -10,10 +10,10 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.videoanalyzer.fluent.VideosClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoContentTokenInner; import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoEntityInner; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoStreamingTokenInner; +import com.azure.resourcemanager.videoanalyzer.models.VideoContentToken; import com.azure.resourcemanager.videoanalyzer.models.VideoEntity; -import com.azure.resourcemanager.videoanalyzer.models.VideoStreamingToken; import com.azure.resourcemanager.videoanalyzer.models.Videos; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -73,26 +73,25 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, videoName, context); } - public VideoStreamingToken listStreamingToken(String resourceGroupName, String accountName, String videoName) { - VideoStreamingTokenInner inner = - this.serviceClient().listStreamingToken(resourceGroupName, accountName, videoName); + public VideoContentToken listContentToken(String resourceGroupName, String accountName, String videoName) { + VideoContentTokenInner inner = this.serviceClient().listContentToken(resourceGroupName, accountName, videoName); if (inner != null) { - return new VideoStreamingTokenImpl(inner, this.manager()); + return new VideoContentTokenImpl(inner, this.manager()); } else { return null; } } - public Response listStreamingTokenWithResponse( + public Response listContentTokenWithResponse( String resourceGroupName, String accountName, String videoName, Context context) { - Response inner = - this.serviceClient().listStreamingTokenWithResponse(resourceGroupName, accountName, videoName, context); + Response inner = + this.serviceClient().listContentTokenWithResponse(resourceGroupName, accountName, videoName, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VideoStreamingTokenImpl(inner.getValue(), this.manager())); + new VideoContentTokenImpl(inner.getValue(), this.manager())); } else { return null; } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicies.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicies.java index bd462f04e00f5..8f12471ba3ee1 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicies.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicies.java @@ -11,7 +11,7 @@ /** Resource collection API of AccessPolicies. */ public interface AccessPolicies { /** - * List all existing access policy resources for the specified account. + * List all existing access policy resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -23,7 +23,7 @@ public interface AccessPolicies { PagedIterable list(String resourceGroupName, String accountName); /** - * List all existing access policy resources for the specified account. + * List all existing access policy resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -38,29 +38,29 @@ public interface AccessPolicies { PagedIterable list(String resourceGroupName, String accountName, Integer top, Context context); /** - * Retrieves an existing access policy resource from an account by name. + * Retrieves an existing access policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to retrieve. + * @param accessPolicyName The Access Policy name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ AccessPolicyEntity get(String resourceGroupName, String accountName, String accessPolicyName); /** - * Retrieves an existing access policy resource from an account by name. + * Retrieves an existing access policy resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to retrieve. + * @param accessPolicyName The Access Policy name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ Response getWithResponse( String resourceGroupName, String accountName, String accessPolicyName, Context context); @@ -70,7 +70,7 @@ Response getWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to delete. + * @param accessPolicyName The Access Policy name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -82,7 +82,7 @@ Response getWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param accessPolicyName The name of the access policy to delete. + * @param accessPolicyName The Access Policy name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -93,25 +93,25 @@ Response deleteWithResponse( String resourceGroupName, String accountName, String accessPolicyName, Context context); /** - * Retrieves an existing access policy resource from an account by name. + * Retrieves an existing access policy resource. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ AccessPolicyEntity getById(String id); /** - * Retrieves an existing access policy resource from an account by name. + * Retrieves an existing access policy resource. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return policy that determines how a video can be accessed. + * @return the response. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderAac.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderAac.java new file mode 100644 index 0000000000000..61ab5d935216c --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderAac.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The audio encoding AAC Codec. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") +@JsonTypeName("#Microsoft.VideoAnalyzer.AudioEncoderAac") +@Fluent +public final class AudioEncoderAac extends AudioEncoderBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AudioEncoderAac.class); + + /** {@inheritDoc} */ + @Override + public AudioEncoderAac withBitrateKbps(String bitrateKbps) { + super.withBitrateKbps(bitrateKbps); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderBase.java new file mode 100644 index 0000000000000..040ea37215f51 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderBase.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The audio encoder base. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "@type", + defaultImpl = AudioEncoderBase.class) +@JsonTypeName("AudioEncoderBase") +@JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.AudioEncoderAac", value = AudioEncoderAac.class)}) +@Fluent +public class AudioEncoderBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AudioEncoderBase.class); + + /* + * The audio encoding bitrate. + */ + @JsonProperty(value = "bitrateKbps") + private String bitrateKbps; + + /** + * Get the bitrateKbps property: The audio encoding bitrate. + * + * @return the bitrateKbps value. + */ + public String bitrateKbps() { + return this.bitrateKbps; + } + + /** + * Set the bitrateKbps property: The audio encoding bitrate. + * + * @param bitrateKbps the bitrateKbps value to set. + * @return the AudioEncoderBase object itself. + */ + public AudioEncoderBase withBitrateKbps(String bitrateKbps) { + this.bitrateKbps = bitrateKbps; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CertificateSource.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CertificateSource.java new file mode 100644 index 0000000000000..59a7f5236ad62 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CertificateSource.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Base class for certificate sources. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "@type", + defaultImpl = CertificateSource.class) +@JsonTypeName("CertificateSource") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.PemCertificateList", value = PemCertificateList.class) +}) +@Immutable +public class CertificateSource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateSource.class); + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CredentialsBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CredentialsBase.java new file mode 100644 index 0000000000000..7b6d8392fc3be --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/CredentialsBase.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Base class for credential objects. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "@type", + defaultImpl = CredentialsBase.class) +@JsonTypeName("CredentialsBase") +@JsonSubTypes({ + @JsonSubTypes.Type( + name = "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials", + value = UsernamePasswordCredentials.class) +}) +@Immutable +public class CredentialsBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CredentialsBase.class); + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModules.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModules.java index 7b3e2cb1c9d7c..030dc04439750 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModules.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModules.java @@ -11,7 +11,7 @@ /** Resource collection API of EdgeModules. */ public interface EdgeModules { /** - * List all of the existing edge module resources for a given Video Analyzer account. + * List all existing edge module resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -23,29 +23,26 @@ public interface EdgeModules { PagedIterable list(String resourceGroupName, String accountName); /** - * List all of the existing edge module resources for a given Video Analyzer account. + * List all existing edge module resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param filter Restricts the set of items returned. * @param top 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. - * @param orderby Specifies the key by which the result collection should be ordered. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a collection of EdgeModuleEntity items. */ - PagedIterable list( - String resourceGroupName, String accountName, String filter, Integer top, String orderby, Context context); + PagedIterable list(String resourceGroupName, String accountName, Integer top, Context context); /** - * Retrieves a specific existing edge module resource in the given Video Analyzer account. + * Retrieves an existing edge module resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to retrieve. + * @param edgeModuleName The Edge Module name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -54,11 +51,11 @@ PagedIterable list( EdgeModuleEntity get(String resourceGroupName, String accountName, String edgeModuleName); /** - * Retrieves a specific existing edge module resource in the given Video Analyzer account. + * Retrieves an existing edge module resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to retrieve. + * @param edgeModuleName The Edge Module name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -75,7 +72,7 @@ Response getWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to be deleted. + * @param edgeModuleName The Edge Module name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -89,7 +86,7 @@ Response getWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module to be deleted. + * @param edgeModuleName The Edge Module name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -109,7 +106,7 @@ Response deleteWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module used to create a new provisioning token. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -129,7 +126,7 @@ EdgeModuleProvisioningToken listProvisioningToken( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param edgeModuleName The name of the edge module used to create a new provisioning token. + * @param edgeModuleName The Edge Module name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -145,7 +142,7 @@ Response listProvisioningTokenWithResponse( Context context); /** - * Retrieves a specific existing edge module resource in the given Video Analyzer account. + * Retrieves an existing edge module resource. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -156,7 +153,7 @@ Response listProvisioningTokenWithResponse( EdgeModuleEntity getById(String id); /** - * Retrieves a specific existing edge module resource in the given Video Analyzer account. + * Retrieves an existing edge module resource. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderCustomPreset.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderCustomPreset.java new file mode 100644 index 0000000000000..8ae0a660c709e --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderCustomPreset.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The encoding custom preset for specifying custom encoder settings. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") +@JsonTypeName("#Microsoft.VideoAnalyzer.EncoderCustomPreset") +@Fluent +public final class EncoderCustomPreset extends EncoderPresetBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EncoderCustomPreset.class); + + /* + * The audio encoder. + */ + @JsonProperty(value = "audioEncoder") + private AudioEncoderBase audioEncoder; + + /* + * The video encoder. + */ + @JsonProperty(value = "videoEncoder") + private VideoEncoderBase videoEncoder; + + /** + * Get the audioEncoder property: The audio encoder. + * + * @return the audioEncoder value. + */ + public AudioEncoderBase audioEncoder() { + return this.audioEncoder; + } + + /** + * Set the audioEncoder property: The audio encoder. + * + * @param audioEncoder the audioEncoder value to set. + * @return the EncoderCustomPreset object itself. + */ + public EncoderCustomPreset withAudioEncoder(AudioEncoderBase audioEncoder) { + this.audioEncoder = audioEncoder; + return this; + } + + /** + * Get the videoEncoder property: The video encoder. + * + * @return the videoEncoder value. + */ + public VideoEncoderBase videoEncoder() { + return this.videoEncoder; + } + + /** + * Set the videoEncoder property: The video encoder. + * + * @param videoEncoder the videoEncoder value to set. + * @return the EncoderCustomPreset object itself. + */ + public EncoderCustomPreset withVideoEncoder(VideoEncoderBase videoEncoder) { + this.videoEncoder = videoEncoder; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (audioEncoder() != null) { + audioEncoder().validate(); + } + if (videoEncoder() != null) { + videoEncoder().validate(); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderPresetBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderPresetBase.java new file mode 100644 index 0000000000000..38d99fc3ce0a9 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderPresetBase.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Encoding preset base. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "@type", + defaultImpl = EncoderPresetBase.class) +@JsonTypeName("EncoderPresetBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.EncoderSystemPreset", value = EncoderSystemPreset.class), + @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.EncoderCustomPreset", value = EncoderCustomPreset.class) +}) +@Immutable +public class EncoderPresetBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EncoderPresetBase.class); + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderProcessor.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderProcessor.java new file mode 100644 index 0000000000000..9f51e6fd292b9 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderProcessor.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** A processor node which encodes the media. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") +@JsonTypeName("#Microsoft.VideoAnalyzer.EncoderProcessor") +@Fluent +public final class EncoderProcessor extends ProcessorNodeBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EncoderProcessor.class); + + /* + * The encoder preset. + */ + @JsonProperty(value = "preset", required = true) + private EncoderPresetBase preset; + + /** + * Get the preset property: The encoder preset. + * + * @return the preset value. + */ + public EncoderPresetBase preset() { + return this.preset; + } + + /** + * Set the preset property: The encoder preset. + * + * @param preset the preset value to set. + * @return the EncoderProcessor object itself. + */ + public EncoderProcessor withPreset(EncoderPresetBase preset) { + this.preset = preset; + return this; + } + + /** {@inheritDoc} */ + @Override + public EncoderProcessor withInputs(List inputs) { + super.withInputs(inputs); + return this; + } + + /** {@inheritDoc} */ + @Override + public EncoderProcessor withName(String name) { + super.withName(name); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (preset() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property preset in model EncoderProcessor")); + } else { + preset().validate(); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderSystemPreset.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderSystemPreset.java new file mode 100644 index 0000000000000..56b6a0cfaecb3 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderSystemPreset.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The encoding built in system preset. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") +@JsonTypeName("#Microsoft.VideoAnalyzer.EncoderSystemPreset") +@Fluent +public final class EncoderSystemPreset extends EncoderPresetBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EncoderSystemPreset.class); + + /* + * The system preset value. + */ + @JsonProperty(value = "name", required = true) + private EncoderSystemPresetType name; + + /** + * Get the name property: The system preset value. + * + * @return the name value. + */ + public EncoderSystemPresetType name() { + return this.name; + } + + /** + * Set the name property: The system preset value. + * + * @param name the name value to set. + * @return the EncoderSystemPreset object itself. + */ + public EncoderSystemPreset withName(EncoderSystemPresetType name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model EncoderSystemPreset")); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderSystemPresetType.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderSystemPresetType.java new file mode 100644 index 0000000000000..bbb6105ff8682 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderSystemPresetType.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for EncoderSystemPresetType. */ +public final class EncoderSystemPresetType extends ExpandableStringEnum { + /** Static value SingleLayer_540p_H264_AAC for EncoderSystemPresetType. */ + public static final EncoderSystemPresetType SINGLE_LAYER_540P_H264_AAC = fromString("SingleLayer_540p_H264_AAC"); + + /** Static value SingleLayer_720p_H264_AAC for EncoderSystemPresetType. */ + public static final EncoderSystemPresetType SINGLE_LAYER_720P_H264_AAC = fromString("SingleLayer_720p_H264_AAC"); + + /** Static value SingleLayer_1080p_H264_AAC for EncoderSystemPresetType. */ + public static final EncoderSystemPresetType SINGLE_LAYER_1080P_H264_AAC = fromString("SingleLayer_1080p_H264_AAC"); + + /** Static value SingleLayer_2160p_H264_AAC for EncoderSystemPresetType. */ + public static final EncoderSystemPresetType SINGLE_LAYER_2160P_H264_AAC = fromString("SingleLayer_2160p_H264_AAC"); + + /** + * Creates or finds a EncoderSystemPresetType from its string representation. + * + * @param name a name to look for. + * @return the corresponding EncoderSystemPresetType. + */ + @JsonCreator + public static EncoderSystemPresetType fromString(String name) { + return fromString(name, EncoderSystemPresetType.class); + } + + /** @return known EncoderSystemPresetType values. */ + public static Collection values() { + return values(EncoderSystemPresetType.class); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EndpointBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EndpointBase.java new file mode 100644 index 0000000000000..57d6793deaf59 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EndpointBase.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Base class for endpoints. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "@type", + defaultImpl = EndpointBase.class) +@JsonTypeName("EndpointBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.UnsecuredEndpoint", value = UnsecuredEndpoint.class), + @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.TlsEndpoint", value = TlsEndpoint.class) +}) +@Fluent +public class EndpointBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointBase.class); + + /* + * Credentials to be presented to the endpoint. + */ + @JsonProperty(value = "credentials") + private CredentialsBase credentials; + + /* + * The endpoint URL for Video Analyzer to connect to. + */ + @JsonProperty(value = "url", required = true) + private String url; + + /* + * Optional tunnel used to connect to the endpoint. + */ + @JsonProperty(value = "tunnel") + private TunnelBase tunnel; + + /** + * Get the credentials property: Credentials to be presented to the endpoint. + * + * @return the credentials value. + */ + public CredentialsBase credentials() { + return this.credentials; + } + + /** + * Set the credentials property: Credentials to be presented to the endpoint. + * + * @param credentials the credentials value to set. + * @return the EndpointBase object itself. + */ + public EndpointBase withCredentials(CredentialsBase credentials) { + this.credentials = credentials; + return this; + } + + /** + * Get the url property: The endpoint URL for Video Analyzer to connect to. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: The endpoint URL for Video Analyzer to connect to. + * + * @param url the url value to set. + * @return the EndpointBase object itself. + */ + public EndpointBase withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the tunnel property: Optional tunnel used to connect to the endpoint. + * + * @return the tunnel value. + */ + public TunnelBase tunnel() { + return this.tunnel; + } + + /** + * Set the tunnel property: Optional tunnel used to connect to the endpoint. + * + * @param tunnel the tunnel value to set. + * @return the EndpointBase object itself. + */ + public EndpointBase withTunnel(TunnelBase tunnel) { + this.tunnel = tunnel; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (credentials() != null) { + credentials().validate(); + } + if (url() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property url in model EndpointBase")); + } + if (tunnel() != null) { + tunnel().validate(); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/GroupLevelAccessControl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/GroupLevelAccessControl.java new file mode 100644 index 0000000000000..4bdce03f48836 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/GroupLevelAccessControl.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The GroupLevelAccessControl model. */ +@Fluent +public final class GroupLevelAccessControl { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GroupLevelAccessControl.class); + + /* + * Whether or not public network access is allowed for specified resources + * under the Video Analyzer account. + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + + /** + * Get the publicNetworkAccess property: Whether or not public network access is allowed for specified resources + * under the Video Analyzer account. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Whether or not public network access is allowed for specified resources + * under the Video Analyzer account. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the GroupLevelAccessControl object itself. + */ + public GroupLevelAccessControl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/IotHub.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/IotHub.java new file mode 100644 index 0000000000000..923e41d834a14 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/IotHub.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The IoT Hub details. */ +@Fluent +public final class IotHub { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHub.class); + + /* + * The IoT Hub ARM ID. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /* + * The IoT Hub identity. + */ + @JsonProperty(value = "identity", required = true) + private ResourceIdentity identity; + + /* + * The current status of the Iot Hub mapping. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private String status; + + /** + * Get the id property: The IoT Hub ARM ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The IoT Hub ARM ID. + * + * @param id the id value to set. + * @return the IotHub object itself. + */ + public IotHub withId(String id) { + this.id = id; + return this; + } + + /** + * Get the identity property: The IoT Hub identity. + * + * @return the identity value. + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The IoT Hub identity. + * + * @param identity the identity value to set. + * @return the IotHub object itself. + */ + public IotHub withIdentity(ResourceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the status property: The current status of the Iot Hub mapping. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property id in model IotHub")); + } + if (identity() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property identity in model IotHub")); + } else { + identity().validate(); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Kind.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Kind.java new file mode 100644 index 0000000000000..3f35111bc2d0c --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Kind.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Kind. */ +public final class Kind extends ExpandableStringEnum { + /** Static value Live for Kind. */ + public static final Kind LIVE = fromString("Live"); + + /** Static value Batch for Kind. */ + public static final Kind BATCH = fromString("Batch"); + + /** + * Creates or finds a Kind from its string representation. + * + * @param name a name to look for. + * @return the corresponding Kind. + */ + @JsonCreator + public static Kind fromString(String name) { + return fromString(name, Kind.class); + } + + /** @return known Kind values. */ + public static Collection values() { + return values(Kind.class); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipeline.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipeline.java new file mode 100644 index 0000000000000..ab66b3ad21a18 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipeline.java @@ -0,0 +1,320 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineInner; +import java.util.List; + +/** An immutable client-side representation of LivePipeline. */ +public interface LivePipeline { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: The system metadata relating to this resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the topologyName property: The reference to an existing pipeline topology defined for real-time content + * processing. When activated, this live pipeline will process content according to the pipeline topology + * definition. + * + * @return the topologyName value. + */ + String topologyName(); + + /** + * Gets the description property: An optional description for the pipeline. + * + * @return the description value. + */ + String description(); + + /** + * Gets the bitrateKbps property: Bitrate capacity in kbps for the live pipeline. The support bit rate is between + * 500 to 3000 kbps. + * + * @return the bitrateKbps value. + */ + Integer bitrateKbps(); + + /** + * Gets the state property: Current pipeline state (read-only). + * + * @return the state value. + */ + LivePipelineState state(); + + /** + * Gets the parameters property: List of the instance level parameter values for the user-defined topology + * parameters. A pipeline can only define or override parameters values for parameters which have been declared in + * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a + * default value can be optionally be overridden. + * + * @return the parameters value. + */ + List parameters(); + + /** + * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineInner object. + * + * @return the inner object. + */ + LivePipelineInner innerModel(); + + /** The entirety of the LivePipeline definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The LivePipeline definition stages. */ + interface DefinitionStages { + /** The first stage of the LivePipeline definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the LivePipeline definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @return the next definition stage. + */ + WithCreate withExistingVideoAnalyzer(String resourceGroupName, String accountName); + } + /** + * The stage of the LivePipeline definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTopologyName, + DefinitionStages.WithDescription, + DefinitionStages.WithBitrateKbps, + DefinitionStages.WithParameters { + /** + * Executes the create request. + * + * @return the created resource. + */ + LivePipeline create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + LivePipeline create(Context context); + } + /** The stage of the LivePipeline definition allowing to specify topologyName. */ + interface WithTopologyName { + /** + * Specifies the topologyName property: The reference to an existing pipeline topology defined for real-time + * content processing. When activated, this live pipeline will process content according to the pipeline + * topology definition.. + * + * @param topologyName The reference to an existing pipeline topology defined for real-time content + * processing. When activated, this live pipeline will process content according to the pipeline + * topology definition. + * @return the next definition stage. + */ + WithCreate withTopologyName(String topologyName); + } + /** The stage of the LivePipeline definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: An optional description for the pipeline.. + * + * @param description An optional description for the pipeline. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the LivePipeline definition allowing to specify bitrateKbps. */ + interface WithBitrateKbps { + /** + * Specifies the bitrateKbps property: Bitrate capacity in kbps for the live pipeline. The support bit rate + * is between 500 to 3000 kbps.. + * + * @param bitrateKbps Bitrate capacity in kbps for the live pipeline. The support bit rate is between 500 to + * 3000 kbps. + * @return the next definition stage. + */ + WithCreate withBitrateKbps(Integer bitrateKbps); + } + /** The stage of the LivePipeline definition allowing to specify parameters. */ + interface WithParameters { + /** + * Specifies the parameters property: List of the instance level parameter values for the user-defined + * topology parameters. A pipeline can only define or override parameters values for parameters which have + * been declared in the referenced topology. Topology parameters without a default value must be defined. + * Topology parameters with a default value can be optionally be overridden.. + * + * @param parameters List of the instance level parameter values for the user-defined topology parameters. A + * pipeline can only define or override parameters values for parameters which have been declared in the + * referenced topology. Topology parameters without a default value must be defined. Topology parameters + * with a default value can be optionally be overridden. + * @return the next definition stage. + */ + WithCreate withParameters(List parameters); + } + } + /** + * Begins update for the LivePipeline resource. + * + * @return the stage of resource update. + */ + LivePipeline.Update update(); + + /** The template for LivePipeline update. */ + interface Update + extends UpdateStages.WithTopologyName, + UpdateStages.WithDescription, + UpdateStages.WithBitrateKbps, + UpdateStages.WithParameters { + /** + * Executes the update request. + * + * @return the updated resource. + */ + LivePipeline apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + LivePipeline apply(Context context); + } + /** The LivePipeline update stages. */ + interface UpdateStages { + /** The stage of the LivePipeline update allowing to specify topologyName. */ + interface WithTopologyName { + /** + * Specifies the topologyName property: The reference to an existing pipeline topology defined for real-time + * content processing. When activated, this live pipeline will process content according to the pipeline + * topology definition.. + * + * @param topologyName The reference to an existing pipeline topology defined for real-time content + * processing. When activated, this live pipeline will process content according to the pipeline + * topology definition. + * @return the next definition stage. + */ + Update withTopologyName(String topologyName); + } + /** The stage of the LivePipeline update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: An optional description for the pipeline.. + * + * @param description An optional description for the pipeline. + * @return the next definition stage. + */ + Update withDescription(String description); + } + /** The stage of the LivePipeline update allowing to specify bitrateKbps. */ + interface WithBitrateKbps { + /** + * Specifies the bitrateKbps property: Bitrate capacity in kbps for the live pipeline. The support bit rate + * is between 500 to 3000 kbps.. + * + * @param bitrateKbps Bitrate capacity in kbps for the live pipeline. The support bit rate is between 500 to + * 3000 kbps. + * @return the next definition stage. + */ + Update withBitrateKbps(Integer bitrateKbps); + } + /** The stage of the LivePipeline update allowing to specify parameters. */ + interface WithParameters { + /** + * Specifies the parameters property: List of the instance level parameter values for the user-defined + * topology parameters. A pipeline can only define or override parameters values for parameters which have + * been declared in the referenced topology. Topology parameters without a default value must be defined. + * Topology parameters with a default value can be optionally be overridden.. + * + * @param parameters List of the instance level parameter values for the user-defined topology parameters. A + * pipeline can only define or override parameters values for parameters which have been declared in the + * referenced topology. Topology parameters without a default value must be defined. Topology parameters + * with a default value can be optionally be overridden. + * @return the next definition stage. + */ + Update withParameters(List parameters); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + LivePipeline refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + LivePipeline refresh(Context context); + + /** + * Activates a live pipeline with the name provided. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void activate(); + + /** + * Activates a live pipeline with the name provided. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void activate(Context context); + + /** + * Deactivates a live pipeline with the name provided. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deactivate(); + + /** + * Deactivates a live pipeline with the name provided. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deactivate(Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineCollection.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineCollection.java new file mode 100644 index 0000000000000..30c28c6f0ed60 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineCollection.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A collection of LivePipeline items. */ +@Fluent +public final class LivePipelineCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LivePipelineCollection.class); + + /* + * A collection of LivePipeline items. + */ + @JsonProperty(value = "value") + private List value; + + /* + * A link to the next page of the collection (when the collection contains + * too many results to return in one response). + */ + @JsonProperty(value = "@nextLink") + private String nextLink; + + /** + * Get the value property: A collection of LivePipeline items. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A collection of LivePipeline items. + * + * @param value the value value to set. + * @return the LivePipelineCollection object itself. + */ + public LivePipelineCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: A link to the next page of the collection (when the collection contains too many + * results to return in one response). + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: A link to the next page of the collection (when the collection contains too many + * results to return in one response). + * + * @param nextLink the nextLink value to set. + * @return the LivePipelineCollection object itself. + */ + public LivePipelineCollection withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineOperationStatus.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineOperationStatus.java new file mode 100644 index 0000000000000..671f6f284b2dd --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineOperationStatus.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineOperationStatusInner; + +/** An immutable client-side representation of LivePipelineOperationStatus. */ +public interface LivePipelineOperationStatus { + /** + * Gets the name property: The name of the live pipeline operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: The status of the live pipeline operation. + * + * @return the status value. + */ + String status(); + + /** + * Gets the error property: The error details for the live pipeline operation. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.LivePipelineOperationStatusInner object. + * + * @return the inner object. + */ + LivePipelineOperationStatusInner innerModel(); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineOperationStatuses.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineOperationStatuses.java new file mode 100644 index 0000000000000..13bd34ea81a58 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineOperationStatuses.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of LivePipelineOperationStatuses. */ +public interface LivePipelineOperationStatuses { + /** + * Get the operation status of a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param operationId The operation ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a live pipeline. + */ + LivePipelineOperationStatus get( + String resourceGroupName, String accountName, String livePipelineName, String operationId); + + /** + * Get the operation status of a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param operationId The operation ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a live pipeline. + */ + Response getWithResponse( + String resourceGroupName, String accountName, String livePipelineName, String operationId, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineState.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineState.java new file mode 100644 index 0000000000000..ee04e3b6d4f25 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineState.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for LivePipelineState. */ +public final class LivePipelineState extends ExpandableStringEnum { + /** Static value Inactive for LivePipelineState. */ + public static final LivePipelineState INACTIVE = fromString("Inactive"); + + /** Static value Activating for LivePipelineState. */ + public static final LivePipelineState ACTIVATING = fromString("Activating"); + + /** Static value Active for LivePipelineState. */ + public static final LivePipelineState ACTIVE = fromString("Active"); + + /** Static value Deactivating for LivePipelineState. */ + public static final LivePipelineState DEACTIVATING = fromString("Deactivating"); + + /** + * Creates or finds a LivePipelineState from its string representation. + * + * @param name a name to look for. + * @return the corresponding LivePipelineState. + */ + @JsonCreator + public static LivePipelineState fromString(String name) { + return fromString(name, LivePipelineState.class); + } + + /** @return known LivePipelineState values. */ + public static Collection values() { + return values(LivePipelineState.class); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelines.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelines.java new file mode 100644 index 0000000000000..fa808cfd1848d --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelines.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of LivePipelines. */ +public interface LivePipelines { + /** + * Retrieves a list of live pipeline that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of LivePipeline items. + */ + PagedIterable list(String resourceGroupName, String accountName); + + /** + * Retrieves a list of live pipeline that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of LivePipeline items. + */ + PagedIterable list( + String resourceGroupName, String accountName, String filter, Integer top, Context context); + + /** + * Retrieves a Live Pipeline by name. If a live pipeline with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + LivePipeline get(String resourceGroupName, String accountName, String livePipelineName); + + /** + * Retrieves a Live Pipeline by name. If a live pipeline with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + Response getWithResponse( + String resourceGroupName, String accountName, String livePipelineName, Context context); + + /** + * Deletes a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String livePipelineName); + + /** + * Deletes a live pipeline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteWithResponse( + String resourceGroupName, String accountName, String livePipelineName, Context context); + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void activate(String resourceGroupName, String accountName, String livePipelineName); + + /** + * Activates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void activate(String resourceGroupName, String accountName, String livePipelineName, Context context); + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deactivate(String resourceGroupName, String accountName, String livePipelineName); + + /** + * Deactivates a live pipeline with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param livePipelineName Live pipeline unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deactivate(String resourceGroupName, String accountName, String livePipelineName, Context context); + + /** + * Retrieves a Live Pipeline by name. If a live pipeline with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + LivePipeline getById(String id); + + /** + * Retrieves a Live Pipeline by name. If a live pipeline with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return live Pipeline represents an unique instance of a pipeline topology which is used for real-time content + * ingestion and analysis. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a live pipeline. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a live pipeline. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new LivePipeline resource. + * + * @param name resource name. + * @return the first stage of the new LivePipeline definition. + */ + LivePipeline.DefinitionStages.Blank define(String name); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NetworkAccessControl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NetworkAccessControl.java new file mode 100644 index 0000000000000..9679be7b1a581 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NetworkAccessControl.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The NetworkAccessControl model. */ +@Fluent +public final class NetworkAccessControl { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkAccessControl.class); + + /* + * Public network access for integration group. + */ + @JsonProperty(value = "integration") + private GroupLevelAccessControl integration; + + /* + * Public network access for ingestion group. + */ + @JsonProperty(value = "ingestion") + private GroupLevelAccessControl ingestion; + + /* + * Public network access for consumption group. + */ + @JsonProperty(value = "consumption") + private GroupLevelAccessControl consumption; + + /** + * Get the integration property: Public network access for integration group. + * + * @return the integration value. + */ + public GroupLevelAccessControl integration() { + return this.integration; + } + + /** + * Set the integration property: Public network access for integration group. + * + * @param integration the integration value to set. + * @return the NetworkAccessControl object itself. + */ + public NetworkAccessControl withIntegration(GroupLevelAccessControl integration) { + this.integration = integration; + return this; + } + + /** + * Get the ingestion property: Public network access for ingestion group. + * + * @return the ingestion value. + */ + public GroupLevelAccessControl ingestion() { + return this.ingestion; + } + + /** + * Set the ingestion property: Public network access for ingestion group. + * + * @param ingestion the ingestion value to set. + * @return the NetworkAccessControl object itself. + */ + public NetworkAccessControl withIngestion(GroupLevelAccessControl ingestion) { + this.ingestion = ingestion; + return this; + } + + /** + * Get the consumption property: Public network access for consumption group. + * + * @return the consumption value. + */ + public GroupLevelAccessControl consumption() { + return this.consumption; + } + + /** + * Set the consumption property: Public network access for consumption group. + * + * @param consumption the consumption value to set. + * @return the NetworkAccessControl object itself. + */ + public NetworkAccessControl withConsumption(GroupLevelAccessControl consumption) { + this.consumption = consumption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (integration() != null) { + integration().validate(); + } + if (ingestion() != null) { + ingestion().validate(); + } + if (consumption() != null) { + consumption().validate(); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NodeBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NodeBase.java new file mode 100644 index 0000000000000..2edd74120e078 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NodeBase.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Base class for nodes. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "@type", + defaultImpl = NodeBase.class) +@JsonTypeName("NodeBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.SourceNodeBase", value = SourceNodeBase.class), + @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.ProcessorNodeBase", value = ProcessorNodeBase.class), + @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.SinkNodeBase", value = SinkNodeBase.class) +}) +@Fluent +public class NodeBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NodeBase.class); + + /* + * Node name. Must be unique within the topology. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Get the name property: Node name. Must be unique within the topology. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Node name. Must be unique within the topology. + * + * @param name the name value to set. + * @return the NodeBase object itself. + */ + public NodeBase withName(String name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property name in model NodeBase")); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NodeInput.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NodeInput.java new file mode 100644 index 0000000000000..8e61195120cef --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/NodeInput.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Describes an input signal to be used on a pipeline node. */ +@Fluent +public final class NodeInput { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NodeInput.class); + + /* + * The name of the upstream node in the pipeline which output is used as + * input of the current node. + */ + @JsonProperty(value = "nodeName", required = true) + private String nodeName; + + /** + * Get the nodeName property: The name of the upstream node in the pipeline which output is used as input of the + * current node. + * + * @return the nodeName value. + */ + public String nodeName() { + return this.nodeName; + } + + /** + * Set the nodeName property: The name of the upstream node in the pipeline which output is used as input of the + * current node. + * + * @param nodeName the nodeName value to set. + * @return the NodeInput object itself. + */ + public NodeInput withNodeName(String nodeName) { + this.nodeName = nodeName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (nodeName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property nodeName in model NodeInput")); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterDeclaration.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterDeclaration.java new file mode 100644 index 0000000000000..df3ef8b69f608 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterDeclaration.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Single topology parameter declaration. Declared parameters can and must be referenced throughout the topology and can + * optionally have default values to be used when they are not defined in the pipelines. + */ +@Fluent +public final class ParameterDeclaration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ParameterDeclaration.class); + + /* + * Name of the parameter. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Type of the parameter. + */ + @JsonProperty(value = "type", required = true) + private ParameterType type; + + /* + * Description of the parameter. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The default value for the parameter to be used if the pipeline does not + * specify a value. + */ + @JsonProperty(value = "default") + private String defaultProperty; + + /** + * Get the name property: Name of the parameter. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the parameter. + * + * @param name the name value to set. + * @return the ParameterDeclaration object itself. + */ + public ParameterDeclaration withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: Type of the parameter. + * + * @return the type value. + */ + public ParameterType type() { + return this.type; + } + + /** + * Set the type property: Type of the parameter. + * + * @param type the type value to set. + * @return the ParameterDeclaration object itself. + */ + public ParameterDeclaration withType(ParameterType type) { + this.type = type; + return this; + } + + /** + * Get the description property: Description of the parameter. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the parameter. + * + * @param description the description value to set. + * @return the ParameterDeclaration object itself. + */ + public ParameterDeclaration withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the defaultProperty property: The default value for the parameter to be used if the pipeline does not specify + * a value. + * + * @return the defaultProperty value. + */ + public String defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the defaultProperty property: The default value for the parameter to be used if the pipeline does not specify + * a value. + * + * @param defaultProperty the defaultProperty value to set. + * @return the ParameterDeclaration object itself. + */ + public ParameterDeclaration withDefaultProperty(String defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model ParameterDeclaration")); + } + if (type() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property type in model ParameterDeclaration")); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterDefinition.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterDefinition.java new file mode 100644 index 0000000000000..512acacd4db4f --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterDefinition.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines the parameter value of an specific pipeline topology parameter. See pipeline topology parameters for more + * information. + */ +@Fluent +public final class ParameterDefinition { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ParameterDefinition.class); + + /* + * Name of the parameter declared in the pipeline topology. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Parameter value to be applied on this specific pipeline. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the name property: Name of the parameter declared in the pipeline topology. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the parameter declared in the pipeline topology. + * + * @param name the name value to set. + * @return the ParameterDefinition object itself. + */ + public ParameterDefinition withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: Parameter value to be applied on this specific pipeline. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Parameter value to be applied on this specific pipeline. + * + * @param value the value value to set. + * @return the ParameterDefinition object itself. + */ + public ParameterDefinition withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model ParameterDefinition")); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterType.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterType.java new file mode 100644 index 0000000000000..6d8a73bedfeab --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ParameterType.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ParameterType. */ +public final class ParameterType extends ExpandableStringEnum { + /** Static value String for ParameterType. */ + public static final ParameterType STRING = fromString("String"); + + /** Static value SecretString for ParameterType. */ + public static final ParameterType SECRET_STRING = fromString("SecretString"); + + /** Static value Int for ParameterType. */ + public static final ParameterType INT = fromString("Int"); + + /** Static value Double for ParameterType. */ + public static final ParameterType DOUBLE = fromString("Double"); + + /** Static value Bool for ParameterType. */ + public static final ParameterType BOOL = fromString("Bool"); + + /** + * Creates or finds a ParameterType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ParameterType. + */ + @JsonCreator + public static ParameterType fromString(String name) { + return fromString(name, ParameterType.class); + } + + /** @return known ParameterType values. */ + public static Collection values() { + return values(ParameterType.class); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PemCertificateList.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PemCertificateList.java new file mode 100644 index 0000000000000..06a1aa042ce36 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PemCertificateList.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** A list of PEM formatted certificates. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") +@JsonTypeName("#Microsoft.VideoAnalyzer.PemCertificateList") +@Fluent +public final class PemCertificateList extends CertificateSource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PemCertificateList.class); + + /* + * PEM formatted public certificates. One certificate per entry. + */ + @JsonProperty(value = "certificates", required = true) + private List certificates; + + /** + * Get the certificates property: PEM formatted public certificates. One certificate per entry. + * + * @return the certificates value. + */ + public List certificates() { + return this.certificates; + } + + /** + * Set the certificates property: PEM formatted public certificates. One certificate per entry. + * + * @param certificates the certificates value to set. + * @return the PemCertificateList object itself. + */ + public PemCertificateList withCertificates(List certificates) { + this.certificates = certificates; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (certificates() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property certificates in model PemCertificateList")); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJob.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJob.java new file mode 100644 index 0000000000000..dead0a786d588 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJob.java @@ -0,0 +1,280 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** An immutable client-side representation of PipelineJob. */ +public interface PipelineJob { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: The system metadata relating to this resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the topologyName property: The reference to an existing pipeline topology defined for real-time content + * processing. When activated, this live pipeline will process content according to the pipeline topology + * definition. + * + * @return the topologyName value. + */ + String topologyName(); + + /** + * Gets the description property: An optional description for the pipeline. + * + * @return the description value. + */ + String description(); + + /** + * Gets the state property: Current pipeline state (read-only). + * + * @return the state value. + */ + PipelineJobState state(); + + /** + * Gets the expiration property: The expiration time when the pipeline job will be automatically deleted. + * + * @return the expiration value. + */ + OffsetDateTime expiration(); + + /** + * Gets the error property: An optional error information about the pipeline job failure. + * + * @return the error value. + */ + PipelineJobError error(); + + /** + * Gets the parameters property: List of the instance level parameter values for the user-defined topology + * parameters. A pipeline can only define or override parameters values for parameters which have been declared in + * the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a + * default value can be optionally be overridden. + * + * @return the parameters value. + */ + List parameters(); + + /** + * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobInner object. + * + * @return the inner object. + */ + PipelineJobInner innerModel(); + + /** The entirety of the PipelineJob definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The PipelineJob definition stages. */ + interface DefinitionStages { + /** The first stage of the PipelineJob definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the PipelineJob definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @return the next definition stage. + */ + WithCreate withExistingVideoAnalyzer(String resourceGroupName, String accountName); + } + /** + * The stage of the PipelineJob definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTopologyName, + DefinitionStages.WithDescription, + DefinitionStages.WithParameters { + /** + * Executes the create request. + * + * @return the created resource. + */ + PipelineJob create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PipelineJob create(Context context); + } + /** The stage of the PipelineJob definition allowing to specify topologyName. */ + interface WithTopologyName { + /** + * Specifies the topologyName property: The reference to an existing pipeline topology defined for real-time + * content processing. When activated, this live pipeline will process content according to the pipeline + * topology definition.. + * + * @param topologyName The reference to an existing pipeline topology defined for real-time content + * processing. When activated, this live pipeline will process content according to the pipeline + * topology definition. + * @return the next definition stage. + */ + WithCreate withTopologyName(String topologyName); + } + /** The stage of the PipelineJob definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: An optional description for the pipeline.. + * + * @param description An optional description for the pipeline. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the PipelineJob definition allowing to specify parameters. */ + interface WithParameters { + /** + * Specifies the parameters property: List of the instance level parameter values for the user-defined + * topology parameters. A pipeline can only define or override parameters values for parameters which have + * been declared in the referenced topology. Topology parameters without a default value must be defined. + * Topology parameters with a default value can be optionally be overridden.. + * + * @param parameters List of the instance level parameter values for the user-defined topology parameters. A + * pipeline can only define or override parameters values for parameters which have been declared in the + * referenced topology. Topology parameters without a default value must be defined. Topology parameters + * with a default value can be optionally be overridden. + * @return the next definition stage. + */ + WithCreate withParameters(List parameters); + } + } + /** + * Begins update for the PipelineJob resource. + * + * @return the stage of resource update. + */ + PipelineJob.Update update(); + + /** The template for PipelineJob update. */ + interface Update extends UpdateStages.WithTopologyName, UpdateStages.WithDescription, UpdateStages.WithParameters { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PipelineJob apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PipelineJob apply(Context context); + } + /** The PipelineJob update stages. */ + interface UpdateStages { + /** The stage of the PipelineJob update allowing to specify topologyName. */ + interface WithTopologyName { + /** + * Specifies the topologyName property: The reference to an existing pipeline topology defined for real-time + * content processing. When activated, this live pipeline will process content according to the pipeline + * topology definition.. + * + * @param topologyName The reference to an existing pipeline topology defined for real-time content + * processing. When activated, this live pipeline will process content according to the pipeline + * topology definition. + * @return the next definition stage. + */ + Update withTopologyName(String topologyName); + } + /** The stage of the PipelineJob update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: An optional description for the pipeline.. + * + * @param description An optional description for the pipeline. + * @return the next definition stage. + */ + Update withDescription(String description); + } + /** The stage of the PipelineJob update allowing to specify parameters. */ + interface WithParameters { + /** + * Specifies the parameters property: List of the instance level parameter values for the user-defined + * topology parameters. A pipeline can only define or override parameters values for parameters which have + * been declared in the referenced topology. Topology parameters without a default value must be defined. + * Topology parameters with a default value can be optionally be overridden.. + * + * @param parameters List of the instance level parameter values for the user-defined topology parameters. A + * pipeline can only define or override parameters values for parameters which have been declared in the + * referenced topology. Topology parameters without a default value must be defined. Topology parameters + * with a default value can be optionally be overridden. + * @return the next definition stage. + */ + Update withParameters(List parameters); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PipelineJob refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PipelineJob refresh(Context context); + + /** + * Cancels a pipeline job with the name provided. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void cancel(); + + /** + * Cancels a pipeline job with the name provided. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void cancel(Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobCollection.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobCollection.java new file mode 100644 index 0000000000000..551140a219b68 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobCollection.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A collection of PipelineJob items. */ +@Fluent +public final class PipelineJobCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PipelineJobCollection.class); + + /* + * A collection of PipelineJob items. + */ + @JsonProperty(value = "value") + private List value; + + /* + * A link to the next page of the collection (when the collection contains + * too many results to return in one response). + */ + @JsonProperty(value = "@nextLink") + private String nextLink; + + /** + * Get the value property: A collection of PipelineJob items. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A collection of PipelineJob items. + * + * @param value the value value to set. + * @return the PipelineJobCollection object itself. + */ + public PipelineJobCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: A link to the next page of the collection (when the collection contains too many + * results to return in one response). + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: A link to the next page of the collection (when the collection contains too many + * results to return in one response). + * + * @param nextLink the nextLink value to set. + * @return the PipelineJobCollection object itself. + */ + public PipelineJobCollection withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobError.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobError.java new file mode 100644 index 0000000000000..f08622d8d4c94 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobError.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The pipeline job error details. */ +@Fluent +public final class PipelineJobError { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PipelineJobError.class); + + /* + * The error code. + */ + @JsonProperty(value = "code") + private String code; + + /* + * The error message. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get the code property: The error code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Set the code property: The error code. + * + * @param code the code value to set. + * @return the PipelineJobError object itself. + */ + public PipelineJobError withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message property: The error message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: The error message. + * + * @param message the message value to set. + * @return the PipelineJobError object itself. + */ + public PipelineJobError withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobOperationStatus.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobOperationStatus.java new file mode 100644 index 0000000000000..2bbfbbdb0fce2 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobOperationStatus.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobOperationStatusInner; + +/** An immutable client-side representation of PipelineJobOperationStatus. */ +public interface PipelineJobOperationStatus { + /** + * Gets the name property: The name of the pipeline job operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: The status of the pipeline job operation. + * + * @return the status value. + */ + String status(); + + /** + * Gets the error property: The error details for the pipeline job operation. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineJobOperationStatusInner object. + * + * @return the inner object. + */ + PipelineJobOperationStatusInner innerModel(); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobOperationStatuses.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobOperationStatuses.java new file mode 100644 index 0000000000000..3caf3d79cfa47 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobOperationStatuses.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of PipelineJobOperationStatuses. */ +public interface PipelineJobOperationStatuses { + /** + * Get the operation status of a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param operationId The operation ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a pipeline job. + */ + PipelineJobOperationStatus get( + String resourceGroupName, String accountName, String pipelineJobName, String operationId); + + /** + * Get the operation status of a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param operationId The operation ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation status of a pipeline job. + */ + Response getWithResponse( + String resourceGroupName, String accountName, String pipelineJobName, String operationId, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobState.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobState.java new file mode 100644 index 0000000000000..22cd9f10610c9 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobState.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PipelineJobState. */ +public final class PipelineJobState extends ExpandableStringEnum { + /** Static value Processing for PipelineJobState. */ + public static final PipelineJobState PROCESSING = fromString("Processing"); + + /** Static value Canceled for PipelineJobState. */ + public static final PipelineJobState CANCELED = fromString("Canceled"); + + /** Static value Completed for PipelineJobState. */ + public static final PipelineJobState COMPLETED = fromString("Completed"); + + /** Static value Failed for PipelineJobState. */ + public static final PipelineJobState FAILED = fromString("Failed"); + + /** + * Creates or finds a PipelineJobState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PipelineJobState. + */ + @JsonCreator + public static PipelineJobState fromString(String name) { + return fromString(name, PipelineJobState.class); + } + + /** @return known PipelineJobState values. */ + public static Collection values() { + return values(PipelineJobState.class); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobs.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobs.java new file mode 100644 index 0000000000000..46fa8d8e62008 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobs.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of PipelineJobs. */ +public interface PipelineJobs { + /** + * Retrieves a list of pipeline jobs that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineJob items. + */ + PagedIterable list(String resourceGroupName, String accountName); + + /** + * Retrieves a list of pipeline jobs that have been created. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineJob items. + */ + PagedIterable list( + String resourceGroupName, String accountName, String filter, Integer top, Context context); + + /** + * Retrieves a pipeline job by name. If a pipeline job with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + PipelineJob get(String resourceGroupName, String accountName, String pipelineJobName); + + /** + * Retrieves a pipeline job by name. If a pipeline job with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + Response getWithResponse( + String resourceGroupName, String accountName, String pipelineJobName, Context context); + + /** + * Deletes a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String pipelineJobName); + + /** + * Deletes a pipeline job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteWithResponse( + String resourceGroupName, String accountName, String pipelineJobName, Context context); + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void cancel(String resourceGroupName, String accountName, String pipelineJobName); + + /** + * Cancels a pipeline job with the name provided. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineJobName The pipeline job name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void cancel(String resourceGroupName, String accountName, String pipelineJobName, Context context); + + /** + * Retrieves a pipeline job by name. If a pipeline job with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + PipelineJob getById(String id); + + /** + * Retrieves a pipeline job by name. If a pipeline job with that name has been previously created, the call will + * return the JSON representation of that instance. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a pipeline job. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a pipeline job. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a pipeline job. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PipelineJob resource. + * + * @param name resource name. + * @return the first stage of the new PipelineJob definition. + */ + PipelineJob.DefinitionStages.Blank define(String name); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologies.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologies.java new file mode 100644 index 0000000000000..10f53fdca940d --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologies.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of PipelineTopologies. */ +public interface PipelineTopologies { + /** + * Retrieves a list of pipeline topologies that have been added. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineTopology items. + */ + PagedIterable list(String resourceGroupName, String accountName); + + /** + * Retrieves a list of pipeline topologies that have been added. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param filter Restricts the set of items returned. + * @param top 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of PipelineTopology items. + */ + PagedIterable list( + String resourceGroupName, String accountName, String filter, Integer top, Context context); + + /** + * Retrieves a pipeline topology by name. If a topology with that name has been previously created, the call will + * return the JSON representation of that topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + PipelineTopology get(String resourceGroupName, String accountName, String pipelineTopologyName); + + /** + * Retrieves a pipeline topology by name. If a topology with that name has been previously created, the call will + * return the JSON representation of that topology. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + Response getWithResponse( + String resourceGroupName, String accountName, String pipelineTopologyName, Context context); + + /** + * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology + * have been stopped and deleted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String pipelineTopologyName); + + /** + * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology + * have been stopped and deleted. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @param pipelineTopologyName Pipeline topology unique identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteWithResponse( + String resourceGroupName, String accountName, String pipelineTopologyName, Context context); + + /** + * Retrieves a pipeline topology by name. If a topology with that name has been previously created, the call will + * return the JSON representation of that topology. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + PipelineTopology getById(String id); + + /** + * Retrieves a pipeline topology by name. If a topology with that name has been previously created, the call will + * return the JSON representation of that topology. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return pipeline topology describes the processing steps to be applied when processing media for a particular + * outcome. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology + * have been stopped and deleted. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes a pipeline topology with the given name. This method should be called after all instances of the topology + * have been stopped and deleted. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PipelineTopology resource. + * + * @param name resource name. + * @return the first stage of the new PipelineTopology definition. + */ + PipelineTopology.DefinitionStages.Blank define(String name); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopology.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopology.java new file mode 100644 index 0000000000000..42ea20e82693b --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopology.java @@ -0,0 +1,366 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyInner; +import java.util.List; + +/** An immutable client-side representation of PipelineTopology. */ +public interface PipelineTopology { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: The system metadata relating to this resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the kind property: Topology kind. + * + * @return the kind value. + */ + Kind kind(); + + /** + * Gets the sku property: The SKU details. + * + * @return the sku value. + */ + Sku sku(); + + /** + * Gets the description property: An optional description of the pipeline topology. It is recommended that the + * expected use of the topology to be described here. + * + * @return the description value. + */ + String description(); + + /** + * Gets the parameters property: List of the topology parameter declarations. Parameters declared here can be + * referenced throughout the topology nodes through the use of \"${PARAMETER_NAME}\" string pattern. Parameters can + * have optional default values and can later be defined in individual instances of the pipeline. + * + * @return the parameters value. + */ + List parameters(); + + /** + * Gets the sources property: List of the topology source nodes. Source nodes enable external data to be ingested by + * the pipeline. + * + * @return the sources value. + */ + List sources(); + + /** + * Gets the processors property: List of the topology processor nodes. Processor nodes enable pipeline data to be + * analyzed, processed or transformed. + * + * @return the processors value. + */ + List processors(); + + /** + * Gets the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or + * exported. + * + * @return the sinks value. + */ + List sinks(); + + /** + * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyInner object. + * + * @return the inner object. + */ + PipelineTopologyInner innerModel(); + + /** The entirety of the PipelineTopology definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithKind, + DefinitionStages.WithSku, + DefinitionStages.WithCreate { + } + /** The PipelineTopology definition stages. */ + interface DefinitionStages { + /** The first stage of the PipelineTopology definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the PipelineTopology definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Azure Video Analyzer account name. + * @return the next definition stage. + */ + WithKind withExistingVideoAnalyzer(String resourceGroupName, String accountName); + } + /** The stage of the PipelineTopology definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Topology kind.. + * + * @param kind Topology kind. + * @return the next definition stage. + */ + WithSku withKind(Kind kind); + } + /** The stage of the PipelineTopology definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The SKU details.. + * + * @param sku The SKU details. + * @return the next definition stage. + */ + WithCreate withSku(Sku sku); + } + /** + * The stage of the PipelineTopology definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithDescription, + DefinitionStages.WithParameters, + DefinitionStages.WithSources, + DefinitionStages.WithProcessors, + DefinitionStages.WithSinks { + /** + * Executes the create request. + * + * @return the created resource. + */ + PipelineTopology create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PipelineTopology create(Context context); + } + /** The stage of the PipelineTopology definition allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: An optional description of the pipeline topology. It is recommended + * that the expected use of the topology to be described here.. + * + * @param description An optional description of the pipeline topology. It is recommended that the expected + * use of the topology to be described here. + * @return the next definition stage. + */ + WithCreate withDescription(String description); + } + /** The stage of the PipelineTopology definition allowing to specify parameters. */ + interface WithParameters { + /** + * Specifies the parameters property: List of the topology parameter declarations. Parameters declared here + * can be referenced throughout the topology nodes through the use of \"${PARAMETER_NAME}\" string pattern. + * Parameters can have optional default values and can later be defined in individual instances of the + * pipeline.. + * + * @param parameters List of the topology parameter declarations. Parameters declared here can be referenced + * throughout the topology nodes through the use of \"${PARAMETER_NAME}\" string pattern. Parameters can + * have optional default values and can later be defined in individual instances of the pipeline. + * @return the next definition stage. + */ + WithCreate withParameters(List parameters); + } + /** The stage of the PipelineTopology definition allowing to specify sources. */ + interface WithSources { + /** + * Specifies the sources property: List of the topology source nodes. Source nodes enable external data to + * be ingested by the pipeline.. + * + * @param sources List of the topology source nodes. Source nodes enable external data to be ingested by the + * pipeline. + * @return the next definition stage. + */ + WithCreate withSources(List sources); + } + /** The stage of the PipelineTopology definition allowing to specify processors. */ + interface WithProcessors { + /** + * Specifies the processors property: List of the topology processor nodes. Processor nodes enable pipeline + * data to be analyzed, processed or transformed.. + * + * @param processors List of the topology processor nodes. Processor nodes enable pipeline data to be + * analyzed, processed or transformed. + * @return the next definition stage. + */ + WithCreate withProcessors(List processors); + } + /** The stage of the PipelineTopology definition allowing to specify sinks. */ + interface WithSinks { + /** + * Specifies the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be + * stored or exported.. + * + * @param sinks List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. + * @return the next definition stage. + */ + WithCreate withSinks(List sinks); + } + } + /** + * Begins update for the PipelineTopology resource. + * + * @return the stage of resource update. + */ + PipelineTopology.Update update(); + + /** The template for PipelineTopology update. */ + interface Update + extends UpdateStages.WithKind, + UpdateStages.WithSku, + UpdateStages.WithDescription, + UpdateStages.WithParameters, + UpdateStages.WithSources, + UpdateStages.WithProcessors, + UpdateStages.WithSinks { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PipelineTopology apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PipelineTopology apply(Context context); + } + /** The PipelineTopology update stages. */ + interface UpdateStages { + /** The stage of the PipelineTopology update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Topology kind.. + * + * @param kind Topology kind. + * @return the next definition stage. + */ + Update withKind(Kind kind); + } + /** The stage of the PipelineTopology update allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The SKU details.. + * + * @param sku The SKU details. + * @return the next definition stage. + */ + Update withSku(Sku sku); + } + /** The stage of the PipelineTopology update allowing to specify description. */ + interface WithDescription { + /** + * Specifies the description property: An optional description of the pipeline topology. It is recommended + * that the expected use of the topology to be described here.. + * + * @param description An optional description of the pipeline topology. It is recommended that the expected + * use of the topology to be described here. + * @return the next definition stage. + */ + Update withDescription(String description); + } + /** The stage of the PipelineTopology update allowing to specify parameters. */ + interface WithParameters { + /** + * Specifies the parameters property: List of the topology parameter declarations. Parameters declared here + * can be referenced throughout the topology nodes through the use of \"${PARAMETER_NAME}\" string pattern. + * Parameters can have optional default values and can later be defined in individual instances of the + * pipeline.. + * + * @param parameters List of the topology parameter declarations. Parameters declared here can be referenced + * throughout the topology nodes through the use of \"${PARAMETER_NAME}\" string pattern. Parameters can + * have optional default values and can later be defined in individual instances of the pipeline. + * @return the next definition stage. + */ + Update withParameters(List parameters); + } + /** The stage of the PipelineTopology update allowing to specify sources. */ + interface WithSources { + /** + * Specifies the sources property: List of the topology source nodes. Source nodes enable external data to + * be ingested by the pipeline.. + * + * @param sources List of the topology source nodes. Source nodes enable external data to be ingested by the + * pipeline. + * @return the next definition stage. + */ + Update withSources(List sources); + } + /** The stage of the PipelineTopology update allowing to specify processors. */ + interface WithProcessors { + /** + * Specifies the processors property: List of the topology processor nodes. Processor nodes enable pipeline + * data to be analyzed, processed or transformed.. + * + * @param processors List of the topology processor nodes. Processor nodes enable pipeline data to be + * analyzed, processed or transformed. + * @return the next definition stage. + */ + Update withProcessors(List processors); + } + /** The stage of the PipelineTopology update allowing to specify sinks. */ + interface WithSinks { + /** + * Specifies the sinks property: List of the topology sink nodes. Sink nodes allow pipeline data to be + * stored or exported.. + * + * @param sinks List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. + * @return the next definition stage. + */ + Update withSinks(List sinks); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PipelineTopology refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PipelineTopology refresh(Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologyCollection.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologyCollection.java new file mode 100644 index 0000000000000..854b0ffe8bc8c --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologyCollection.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PipelineTopologyInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A collection of PipelineTopology items. */ +@Fluent +public final class PipelineTopologyCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PipelineTopologyCollection.class); + + /* + * A collection of PipelineTopology items. + */ + @JsonProperty(value = "value") + private List value; + + /* + * A link to the next page of the collection (when the collection contains + * too many results to return in one response). + */ + @JsonProperty(value = "@nextLink") + private String nextLink; + + /** + * Get the value property: A collection of PipelineTopology items. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: A collection of PipelineTopology items. + * + * @param value the value value to set. + * @return the PipelineTopologyCollection object itself. + */ + public PipelineTopologyCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: A link to the next page of the collection (when the collection contains too many + * results to return in one response). + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: A link to the next page of the collection (when the collection contains too many + * results to return in one response). + * + * @param nextLink the nextLink value to set. + * @return the PipelineTopologyCollection object itself. + */ + public PipelineTopologyCollection withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SyncStorageKeysInput.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpoint.java similarity index 55% rename from sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SyncStorageKeysInput.java rename to sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpoint.java index 4fcaff411038e..6ad601ba569ea 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SyncStorageKeysInput.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpoint.java @@ -4,24 +4,24 @@ package com.azure.resourcemanager.videoanalyzer.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -/** The input to the sync storage keys request. */ -@Fluent -public final class SyncStorageKeysInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SyncStorageKeysInput.class); +/** The Private Endpoint resource. */ +@Immutable +public final class PrivateEndpoint { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpoint.class); /* - * The ID of the storage account resource. + * The ARM identifier for Private Endpoint */ - @JsonProperty(value = "id") + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /** - * Get the id property: The ID of the storage account resource. + * Get the id property: The ARM identifier for Private Endpoint. * * @return the id value. */ @@ -29,17 +29,6 @@ public String id() { return this.id; } - /** - * Set the id property: The ID of the storage account resource. - * - * @param id the id value to set. - * @return the SyncStorageKeysInput object itself. - */ - public SyncStorageKeysInput withId(String id) { - this.id = id; - return this; - } - /** * Validates the instance. * diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnection.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnection.java new file mode 100644 index 0000000000000..cdcf0ff2897ac --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnection.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; + +/** An immutable client-side representation of PrivateEndpointConnection. */ +public interface PrivateEndpointConnection { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + PrivateEndpoint privateEndpoint(); + + /** + * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the + * connection between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); + + /** + * Gets the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + PrivateEndpointConnectionProvisioningState provisioningState(); + + /** + * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner object. + * + * @return the inner object. + */ + PrivateEndpointConnectionInner innerModel(); + + /** The entirety of the PrivateEndpointConnection definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The PrivateEndpointConnection definition stages. */ + interface DefinitionStages { + /** The first stage of the PrivateEndpointConnection definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the PrivateEndpointConnection definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @return the next definition stage. + */ + WithCreate withExistingVideoAnalyzer(String resourceGroupName, String accountName); + } + /** + * The stage of the PrivateEndpointConnection definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithPrivateEndpoint, DefinitionStages.WithPrivateLinkServiceConnectionState { + /** + * Executes the create request. + * + * @return the created resource. + */ + PrivateEndpointConnection create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PrivateEndpointConnection create(Context context); + } + /** The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. */ + interface WithPrivateEndpoint { + /** + * Specifies the privateEndpoint property: The resource of private end point.. + * + * @param privateEndpoint The resource of private end point. + * @return the next definition stage. + */ + WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); + } + /** + * The stage of the PrivateEndpointConnection definition allowing to specify privateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of + * the connection between service consumer and provider.. + * + * @param privateLinkServiceConnectionState A collection of information about the state of the connection + * between service consumer and provider. + * @return the next definition stage. + */ + WithCreate withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState); + } + } + /** + * Begins update for the PrivateEndpointConnection resource. + * + * @return the stage of resource update. + */ + PrivateEndpointConnection.Update update(); + + /** The template for PrivateEndpointConnection update. */ + interface Update extends UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PrivateEndpointConnection apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PrivateEndpointConnection apply(Context context); + } + /** The PrivateEndpointConnection update stages. */ + interface UpdateStages { + /** The stage of the PrivateEndpointConnection update allowing to specify privateEndpoint. */ + interface WithPrivateEndpoint { + /** + * Specifies the privateEndpoint property: The resource of private end point.. + * + * @param privateEndpoint The resource of private end point. + * @return the next definition stage. + */ + Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); + } + /** The stage of the PrivateEndpointConnection update allowing to specify privateLinkServiceConnectionState. */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of + * the connection between service consumer and provider.. + * + * @param privateLinkServiceConnectionState A collection of information about the state of the connection + * between service consumer and provider. + * @return the next definition stage. + */ + Update withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PrivateEndpointConnection refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PrivateEndpointConnection refresh(Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionListResult.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionListResult.java new file mode 100644 index 0000000000000..7f33eecaa8262 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionListResult.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionListResultInner; +import java.util.List; + +/** An immutable client-side representation of PrivateEndpointConnectionListResult. */ +public interface PrivateEndpointConnectionListResult { + /** + * Gets the value property: Array of private endpoint connections. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionListResultInner + * object. + * + * @return the inner object. + */ + PrivateEndpointConnectionListResultInner innerModel(); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionProvisioningState.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionProvisioningState.java new file mode 100644 index 0000000000000..d95e2b14f1300 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionProvisioningState.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PrivateEndpointConnectionProvisioningState. */ +public final class PrivateEndpointConnectionProvisioningState + extends ExpandableStringEnum { + /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Creating for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); + + /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); + + /** Static value Failed for PrivateEndpointConnectionProvisioningState. */ + public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); + + /** + * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrivateEndpointConnectionProvisioningState. + */ + @JsonCreator + public static PrivateEndpointConnectionProvisioningState fromString(String name) { + return fromString(name, PrivateEndpointConnectionProvisioningState.class); + } + + /** @return known PrivateEndpointConnectionProvisioningState values. */ + public static Collection values() { + return values(PrivateEndpointConnectionProvisioningState.class); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnections.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnections.java new file mode 100644 index 0000000000000..1b4d3630cc5c0 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnections.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of PrivateEndpointConnections. */ +public interface PrivateEndpointConnections { + /** + * Get all private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all private endpoint connections. + */ + PrivateEndpointConnectionListResult list(String resourceGroupName, String accountName); + + /** + * Get all private endpoint connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all private endpoint connections. + */ + Response listWithResponse( + String resourceGroupName, String accountName, Context context); + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection. + */ + PrivateEndpointConnection get(String resourceGroupName, String accountName, String name); + + /** + * Get private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection. + */ + Response getWithResponse( + String resourceGroupName, String accountName, String name, Context context); + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String name); + + /** + * Delete private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteWithResponse(String resourceGroupName, String accountName, String name, Context context); + + /** + * Get private endpoint connection. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection. + */ + PrivateEndpointConnection getById(String id); + + /** + * Get private endpoint connection. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete private endpoint connection. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete private endpoint connection. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PrivateEndpointConnection resource. + * + * @param name resource name. + * @return the first stage of the new PrivateEndpointConnection definition. + */ + PrivateEndpointConnection.DefinitionStages.Blank define(String name); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionsCreateOrUpdateHeaders.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionsCreateOrUpdateHeaders.java new file mode 100644 index 0000000000000..776f0450209f8 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionsCreateOrUpdateHeaders.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The PrivateEndpointConnectionsCreateOrUpdateHeaders model. */ +@Fluent +public final class PrivateEndpointConnectionsCreateOrUpdateHeaders { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsCreateOrUpdateHeaders.class); + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the PrivateEndpointConnectionsCreateOrUpdateHeaders object itself. + */ + public PrivateEndpointConnectionsCreateOrUpdateHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the PrivateEndpointConnectionsCreateOrUpdateHeaders object itself. + */ + public PrivateEndpointConnectionsCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the PrivateEndpointConnectionsCreateOrUpdateHeaders object itself. + */ + public PrivateEndpointConnectionsCreateOrUpdateHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionsCreateOrUpdateResponse.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionsCreateOrUpdateResponse.java new file mode 100644 index 0000000000000..380efa97811d1 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnectionsCreateOrUpdateResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; + +/** Contains all response data for the createOrUpdate operation. */ +public final class PrivateEndpointConnectionsCreateOrUpdateResponse + extends ResponseBase { + /** + * Creates an instance of PrivateEndpointConnectionsCreateOrUpdateResponse. + * + * @param request the request which resulted in this PrivateEndpointConnectionsCreateOrUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public PrivateEndpointConnectionsCreateOrUpdateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + PrivateEndpointConnectionInner value, + PrivateEndpointConnectionsCreateOrUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public PrivateEndpointConnectionInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointServiceConnectionStatus.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointServiceConnectionStatus.java new file mode 100644 index 0000000000000..99987ab10805d --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointServiceConnectionStatus.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PrivateEndpointServiceConnectionStatus. */ +public final class PrivateEndpointServiceConnectionStatus + extends ExpandableStringEnum { + /** Static value Pending for PrivateEndpointServiceConnectionStatus. */ + public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); + + /** Static value Approved for PrivateEndpointServiceConnectionStatus. */ + public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); + + /** Static value Rejected for PrivateEndpointServiceConnectionStatus. */ + public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); + + /** + * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrivateEndpointServiceConnectionStatus. + */ + @JsonCreator + public static PrivateEndpointServiceConnectionStatus fromString(String name) { + return fromString(name, PrivateEndpointServiceConnectionStatus.class); + } + + /** @return known PrivateEndpointServiceConnectionStatus values. */ + public static Collection values() { + return values(PrivateEndpointServiceConnectionStatus.class); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResource.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResource.java new file mode 100644 index 0000000000000..55854a981cb76 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResource.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceInner; +import java.util.List; + +/** An immutable client-side representation of PrivateLinkResource. */ +public interface PrivateLinkResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + String groupId(); + + /** + * Gets the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + List requiredMembers(); + + /** + * Gets the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + List requiredZoneNames(); + + /** + * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceInner object. + * + * @return the inner object. + */ + PrivateLinkResourceInner innerModel(); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResourceListResult.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResourceListResult.java new file mode 100644 index 0000000000000..1ea5ad139ed2e --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResourceListResult.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceListResultInner; +import java.util.List; + +/** An immutable client-side representation of PrivateLinkResourceListResult. */ +public interface PrivateLinkResourceListResult { + /** + * Gets the value property: Array of private link resources. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateLinkResourceListResultInner object. + * + * @return the inner object. + */ + PrivateLinkResourceListResultInner innerModel(); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResources.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResources.java new file mode 100644 index 0000000000000..bda8f540b9e65 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResources.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of PrivateLinkResources. */ +public interface PrivateLinkResources { + /** + * Get list of group IDs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of group IDs. + */ + PrivateLinkResourceListResult list(String resourceGroupName, String accountName); + + /** + * Get list of group IDs. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of group IDs. + */ + Response listWithResponse( + String resourceGroupName, String accountName, Context context); + + /** + * Get group ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return group ID. + */ + PrivateLinkResource get(String resourceGroupName, String accountName, String name); + + /** + * Get group ID. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return group ID. + */ + Response getWithResponse( + String resourceGroupName, String accountName, String name, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkServiceConnectionState.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkServiceConnectionState.java new file mode 100644 index 0000000000000..1425355715213 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkServiceConnectionState.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A collection of information about the state of the connection between service consumer and provider. */ +@Fluent +public final class PrivateLinkServiceConnectionState { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkServiceConnectionState.class); + + /* + * Indicates whether the connection has been Approved/Rejected/Removed by + * the owner of the service. + */ + @JsonProperty(value = "status") + private PrivateEndpointServiceConnectionStatus status; + + /* + * The reason for approval/rejection of the connection. + */ + @JsonProperty(value = "description") + private String description; + + /* + * A message indicating if changes on the service provider require any + * updates on the consumer. + */ + @JsonProperty(value = "actionsRequired") + private String actionsRequired; + + /** + * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. + * + * @return the status value. + */ + public PrivateEndpointServiceConnectionStatus status() { + return this.status; + } + + /** + * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. + * + * @param status the status value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) { + this.status = status; + return this; + } + + /** + * Get the description property: The reason for approval/rejection of the connection. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The reason for approval/rejection of the connection. + * + * @param description the description value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on + * the consumer. + * + * @return the actionsRequired value. + */ + public String actionsRequired() { + return this.actionsRequired; + } + + /** + * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on + * the consumer. + * + * @param actionsRequired the actionsRequired value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { + this.actionsRequired = actionsRequired; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ProcessorNodeBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ProcessorNodeBase.java new file mode 100644 index 0000000000000..ce3eafeae820f --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ProcessorNodeBase.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** Base class for topology processor nodes. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "@type", + defaultImpl = ProcessorNodeBase.class) +@JsonTypeName("#Microsoft.VideoAnalyzer.ProcessorNodeBase") +@JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.EncoderProcessor", value = EncoderProcessor.class)}) +@Fluent +public class ProcessorNodeBase extends NodeBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProcessorNodeBase.class); + + /* + * An array of upstream node references within the topology to be used as + * inputs for this node. + */ + @JsonProperty(value = "inputs", required = true) + private List inputs; + + /** + * Get the inputs property: An array of upstream node references within the topology to be used as inputs for this + * node. + * + * @return the inputs value. + */ + public List inputs() { + return this.inputs; + } + + /** + * Set the inputs property: An array of upstream node references within the topology to be used as inputs for this + * node. + * + * @param inputs the inputs value to set. + * @return the ProcessorNodeBase object itself. + */ + public ProcessorNodeBase withInputs(List inputs) { + this.inputs = inputs; + return this; + } + + /** {@inheritDoc} */ + @Override + public ProcessorNodeBase withName(String name) { + super.withName(name); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (inputs() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property inputs in model ProcessorNodeBase")); + } else { + inputs().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ProvisioningState.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ProvisioningState.java new file mode 100644 index 0000000000000..33081865f768b --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/ProvisioningState.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ProvisioningState. */ +public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Failed for ProvisioningState. */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** Static value InProgress for ProvisioningState. */ + public static final ProvisioningState IN_PROGRESS = fromString("InProgress"); + + /** Static value Succeeded for ProvisioningState. */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** @return known ProvisioningState values. */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PublicNetworkAccess.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PublicNetworkAccess.java new file mode 100644 index 0000000000000..87998359cfc88 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PublicNetworkAccess.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PublicNetworkAccess. */ +public final class PublicNetworkAccess extends ExpandableStringEnum { + /** Static value Enabled for PublicNetworkAccess. */ + public static final PublicNetworkAccess ENABLED = fromString("Enabled"); + + /** Static value Disabled for PublicNetworkAccess. */ + public static final PublicNetworkAccess DISABLED = fromString("Disabled"); + + /** + * Creates or finds a PublicNetworkAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding PublicNetworkAccess. + */ + @JsonCreator + public static PublicNetworkAccess fromString(String name) { + return fromString(name, PublicNetworkAccess.class); + } + + /** @return known PublicNetworkAccess values. */ + public static Collection values() { + return values(PublicNetworkAccess.class); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RtspSource.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RtspSource.java new file mode 100644 index 0000000000000..60640209db265 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RtspSource.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** RTSP source allows for media from an RTSP camera or generic RTSP server to be ingested into a pipeline. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") +@JsonTypeName("#Microsoft.VideoAnalyzer.RtspSource") +@Fluent +public final class RtspSource extends SourceNodeBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RtspSource.class); + + /* + * Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. + * When using TCP, the RTP packets are interleaved on the TCP RTSP + * connection. When using HTTP, the RTSP messages are exchanged through + * long lived HTTP connections, and the RTP packages are interleaved in the + * HTTP connections alongside the RTSP messages. + */ + @JsonProperty(value = "transport") + private RtspTransport transport; + + /* + * RTSP endpoint information for Video Analyzer to connect to. This + * contains the required information for Video Analyzer to connect to RTSP + * cameras and/or generic RTSP servers. + */ + @JsonProperty(value = "endpoint", required = true) + private EndpointBase endpoint; + + /** + * Get the transport property: Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When using TCP, + * the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the RTSP messages are exchanged + * through long lived HTTP connections, and the RTP packages are interleaved in the HTTP connections alongside the + * RTSP messages. + * + * @return the transport value. + */ + public RtspTransport transport() { + return this.transport; + } + + /** + * Set the transport property: Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When using TCP, + * the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the RTSP messages are exchanged + * through long lived HTTP connections, and the RTP packages are interleaved in the HTTP connections alongside the + * RTSP messages. + * + * @param transport the transport value to set. + * @return the RtspSource object itself. + */ + public RtspSource withTransport(RtspTransport transport) { + this.transport = transport; + return this; + } + + /** + * Get the endpoint property: RTSP endpoint information for Video Analyzer to connect to. This contains the required + * information for Video Analyzer to connect to RTSP cameras and/or generic RTSP servers. + * + * @return the endpoint value. + */ + public EndpointBase endpoint() { + return this.endpoint; + } + + /** + * Set the endpoint property: RTSP endpoint information for Video Analyzer to connect to. This contains the required + * information for Video Analyzer to connect to RTSP cameras and/or generic RTSP servers. + * + * @param endpoint the endpoint value to set. + * @return the RtspSource object itself. + */ + public RtspSource withEndpoint(EndpointBase endpoint) { + this.endpoint = endpoint; + return this; + } + + /** {@inheritDoc} */ + @Override + public RtspSource withName(String name) { + super.withName(name); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (endpoint() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property endpoint in model RtspSource")); + } else { + endpoint().validate(); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RtspTransport.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RtspTransport.java new file mode 100644 index 0000000000000..29bd98eb961d4 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/RtspTransport.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for RtspTransport. */ +public final class RtspTransport extends ExpandableStringEnum { + /** Static value Http for RtspTransport. */ + public static final RtspTransport HTTP = fromString("Http"); + + /** Static value Tcp for RtspTransport. */ + public static final RtspTransport TCP = fromString("Tcp"); + + /** + * Creates or finds a RtspTransport from its string representation. + * + * @param name a name to look for. + * @return the corresponding RtspTransport. + */ + @JsonCreator + public static RtspTransport fromString(String name) { + return fromString(name, RtspTransport.class); + } + + /** @return known RtspTransport values. */ + public static Collection values() { + return values(RtspTransport.class); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SecureIotDeviceRemoteTunnel.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SecureIotDeviceRemoteTunnel.java new file mode 100644 index 0000000000000..f73e4fc8b0fe1 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SecureIotDeviceRemoteTunnel.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** A remote tunnel securely established using IoT Hub device information. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") +@JsonTypeName("#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel") +@Fluent +public final class SecureIotDeviceRemoteTunnel extends TunnelBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SecureIotDeviceRemoteTunnel.class); + + /* + * The IoT Hub name to use when establishing the remote tunnel. + */ + @JsonProperty(value = "iotHubName", required = true) + private String iotHubName; + + /* + * The device id to use when establishing the remote tunnel. + */ + @JsonProperty(value = "deviceId", required = true) + private String deviceId; + + /** + * Get the iotHubName property: The IoT Hub name to use when establishing the remote tunnel. + * + * @return the iotHubName value. + */ + public String iotHubName() { + return this.iotHubName; + } + + /** + * Set the iotHubName property: The IoT Hub name to use when establishing the remote tunnel. + * + * @param iotHubName the iotHubName value to set. + * @return the SecureIotDeviceRemoteTunnel object itself. + */ + public SecureIotDeviceRemoteTunnel withIotHubName(String iotHubName) { + this.iotHubName = iotHubName; + return this; + } + + /** + * Get the deviceId property: The device id to use when establishing the remote tunnel. + * + * @return the deviceId value. + */ + public String deviceId() { + return this.deviceId; + } + + /** + * Set the deviceId property: The device id to use when establishing the remote tunnel. + * + * @param deviceId the deviceId value to set. + * @return the SecureIotDeviceRemoteTunnel object itself. + */ + public SecureIotDeviceRemoteTunnel withDeviceId(String deviceId) { + this.deviceId = deviceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (iotHubName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property iotHubName in model SecureIotDeviceRemoteTunnel")); + } + if (deviceId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property deviceId in model SecureIotDeviceRemoteTunnel")); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SinkNodeBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SinkNodeBase.java new file mode 100644 index 0000000000000..caf71f368f5d0 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SinkNodeBase.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** Base class for topology sink nodes. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "@type", + defaultImpl = SinkNodeBase.class) +@JsonTypeName("#Microsoft.VideoAnalyzer.SinkNodeBase") +@JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.VideoSink", value = VideoSink.class)}) +@Fluent +public class SinkNodeBase extends NodeBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SinkNodeBase.class); + + /* + * An array of upstream node references within the topology to be used as + * inputs for this node. + */ + @JsonProperty(value = "inputs", required = true) + private List inputs; + + /** + * Get the inputs property: An array of upstream node references within the topology to be used as inputs for this + * node. + * + * @return the inputs value. + */ + public List inputs() { + return this.inputs; + } + + /** + * Set the inputs property: An array of upstream node references within the topology to be used as inputs for this + * node. + * + * @param inputs the inputs value to set. + * @return the SinkNodeBase object itself. + */ + public SinkNodeBase withInputs(List inputs) { + this.inputs = inputs; + return this; + } + + /** {@inheritDoc} */ + @Override + public SinkNodeBase withName(String name) { + super.withName(name); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (inputs() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property inputs in model SinkNodeBase")); + } else { + inputs().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Sku.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Sku.java new file mode 100644 index 0000000000000..e94e7ffe661db --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Sku.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The SKU details. */ +@Fluent +public final class Sku { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class); + + /* + * The SKU name. + */ + @JsonProperty(value = "name", required = true) + private SkuName name; + + /* + * The SKU tier. + */ + @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY) + private Tier tier; + + /** + * Get the name property: The SKU name. + * + * @return the name value. + */ + public SkuName name() { + return this.name; + } + + /** + * Set the name property: The SKU name. + * + * @param name the name value to set. + * @return the Sku object itself. + */ + public Sku withName(SkuName name) { + this.name = name; + return this; + } + + /** + * Get the tier property: The SKU tier. + * + * @return the tier value. + */ + public Tier tier() { + return this.tier; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku")); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SkuName.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SkuName.java new file mode 100644 index 0000000000000..655b272b9c592 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SkuName.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SkuName. */ +public final class SkuName extends ExpandableStringEnum { + /** Static value Live_S1 for SkuName. */ + public static final SkuName LIVE_S1 = fromString("Live_S1"); + + /** Static value Batch_S1 for SkuName. */ + public static final SkuName BATCH_S1 = fromString("Batch_S1"); + + /** + * Creates or finds a SkuName from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuName. + */ + @JsonCreator + public static SkuName fromString(String name) { + return fromString(name, SkuName.class); + } + + /** @return known SkuName values. */ + public static Collection values() { + return values(SkuName.class); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SourceNodeBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SourceNodeBase.java new file mode 100644 index 0000000000000..c72654a101bb8 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SourceNodeBase.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Base class for topology source nodes. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "@type", + defaultImpl = SourceNodeBase.class) +@JsonTypeName("#Microsoft.VideoAnalyzer.SourceNodeBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.RtspSource", value = RtspSource.class), + @JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.VideoSource", value = VideoSource.class) +}) +@Fluent +public class SourceNodeBase extends NodeBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SourceNodeBase.class); + + /** {@inheritDoc} */ + @Override + public SourceNodeBase withName(String name) { + super.withName(name); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/StorageAccount.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/StorageAccount.java index ee047ff81f004..cb40c9b033949 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/StorageAccount.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/StorageAccount.java @@ -19,7 +19,7 @@ public final class StorageAccount { * queues, and blobs. The primary storage account must be a Standard * Storage account (either Microsoft.ClassicStorage or Microsoft.Storage). */ - @JsonProperty(value = "id") + @JsonProperty(value = "id", required = true) private String id; /* @@ -94,6 +94,11 @@ public String status() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (id() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property id in model StorageAccount")); + } if (identity() != null) { identity().validate(); } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Tier.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Tier.java new file mode 100644 index 0000000000000..9fc5a08e8f30e --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Tier.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Tier. */ +public final class Tier extends ExpandableStringEnum { + /** Static value Standard for Tier. */ + public static final Tier STANDARD = fromString("Standard"); + + /** + * Creates or finds a Tier from its string representation. + * + * @param name a name to look for. + * @return the corresponding Tier. + */ + @JsonCreator + public static Tier fromString(String name) { + return fromString(name, Tier.class); + } + + /** @return known Tier values. */ + public static Collection values() { + return values(Tier.class); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TimeSequenceBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TimeSequenceBase.java new file mode 100644 index 0000000000000..ce4b876d27721 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TimeSequenceBase.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Sequence of time. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "@type", + defaultImpl = TimeSequenceBase.class) +@JsonTypeName("TimeSequenceBase") +@JsonSubTypes({ + @JsonSubTypes.Type( + name = "#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers", + value = VideoSequenceAbsoluteTimeMarkers.class) +}) +@Immutable +public class TimeSequenceBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TimeSequenceBase.class); + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TlsEndpoint.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TlsEndpoint.java new file mode 100644 index 0000000000000..2585c3e3fc717 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TlsEndpoint.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * TLS endpoint describes an endpoint that the pipeline can connect to over TLS transport (data is encrypted in + * transit). + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") +@JsonTypeName("#Microsoft.VideoAnalyzer.TlsEndpoint") +@Fluent +public final class TlsEndpoint extends EndpointBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TlsEndpoint.class); + + /* + * List of trusted certificate authorities when authenticating a TLS + * connection. A null list designates that Azure Video Analyzer's list of + * trusted authorities should be used. + */ + @JsonProperty(value = "trustedCertificates") + private CertificateSource trustedCertificates; + + /* + * Validation options to use when authenticating a TLS connection. By + * default, strict validation is used. + */ + @JsonProperty(value = "validationOptions") + private TlsValidationOptions validationOptions; + + /** + * Get the trustedCertificates property: List of trusted certificate authorities when authenticating a TLS + * connection. A null list designates that Azure Video Analyzer's list of trusted authorities should be used. + * + * @return the trustedCertificates value. + */ + public CertificateSource trustedCertificates() { + return this.trustedCertificates; + } + + /** + * Set the trustedCertificates property: List of trusted certificate authorities when authenticating a TLS + * connection. A null list designates that Azure Video Analyzer's list of trusted authorities should be used. + * + * @param trustedCertificates the trustedCertificates value to set. + * @return the TlsEndpoint object itself. + */ + public TlsEndpoint withTrustedCertificates(CertificateSource trustedCertificates) { + this.trustedCertificates = trustedCertificates; + return this; + } + + /** + * Get the validationOptions property: Validation options to use when authenticating a TLS connection. By default, + * strict validation is used. + * + * @return the validationOptions value. + */ + public TlsValidationOptions validationOptions() { + return this.validationOptions; + } + + /** + * Set the validationOptions property: Validation options to use when authenticating a TLS connection. By default, + * strict validation is used. + * + * @param validationOptions the validationOptions value to set. + * @return the TlsEndpoint object itself. + */ + public TlsEndpoint withValidationOptions(TlsValidationOptions validationOptions) { + this.validationOptions = validationOptions; + return this; + } + + /** {@inheritDoc} */ + @Override + public TlsEndpoint withCredentials(CredentialsBase credentials) { + super.withCredentials(credentials); + return this; + } + + /** {@inheritDoc} */ + @Override + public TlsEndpoint withUrl(String url) { + super.withUrl(url); + return this; + } + + /** {@inheritDoc} */ + @Override + public TlsEndpoint withTunnel(TunnelBase tunnel) { + super.withTunnel(tunnel); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (trustedCertificates() != null) { + trustedCertificates().validate(); + } + if (validationOptions() != null) { + validationOptions().validate(); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TlsValidationOptions.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TlsValidationOptions.java new file mode 100644 index 0000000000000..a5d203cd4eafa --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TlsValidationOptions.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Options for controlling the validation of TLS endpoints. */ +@Fluent +public final class TlsValidationOptions { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TlsValidationOptions.class); + + /* + * When set to 'true' causes the certificate subject name validation to be + * skipped. Default is 'false'. + */ + @JsonProperty(value = "ignoreHostname") + private String ignoreHostname; + + /* + * When set to 'true' causes the certificate chain trust validation to be + * skipped. Default is 'false'. + */ + @JsonProperty(value = "ignoreSignature") + private String ignoreSignature; + + /** + * Get the ignoreHostname property: When set to 'true' causes the certificate subject name validation to be skipped. + * Default is 'false'. + * + * @return the ignoreHostname value. + */ + public String ignoreHostname() { + return this.ignoreHostname; + } + + /** + * Set the ignoreHostname property: When set to 'true' causes the certificate subject name validation to be skipped. + * Default is 'false'. + * + * @param ignoreHostname the ignoreHostname value to set. + * @return the TlsValidationOptions object itself. + */ + public TlsValidationOptions withIgnoreHostname(String ignoreHostname) { + this.ignoreHostname = ignoreHostname; + return this; + } + + /** + * Get the ignoreSignature property: When set to 'true' causes the certificate chain trust validation to be skipped. + * Default is 'false'. + * + * @return the ignoreSignature value. + */ + public String ignoreSignature() { + return this.ignoreSignature; + } + + /** + * Set the ignoreSignature property: When set to 'true' causes the certificate chain trust validation to be skipped. + * Default is 'false'. + * + * @param ignoreSignature the ignoreSignature value to set. + * @return the TlsValidationOptions object itself. + */ + public TlsValidationOptions withIgnoreSignature(String ignoreSignature) { + this.ignoreSignature = ignoreSignature; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TunnelBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TunnelBase.java new file mode 100644 index 0000000000000..d5b86cabea329 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TunnelBase.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Base class for tunnel objects. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "@type", + defaultImpl = TunnelBase.class) +@JsonTypeName("TunnelBase") +@JsonSubTypes({ + @JsonSubTypes.Type( + name = "#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel", + value = SecureIotDeviceRemoteTunnel.class) +}) +@Immutable +public class TunnelBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TunnelBase.class); + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UnsecuredEndpoint.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UnsecuredEndpoint.java new file mode 100644 index 0000000000000..9b2783fa94388 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UnsecuredEndpoint.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Unsecured endpoint describes an endpoint that the pipeline can connect to over clear transport (no encryption in + * transit). + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") +@JsonTypeName("#Microsoft.VideoAnalyzer.UnsecuredEndpoint") +@Fluent +public final class UnsecuredEndpoint extends EndpointBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UnsecuredEndpoint.class); + + /** {@inheritDoc} */ + @Override + public UnsecuredEndpoint withCredentials(CredentialsBase credentials) { + super.withCredentials(credentials); + return this; + } + + /** {@inheritDoc} */ + @Override + public UnsecuredEndpoint withUrl(String url) { + super.withUrl(url); + return this; + } + + /** {@inheritDoc} */ + @Override + public UnsecuredEndpoint withTunnel(TunnelBase tunnel) { + super.withTunnel(tunnel); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UserAssignedManagedIdentity.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UserAssignedManagedIdentity.java index c2f0dcfd8d728..180dc95bb5100 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UserAssignedManagedIdentity.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UserAssignedManagedIdentity.java @@ -8,6 +8,7 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; /** The details of the user assigned managed identity used by the Video Analyzer resource. */ @Immutable @@ -18,20 +19,20 @@ public class UserAssignedManagedIdentity { * The client ID. */ @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) - private String clientId; + private UUID clientId; /* * The principal ID. */ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; + private UUID principalId; /** * Get the clientId property: The client ID. * * @return the clientId value. */ - public String clientId() { + public UUID clientId() { return this.clientId; } @@ -40,7 +41,7 @@ public String clientId() { * * @return the principalId value. */ - public String principalId() { + public UUID principalId() { return this.principalId; } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UsernamePasswordCredentials.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UsernamePasswordCredentials.java new file mode 100644 index 0000000000000..6ae2926f7ca0e --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/UsernamePasswordCredentials.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Username and password credentials. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") +@JsonTypeName("#Microsoft.VideoAnalyzer.UsernamePasswordCredentials") +@Fluent +public final class UsernamePasswordCredentials extends CredentialsBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UsernamePasswordCredentials.class); + + /* + * Username to be presented as part of the credentials. + */ + @JsonProperty(value = "username", required = true) + private String username; + + /* + * Password to be presented as part of the credentials. It is recommended + * that this value is parameterized as a secret string in order to prevent + * this value to be returned as part of the resource on API requests. + */ + @JsonProperty(value = "password", required = true) + private String password; + + /** + * Get the username property: Username to be presented as part of the credentials. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: Username to be presented as part of the credentials. + * + * @param username the username value to set. + * @return the UsernamePasswordCredentials object itself. + */ + public UsernamePasswordCredentials withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password property: Password to be presented as part of the credentials. It is recommended that this value + * is parameterized as a secret string in order to prevent this value to be returned as part of the resource on API + * requests. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: Password to be presented as part of the credentials. It is recommended that this value + * is parameterized as a secret string in order to prevent this value to be returned as part of the resource on API + * requests. + * + * @param password the password value to set. + * @return the UsernamePasswordCredentials object itself. + */ + public UsernamePasswordCredentials withPassword(String password) { + this.password = password; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (username() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property username in model UsernamePasswordCredentials")); + } + if (password() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property password in model UsernamePasswordCredentials")); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzer.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzer.java index fb308b90e8367..090c08206245d 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzer.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzer.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.videoanalyzer.models; -import com.azure.core.http.rest.Response; import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.util.Context; @@ -57,7 +56,7 @@ public interface VideoAnalyzer { SystemData systemData(); /** - * Gets the identity property: The set of managed identities associated with the Video Analyzer resource. + * Gets the identity property: The identities associated to the Video Analyzer resource. * * @return the identity value. */ @@ -71,7 +70,7 @@ public interface VideoAnalyzer { List storageAccounts(); /** - * Gets the endpoints property: The list of endpoints associated with this resource. + * Gets the endpoints property: The endpoints associated with this resource. * * @return the endpoints value. */ @@ -84,6 +83,42 @@ public interface VideoAnalyzer { */ AccountEncryption encryption(); + /** + * Gets the iotHubs property: The IoT Hubs for this resource. + * + * @return the iotHubs value. + */ + List iotHubs(); + + /** + * Gets the publicNetworkAccess property: Whether or not public network access is allowed for resources under the + * Video Analyzer account. + * + * @return the publicNetworkAccess value. + */ + PublicNetworkAccess publicNetworkAccess(); + + /** + * Gets the networkAccessControl property: Network access control for Video Analyzer. + * + * @return the networkAccessControl value. + */ + NetworkAccessControl networkAccessControl(); + + /** + * Gets the provisioningState property: Provisioning state of the Video Analyzer account. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the privateEndpointConnections property: Private Endpoint Connections created under Video Analyzer account. + * + * @return the privateEndpointConnections value. + */ + List privateEndpointConnections(); + /** * Gets the region of the resource. * @@ -153,7 +188,10 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithStorageAccounts, - DefinitionStages.WithEncryption { + DefinitionStages.WithEncryption, + DefinitionStages.WithIotHubs, + DefinitionStages.WithPublicNetworkAccess, + DefinitionStages.WithNetworkAccessControl { /** * Executes the create request. * @@ -182,10 +220,9 @@ interface WithTags { /** The stage of the VideoAnalyzer definition allowing to specify identity. */ interface WithIdentity { /** - * Specifies the identity property: The set of managed identities associated with the Video Analyzer - * resource.. + * Specifies the identity property: The identities associated to the Video Analyzer resource.. * - * @param identity The set of managed identities associated with the Video Analyzer resource. + * @param identity The identities associated to the Video Analyzer resource. * @return the next definition stage. */ WithCreate withIdentity(VideoAnalyzerIdentity identity); @@ -210,6 +247,38 @@ interface WithEncryption { */ WithCreate withEncryption(AccountEncryption encryption); } + /** The stage of the VideoAnalyzer definition allowing to specify iotHubs. */ + interface WithIotHubs { + /** + * Specifies the iotHubs property: The IoT Hubs for this resource.. + * + * @param iotHubs The IoT Hubs for this resource. + * @return the next definition stage. + */ + WithCreate withIotHubs(List iotHubs); + } + /** The stage of the VideoAnalyzer definition allowing to specify publicNetworkAccess. */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: Whether or not public network access is allowed for resources + * under the Video Analyzer account.. + * + * @param publicNetworkAccess Whether or not public network access is allowed for resources under the Video + * Analyzer account. + * @return the next definition stage. + */ + WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + } + /** The stage of the VideoAnalyzer definition allowing to specify networkAccessControl. */ + interface WithNetworkAccessControl { + /** + * Specifies the networkAccessControl property: Network access control for Video Analyzer.. + * + * @param networkAccessControl Network access control for Video Analyzer. + * @return the next definition stage. + */ + WithCreate withNetworkAccessControl(NetworkAccessControl networkAccessControl); + } } /** * Begins update for the VideoAnalyzer resource. @@ -223,7 +292,10 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithStorageAccounts, - UpdateStages.WithEncryption { + UpdateStages.WithEncryption, + UpdateStages.WithIotHubs, + UpdateStages.WithPublicNetworkAccess, + UpdateStages.WithNetworkAccessControl { /** * Executes the update request. * @@ -281,6 +353,38 @@ interface WithEncryption { */ Update withEncryption(AccountEncryption encryption); } + /** The stage of the VideoAnalyzer update allowing to specify iotHubs. */ + interface WithIotHubs { + /** + * Specifies the iotHubs property: The IoT Hubs for this resource.. + * + * @param iotHubs The IoT Hubs for this resource. + * @return the next definition stage. + */ + Update withIotHubs(List iotHubs); + } + /** The stage of the VideoAnalyzer update allowing to specify publicNetworkAccess. */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: Whether or not public network access is allowed for resources + * under the Video Analyzer account.. + * + * @param publicNetworkAccess Whether or not public network access is allowed for resources under the Video + * Analyzer account. + * @return the next definition stage. + */ + Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + } + /** The stage of the VideoAnalyzer update allowing to specify networkAccessControl. */ + interface WithNetworkAccessControl { + /** + * Specifies the networkAccessControl property: Network access control for Video Analyzer.. + * + * @param networkAccessControl Network access control for Video Analyzer. + * @return the next definition stage. + */ + Update withNetworkAccessControl(NetworkAccessControl networkAccessControl); + } } /** * Refreshes the resource to sync with Azure. @@ -296,26 +400,4 @@ interface WithEncryption { * @return the refreshed resource. */ VideoAnalyzer refresh(Context context); - - /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. - * - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void syncStorageKeys(SyncStorageKeysInput parameters); - - /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. - * - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response syncStorageKeysWithResponse(SyncStorageKeysInput parameters, Context context); } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerIdentity.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerIdentity.java index 10f580ddcfafe..0c301521df9d3 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerIdentity.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerIdentity.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -25,6 +26,7 @@ public class VideoAnalyzerIdentity { * The User Assigned Managed Identities. */ @JsonProperty(value = "userAssignedIdentities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; /** diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationResults.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationResults.java new file mode 100644 index 0000000000000..d5fe846763b80 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationResults.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of VideoAnalyzerOperationResults. */ +public interface VideoAnalyzerOperationResults { + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + VideoAnalyzer get(String locationName, String name); + + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + Response getWithResponse(String locationName, String name, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationStatus.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationStatus.java new file mode 100644 index 0000000000000..2c6f65eecfd7d --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationStatus.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerOperationStatusInner; + +/** An immutable client-side representation of VideoAnalyzerOperationStatus. */ +public interface VideoAnalyzerOperationStatus { + /** + * Gets the name property: The name property. + * + * @return the name value. + */ + String name(); + + /** + * Gets the id property: The id property. + * + * @return the id value. + */ + String id(); + + /** + * Gets the startTime property: The startTime property. + * + * @return the startTime value. + */ + String startTime(); + + /** + * Gets the endTime property: The endTime property. + * + * @return the endTime value. + */ + String endTime(); + + /** + * Gets the status property: The status property. + * + * @return the status value. + */ + String status(); + + /** + * Gets the error property: The error detail. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerOperationStatusInner object. + * + * @return the inner object. + */ + VideoAnalyzerOperationStatusInner innerModel(); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationStatuses.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationStatuses.java new file mode 100644 index 0000000000000..350be23268ac5 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationStatuses.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of VideoAnalyzerOperationStatuses. */ +public interface VideoAnalyzerOperationStatuses { + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + VideoAnalyzerOperationStatus get(String locationName, String name); + + /** + * Get operation status. + * + * @param locationName The locationName parameter. + * @param name The name parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operation status. + */ + Response getWithResponse(String locationName, String name, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerProperties.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerProperties.java index 2d2cba39a4c93..f6f7913849c7b 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerProperties.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerProperties.java @@ -4,14 +4,14 @@ package com.azure.resourcemanager.videoanalyzer.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import java.util.List; /** The VideoAnalyzerProperties model. */ -@Immutable -public final class VideoAnalyzerProperties extends VideoAnalyzerPropertiesUpdate { +@Fluent +public final class VideoAnalyzerProperties extends VideoAnalyzerPropertiesBase { @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoAnalyzerProperties.class); /** {@inheritDoc} */ @@ -28,6 +28,27 @@ public VideoAnalyzerProperties withEncryption(AccountEncryption encryption) { return this; } + /** {@inheritDoc} */ + @Override + public VideoAnalyzerProperties withIotHubs(List iotHubs) { + super.withIotHubs(iotHubs); + return this; + } + + /** {@inheritDoc} */ + @Override + public VideoAnalyzerProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + super.withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + /** {@inheritDoc} */ + @Override + public VideoAnalyzerProperties withNetworkAccessControl(NetworkAccessControl networkAccessControl) { + super.withNetworkAccessControl(networkAccessControl); + return this; + } + /** * Validates the instance. * diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerPropertiesBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerPropertiesBase.java new file mode 100644 index 0000000000000..f1d875a33763b --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerPropertiesBase.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The properties of the Video Analyzer account. */ +@Fluent +public class VideoAnalyzerPropertiesBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoAnalyzerPropertiesBase.class); + + /* + * The storage accounts for this resource. + */ + @JsonProperty(value = "storageAccounts") + private List storageAccounts; + + /* + * The endpoints associated with this resource. + */ + @JsonProperty(value = "endpoints", access = JsonProperty.Access.WRITE_ONLY) + private List endpoints; + + /* + * The account encryption properties. + */ + @JsonProperty(value = "encryption") + private AccountEncryption encryption; + + /* + * The IoT Hubs for this resource. + */ + @JsonProperty(value = "iotHubs") + private List iotHubs; + + /* + * Whether or not public network access is allowed for resources under the + * Video Analyzer account. + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + + /* + * Network access control for Video Analyzer. + */ + @JsonProperty(value = "networkAccessControl") + private NetworkAccessControl networkAccessControl; + + /* + * Provisioning state of the Video Analyzer account. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Private Endpoint Connections created under Video Analyzer account. + */ + @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + + /** + * Get the storageAccounts property: The storage accounts for this resource. + * + * @return the storageAccounts value. + */ + public List storageAccounts() { + return this.storageAccounts; + } + + /** + * Set the storageAccounts property: The storage accounts for this resource. + * + * @param storageAccounts the storageAccounts value to set. + * @return the VideoAnalyzerPropertiesBase object itself. + */ + public VideoAnalyzerPropertiesBase withStorageAccounts(List storageAccounts) { + this.storageAccounts = storageAccounts; + return this; + } + + /** + * Get the endpoints property: The endpoints associated with this resource. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Get the encryption property: The account encryption properties. + * + * @return the encryption value. + */ + public AccountEncryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: The account encryption properties. + * + * @param encryption the encryption value to set. + * @return the VideoAnalyzerPropertiesBase object itself. + */ + public VideoAnalyzerPropertiesBase withEncryption(AccountEncryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the iotHubs property: The IoT Hubs for this resource. + * + * @return the iotHubs value. + */ + public List iotHubs() { + return this.iotHubs; + } + + /** + * Set the iotHubs property: The IoT Hubs for this resource. + * + * @param iotHubs the iotHubs value to set. + * @return the VideoAnalyzerPropertiesBase object itself. + */ + public VideoAnalyzerPropertiesBase withIotHubs(List iotHubs) { + this.iotHubs = iotHubs; + return this; + } + + /** + * Get the publicNetworkAccess property: Whether or not public network access is allowed for resources under the + * Video Analyzer account. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Whether or not public network access is allowed for resources under the + * Video Analyzer account. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the VideoAnalyzerPropertiesBase object itself. + */ + public VideoAnalyzerPropertiesBase withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the networkAccessControl property: Network access control for Video Analyzer. + * + * @return the networkAccessControl value. + */ + public NetworkAccessControl networkAccessControl() { + return this.networkAccessControl; + } + + /** + * Set the networkAccessControl property: Network access control for Video Analyzer. + * + * @param networkAccessControl the networkAccessControl value to set. + * @return the VideoAnalyzerPropertiesBase object itself. + */ + public VideoAnalyzerPropertiesBase withNetworkAccessControl(NetworkAccessControl networkAccessControl) { + this.networkAccessControl = networkAccessControl; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the Video Analyzer account. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the privateEndpointConnections property: Private Endpoint Connections created under Video Analyzer account. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageAccounts() != null) { + storageAccounts().forEach(e -> e.validate()); + } + if (endpoints() != null) { + endpoints().forEach(e -> e.validate()); + } + if (encryption() != null) { + encryption().validate(); + } + if (iotHubs() != null) { + iotHubs().forEach(e -> e.validate()); + } + if (networkAccessControl() != null) { + networkAccessControl().validate(); + } + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerPropertiesUpdate.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerPropertiesUpdate.java index 29e6a2725fe61..0766f8dd2cfcd 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerPropertiesUpdate.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerPropertiesUpdate.java @@ -7,78 +7,45 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties of the Video Analyzer account. */ +/** The VideoAnalyzerPropertiesUpdate model. */ @Fluent -public class VideoAnalyzerPropertiesUpdate { +public final class VideoAnalyzerPropertiesUpdate extends VideoAnalyzerPropertiesBase { @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoAnalyzerPropertiesUpdate.class); - /* - * The storage accounts for this resource. - */ - @JsonProperty(value = "storageAccounts") - private List storageAccounts; - - /* - * The list of endpoints associated with this resource. - */ - @JsonProperty(value = "endpoints", access = JsonProperty.Access.WRITE_ONLY) - private List endpoints; - - /* - * The account encryption properties. - */ - @JsonProperty(value = "encryption") - private AccountEncryption encryption; - - /** - * Get the storageAccounts property: The storage accounts for this resource. - * - * @return the storageAccounts value. - */ - public List storageAccounts() { - return this.storageAccounts; + /** {@inheritDoc} */ + @Override + public VideoAnalyzerPropertiesUpdate withStorageAccounts(List storageAccounts) { + super.withStorageAccounts(storageAccounts); + return this; } - /** - * Set the storageAccounts property: The storage accounts for this resource. - * - * @param storageAccounts the storageAccounts value to set. - * @return the VideoAnalyzerPropertiesUpdate object itself. - */ - public VideoAnalyzerPropertiesUpdate withStorageAccounts(List storageAccounts) { - this.storageAccounts = storageAccounts; + /** {@inheritDoc} */ + @Override + public VideoAnalyzerPropertiesUpdate withEncryption(AccountEncryption encryption) { + super.withEncryption(encryption); return this; } - /** - * Get the endpoints property: The list of endpoints associated with this resource. - * - * @return the endpoints value. - */ - public List endpoints() { - return this.endpoints; + /** {@inheritDoc} */ + @Override + public VideoAnalyzerPropertiesUpdate withIotHubs(List iotHubs) { + super.withIotHubs(iotHubs); + return this; } - /** - * Get the encryption property: The account encryption properties. - * - * @return the encryption value. - */ - public AccountEncryption encryption() { - return this.encryption; + /** {@inheritDoc} */ + @Override + public VideoAnalyzerPropertiesUpdate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + super.withPublicNetworkAccess(publicNetworkAccess); + return this; } - /** - * Set the encryption property: The account encryption properties. - * - * @param encryption the encryption value to set. - * @return the VideoAnalyzerPropertiesUpdate object itself. - */ - public VideoAnalyzerPropertiesUpdate withEncryption(AccountEncryption encryption) { - this.encryption = encryption; + /** {@inheritDoc} */ + @Override + public VideoAnalyzerPropertiesUpdate withNetworkAccessControl(NetworkAccessControl networkAccessControl) { + super.withNetworkAccessControl(networkAccessControl); return this; } @@ -87,15 +54,8 @@ public VideoAnalyzerPropertiesUpdate withEncryption(AccountEncryption encryption * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { - if (storageAccounts() != null) { - storageAccounts().forEach(e -> e.validate()); - } - if (endpoints() != null) { - endpoints().forEach(e -> e.validate()); - } - if (encryption() != null) { - encryption().validate(); - } + super.validate(); } } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerUpdate.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerUpdate.java index 7944d5041f5d8..92694ea6b44ef 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerUpdate.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerUpdate.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -22,6 +24,7 @@ public class VideoAnalyzerUpdate { * Resource tags. */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* @@ -37,7 +40,7 @@ public class VideoAnalyzerUpdate { private List storageAccounts; /* - * The list of endpoints associated with this resource. + * The endpoints associated with this resource. */ @JsonProperty(value = "properties.endpoints", access = JsonProperty.Access.WRITE_ONLY) private List endpoints; @@ -48,6 +51,37 @@ public class VideoAnalyzerUpdate { @JsonProperty(value = "properties.encryption") private AccountEncryption encryption; + /* + * The IoT Hubs for this resource. + */ + @JsonProperty(value = "properties.iotHubs") + private List iotHubs; + + /* + * Whether or not public network access is allowed for resources under the + * Video Analyzer account. + */ + @JsonProperty(value = "properties.publicNetworkAccess") + private PublicNetworkAccess publicNetworkAccess; + + /* + * Network access control for Video Analyzer. + */ + @JsonProperty(value = "properties.networkAccessControl") + private NetworkAccessControl networkAccessControl; + + /* + * Provisioning state of the Video Analyzer account. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Private Endpoint Connections created under Video Analyzer account. + */ + @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + /** * Get the tags property: Resource tags. * @@ -109,7 +143,7 @@ public VideoAnalyzerUpdate withStorageAccounts(List storageAccou } /** - * Get the endpoints property: The list of endpoints associated with this resource. + * Get the endpoints property: The endpoints associated with this resource. * * @return the endpoints value. */ @@ -137,6 +171,86 @@ public VideoAnalyzerUpdate withEncryption(AccountEncryption encryption) { return this; } + /** + * Get the iotHubs property: The IoT Hubs for this resource. + * + * @return the iotHubs value. + */ + public List iotHubs() { + return this.iotHubs; + } + + /** + * Set the iotHubs property: The IoT Hubs for this resource. + * + * @param iotHubs the iotHubs value to set. + * @return the VideoAnalyzerUpdate object itself. + */ + public VideoAnalyzerUpdate withIotHubs(List iotHubs) { + this.iotHubs = iotHubs; + return this; + } + + /** + * Get the publicNetworkAccess property: Whether or not public network access is allowed for resources under the + * Video Analyzer account. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Whether or not public network access is allowed for resources under the + * Video Analyzer account. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the VideoAnalyzerUpdate object itself. + */ + public VideoAnalyzerUpdate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the networkAccessControl property: Network access control for Video Analyzer. + * + * @return the networkAccessControl value. + */ + public NetworkAccessControl networkAccessControl() { + return this.networkAccessControl; + } + + /** + * Set the networkAccessControl property: Network access control for Video Analyzer. + * + * @param networkAccessControl the networkAccessControl value to set. + * @return the VideoAnalyzerUpdate object itself. + */ + public VideoAnalyzerUpdate withNetworkAccessControl(NetworkAccessControl networkAccessControl) { + this.networkAccessControl = networkAccessControl; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the Video Analyzer account. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the privateEndpointConnections property: Private Endpoint Connections created under Video Analyzer account. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + /** * Validates the instance. * @@ -155,5 +269,14 @@ public void validate() { if (encryption() != null) { encryption().validate(); } + if (iotHubs() != null) { + iotHubs().forEach(e -> e.validate()); + } + if (networkAccessControl() != null) { + networkAccessControl().validate(); + } + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } } } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzers.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzers.java index 9bb19d96c65e3..1308a64cc2290 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzers.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzers.java @@ -82,33 +82,6 @@ Response getByResourceGroupWithResponse( */ Response deleteWithResponse(String resourceGroupName, String accountName, Context context); - /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void syncStorageKeys(String resourceGroupName, String accountName, SyncStorageKeysInput parameters); - - /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName The Video Analyzer account name. - * @param parameters The request parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response syncStorageKeysWithResponse( - String resourceGroupName, String accountName, SyncStorageKeysInput parameters, Context context); - /** * Lists the Video Analyzer accounts in the specific subscription. * diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersCreateOrUpdateHeaders.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersCreateOrUpdateHeaders.java new file mode 100644 index 0000000000000..7fcc16b26c29b --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersCreateOrUpdateHeaders.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The VideoAnalyzersCreateOrUpdateHeaders model. */ +@Fluent +public final class VideoAnalyzersCreateOrUpdateHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoAnalyzersCreateOrUpdateHeaders.class); + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the VideoAnalyzersCreateOrUpdateHeaders object itself. + */ + public VideoAnalyzersCreateOrUpdateHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the VideoAnalyzersCreateOrUpdateHeaders object itself. + */ + public VideoAnalyzersCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the VideoAnalyzersCreateOrUpdateHeaders object itself. + */ + public VideoAnalyzersCreateOrUpdateHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersCreateOrUpdateResponse.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersCreateOrUpdateResponse.java new file mode 100644 index 0000000000000..cf64c312472a2 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersCreateOrUpdateResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; + +/** Contains all response data for the createOrUpdate operation. */ +public final class VideoAnalyzersCreateOrUpdateResponse + extends ResponseBase { + /** + * Creates an instance of VideoAnalyzersCreateOrUpdateResponse. + * + * @param request the request which resulted in this VideoAnalyzersCreateOrUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public VideoAnalyzersCreateOrUpdateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + VideoAnalyzerInner value, + VideoAnalyzersCreateOrUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public VideoAnalyzerInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersUpdateHeaders.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersUpdateHeaders.java new file mode 100644 index 0000000000000..7f3ae8b7b6b2b --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersUpdateHeaders.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The VideoAnalyzersUpdateHeaders model. */ +@Fluent +public final class VideoAnalyzersUpdateHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoAnalyzersUpdateHeaders.class); + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the VideoAnalyzersUpdateHeaders object itself. + */ + public VideoAnalyzersUpdateHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the VideoAnalyzersUpdateHeaders object itself. + */ + public VideoAnalyzersUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the VideoAnalyzersUpdateHeaders object itself. + */ + public VideoAnalyzersUpdateHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersUpdateResponse.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersUpdateResponse.java new file mode 100644 index 0000000000000..6132c4ee01eea --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzersUpdateResponse.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; + +/** Contains all response data for the update operation. */ +public final class VideoAnalyzersUpdateResponse extends ResponseBase { + /** + * Creates an instance of VideoAnalyzersUpdateResponse. + * + * @param request the request which resulted in this VideoAnalyzersUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public VideoAnalyzersUpdateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + VideoAnalyzerInner value, + VideoAnalyzersUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public VideoAnalyzerInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoArchival.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoArchival.java new file mode 100644 index 0000000000000..827e09e9bbbeb --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoArchival.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Video archival properties. */ +@Fluent +public final class VideoArchival { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoArchival.class); + + /* + * Video retention period indicates the maximum age of the video archive + * segments which are intended to be kept in storage. It must be provided + * in the ISO8601 duration format in the granularity of days, up to a + * maximum of 10 years. For example, if this is set to P30D (30 days), + * content older than 30 days will be periodically deleted. This value can + * be updated at any time and the new desired retention period will be + * effective within 24 hours. + */ + @JsonProperty(value = "retentionPeriod") + private String retentionPeriod; + + /** + * Get the retentionPeriod property: Video retention period indicates the maximum age of the video archive segments + * which are intended to be kept in storage. It must be provided in the ISO8601 duration format in the granularity + * of days, up to a maximum of 10 years. For example, if this is set to P30D (30 days), content older than 30 days + * will be periodically deleted. This value can be updated at any time and the new desired retention period will be + * effective within 24 hours. + * + * @return the retentionPeriod value. + */ + public String retentionPeriod() { + return this.retentionPeriod; + } + + /** + * Set the retentionPeriod property: Video retention period indicates the maximum age of the video archive segments + * which are intended to be kept in storage. It must be provided in the ISO8601 duration format in the granularity + * of days, up to a maximum of 10 years. For example, if this is set to P30D (30 days), content older than 30 days + * will be periodically deleted. This value can be updated at any time and the new desired retention period will be + * effective within 24 hours. + * + * @param retentionPeriod the retentionPeriod value to set. + * @return the VideoArchival object itself. + */ + public VideoArchival withRetentionPeriod(String retentionPeriod) { + this.retentionPeriod = retentionPeriod; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoStreamingToken.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoContentToken.java similarity index 59% rename from sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoStreamingToken.java rename to sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoContentToken.java index df479edc92319..8e7326ffb5a4a 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoStreamingToken.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoContentToken.java @@ -4,21 +4,20 @@ package com.azure.resourcemanager.videoanalyzer.models; -import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoStreamingTokenInner; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoContentTokenInner; import java.time.OffsetDateTime; -/** An immutable client-side representation of VideoStreamingToken. */ -public interface VideoStreamingToken { +/** An immutable client-side representation of VideoContentToken. */ +public interface VideoContentToken { /** - * Gets the expirationDate property: The streaming token expiration date in ISO8601 format (eg. - * 2021-01-01T00:00:00Z). + * Gets the expirationDate property: The content token expiration date in ISO8601 format (eg. 2021-01-01T00:00:00Z). * * @return the expirationDate value. */ OffsetDateTime expirationDate(); /** - * Gets the token property: The streaming token value to be added to the video streaming URL as the value for a + * Gets the token property: The content token value to be added to the video content URL as the value for the * "token" query string parameter. The token is specific to a single video. * * @return the token value. @@ -26,9 +25,9 @@ public interface VideoStreamingToken { String token(); /** - * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.VideoStreamingTokenInner object. + * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.VideoContentTokenInner object. * * @return the inner object. */ - VideoStreamingTokenInner innerModel(); + VideoContentTokenInner innerModel(); } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoContentUrls.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoContentUrls.java new file mode 100644 index 0000000000000..23d71464d5c87 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoContentUrls.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Set of URLs to the video content. */ +@Fluent +public final class VideoContentUrls { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoContentUrls.class); + + /* + * Video file download URL. This URL can be used in conjunction with the + * video content authorization token to download the video MP4 file. The + * resulting MP4 file can be played on any standard media player. It is + * available when the video type is 'file' and video file is available for + * consumption. + */ + @JsonProperty(value = "downloadUrl") + private String downloadUrl; + + /* + * Video archive streaming base URL. The archived content can be + * automatically played by the Azure Video Analyzer player widget. + * Alternatively, this URL can be used in conjunction with the video + * content authorization token on any compatible DASH or HLS players by + * appending the following to the base URL: + * + * - HLSv4: /manifest(format=m3u8-aapl).m3u8 + * - HLS CMAF: /manifest(format=m3u8-cmaf) + * - DASH CMAF: /manifest(format=mpd-time-cmaf) + * + * Moreover, an ongoing video recording can be played in "live mode" with + * latencies which are approximately double of the chosen video segment + * length. It is available when the video type is 'archive' and video + * archiving is enabled. + */ + @JsonProperty(value = "archiveBaseUrl") + private String archiveBaseUrl; + + /* + * Video low-latency streaming URL. The live content can be automatically + * played by the Azure Video Analyzer player widget. Alternatively, this + * URL can be used in conjunction with the video content authorization + * token to expose a WebSocket tunneled RTSP stream. It is available when + * the video type is 'archive' and a live, low-latency feed is available + * from the source. + */ + @JsonProperty(value = "rtspTunnelUrl") + private String rtspTunnelUrl; + + /* + * Video preview image URLs. These URLs can be used in conjunction with the + * video content authorization token to download the most recent still + * image from the video archive in different resolutions. They are + * available when the video type is 'archive' and preview images are + * enabled. + */ + @JsonProperty(value = "previewImageUrls") + private VideoPreviewImageUrls previewImageUrls; + + /** + * Get the downloadUrl property: Video file download URL. This URL can be used in conjunction with the video content + * authorization token to download the video MP4 file. The resulting MP4 file can be played on any standard media + * player. It is available when the video type is 'file' and video file is available for consumption. + * + * @return the downloadUrl value. + */ + public String downloadUrl() { + return this.downloadUrl; + } + + /** + * Set the downloadUrl property: Video file download URL. This URL can be used in conjunction with the video content + * authorization token to download the video MP4 file. The resulting MP4 file can be played on any standard media + * player. It is available when the video type is 'file' and video file is available for consumption. + * + * @param downloadUrl the downloadUrl value to set. + * @return the VideoContentUrls object itself. + */ + public VideoContentUrls withDownloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl; + return this; + } + + /** + * Get the archiveBaseUrl property: Video archive streaming base URL. The archived content can be automatically + * played by the Azure Video Analyzer player widget. Alternatively, this URL can be used in conjunction with the + * video content authorization token on any compatible DASH or HLS players by appending the following to the base + * URL: + * + *

- HLSv4: /manifest(format=m3u8-aapl).m3u8 - HLS CMAF: /manifest(format=m3u8-cmaf) - DASH CMAF: + * /manifest(format=mpd-time-cmaf) + * + *

Moreover, an ongoing video recording can be played in "live mode" with latencies which are approximately + * double of the chosen video segment length. It is available when the video type is 'archive' and video archiving + * is enabled. + * + * @return the archiveBaseUrl value. + */ + public String archiveBaseUrl() { + return this.archiveBaseUrl; + } + + /** + * Set the archiveBaseUrl property: Video archive streaming base URL. The archived content can be automatically + * played by the Azure Video Analyzer player widget. Alternatively, this URL can be used in conjunction with the + * video content authorization token on any compatible DASH or HLS players by appending the following to the base + * URL: + * + *

- HLSv4: /manifest(format=m3u8-aapl).m3u8 - HLS CMAF: /manifest(format=m3u8-cmaf) - DASH CMAF: + * /manifest(format=mpd-time-cmaf) + * + *

Moreover, an ongoing video recording can be played in "live mode" with latencies which are approximately + * double of the chosen video segment length. It is available when the video type is 'archive' and video archiving + * is enabled. + * + * @param archiveBaseUrl the archiveBaseUrl value to set. + * @return the VideoContentUrls object itself. + */ + public VideoContentUrls withArchiveBaseUrl(String archiveBaseUrl) { + this.archiveBaseUrl = archiveBaseUrl; + return this; + } + + /** + * Get the rtspTunnelUrl property: Video low-latency streaming URL. The live content can be automatically played by + * the Azure Video Analyzer player widget. Alternatively, this URL can be used in conjunction with the video content + * authorization token to expose a WebSocket tunneled RTSP stream. It is available when the video type is 'archive' + * and a live, low-latency feed is available from the source. + * + * @return the rtspTunnelUrl value. + */ + public String rtspTunnelUrl() { + return this.rtspTunnelUrl; + } + + /** + * Set the rtspTunnelUrl property: Video low-latency streaming URL. The live content can be automatically played by + * the Azure Video Analyzer player widget. Alternatively, this URL can be used in conjunction with the video content + * authorization token to expose a WebSocket tunneled RTSP stream. It is available when the video type is 'archive' + * and a live, low-latency feed is available from the source. + * + * @param rtspTunnelUrl the rtspTunnelUrl value to set. + * @return the VideoContentUrls object itself. + */ + public VideoContentUrls withRtspTunnelUrl(String rtspTunnelUrl) { + this.rtspTunnelUrl = rtspTunnelUrl; + return this; + } + + /** + * Get the previewImageUrls property: Video preview image URLs. These URLs can be used in conjunction with the video + * content authorization token to download the most recent still image from the video archive in different + * resolutions. They are available when the video type is 'archive' and preview images are enabled. + * + * @return the previewImageUrls value. + */ + public VideoPreviewImageUrls previewImageUrls() { + return this.previewImageUrls; + } + + /** + * Set the previewImageUrls property: Video preview image URLs. These URLs can be used in conjunction with the video + * content authorization token to download the most recent still image from the video archive in different + * resolutions. They are available when the video type is 'archive' and preview images are enabled. + * + * @param previewImageUrls the previewImageUrls value to set. + * @return the VideoContentUrls object itself. + */ + public VideoContentUrls withPreviewImageUrls(VideoPreviewImageUrls previewImageUrls) { + this.previewImageUrls = previewImageUrls; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (previewImageUrls() != null) { + previewImageUrls().validate(); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoCreationProperties.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoCreationProperties.java new file mode 100644 index 0000000000000..649d36e10a94f --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoCreationProperties.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Optional video properties to be used in case a new video resource needs to be created on the service. These will not + * take effect if the video already exists. + */ +@Fluent +public final class VideoCreationProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoCreationProperties.class); + + /* + * Optional video title provided by the user. Value can be up to 256 + * characters long. + */ + @JsonProperty(value = "title") + private String title; + + /* + * Optional video description provided by the user. Value can be up to 2048 + * characters long. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Video segment length indicates the length of individual video files + * (segments) which are persisted to storage. Smaller segments provide + * lower archive playback latency but generate larger volume of storage + * transactions. Larger segments reduce the amount of storage transactions + * while increasing the archive playback latency. Value must be specified + * in ISO8601 duration format (i.e. \"PT30S\" equals 30 seconds) and can + * vary between 30 seconds to 5 minutes, in 30 seconds increments. Changing + * this value after the video is initially created can lead to errors when + * uploading media to the archive. Default value is 30 seconds. + */ + @JsonProperty(value = "segmentLength") + private String segmentLength; + + /* + * Video retention period indicates how long the video is kept in storage. + * Value must be specified in ISO8601 duration format (i.e. \"PT1D\" equals + * 1 day) and can vary between 1 day to 5 years, in 1 day increments. When + * absent (null), all video content is retained indefinitely. + */ + @JsonProperty(value = "retentionPeriod") + private String retentionPeriod; + + /** + * Get the title property: Optional video title provided by the user. Value can be up to 256 characters long. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: Optional video title provided by the user. Value can be up to 256 characters long. + * + * @param title the title value to set. + * @return the VideoCreationProperties object itself. + */ + public VideoCreationProperties withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the description property: Optional video description provided by the user. Value can be up to 2048 characters + * long. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Optional video description provided by the user. Value can be up to 2048 characters + * long. + * + * @param description the description value to set. + * @return the VideoCreationProperties object itself. + */ + public VideoCreationProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the segmentLength property: Video segment length indicates the length of individual video files (segments) + * which are persisted to storage. Smaller segments provide lower archive playback latency but generate larger + * volume of storage transactions. Larger segments reduce the amount of storage transactions while increasing the + * archive playback latency. Value must be specified in ISO8601 duration format (i.e. \"PT30S\" equals 30 seconds) + * and can vary between 30 seconds to 5 minutes, in 30 seconds increments. Changing this value after the video is + * initially created can lead to errors when uploading media to the archive. Default value is 30 seconds. + * + * @return the segmentLength value. + */ + public String segmentLength() { + return this.segmentLength; + } + + /** + * Set the segmentLength property: Video segment length indicates the length of individual video files (segments) + * which are persisted to storage. Smaller segments provide lower archive playback latency but generate larger + * volume of storage transactions. Larger segments reduce the amount of storage transactions while increasing the + * archive playback latency. Value must be specified in ISO8601 duration format (i.e. \"PT30S\" equals 30 seconds) + * and can vary between 30 seconds to 5 minutes, in 30 seconds increments. Changing this value after the video is + * initially created can lead to errors when uploading media to the archive. Default value is 30 seconds. + * + * @param segmentLength the segmentLength value to set. + * @return the VideoCreationProperties object itself. + */ + public VideoCreationProperties withSegmentLength(String segmentLength) { + this.segmentLength = segmentLength; + return this; + } + + /** + * Get the retentionPeriod property: Video retention period indicates how long the video is kept in storage. Value + * must be specified in ISO8601 duration format (i.e. \"PT1D\" equals 1 day) and can vary between 1 day to 5 years, + * in 1 day increments. When absent (null), all video content is retained indefinitely. + * + * @return the retentionPeriod value. + */ + public String retentionPeriod() { + return this.retentionPeriod; + } + + /** + * Set the retentionPeriod property: Video retention period indicates how long the video is kept in storage. Value + * must be specified in ISO8601 duration format (i.e. \"PT1D\" equals 1 day) and can vary between 1 day to 5 years, + * in 1 day increments. When absent (null), all video content is retained indefinitely. + * + * @param retentionPeriod the retentionPeriod value to set. + * @return the VideoCreationProperties object itself. + */ + public VideoCreationProperties withRetentionPeriod(String retentionPeriod) { + this.retentionPeriod = retentionPeriod; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEncoderBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEncoderBase.java new file mode 100644 index 0000000000000..45b948d2529b7 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEncoderBase.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The video encoder base. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "@type", + defaultImpl = VideoEncoderBase.class) +@JsonTypeName("VideoEncoderBase") +@JsonSubTypes({@JsonSubTypes.Type(name = "#Microsoft.VideoAnalyzer.VideoEncoderH264", value = VideoEncoderH264.class)}) +@Fluent +public class VideoEncoderBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoEncoderBase.class); + + /* + * The video encoding bitrate. + */ + @JsonProperty(value = "bitrateKbps") + private String bitrateKbps; + + /* + * Video encoder frame rate. + */ + @JsonProperty(value = "frameRate") + private String frameRate; + + /* + * Defines the video scale. + */ + @JsonProperty(value = "scale") + private VideoScale scale; + + /** + * Get the bitrateKbps property: The video encoding bitrate. + * + * @return the bitrateKbps value. + */ + public String bitrateKbps() { + return this.bitrateKbps; + } + + /** + * Set the bitrateKbps property: The video encoding bitrate. + * + * @param bitrateKbps the bitrateKbps value to set. + * @return the VideoEncoderBase object itself. + */ + public VideoEncoderBase withBitrateKbps(String bitrateKbps) { + this.bitrateKbps = bitrateKbps; + return this; + } + + /** + * Get the frameRate property: Video encoder frame rate. + * + * @return the frameRate value. + */ + public String frameRate() { + return this.frameRate; + } + + /** + * Set the frameRate property: Video encoder frame rate. + * + * @param frameRate the frameRate value to set. + * @return the VideoEncoderBase object itself. + */ + public VideoEncoderBase withFrameRate(String frameRate) { + this.frameRate = frameRate; + return this; + } + + /** + * Get the scale property: Defines the video scale. + * + * @return the scale value. + */ + public VideoScale scale() { + return this.scale; + } + + /** + * Set the scale property: Defines the video scale. + * + * @param scale the scale value to set. + * @return the VideoEncoderBase object itself. + */ + public VideoEncoderBase withScale(VideoScale scale) { + this.scale = scale; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scale() != null) { + scale().validate(); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEncoderH264.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEncoderH264.java new file mode 100644 index 0000000000000..8bad002c75145 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEncoderH264.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The video H264 codec encoder. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") +@JsonTypeName("#Microsoft.VideoAnalyzer.VideoEncoderH264") +@Fluent +public final class VideoEncoderH264 extends VideoEncoderBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoEncoderH264.class); + + /** {@inheritDoc} */ + @Override + public VideoEncoderH264 withBitrateKbps(String bitrateKbps) { + super.withBitrateKbps(bitrateKbps); + return this; + } + + /** {@inheritDoc} */ + @Override + public VideoEncoderH264 withFrameRate(String frameRate) { + super.withFrameRate(frameRate); + return this; + } + + /** {@inheritDoc} */ + @Override + public VideoEncoderH264 withScale(VideoScale scale) { + super.withScale(scale); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEntity.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEntity.java index ce4d9618b25f5..199dc52a7e1f5 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEntity.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEntity.java @@ -55,8 +55,8 @@ public interface VideoEntity { String description(); /** - * Gets the typePropertiesType property: Type of the video archive. Different archive formats provide different - * capabilities. + * Gets the typePropertiesType property: Video content type. Different content types are suitable for different + * applications and scenarios. * * @return the typePropertiesType value. */ @@ -71,11 +71,11 @@ public interface VideoEntity { VideoFlags flags(); /** - * Gets the streaming property: Video streaming holds information about video streaming URLs. + * Gets the contentUrls property: Set of URLs to the video content. * - * @return the streaming value. + * @return the contentUrls value. */ - VideoStreaming streaming(); + VideoContentUrls contentUrls(); /** * Gets the mediaInfo property: Contains information about the video and audio content. @@ -84,6 +84,13 @@ public interface VideoEntity { */ VideoMediaInfo mediaInfo(); + /** + * Gets the archival property: Video archival properties. + * + * @return the archival value. + */ + VideoArchival archival(); + /** * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.VideoEntityInner object. * @@ -115,7 +122,11 @@ interface WithParentResource { * The stage of the VideoEntity definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTitle, DefinitionStages.WithDescription { + interface WithCreate + extends DefinitionStages.WithTitle, + DefinitionStages.WithDescription, + DefinitionStages.WithTypePropertiesType, + DefinitionStages.WithArchival { /** * Executes the create request. * @@ -154,6 +165,28 @@ interface WithDescription { */ WithCreate withDescription(String description); } + /** The stage of the VideoEntity definition allowing to specify typePropertiesType. */ + interface WithTypePropertiesType { + /** + * Specifies the typePropertiesType property: Video content type. Different content types are suitable for + * different applications and scenarios.. + * + * @param typePropertiesType Video content type. Different content types are suitable for different + * applications and scenarios. + * @return the next definition stage. + */ + WithCreate withTypePropertiesType(VideoType typePropertiesType); + } + /** The stage of the VideoEntity definition allowing to specify archival. */ + interface WithArchival { + /** + * Specifies the archival property: Video archival properties.. + * + * @param archival Video archival properties. + * @return the next definition stage. + */ + WithCreate withArchival(VideoArchival archival); + } } /** * Begins update for the VideoEntity resource. @@ -163,7 +196,11 @@ interface WithDescription { VideoEntity.Update update(); /** The template for VideoEntity update. */ - interface Update extends UpdateStages.WithTitle, UpdateStages.WithDescription { + interface Update + extends UpdateStages.WithTitle, + UpdateStages.WithDescription, + UpdateStages.WithTypePropertiesType, + UpdateStages.WithArchival { /** * Executes the update request. * @@ -204,6 +241,28 @@ interface WithDescription { */ Update withDescription(String description); } + /** The stage of the VideoEntity update allowing to specify typePropertiesType. */ + interface WithTypePropertiesType { + /** + * Specifies the typePropertiesType property: Video content type. Different content types are suitable for + * different applications and scenarios.. + * + * @param typePropertiesType Video content type. Different content types are suitable for different + * applications and scenarios. + * @return the next definition stage. + */ + Update withTypePropertiesType(VideoType typePropertiesType); + } + /** The stage of the VideoEntity update allowing to specify archival. */ + interface WithArchival { + /** + * Specifies the archival property: Video archival properties.. + * + * @param archival Video archival properties. + * @return the next definition stage. + */ + Update withArchival(VideoArchival archival); + } } /** * Refreshes the resource to sync with Azure. @@ -221,24 +280,22 @@ interface WithDescription { VideoEntity refresh(Context context); /** - * Generates a streaming token used for authenticating video playback. + * Generates a streaming token which can be used for accessing content from video content URLs. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video streaming token grants access to the video streaming URLs which can be used by an compatible HLS or - * DASH player. + * @return "Video content token grants access to the video content URLs.". */ - VideoStreamingToken listStreamingToken(); + VideoContentToken listContentToken(); /** - * Generates a streaming token used for authenticating video playback. + * Generates a streaming token which can be used for accessing content from video content URLs. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video streaming token grants access to the video streaming URLs which can be used by an compatible HLS or - * DASH player. + * @return "Video content token grants access to the video content URLs.". */ - Response listStreamingTokenWithResponse(Context context); + Response listContentTokenWithResponse(Context context); } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoFlags.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoFlags.java index 73de1c6d12262..9eaae8c0880bf 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoFlags.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoFlags.java @@ -34,13 +34,13 @@ public final class VideoFlags { /* * Value indicating whether or not the video is currently being referenced - * be an active live pipeline. The fact that is being referenced, doesn't + * be an active pipeline. The fact that is being referenced, doesn't * necessarily indicate that data is being received. For example, video * recording may be gated on events or camera may not be accessible at the * time. */ - @JsonProperty(value = "isRecording", required = true) - private boolean isRecording; + @JsonProperty(value = "isInUse", required = true) + private boolean isInUse; /** * Get the canStream property: Value indicating whether or not the video can be streamed. Only "archive" type videos @@ -87,26 +87,26 @@ public VideoFlags withHasData(boolean hasData) { } /** - * Get the isRecording property: Value indicating whether or not the video is currently being referenced be an - * active live pipeline. The fact that is being referenced, doesn't necessarily indicate that data is being - * received. For example, video recording may be gated on events or camera may not be accessible at the time. + * Get the isInUse property: Value indicating whether or not the video is currently being referenced be an active + * pipeline. The fact that is being referenced, doesn't necessarily indicate that data is being received. For + * example, video recording may be gated on events or camera may not be accessible at the time. * - * @return the isRecording value. + * @return the isInUse value. */ - public boolean isRecording() { - return this.isRecording; + public boolean isInUse() { + return this.isInUse; } /** - * Set the isRecording property: Value indicating whether or not the video is currently being referenced be an - * active live pipeline. The fact that is being referenced, doesn't necessarily indicate that data is being - * received. For example, video recording may be gated on events or camera may not be accessible at the time. + * Set the isInUse property: Value indicating whether or not the video is currently being referenced be an active + * pipeline. The fact that is being referenced, doesn't necessarily indicate that data is being received. For + * example, video recording may be gated on events or camera may not be accessible at the time. * - * @param isRecording the isRecording value to set. + * @param isInUse the isInUse value to set. * @return the VideoFlags object itself. */ - public VideoFlags withIsRecording(boolean isRecording) { - this.isRecording = isRecording; + public VideoFlags withIsInUse(boolean isInUse) { + this.isInUse = isInUse; return this; } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoPreviewImageUrls.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoPreviewImageUrls.java new file mode 100644 index 0000000000000..db6ccf86e81be --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoPreviewImageUrls.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Video preview image URLs. These URLs can be used in conjunction with the video content authorization token to + * download the most recent still image from the video archive in different resolutions. They are available when the + * video type is 'archive' and preview images are enabled. + */ +@Fluent +public final class VideoPreviewImageUrls { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoPreviewImageUrls.class); + + /* + * Low resolution preview image URL. + */ + @JsonProperty(value = "small") + private String small; + + /* + * Medium resolution preview image URL. + */ + @JsonProperty(value = "medium") + private String medium; + + /* + * High resolution preview image URL. + */ + @JsonProperty(value = "large") + private String large; + + /** + * Get the small property: Low resolution preview image URL. + * + * @return the small value. + */ + public String small() { + return this.small; + } + + /** + * Set the small property: Low resolution preview image URL. + * + * @param small the small value to set. + * @return the VideoPreviewImageUrls object itself. + */ + public VideoPreviewImageUrls withSmall(String small) { + this.small = small; + return this; + } + + /** + * Get the medium property: Medium resolution preview image URL. + * + * @return the medium value. + */ + public String medium() { + return this.medium; + } + + /** + * Set the medium property: Medium resolution preview image URL. + * + * @param medium the medium value to set. + * @return the VideoPreviewImageUrls object itself. + */ + public VideoPreviewImageUrls withMedium(String medium) { + this.medium = medium; + return this; + } + + /** + * Get the large property: High resolution preview image URL. + * + * @return the large value. + */ + public String large() { + return this.large; + } + + /** + * Set the large property: High resolution preview image URL. + * + * @param large the large value to set. + * @return the VideoPreviewImageUrls object itself. + */ + public VideoPreviewImageUrls withLarge(String large) { + this.large = large; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoPublishingOptions.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoPublishingOptions.java new file mode 100644 index 0000000000000..eee01bdd64d57 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoPublishingOptions.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Options for changing video publishing behavior on the video sink and output video. */ +@Fluent +public final class VideoPublishingOptions { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoPublishingOptions.class); + + /* + * When set to 'true' the video will not archive media content. Default is + * 'false'. + */ + @JsonProperty(value = "disableArchive") + private String disableArchive; + + /* + * When set to 'true' the video will not publish RTSP playback. Default is + * 'false'. + */ + @JsonProperty(value = "disableRtspPublishing") + private String disableRtspPublishing; + + /* + * When set to 'true' the video will not publish preview images. Default is + * 'false'. + */ + @JsonProperty(value = "disableVideoPreviewImage") + private String disableVideoPreviewImage; + + /** + * Get the disableArchive property: When set to 'true' the video will not archive media content. Default is 'false'. + * + * @return the disableArchive value. + */ + public String disableArchive() { + return this.disableArchive; + } + + /** + * Set the disableArchive property: When set to 'true' the video will not archive media content. Default is 'false'. + * + * @param disableArchive the disableArchive value to set. + * @return the VideoPublishingOptions object itself. + */ + public VideoPublishingOptions withDisableArchive(String disableArchive) { + this.disableArchive = disableArchive; + return this; + } + + /** + * Get the disableRtspPublishing property: When set to 'true' the video will not publish RTSP playback. Default is + * 'false'. + * + * @return the disableRtspPublishing value. + */ + public String disableRtspPublishing() { + return this.disableRtspPublishing; + } + + /** + * Set the disableRtspPublishing property: When set to 'true' the video will not publish RTSP playback. Default is + * 'false'. + * + * @param disableRtspPublishing the disableRtspPublishing value to set. + * @return the VideoPublishingOptions object itself. + */ + public VideoPublishingOptions withDisableRtspPublishing(String disableRtspPublishing) { + this.disableRtspPublishing = disableRtspPublishing; + return this; + } + + /** + * Get the disableVideoPreviewImage property: When set to 'true' the video will not publish preview images. Default + * is 'false'. + * + * @return the disableVideoPreviewImage value. + */ + public String disableVideoPreviewImage() { + return this.disableVideoPreviewImage; + } + + /** + * Set the disableVideoPreviewImage property: When set to 'true' the video will not publish preview images. Default + * is 'false'. + * + * @param disableVideoPreviewImage the disableVideoPreviewImage value to set. + * @return the VideoPublishingOptions object itself. + */ + public VideoPublishingOptions withDisableVideoPreviewImage(String disableVideoPreviewImage) { + this.disableVideoPreviewImage = disableVideoPreviewImage; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoScale.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoScale.java new file mode 100644 index 0000000000000..2d69bd1220d68 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoScale.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The video scaling information. */ +@Fluent +public final class VideoScale { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoScale.class); + + /* + * The desired output video height. + */ + @JsonProperty(value = "height") + private String height; + + /* + * The desired output video width. + */ + @JsonProperty(value = "width") + private String width; + + /* + * Describes the video scaling mode to be applied. Default mode is 'pad'. + */ + @JsonProperty(value = "mode") + private VideoScaleMode mode; + + /** + * Get the height property: The desired output video height. + * + * @return the height value. + */ + public String height() { + return this.height; + } + + /** + * Set the height property: The desired output video height. + * + * @param height the height value to set. + * @return the VideoScale object itself. + */ + public VideoScale withHeight(String height) { + this.height = height; + return this; + } + + /** + * Get the width property: The desired output video width. + * + * @return the width value. + */ + public String width() { + return this.width; + } + + /** + * Set the width property: The desired output video width. + * + * @param width the width value to set. + * @return the VideoScale object itself. + */ + public VideoScale withWidth(String width) { + this.width = width; + return this; + } + + /** + * Get the mode property: Describes the video scaling mode to be applied. Default mode is 'pad'. + * + * @return the mode value. + */ + public VideoScaleMode mode() { + return this.mode; + } + + /** + * Set the mode property: Describes the video scaling mode to be applied. Default mode is 'pad'. + * + * @param mode the mode value to set. + * @return the VideoScale object itself. + */ + public VideoScale withMode(VideoScaleMode mode) { + this.mode = mode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoScaleMode.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoScaleMode.java new file mode 100644 index 0000000000000..0c95a494d8065 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoScaleMode.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for VideoScaleMode. */ +public final class VideoScaleMode extends ExpandableStringEnum { + /** Static value Pad for VideoScaleMode. */ + public static final VideoScaleMode PAD = fromString("Pad"); + + /** Static value PreserveAspectRatio for VideoScaleMode. */ + public static final VideoScaleMode PRESERVE_ASPECT_RATIO = fromString("PreserveAspectRatio"); + + /** Static value Stretch for VideoScaleMode. */ + public static final VideoScaleMode STRETCH = fromString("Stretch"); + + /** + * Creates or finds a VideoScaleMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding VideoScaleMode. + */ + @JsonCreator + public static VideoScaleMode fromString(String name) { + return fromString(name, VideoScaleMode.class); + } + + /** @return known VideoScaleMode values. */ + public static Collection values() { + return values(VideoScaleMode.class); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSequenceAbsoluteTimeMarkers.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSequenceAbsoluteTimeMarkers.java new file mode 100644 index 0000000000000..70f677c9275c8 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSequenceAbsoluteTimeMarkers.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Absolute datetime sequence as a string. The datetime format supported is as per ISO8601. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") +@JsonTypeName("#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers") +@Fluent +public final class VideoSequenceAbsoluteTimeMarkers extends TimeSequenceBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoSequenceAbsoluteTimeMarkers.class); + + /* + * The datetime sequence ranges. Example: '[["2020-10-05T03:30:00Z", + * "2020-10-05T03:40:00Z"],["2020-10-05T07:30:00Z", + * "2020-10-05T08:30:00Z"]]'. Each range indicates the start and end date + * time marker. + */ + @JsonProperty(value = "ranges", required = true) + private String ranges; + + /** + * Get the ranges property: The datetime sequence ranges. Example: '[["2020-10-05T03:30:00Z", + * "2020-10-05T03:40:00Z"],["2020-10-05T07:30:00Z", "2020-10-05T08:30:00Z"]]'. Each range indicates the start and + * end date time marker. + * + * @return the ranges value. + */ + public String ranges() { + return this.ranges; + } + + /** + * Set the ranges property: The datetime sequence ranges. Example: '[["2020-10-05T03:30:00Z", + * "2020-10-05T03:40:00Z"],["2020-10-05T07:30:00Z", "2020-10-05T08:30:00Z"]]'. Each range indicates the start and + * end date time marker. + * + * @param ranges the ranges value to set. + * @return the VideoSequenceAbsoluteTimeMarkers object itself. + */ + public VideoSequenceAbsoluteTimeMarkers withRanges(String ranges) { + this.ranges = ranges; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (ranges() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property ranges in model VideoSequenceAbsoluteTimeMarkers")); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSink.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSink.java new file mode 100644 index 0000000000000..a3ba52156cc0b --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSink.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * Video sink allows for video and audio to be recorded to the Video Analyzer service. The recorded video can be played + * from anywhere and further managed from the cloud. Due to security reasons, a given Video Analyzer edge module + * instance can only record content to new video entries, or existing video entries previously recorded by the same + * module. Any attempt to record content to an existing video which has not been created by the same module instance + * will result in failure to record. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") +@JsonTypeName("#Microsoft.VideoAnalyzer.VideoSink") +@Fluent +public final class VideoSink extends SinkNodeBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoSink.class); + + /* + * Name of a new or existing Video Analyzer video resource used for the + * media recording. + */ + @JsonProperty(value = "videoName", required = true) + private String videoName; + + /* + * Optional video properties to be used in case a new video resource needs + * to be created on the service. + */ + @JsonProperty(value = "videoCreationProperties") + private VideoCreationProperties videoCreationProperties; + + /* + * Optional video publishing options to be used for changing publishing + * behavior of the output video. + */ + @JsonProperty(value = "videoPublishingOptions") + private VideoPublishingOptions videoPublishingOptions; + + /** + * Get the videoName property: Name of a new or existing Video Analyzer video resource used for the media recording. + * + * @return the videoName value. + */ + public String videoName() { + return this.videoName; + } + + /** + * Set the videoName property: Name of a new or existing Video Analyzer video resource used for the media recording. + * + * @param videoName the videoName value to set. + * @return the VideoSink object itself. + */ + public VideoSink withVideoName(String videoName) { + this.videoName = videoName; + return this; + } + + /** + * Get the videoCreationProperties property: Optional video properties to be used in case a new video resource needs + * to be created on the service. + * + * @return the videoCreationProperties value. + */ + public VideoCreationProperties videoCreationProperties() { + return this.videoCreationProperties; + } + + /** + * Set the videoCreationProperties property: Optional video properties to be used in case a new video resource needs + * to be created on the service. + * + * @param videoCreationProperties the videoCreationProperties value to set. + * @return the VideoSink object itself. + */ + public VideoSink withVideoCreationProperties(VideoCreationProperties videoCreationProperties) { + this.videoCreationProperties = videoCreationProperties; + return this; + } + + /** + * Get the videoPublishingOptions property: Optional video publishing options to be used for changing publishing + * behavior of the output video. + * + * @return the videoPublishingOptions value. + */ + public VideoPublishingOptions videoPublishingOptions() { + return this.videoPublishingOptions; + } + + /** + * Set the videoPublishingOptions property: Optional video publishing options to be used for changing publishing + * behavior of the output video. + * + * @param videoPublishingOptions the videoPublishingOptions value to set. + * @return the VideoSink object itself. + */ + public VideoSink withVideoPublishingOptions(VideoPublishingOptions videoPublishingOptions) { + this.videoPublishingOptions = videoPublishingOptions; + return this; + } + + /** {@inheritDoc} */ + @Override + public VideoSink withInputs(List inputs) { + super.withInputs(inputs); + return this; + } + + /** {@inheritDoc} */ + @Override + public VideoSink withName(String name) { + super.withName(name); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (videoName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property videoName in model VideoSink")); + } + if (videoCreationProperties() != null) { + videoCreationProperties().validate(); + } + if (videoPublishingOptions() != null) { + videoPublishingOptions().validate(); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSource.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSource.java new file mode 100644 index 0000000000000..f1f7d38b5857f --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSource.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Enables a pipeline to use video as a source. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type") +@JsonTypeName("#Microsoft.VideoAnalyzer.VideoSource") +@Fluent +public final class VideoSource extends SourceNodeBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoSource.class); + + /* + * Video name. + */ + @JsonProperty(value = "videoName", required = true) + private String videoName; + + /* + * Video time sequences selected for the video. + */ + @JsonProperty(value = "timeSequences", required = true) + private TimeSequenceBase timeSequences; + + /** + * Get the videoName property: Video name. + * + * @return the videoName value. + */ + public String videoName() { + return this.videoName; + } + + /** + * Set the videoName property: Video name. + * + * @param videoName the videoName value to set. + * @return the VideoSource object itself. + */ + public VideoSource withVideoName(String videoName) { + this.videoName = videoName; + return this; + } + + /** + * Get the timeSequences property: Video time sequences selected for the video. + * + * @return the timeSequences value. + */ + public TimeSequenceBase timeSequences() { + return this.timeSequences; + } + + /** + * Set the timeSequences property: Video time sequences selected for the video. + * + * @param timeSequences the timeSequences value to set. + * @return the VideoSource object itself. + */ + public VideoSource withTimeSequences(TimeSequenceBase timeSequences) { + this.timeSequences = timeSequences; + return this; + } + + /** {@inheritDoc} */ + @Override + public VideoSource withName(String name) { + super.withName(name); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (videoName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property videoName in model VideoSource")); + } + if (timeSequences() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property timeSequences in model VideoSource")); + } else { + timeSequences().validate(); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoStreaming.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoStreaming.java deleted file mode 100644 index 448feec13fef7..0000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoStreaming.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.videoanalyzer.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Video streaming holds information about video streaming URLs. */ -@Fluent -public final class VideoStreaming { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoStreaming.class); - - /* - * Video streaming base URL for the video archive. When present, archived - * video can be played through the Azure Video Analyzer player. - * Alternatively, this URL can be used with compatible DASH or HLS players - * by appending the following to the base URL: - * - * - HLSv4: /manifest(format=m3u8-aapl).m3u8 - * - HLS CMAF: /manifest(format=m3u8-cmaf) - * - DASH CMAF: /manifest(format=mpd-time-cmaf) - * - * Moreover, an ongoing video recording can be played in "live mode" with - * latencies which are approximately double of the chosen video segment - * length. - */ - @JsonProperty(value = "archiveBaseUrl") - private String archiveBaseUrl; - - /** - * Get the archiveBaseUrl property: Video streaming base URL for the video archive. When present, archived video can - * be played through the Azure Video Analyzer player. Alternatively, this URL can be used with compatible DASH or - * HLS players by appending the following to the base URL: - * - *

- HLSv4: /manifest(format=m3u8-aapl).m3u8 - HLS CMAF: /manifest(format=m3u8-cmaf) - DASH CMAF: - * /manifest(format=mpd-time-cmaf) - * - *

Moreover, an ongoing video recording can be played in "live mode" with latencies which are approximately - * double of the chosen video segment length. - * - * @return the archiveBaseUrl value. - */ - public String archiveBaseUrl() { - return this.archiveBaseUrl; - } - - /** - * Set the archiveBaseUrl property: Video streaming base URL for the video archive. When present, archived video can - * be played through the Azure Video Analyzer player. Alternatively, this URL can be used with compatible DASH or - * HLS players by appending the following to the base URL: - * - *

- HLSv4: /manifest(format=m3u8-aapl).m3u8 - HLS CMAF: /manifest(format=m3u8-cmaf) - DASH CMAF: - * /manifest(format=mpd-time-cmaf) - * - *

Moreover, an ongoing video recording can be played in "live mode" with latencies which are approximately - * double of the chosen video segment length. - * - * @param archiveBaseUrl the archiveBaseUrl value to set. - * @return the VideoStreaming object itself. - */ - public VideoStreaming withArchiveBaseUrl(String archiveBaseUrl) { - this.archiveBaseUrl = archiveBaseUrl; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoType.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoType.java index 050e57e5a1b7a..34ad52f7ffbc7 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoType.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoType.java @@ -13,6 +13,9 @@ public final class VideoType extends ExpandableStringEnum { /** Static value Archive for VideoType. */ public static final VideoType ARCHIVE = fromString("Archive"); + /** Static value File for VideoType. */ + public static final VideoType FILE = fromString("File"); + /** * Creates or finds a VideoType from its string representation. * diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Videos.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Videos.java index 8db3881549b9c..12ef2a8881730 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Videos.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Videos.java @@ -11,7 +11,7 @@ /** Resource collection API of Videos. */ public interface Videos { /** - * List all existing video resources in the specified account. + * List all existing video resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -23,7 +23,7 @@ public interface Videos { PagedIterable list(String resourceGroupName, String accountName); /** - * List all existing video resources in the specified account. + * List all existing video resources. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -38,29 +38,29 @@ public interface Videos { PagedIterable list(String resourceGroupName, String accountName, Integer top, Context context); /** - * Retrieves an existing video resource within an account with a given name. + * Retrieves an existing video resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to retrieve. + * @param videoName The Video name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ VideoEntity get(String resourceGroupName, String accountName, String videoName); /** - * Retrieves an existing video resource within an account with a given name. + * Retrieves an existing video resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to retrieve. + * @param videoName The Video name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ Response getWithResponse( String resourceGroupName, String accountName, String videoName, Context context); @@ -70,7 +70,7 @@ Response getWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to delete. + * @param videoName The Video name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -82,7 +82,7 @@ Response getWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to delete. + * @param videoName The Video name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -92,55 +92,53 @@ Response getWithResponse( Response deleteWithResponse(String resourceGroupName, String accountName, String videoName, Context context); /** - * Generates a streaming token used for authenticating video playback. + * Generates a streaming token which can be used for accessing content from video content URLs. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to generate a token for playback. + * @param videoName The Video name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video streaming token grants access to the video streaming URLs which can be used by an compatible HLS or - * DASH player. + * @return "Video content token grants access to the video content URLs.". */ - VideoStreamingToken listStreamingToken(String resourceGroupName, String accountName, String videoName); + VideoContentToken listContentToken(String resourceGroupName, String accountName, String videoName); /** - * Generates a streaming token used for authenticating video playback. + * Generates a streaming token which can be used for accessing content from video content URLs. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. - * @param videoName The name of the video to generate a token for playback. + * @param videoName The Video name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return video streaming token grants access to the video streaming URLs which can be used by an compatible HLS or - * DASH player. + * @return "Video content token grants access to the video content URLs.". */ - Response listStreamingTokenWithResponse( + Response listContentTokenWithResponse( String resourceGroupName, String accountName, String videoName, Context context); /** - * Retrieves an existing video resource within an account with a given name. + * Retrieves an existing video resource. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ VideoEntity getById(String id); /** - * Retrieves an existing video resource within an account with a given name. + * Retrieves an existing video resource. * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the representation of a single video in a Video Analyzer account. + * @return the response. */ Response getByIdWithResponse(String id, Context context);