diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/CHANGELOG.md b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/CHANGELOG.md index 4c5aa3aa98394..415eb18c186b3 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-29) +- 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 89ae3eff419f2..09593e4988a60 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..52d9a6fd1b83c 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,44 @@ 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.OperationResultsImpl; +import com.azure.resourcemanager.videoanalyzer.implementation.OperationStatusesImpl; 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.OperationResults; +import com.azure.resourcemanager.videoanalyzer.models.OperationStatuses; 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 +67,35 @@ * 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 OperationStatuses operationStatuses; + + private OperationResults operationResults; + + private VideoAnalyzerOperationStatuses videoAnalyzerOperationStatuses; + + private VideoAnalyzerOperationResults videoAnalyzerOperationResults; + + private Locations locations; private Videos videos; @@ -100,6 +144,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 +184,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 +237,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 +251,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 +263,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 +276,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 +342,57 @@ 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 OperationStatuses. */ + public OperationStatuses operationStatuses() { + if (this.operationStatuses == null) { + this.operationStatuses = new OperationStatusesImpl(clientObject.getOperationStatuses(), this); + } + return operationStatuses; + } + + /** @return Resource collection API of OperationResults. */ + public OperationResults operationResults() { + if (this.operationResults == null) { + this.operationResults = new OperationResultsImpl(clientObject.getOperationResults(), this); + } + return operationResults; + } + + /** @return Resource collection API of 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 +401,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..9cdbdb34cee28 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. + * Retrieves all existing access policy resources, along with their JSON representations. * * @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. + * Retrieves all existing access policy resources, along with their JSON representations. * * @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 @@ 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 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 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 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 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( String resourceGroupName, String accountName, String accessPolicyName, Context context); /** - * Creates a new access policy resource or updates an existing one. + * Creates a new access policy resource 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 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( String resourceGroupName, String accountName, String accessPolicyName, AccessPolicyEntityInner parameters); /** - * Creates a new access policy resource or updates an existing one. + * Creates a new access policy resource 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 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( @@ -111,11 +111,11 @@ Response createOrUpdateWithResponse( Context context); /** - * Deletes an existing access policy resource. + * Deletes an existing access policy resource 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 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. @@ -124,11 +124,11 @@ Response createOrUpdateWithResponse( void delete(String resourceGroupName, String accountName, String accessPolicyName); /** - * Deletes an existing access policy resource. + * Deletes an existing access policy resource 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 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. @@ -140,33 +140,33 @@ Response deleteWithResponse( String resourceGroupName, String accountName, String accessPolicyName, Context context); /** - * Updates individual properties of an existing access policy resource. + * Updates individual properties of an existing access policy resource 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 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( String resourceGroupName, String accountName, String accessPolicyName, AccessPolicyEntityInner parameters); /** - * Updates individual properties of an existing access policy resource. + * Updates individual properties of an existing access policy resource 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 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..52a779c39b304 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, along with their JSON representations. * * @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, along with their JSON representations. * * @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 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 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 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 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..03d2bdb63cef2 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LivePipelinesClient.java @@ -0,0 +1,308 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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; +import com.azure.resourcemanager.videoanalyzer.models.LivePipelineUpdate; + +/** An instance of this class provides access to all the operations defined in LivePipelinesClient. */ +public interface LivePipelinesClient { + /** + * Retrieves a list of live pipelines that have been created, along with their JSON representations. + * + * @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 pipelines that have been created, along with their JSON representations. + * + * @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 specific 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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LivePipelineInner get(String resourceGroupName, String accountName, String livePipelineName); + + /** + * Retrieves a specific 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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String accountName, + String livePipelineName, + LivePipelineInner parameters, + Context context); + + /** + * Deletes a live pipeline 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 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 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 an existing live pipeline with the given name. Properties that can be updated include: description, + * bitrateKbps, and parameter definitions. Only the description can be updated while the live pipeline is active. + * + * @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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LivePipelineInner update( + String resourceGroupName, String accountName, String livePipelineName, LivePipelineUpdate parameters); + + /** + * Updates an existing live pipeline with the given name. Properties that can be updated include: description, + * bitrateKbps, and parameter definitions. Only the description can be updated while the live pipeline is active. + * + * @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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String accountName, + String livePipelineName, + LivePipelineUpdate parameters, + Context context); + + /** + * Activates a live pipeline 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 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 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/LocationsClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LocationsClient.java index d85245fee52e4..5c99da0be09c7 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LocationsClient.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/LocationsClient.java @@ -16,7 +16,7 @@ public interface LocationsClient { /** * Checks whether the Video Analyzer resource name is available. * - * @param locationName The name of the location. + * @param locationName Location Name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -30,7 +30,7 @@ CheckNameAvailabilityResponseInner checkNameAvailability( /** * Checks whether the Video Analyzer resource name is available. * - * @param locationName The name of the location. + * @param locationName Location Name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/OperationResultsClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/OperationResultsClient.java new file mode 100644 index 0000000000000..81beef81c657d --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/OperationResultsClient.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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +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.PrivateEndpointConnectionInner; + +/** An instance of this class provides access to all the operations defined in OperationResultsClient. */ +public interface OperationResultsClient { + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, PrivateEndpointConnectionInner> beginGet( + String resourceGroupName, String accountName, String name, String operationId); + + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, PrivateEndpointConnectionInner> beginGet( + String resourceGroupName, String accountName, String name, String operationId, Context context); + + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, String name, String operationId); + + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner get( + String resourceGroupName, String accountName, String name, String operationId, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/OperationStatusesClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/OperationStatusesClient.java new file mode 100644 index 0000000000000..2582c12a77bf7 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/OperationStatusesClient.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.VideoAnalyzerPrivateEndpointConnectionOperationStatusInner; + +/** An instance of this class provides access to all the operations defined in OperationStatusesClient. */ +public interface OperationStatusesClient { + /** + * Get private endpoint connection operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VideoAnalyzerPrivateEndpointConnectionOperationStatusInner get( + String resourceGroupName, String accountName, String name, String operationId); + + /** + * Get private endpoint connection operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String accountName, String name, String operationId, 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..64a2c79ff4142 --- /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 with the given operationId. + * + * @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 with the given operationId. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PipelineJobOperationStatusInner get( + String resourceGroupName, String accountName, String pipelineJobName, String operationId); + + /** + * Get the operation status of a pipeline job with the given operationId. + * + * @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 with the given operationId. + */ + @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..395f85aa4d4cb --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineJobsClient.java @@ -0,0 +1,248 @@ +// 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; +import com.azure.resourcemanager.videoanalyzer.models.PipelineJobUpdate; + +/** An instance of this class provides access to all the operations defined in PipelineJobsClient. */ +public interface PipelineJobsClient { + /** + * Retrieves a list of all live pipelines that have been created, along with their JSON representations. + * + * @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 all live pipelines that have been created, along with their JSON representations. + * + * @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 specific 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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PipelineJobInner get(String resourceGroupName, String accountName, String pipelineJobName); + + /** + * Retrieves a specific 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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String accountName, + String pipelineJobName, + PipelineJobInner parameters, + Context context); + + /** + * Deletes a pipeline job 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 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 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 an existing pipeline job with the given name. Properties that can be updated include: description. + * + * @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PipelineJobInner update( + String resourceGroupName, String accountName, String pipelineJobName, PipelineJobUpdate parameters); + + /** + * Updates an existing pipeline job with the given name. Properties that can be updated include: description. + * + * @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String accountName, + String pipelineJobName, + PipelineJobUpdate parameters, + Context context); + + /** + * Cancels a pipeline job 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 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 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..9e5abda884641 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/PipelineTopologiesClient.java @@ -0,0 +1,202 @@ +// 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; +import com.azure.resourcemanager.videoanalyzer.models.PipelineTopologyUpdate; + +/** 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 to the account, if any, along with their JSON + * representation. + * + * @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 to the account, if any, along with their JSON + * representation. + * + * @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 specific 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 content for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PipelineTopologyInner get(String resourceGroupName, String accountName, String pipelineTopologyName); + + /** + * Retrieves a specific 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 content 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 describes + * the processing steps to be applied when processing content 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. + * + * @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 content 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 describes + * the processing steps to be applied when processing content 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. + * + * @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 content 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 an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are + * in active or processing state, respectively, then only the description can be updated. Else, the properties that + * can be updated include: description, parameter declarations, sources, processors, and sinks. + * + * @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 content for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PipelineTopologyInner update( + String resourceGroupName, String accountName, String pipelineTopologyName, PipelineTopologyUpdate parameters); + + /** + * Updates an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are + * in active or processing state, respectively, then only the description can be updated. Else, the properties that + * can be updated include: description, parameter declarations, sources, processors, and sinks. + * + * @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 content for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String accountName, + String pipelineTopologyName, + PipelineTopologyUpdate 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..dae2dd5081cf0 --- /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 under video analyzer account. + * + * @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 under video analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionListResultInner list(String resourceGroupName, String accountName); + + /** + * Get all private endpoint connections under video analyzer account. + * + * @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 under video analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse( + String resourceGroupName, String accountName, Context context); + + /** + * Get private endpoint connection under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 private endpoint connection under video analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, String name); + + /** + * Get private endpoint connection under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 private endpoint connection under video analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String accountName, String name, Context context); + + /** + * Update private endpoint connection state under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner createOrUpdate( + String resourceGroupName, String accountName, String name, PrivateEndpointConnectionInner parameters); + + /** + * Update private endpoint connection state under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionsCreateOrUpdateResponse createOrUpdateWithResponse( + String resourceGroupName, + String accountName, + String name, + PrivateEndpointConnectionInner parameters, + Context context); + + /** + * Delete private endpoint connection under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 name); + + /** + * Delete private endpoint connection under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 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..188db1945b3ac --- /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 for video analyzer account. + * + * @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 for video analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourceListResultInner list(String resourceGroupName, String accountName); + + /** + * Get list of group IDs for video analyzer account. + * + * @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 for video analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse( + String resourceGroupName, String accountName, Context context); + + /** + * Get group ID for video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Name of the private link resource (Group 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 group ID for video analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourceInner get(String resourceGroupName, String accountName, String name); + + /** + * Get group ID for video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Name of the private link resource (Group 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 group ID for video analyzer account. + */ + @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..a44ec2e4a0a93 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,53 @@ 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 OperationStatusesClient object to access its operations. + * + * @return the OperationStatusesClient object. + */ + OperationStatusesClient getOperationStatuses(); + + /** + * Gets the OperationResultsClient object to access its operations. + * + * @return the OperationResultsClient object. + */ + OperationResultsClient getOperationResults(); + + /** + * Gets the 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..52f201505e5dc --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationResultsClient.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; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +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.VideoAnalyzerInner; + +/** An instance of this class provides access to all the operations defined in VideoAnalyzerOperationResultsClient. */ +public interface VideoAnalyzerOperationResultsClient { + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, VideoAnalyzerInner> beginGet(String locationName, String operationId); + + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, VideoAnalyzerInner> beginGet( + String locationName, String operationId, Context context); + + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VideoAnalyzerInner get(String locationName, String operationId); + + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VideoAnalyzerInner get(String locationName, String operationId, 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..1a8bb55f9c3fd --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideoAnalyzerOperationStatusesClient.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.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 video analyzer operation status. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VideoAnalyzerOperationStatusInner get(String locationName, String operationId); + + /** + * Get video analyzer operation status. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String locationName, String operationId, 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..bededb6734c59 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 @@ -7,10 +7,11 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; 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.VideoAnalyzerCollectionInner; import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; -import com.azure.resourcemanager.videoanalyzer.models.SyncStorageKeysInput; import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerUpdate; /** An instance of this class provides access to all the operations defined in VideoAnalyzersClient. */ @@ -77,7 +78,38 @@ 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 Video Analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, VideoAnalyzerInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, VideoAnalyzerInner parameters); + + /** + * Create or update an instance of a 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 Video Analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, VideoAnalyzerInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, VideoAnalyzerInner parameters, Context context); + + /** + * Create or update an instance of a 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. + * @return the Video Analyzer account. */ @ServiceMethod(returns = ReturnType.SINGLE) VideoAnalyzerInner createOrUpdate(String resourceGroupName, String accountName, VideoAnalyzerInner parameters); @@ -92,10 +124,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 Video Analyzer account. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + VideoAnalyzerInner createOrUpdate( String resourceGroupName, String accountName, VideoAnalyzerInner parameters, Context context); /** @@ -133,10 +165,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. + * @return the Video Analyzer account. */ @ServiceMethod(returns = ReturnType.SINGLE) - VideoAnalyzerInner update(String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters); + SyncPoller, VideoAnalyzerInner> beginUpdate( + String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters); /** * Updates an existing instance of Video Analyzer account. @@ -148,14 +181,14 @@ 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 Video Analyzer account. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( + SyncPoller, VideoAnalyzerInner> beginUpdate( String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters, Context context); /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. + * Updates an existing instance of Video Analyzer account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Video Analyzer account name. @@ -163,12 +196,13 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Video Analyzer account. */ @ServiceMethod(returns = ReturnType.SINGLE) - void syncStorageKeys(String resourceGroupName, String accountName, SyncStorageKeysInput parameters); + VideoAnalyzerInner update(String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters); /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. + * Updates an existing instance of Video Analyzer account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Video Analyzer account name. @@ -177,14 +211,14 @@ Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the Video Analyzer account. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response syncStorageKeysWithResponse( - String resourceGroupName, String accountName, SyncStorageKeysInput parameters, Context context); + VideoAnalyzerInner update( + String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters, Context context); /** - * Lists the Video Analyzer accounts in the specific subscription. + * List all Video Analyzer accounts in the specified subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -194,7 +228,7 @@ Response syncStorageKeysWithResponse( VideoAnalyzerCollectionInner listBySubscription(); /** - * Lists the Video Analyzer accounts in the specific subscription. + * List all Video Analyzer accounts in the specified subscription. * * @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/VideosClient.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/VideosClient.java index d06b85291a4cc..02e84ad2aafe5 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. + * Retrieves a list of video resources that have been created, along with their JSON representations. * * @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. + * Retrieves a list of video resources that have been created, along with their JSON representations. * * @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 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 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 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 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 video resource 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 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 video resource 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 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. @@ -135,67 +135,67 @@ Response createOrUpdateWithResponse( Response deleteWithResponse(String resourceGroupName, String accountName, String videoName, Context context); /** - * Updates individual properties of an existing video resource. + * Updates individual properties of an existing video resource 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 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( String resourceGroupName, String accountName, String videoName, VideoEntityInner parameters); /** - * Updates individual properties of an existing video resource. + * Updates individual properties of an existing video resource 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 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, for a video resource + * 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 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, for a video resource + * 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 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..837e2ea08c4ea 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,18 +14,12 @@ 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 { @JsonIgnore private final ClientLogger logger = new ClientLogger(AccessPolicyEntityInner.class); - /* - * The system metadata relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /* * Defines the access level granted by this policy. */ @@ -38,14 +32,12 @@ public class AccessPolicyEntityInner extends ProxyResource { @JsonProperty(value = "properties.authentication") private AuthenticationBase authentication; - /** - * Get the systemData property: The system metadata relating to this resource. - * - * @return the systemData value. + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. */ - public SystemData systemData() { - return this.systemData; - } + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /** * Get the role property: Defines the access level granted by this policy. @@ -87,6 +79,15 @@ public AccessPolicyEntityInner withAuthentication(AuthenticationBase authenticat return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. * diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/EdgeModuleEntityInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/EdgeModuleEntityInner.java index dabe0dd13707a..ba7be547dec84 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/EdgeModuleEntityInner.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/EdgeModuleEntityInner.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.Immutable; 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.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -19,12 +18,6 @@ public class EdgeModuleEntityInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(EdgeModuleEntityInner.class); - /* - * The system metadata relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /* * Internal ID generated for the instance of the Video Analyzer edge * module. @@ -32,15 +25,6 @@ public class EdgeModuleEntityInner extends ProxyResource { @JsonProperty(value = "properties.edgeModuleId", access = JsonProperty.Access.WRITE_ONLY) private UUID edgeModuleId; - /** - * Get the systemData property: The system metadata relating to this resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - /** * Get the edgeModuleId property: Internal ID generated for the instance of the Video Analyzer edge module. * 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..f770548a67ff5 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/LivePipelineInner.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.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 a unique instance of a live topology, used for real-time ingestion, archiving and publishing + * of content for a unique RTSP camera. + */ +@JsonFlatten +@Fluent +public class LivePipelineInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LivePipelineInner.class); + + /* + * 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; + + /* + * Maximum bitrate capacity in Kbps reserved for the live pipeline. The + * allowed range is from 500 to 3000 Kbps in increments of 100 Kbps. If the + * RTSP camera exceeds this capacity, then the service will disconnect + * temporarily from the camera. It will retry to re-establish connection + * (with exponential backoff), checking to see if the camera bitrate is now + * below the reserved capacity. Doing so will ensure that one 'noisy + * neighbor' does not affect other live pipelines in your account. + */ + @JsonProperty(value = "properties.bitrateKbps") + private Integer bitrateKbps; + + /* + * Current state of the pipeline (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; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData 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: Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range + * is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the service + * will disconnect temporarily from the camera. It will retry to re-establish connection (with exponential backoff), + * checking to see if the camera bitrate is now below the reserved capacity. Doing so will ensure that one 'noisy + * neighbor' does not affect other live pipelines in your account. + * + * @return the bitrateKbps value. + */ + public Integer bitrateKbps() { + return this.bitrateKbps; + } + + /** + * Set the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range + * is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the service + * will disconnect temporarily from the camera. It will retry to re-establish connection (with exponential backoff), + * checking to see if the camera bitrate is now below the reserved capacity. Doing so will ensure that one 'noisy + * neighbor' does not affect other live pipelines in your account. + * + * @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 state of the pipeline (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; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * 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..0efa1febb3289 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PipelineJobInner.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.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; + +/** + * Pipeline job represents a unique instance of a batch topology, used for offline processing of selected portions of + * archived content. + */ +@JsonFlatten +@Fluent +public class PipelineJobInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PipelineJobInner.class); + + /* + * Reference to an existing pipeline topology. When activated, this + * pipeline job 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 state of the pipeline (read-only). + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private PipelineJobState state; + + /* + * The date-time by when this pipeline job will be automatically deleted + * from your account. + */ + @JsonProperty(value = "properties.expiration", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expiration; + + /* + * Details about the error, in case the pipeline job fails. + */ + @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; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the topologyName property: Reference to an existing pipeline topology. When activated, this pipeline job will + * process content according to the pipeline topology definition. + * + * @return the topologyName value. + */ + public String topologyName() { + return this.topologyName; + } + + /** + * Set the topologyName property: Reference to an existing pipeline topology. When activated, this pipeline job 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 state of the pipeline (read-only). + * + * @return the state value. + */ + public PipelineJobState state() { + return this.state; + } + + /** + * Get the expiration property: The date-time by when this pipeline job will be automatically deleted from your + * account. + * + * @return the expiration value. + */ + public OffsetDateTime expiration() { + return this.expiration; + } + + /** + * Get the error property: Details about the error, in case the pipeline job fails. + * + * @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; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * 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..92894f49e51b8 --- /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 content 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 captures content from a RTSP + * camera and archives the content can be reused across many different cameras, as long as the same processing is to 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. This allows individual pipelines refer to different + * values, such as individual cameras' RTSP endpoints and credentials. Overall a topology is composed of the following: + * + *

- Parameters: list of user defined parameters that can be references across the topology nodes. - Sources: list of + * one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras. - + * Processors: list of nodes which perform data analysis or transformations. - 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); + + /* + * Topology kind. + */ + @JsonProperty(value = "kind", required = true) + private Kind kind; + + /* + * Describes the properties of a SKU. + */ + @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; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData 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: Describes the properties of a SKU. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: Describes the properties of a SKU. + * + * @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; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * 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..85961f1ed5668 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateEndpointConnectionInner.java @@ -0,0 +1,124 @@ +// 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.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; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * 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; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * 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..4fc2accb1ed1a --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/PrivateLinkResourceInner.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.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.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; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * 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; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * 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..cb10cdb740f02 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 @@ -7,10 +7,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.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,21 +21,14 @@ import java.util.List; import java.util.Map; -/** A Video Analyzer account. */ +/** The Video Analyzer account. */ @JsonFlatten @Fluent public class VideoAnalyzerInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoAnalyzerInner.class); /* - * The system data of the Video Analyzer account. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - 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 +40,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,17 +51,39 @@ public class VideoAnalyzerInner extends Resource { @JsonProperty(value = "properties.encryption") private AccountEncryption encryption; - /** - * Get the systemData property: The system data of the Video Analyzer account. - * - * @return the systemData value. + /* + * The IoT Hubs for this resource. */ - public SystemData systemData() { - return this.systemData; - } + @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 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 +92,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 +123,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 +151,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 +263,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..7f75a724d8e3f --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerOperationStatusInner.java @@ -0,0 +1,187 @@ +// 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; + +/** Status of video analyzer operation. */ +@Fluent +public final class VideoAnalyzerOperationStatusInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoAnalyzerOperationStatusInner.class); + + /* + * Operation identifier. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Operation resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Operation start time. + */ + @JsonProperty(value = "startTime") + private String startTime; + + /* + * Operation end time. + */ + @JsonProperty(value = "endTime") + private String endTime; + + /* + * Operation status. + */ + @JsonProperty(value = "status") + private String status; + + /* + * The error detail. + */ + @JsonProperty(value = "error") + private ManagementError error; + + /** + * Get the name property: Operation identifier. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Operation identifier. + * + * @param name the name value to set. + * @return the VideoAnalyzerOperationStatusInner object itself. + */ + public VideoAnalyzerOperationStatusInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the id property: Operation resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Operation resource ID. + * + * @param id the id value to set. + * @return the VideoAnalyzerOperationStatusInner object itself. + */ + public VideoAnalyzerOperationStatusInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the startTime property: Operation start time. + * + * @return the startTime value. + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Operation start time. + * + * @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: Operation end time. + * + * @return the endTime value. + */ + public String endTime() { + return this.endTime; + } + + /** + * Set the endTime property: Operation end time. + * + * @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: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Operation status. + * + * @param status the status value to set. + * @return the 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")); + } + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerPrivateEndpointConnectionOperationStatusInner.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerPrivateEndpointConnectionOperationStatusInner.java new file mode 100644 index 0000000000000..ceebb00e93f0b --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoAnalyzerPrivateEndpointConnectionOperationStatusInner.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.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; + +/** Status of private endpoint connection operation. */ +@Fluent +public final class VideoAnalyzerPrivateEndpointConnectionOperationStatusInner { + @JsonIgnore + private final ClientLogger logger = + new ClientLogger(VideoAnalyzerPrivateEndpointConnectionOperationStatusInner.class); + + /* + * Operation identifier. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Operation resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Operation start time. + */ + @JsonProperty(value = "startTime") + private String startTime; + + /* + * Operation end time. + */ + @JsonProperty(value = "endTime") + private String endTime; + + /* + * Operation status. + */ + @JsonProperty(value = "status") + private String status; + + /* + * The error detail. + */ + @JsonProperty(value = "error") + private ManagementError error; + + /** + * Get the name property: Operation identifier. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Operation identifier. + * + * @param name the name value to set. + * @return the VideoAnalyzerPrivateEndpointConnectionOperationStatusInner object itself. + */ + public VideoAnalyzerPrivateEndpointConnectionOperationStatusInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the id property: Operation resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Operation resource ID. + * + * @param id the id value to set. + * @return the VideoAnalyzerPrivateEndpointConnectionOperationStatusInner object itself. + */ + public VideoAnalyzerPrivateEndpointConnectionOperationStatusInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the startTime property: Operation start time. + * + * @return the startTime value. + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Operation start time. + * + * @param startTime the startTime value to set. + * @return the VideoAnalyzerPrivateEndpointConnectionOperationStatusInner object itself. + */ + public VideoAnalyzerPrivateEndpointConnectionOperationStatusInner withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: Operation end time. + * + * @return the endTime value. + */ + public String endTime() { + return this.endTime; + } + + /** + * Set the endTime property: Operation end time. + * + * @param endTime the endTime value to set. + * @return the VideoAnalyzerPrivateEndpointConnectionOperationStatusInner object itself. + */ + public VideoAnalyzerPrivateEndpointConnectionOperationStatusInner withEndTime(String endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Operation status. + * + * @param status the status value to set. + * @return the VideoAnalyzerPrivateEndpointConnectionOperationStatusInner object itself. + */ + public VideoAnalyzerPrivateEndpointConnectionOperationStatusInner 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 VideoAnalyzerPrivateEndpointConnectionOperationStatusInner object itself. + */ + public VideoAnalyzerPrivateEndpointConnectionOperationStatusInner 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" + + " VideoAnalyzerPrivateEndpointConnectionOperationStatusInner")); + } + } +} 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..79c802c54c2f8 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,25 +9,20 @@ 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 { @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoEntityInner.class); - /* - * The system metadata relating to this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /* * Optional video title provided by the user. Value can be up to 256 * characters long. @@ -43,8 +38,8 @@ 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) private VideoType typePropertiesType; @@ -57,10 +52,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,14 +63,18 @@ public class VideoEntityInner extends ProxyResource { @JsonProperty(value = "properties.mediaInfo", access = JsonProperty.Access.WRITE_ONLY) private VideoMediaInfo mediaInfo; - /** - * Get the systemData property: The system metadata relating to this resource. - * - * @return the systemData value. + /* + * Video archival properties. */ - public SystemData systemData() { - return this.systemData; - } + @JsonProperty(value = "properties.archival") + private VideoArchival archival; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /** * Get the title property: Optional video title provided by the user. Value can be up to 256 characters long. @@ -120,8 +119,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. */ @@ -140,12 +139,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 +156,35 @@ 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; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. * @@ -166,11 +194,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..5c6c6e1ed65ed 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. + * Retrieves all existing access policy resources, along with their JSON representations. * * @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. + * Retrieves all existing access policy resources, along with their JSON representations. * * @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. + * Retrieves all existing access policy resources, along with their JSON representations. * * @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. + * Retrieves all existing access policy resources, along with their JSON representations. * * @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. + * Retrieves all existing access policy resources, along with their JSON representations. * * @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. + * Retrieves all existing access policy resources, along with their JSON representations. * * @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. + * Retrieves all existing access policy resources, along with their JSON representations. * * @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 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 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 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 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 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 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 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 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 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 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( @@ -533,16 +533,16 @@ public Response getWithResponse( } /** - * Creates a new access policy resource or updates an existing one. + * Creates a new access policy resource 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 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( @@ -594,17 +594,17 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates a new access policy resource or updates an existing one. + * Creates a new access policy resource 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 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( @@ -657,16 +657,16 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates a new access policy resource or updates an existing one. + * Creates a new access policy resource 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 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( @@ -683,16 +683,16 @@ private Mono createOrUpdateAsync( } /** - * Creates a new access policy resource or updates an existing one. + * Creates a new access policy resource 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 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( @@ -701,17 +701,17 @@ public AccessPolicyEntityInner createOrUpdate( } /** - * Creates a new access policy resource or updates an existing one. + * Creates a new access policy resource 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 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( @@ -725,11 +725,11 @@ public Response createOrUpdateWithResponse( } /** - * Deletes an existing access policy resource. + * Deletes an existing access policy resource 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 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. @@ -779,11 +779,11 @@ private Mono> deleteWithResponseAsync( } /** - * Deletes an existing access policy resource. + * Deletes an existing access policy resource 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 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. @@ -831,11 +831,11 @@ private Mono> deleteWithResponseAsync( } /** - * Deletes an existing access policy resource. + * Deletes an existing access policy resource 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 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. @@ -848,11 +848,11 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str } /** - * Deletes an existing access policy resource. + * Deletes an existing access policy resource 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 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. @@ -863,11 +863,11 @@ public void delete(String resourceGroupName, String accountName, String accessPo } /** - * Deletes an existing access policy resource. + * Deletes an existing access policy resource 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 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. @@ -881,16 +881,16 @@ public Response deleteWithResponse( } /** - * Updates individual properties of an existing access policy resource. + * Updates individual properties of an existing access policy resource 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 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( @@ -942,17 +942,17 @@ private Mono> updateWithResponseAsync( } /** - * Updates individual properties of an existing access policy resource. + * Updates individual properties of an existing access policy resource 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 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( @@ -1005,16 +1005,16 @@ private Mono> updateWithResponseAsync( } /** - * Updates individual properties of an existing access policy resource. + * Updates individual properties of an existing access policy resource 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 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( @@ -1031,16 +1031,16 @@ private Mono updateAsync( } /** - * Updates individual properties of an existing access policy resource. + * Updates individual properties of an existing access policy resource 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 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( @@ -1049,17 +1049,17 @@ public AccessPolicyEntityInner update( } /** - * Updates individual properties of an existing access policy resource. + * Updates individual properties of an existing access policy resource 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 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/AccessPolicyEntityImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPolicyEntityImpl.java index c5abf95ac819e..1347a8b0e8225 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPolicyEntityImpl.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/AccessPolicyEntityImpl.java @@ -29,10 +29,6 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - public AccessPolicyRole role() { return this.innerModel().role(); } @@ -41,6 +37,10 @@ public AuthenticationBase authentication() { return this.innerModel().authentication(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public AccessPolicyEntityInner innerModel() { return this.innerObject; } diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModuleEntityImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModuleEntityImpl.java index 8c1f1c93cc3ad..e1a60d59f2547 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModuleEntityImpl.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/EdgeModuleEntityImpl.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.videoanalyzer.implementation; import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.videoanalyzer.fluent.models.EdgeModuleEntityInner; import com.azure.resourcemanager.videoanalyzer.models.EdgeModuleEntity; @@ -31,10 +30,6 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - public UUID edgeModuleId() { return this.innerModel().edgeModuleId(); } 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..f0f37d9a3aa30 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, along with their JSON representations. * * @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, along with their JSON representations. * * @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, along with their JSON representations. * * @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, along with their JSON representations. * * @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, along with their JSON representations. * * @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, along with their JSON representations. * * @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, along with their JSON representations. * * @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 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 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 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 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 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 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 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 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 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 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..e1d8e2f9a30cf --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelineImpl.java @@ -0,0 +1,226 @@ +// 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.LivePipelineUpdate; +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 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 SystemData systemData() { + return this.innerModel().systemData(); + } + + 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; + + private LivePipelineUpdate updateParameters; + + 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() { + this.updateParameters = new LivePipelineUpdate(); + return this; + } + + public LivePipeline apply() { + this.innerObject = + serviceManager + .serviceClient() + .getLivePipelines() + .updateWithResponse(resourceGroupName, accountName, livePipelineName, updateParameters, Context.NONE) + .getValue(); + return this; + } + + public LivePipeline apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getLivePipelines() + .updateWithResponse(resourceGroupName, accountName, livePipelineName, updateParameters, 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) { + if (isInCreateMode()) { + this.innerModel().withTopologyName(topologyName); + return this; + } else { + this.updateParameters.withTopologyName(topologyName); + return this; + } + } + + public LivePipelineImpl withDescription(String description) { + if (isInCreateMode()) { + this.innerModel().withDescription(description); + return this; + } else { + this.updateParameters.withDescription(description); + return this; + } + } + + public LivePipelineImpl withBitrateKbps(Integer bitrateKbps) { + if (isInCreateMode()) { + this.innerModel().withBitrateKbps(bitrateKbps); + return this; + } else { + this.updateParameters.withBitrateKbps(bitrateKbps); + return this; + } + } + + public LivePipelineImpl withParameters(List parameters) { + if (isInCreateMode()) { + this.innerModel().withParameters(parameters); + return this; + } else { + this.updateParameters.withParameters(parameters); + 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/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..991f5abca05ca --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LivePipelinesClientImpl.java @@ -0,0 +1,1726 @@ +// 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 com.azure.resourcemanager.videoanalyzer.models.LivePipelineUpdate; +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") LivePipelineUpdate 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 pipelines that have been created, along with their JSON representations. + * + * @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 pipelines that have been created, along with their JSON representations. + * + * @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 pipelines that have been created, along with their JSON representations. + * + * @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 pipelines that have been created, along with their JSON representations. + * + * @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 pipelines that have been created, along with their JSON representations. + * + * @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 pipelines that have been created, along with their JSON representations. + * + * @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 pipelines that have been created, along with their JSON representations. + * + * @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 specific 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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @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 specific 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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @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 specific 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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @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 specific 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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LivePipelineInner get(String resourceGroupName, String accountName, String livePipelineName) { + return getAsync(resourceGroupName, accountName, livePipelineName).block(); + } + + /** + * Retrieves a specific 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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 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 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 an existing live pipeline with the given name. Properties that can be updated include: description, + * bitrateKbps, and parameter definitions. Only the description can be updated while the live pipeline is active. + * + * @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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String accountName, String livePipelineName, LivePipelineUpdate 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 an existing live pipeline with the given name. Properties that can be updated include: description, + * bitrateKbps, and parameter definitions. Only the description can be updated while the live pipeline is active. + * + * @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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String accountName, + String livePipelineName, + LivePipelineUpdate 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 an existing live pipeline with the given name. Properties that can be updated include: description, + * bitrateKbps, and parameter definitions. Only the description can be updated while the live pipeline is active. + * + * @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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String accountName, String livePipelineName, LivePipelineUpdate parameters) { + return updateWithResponseAsync(resourceGroupName, accountName, livePipelineName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Updates an existing live pipeline with the given name. Properties that can be updated include: description, + * bitrateKbps, and parameter definitions. Only the description can be updated while the live pipeline is active. + * + * @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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LivePipelineInner update( + String resourceGroupName, String accountName, String livePipelineName, LivePipelineUpdate parameters) { + return updateAsync(resourceGroupName, accountName, livePipelineName, parameters).block(); + } + + /** + * Updates an existing live pipeline with the given name. Properties that can be updated include: description, + * bitrateKbps, and parameter definitions. Only the description can be updated while the live pipeline is active. + * + * @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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, + String accountName, + String livePipelineName, + LivePipelineUpdate parameters, + Context context) { + return updateWithResponseAsync(resourceGroupName, accountName, livePipelineName, parameters, context).block(); + } + + /** + * Activates a live pipeline 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 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 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/LocationsClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LocationsClientImpl.java index c363b2c566bdc..3891d9f6c3ea2 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LocationsClientImpl.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/LocationsClientImpl.java @@ -74,7 +74,7 @@ Mono> checkNameAvailability( /** * Checks whether the Video Analyzer resource name is available. * - * @param locationName The name of the location. + * @param locationName Location Name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -123,7 +123,7 @@ private Mono> checkNameAvailability /** * Checks whether the Video Analyzer resource name is available. * - * @param locationName The name of the location. + * @param locationName Location Name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -170,7 +170,7 @@ private Mono> checkNameAvailability /** * Checks whether the Video Analyzer resource name is available. * - * @param locationName The name of the location. + * @param locationName Location Name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -194,7 +194,7 @@ private Mono checkNameAvailabilityAsync( /** * Checks whether the Video Analyzer resource name is available. * - * @param locationName The name of the location. + * @param locationName Location Name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -210,7 +210,7 @@ public CheckNameAvailabilityResponseInner checkNameAvailability( /** * Checks whether the Video Analyzer resource name is available. * - * @param locationName The name of the location. + * @param locationName Location Name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationResultsClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationResultsClientImpl.java new file mode 100644 index 0000000000000..198383e4bc8c0 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationResultsClientImpl.java @@ -0,0 +1,363 @@ +// 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.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.OperationResultsClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; +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 OperationResultsClient. */ +public final class OperationResultsClientImpl implements OperationResultsClient { + private final ClientLogger logger = new ClientLogger(OperationResultsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final OperationResultsService service; + + /** The service client containing this operation class. */ + private final VideoAnalyzerManagementClientImpl client; + + /** + * Initializes an instance of OperationResultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationResultsClientImpl(VideoAnalyzerManagementClientImpl client) { + this.service = + RestProxy.create(OperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for VideoAnalyzerManagementClientOperationResults to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "VideoAnalyzerManagem") + private interface OperationResultsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/operationResults/{operationId}") + @ExpectedResponses({200, 202}) + @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, + @PathParam("operationId") String operationId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getWithResponseAsync( + String resourceGroupName, String accountName, String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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, + name, + operationId, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getWithResponseAsync( + String resourceGroupName, String accountName, String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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, + name, + operationId, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, PrivateEndpointConnectionInner> beginGetAsync( + String resourceGroupName, String accountName, String name, String operationId) { + Mono>> mono = getWithResponseAsync(resourceGroupName, accountName, name, operationId); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PrivateEndpointConnectionInner.class, + PrivateEndpointConnectionInner.class, + Context.NONE); + } + + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, PrivateEndpointConnectionInner> beginGetAsync( + String resourceGroupName, String accountName, String name, String operationId, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + getWithResponseAsync(resourceGroupName, accountName, name, operationId, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PrivateEndpointConnectionInner.class, + PrivateEndpointConnectionInner.class, + context); + } + + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, PrivateEndpointConnectionInner> beginGet( + String resourceGroupName, String accountName, String name, String operationId) { + return beginGetAsync(resourceGroupName, accountName, name, operationId).getSyncPoller(); + } + + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, PrivateEndpointConnectionInner> beginGet( + String resourceGroupName, String accountName, String name, String operationId, Context context) { + return beginGetAsync(resourceGroupName, accountName, name, operationId, context).getSyncPoller(); + } + + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String accountName, String name, String operationId) { + return beginGetAsync(resourceGroupName, accountName, name, operationId) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String accountName, String name, String operationId, Context context) { + return beginGetAsync(resourceGroupName, accountName, name, operationId, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner get( + String resourceGroupName, String accountName, String name, String operationId) { + return getAsync(resourceGroupName, accountName, name, operationId).block(); + } + + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner get( + String resourceGroupName, String accountName, String name, String operationId, Context context) { + return getAsync(resourceGroupName, accountName, name, operationId, context).block(); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationResultsImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationResultsImpl.java new file mode 100644 index 0000000000000..6fab035f92d0c --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationResultsImpl.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.implementation; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.videoanalyzer.fluent.OperationResultsClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.videoanalyzer.models.OperationResults; +import com.azure.resourcemanager.videoanalyzer.models.PrivateEndpointConnection; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class OperationResultsImpl implements OperationResults { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultsImpl.class); + + private final OperationResultsClient innerClient; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + public OperationResultsImpl( + OperationResultsClient innerClient, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PrivateEndpointConnection get( + String resourceGroupName, String accountName, String name, String operationId) { + PrivateEndpointConnectionInner inner = + this.serviceClient().get(resourceGroupName, accountName, name, operationId); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public PrivateEndpointConnection get( + String resourceGroupName, String accountName, String name, String operationId, Context context) { + PrivateEndpointConnectionInner inner = + this.serviceClient().get(resourceGroupName, accountName, name, operationId, context); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + private OperationResultsClient 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/OperationStatusesClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationStatusesClientImpl.java new file mode 100644 index 0000000000000..80370917a0033 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationStatusesClientImpl.java @@ -0,0 +1,251 @@ +// 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.OperationStatusesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerPrivateEndpointConnectionOperationStatusInner; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in OperationStatusesClient. */ +public final class OperationStatusesClientImpl implements OperationStatusesClient { + private final ClientLogger logger = new ClientLogger(OperationStatusesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final OperationStatusesService service; + + /** The service client containing this operation class. */ + private final VideoAnalyzerManagementClientImpl client; + + /** + * Initializes an instance of OperationStatusesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationStatusesClientImpl(VideoAnalyzerManagementClientImpl client) { + this.service = + RestProxy.create(OperationStatusesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for VideoAnalyzerManagementClientOperationStatuses to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "VideoAnalyzerManagem") + private interface OperationStatusesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media" + + "/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/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("name") String name, + @PathParam("operationId") String operationId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get private endpoint connection operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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, + name, + operationId, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get private endpoint connection operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String accountName, String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name 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, + name, + operationId, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get private endpoint connection operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String accountName, String name, String operationId) { + return getWithResponseAsync(resourceGroupName, accountName, name, operationId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get private endpoint connection operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VideoAnalyzerPrivateEndpointConnectionOperationStatusInner get( + String resourceGroupName, String accountName, String name, String operationId) { + return getAsync(resourceGroupName, accountName, name, operationId).block(); + } + + /** + * Get private endpoint connection operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String accountName, String name, String operationId, Context context) { + return getWithResponseAsync(resourceGroupName, accountName, name, operationId, context).block(); + } +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationStatusesImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationStatusesImpl.java new file mode 100644 index 0000000000000..7db0c3291fd89 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/OperationStatusesImpl.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.OperationStatusesClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerPrivateEndpointConnectionOperationStatusInner; +import com.azure.resourcemanager.videoanalyzer.models.OperationStatuses; +import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerPrivateEndpointConnectionOperationStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class OperationStatusesImpl implements OperationStatuses { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationStatusesImpl.class); + + private final OperationStatusesClient innerClient; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + public OperationStatusesImpl( + OperationStatusesClient innerClient, + com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public VideoAnalyzerPrivateEndpointConnectionOperationStatus get( + String resourceGroupName, String accountName, String name, String operationId) { + VideoAnalyzerPrivateEndpointConnectionOperationStatusInner inner = + this.serviceClient().get(resourceGroupName, accountName, name, operationId); + if (inner != null) { + return new VideoAnalyzerPrivateEndpointConnectionOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String accountName, String name, String operationId, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, accountName, name, operationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VideoAnalyzerPrivateEndpointConnectionOperationStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private OperationStatusesClient 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/PipelineJobImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobImpl.java new file mode 100644 index 0000000000000..29effac1d5242 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobImpl.java @@ -0,0 +1,213 @@ +// 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 com.azure.resourcemanager.videoanalyzer.models.PipelineJobUpdate; +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 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 SystemData systemData() { + return this.innerModel().systemData(); + } + + 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; + + private PipelineJobUpdate updateParameters; + + 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() { + this.updateParameters = new PipelineJobUpdate(); + return this; + } + + public PipelineJob apply() { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineJobs() + .updateWithResponse(resourceGroupName, accountName, pipelineJobName, updateParameters, Context.NONE) + .getValue(); + return this; + } + + public PipelineJob apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineJobs() + .updateWithResponse(resourceGroupName, accountName, pipelineJobName, updateParameters, 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) { + if (isInCreateMode()) { + this.innerModel().withTopologyName(topologyName); + return this; + } else { + this.updateParameters.withTopologyName(topologyName); + return this; + } + } + + public PipelineJobImpl withDescription(String description) { + if (isInCreateMode()) { + this.innerModel().withDescription(description); + return this; + } else { + this.updateParameters.withDescription(description); + return this; + } + } + + public PipelineJobImpl withParameters(List parameters) { + if (isInCreateMode()) { + this.innerModel().withParameters(parameters); + return this; + } else { + this.updateParameters.withParameters(parameters); + 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/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..00400df444daf --- /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 with the given operationId. + * + * @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 with the given operationId. + */ + @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 with the given operationId. + * + * @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 with the given operationId. + */ + @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 with the given operationId. + * + * @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 with the given operationId. + */ + @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 with the given operationId. + * + * @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 with the given operationId. + */ + @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 with the given operationId. + * + * @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 with the given operationId. + */ + @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..06f4446feaf75 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineJobsClientImpl.java @@ -0,0 +1,1451 @@ +// 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 com.azure.resourcemanager.videoanalyzer.models.PipelineJobUpdate; +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") PipelineJobUpdate 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 all live pipelines that have been created, along with their JSON representations. + * + * @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 all live pipelines that have been created, along with their JSON representations. + * + * @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 all live pipelines that have been created, along with their JSON representations. + * + * @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 all live pipelines that have been created, along with their JSON representations. + * + * @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 all live pipelines that have been created, along with their JSON representations. + * + * @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 all live pipelines that have been created, along with their JSON representations. + * + * @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 all live pipelines that have been created, along with their JSON representations. + * + * @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 specific 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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @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 specific 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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @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 specific 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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @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 specific 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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PipelineJobInner get(String resourceGroupName, String accountName, String pipelineJobName) { + return getAsync(resourceGroupName, accountName, pipelineJobName).block(); + } + + /** + * Retrieves a specific 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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 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 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 an existing pipeline job with the given name. Properties that can be updated include: description. + * + * @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String accountName, String pipelineJobName, PipelineJobUpdate 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 an existing pipeline job with the given name. Properties that can be updated include: description. + * + * @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String accountName, + String pipelineJobName, + PipelineJobUpdate 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 an existing pipeline job with the given name. Properties that can be updated include: description. + * + * @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String accountName, String pipelineJobName, PipelineJobUpdate parameters) { + return updateWithResponseAsync(resourceGroupName, accountName, pipelineJobName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Updates an existing pipeline job with the given name. Properties that can be updated include: description. + * + * @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PipelineJobInner update( + String resourceGroupName, String accountName, String pipelineJobName, PipelineJobUpdate parameters) { + return updateAsync(resourceGroupName, accountName, pipelineJobName, parameters).block(); + } + + /** + * Updates an existing pipeline job with the given name. Properties that can be updated include: description. + * + * @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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, + String accountName, + String pipelineJobName, + PipelineJobUpdate parameters, + Context context) { + return updateWithResponseAsync(resourceGroupName, accountName, pipelineJobName, parameters, context).block(); + } + + /** + * Cancels a pipeline job 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 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 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..57d5518694e8b --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologiesClientImpl.java @@ -0,0 +1,1215 @@ +// 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 com.azure.resourcemanager.videoanalyzer.models.PipelineTopologyUpdate; +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") PipelineTopologyUpdate 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 to the account, if any, along with their JSON + * representation. + * + * @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 to the account, if any, along with their JSON + * representation. + * + * @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 to the account, if any, along with their JSON + * representation. + * + * @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 to the account, if any, along with their JSON + * representation. + * + * @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 to the account, if any, along with their JSON + * representation. + * + * @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 to the account, if any, along with their JSON + * representation. + * + * @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 to the account, if any, along with their JSON + * representation. + * + * @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 specific 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 content 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 specific 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 content 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 specific 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 content 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 specific 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 content 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 specific 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 content 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 describes + * the processing steps to be applied when processing content 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. + * + * @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 content 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 describes + * the processing steps to be applied when processing content 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. + * + * @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 content 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 describes + * the processing steps to be applied when processing content 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. + * + * @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 content 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 describes + * the processing steps to be applied when processing content 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. + * + * @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 content 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 describes + * the processing steps to be applied when processing content 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. + * + * @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 content 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 an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are + * in active or processing state, respectively, then only the description can be updated. Else, the properties that + * can be updated include: description, parameter declarations, sources, processors, and sinks. + * + * @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 content for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String accountName, String pipelineTopologyName, PipelineTopologyUpdate 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 an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are + * in active or processing state, respectively, then only the description can be updated. Else, the properties that + * can be updated include: description, parameter declarations, sources, processors, and sinks. + * + * @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 content for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String accountName, + String pipelineTopologyName, + PipelineTopologyUpdate 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 an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are + * in active or processing state, respectively, then only the description can be updated. Else, the properties that + * can be updated include: description, parameter declarations, sources, processors, and sinks. + * + * @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 content for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String accountName, String pipelineTopologyName, PipelineTopologyUpdate parameters) { + return updateWithResponseAsync(resourceGroupName, accountName, pipelineTopologyName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Updates an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are + * in active or processing state, respectively, then only the description can be updated. Else, the properties that + * can be updated include: description, parameter declarations, sources, processors, and sinks. + * + * @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 content for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PipelineTopologyInner update( + String resourceGroupName, String accountName, String pipelineTopologyName, PipelineTopologyUpdate parameters) { + return updateAsync(resourceGroupName, accountName, pipelineTopologyName, parameters).block(); + } + + /** + * Updates an existing pipeline topology with the given name. If the associated live pipelines or pipeline jobs are + * in active or processing state, respectively, then only the description can be updated. Else, the properties that + * can be updated include: description, parameter declarations, sources, processors, and sinks. + * + * @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 content for a particular + * outcome. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, + String accountName, + String pipelineTopologyName, + PipelineTopologyUpdate 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..9776d74a635e1 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PipelineTopologyImpl.java @@ -0,0 +1,270 @@ +// 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.PipelineTopologyUpdate; +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 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 SystemData systemData() { + return this.innerModel().systemData(); + } + + 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; + + private PipelineTopologyUpdate updateParameters; + + 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() { + this.updateParameters = new PipelineTopologyUpdate(); + return this; + } + + public PipelineTopology apply() { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineTopologies() + .updateWithResponse( + resourceGroupName, accountName, pipelineTopologyName, updateParameters, Context.NONE) + .getValue(); + return this; + } + + public PipelineTopology apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getPipelineTopologies() + .updateWithResponse(resourceGroupName, accountName, pipelineTopologyName, updateParameters, 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) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updateParameters.withKind(kind); + return this; + } + } + + public PipelineTopologyImpl withSku(Sku sku) { + if (isInCreateMode()) { + this.innerModel().withSku(sku); + return this; + } else { + this.updateParameters.withSku(sku); + return this; + } + } + + public PipelineTopologyImpl withDescription(String description) { + if (isInCreateMode()) { + this.innerModel().withDescription(description); + return this; + } else { + this.updateParameters.withDescription(description); + return this; + } + } + + public PipelineTopologyImpl withParameters(List parameters) { + if (isInCreateMode()) { + this.innerModel().withParameters(parameters); + return this; + } else { + this.updateParameters.withParameters(parameters); + return this; + } + } + + public PipelineTopologyImpl withSources(List sources) { + if (isInCreateMode()) { + this.innerModel().withSources(sources); + return this; + } else { + this.updateParameters.withSources(sources); + return this; + } + } + + public PipelineTopologyImpl withProcessors(List processors) { + if (isInCreateMode()) { + this.innerModel().withProcessors(processors); + return this; + } else { + this.updateParameters.withProcessors(processors); + return this; + } + } + + public PipelineTopologyImpl withSinks(List sinks) { + if (isInCreateMode()) { + this.innerModel().withSinks(sinks); + return this; + } else { + this.updateParameters.withSinks(sinks); + 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/PrivateEndpointConnectionImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 0000000000000..c94e595266582 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateEndpointConnectionImpl.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.implementation; + +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.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 SystemData systemData() { + return this.innerModel().systemData(); + } + + 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..eec9c407dd42d --- /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({201}) + @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 under video analyzer account. + * + * @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 under video analyzer account. + */ + @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 under video analyzer account. + * + * @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 under video analyzer account. + */ + @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 under video analyzer account. + * + * @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 under video analyzer account. + */ + @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 under video analyzer account. + * + * @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 under video analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionListResultInner list(String resourceGroupName, String accountName) { + return listAsync(resourceGroupName, accountName).block(); + } + + /** + * Get all private endpoint connections under video analyzer account. + * + * @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 under video analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse( + String resourceGroupName, String accountName, Context context) { + return listWithResponseAsync(resourceGroupName, accountName, context).block(); + } + + /** + * Get private endpoint connection under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 private endpoint connection under video analyzer account. + */ + @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 under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 private endpoint connection under video analyzer account. + */ + @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 under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 private endpoint connection under video analyzer account. + */ + @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 under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 private endpoint connection under video analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, String name) { + return getAsync(resourceGroupName, accountName, name).block(); + } + + /** + * Get private endpoint connection under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 private endpoint connection under video analyzer account. + */ + @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 state under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 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 state under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 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 state under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 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 state under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 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 state under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 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 under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 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 under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 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 under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 name) { + return deleteWithResponseAsync(resourceGroupName, accountName, name) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Delete private endpoint connection under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 name) { + deleteAsync(resourceGroupName, accountName, name).block(); + } + + /** + * Delete private endpoint connection under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 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..84a4daa505c2e --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/PrivateLinkResourceImpl.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.implementation; + +import com.azure.core.management.SystemData; +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 SystemData systemData() { + return this.innerModel().systemData(); + } + + 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..264d1c9b6c7c9 --- /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 for video analyzer account. + * + * @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 for video analyzer account. + */ + @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 for video analyzer account. + * + * @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 for video analyzer account. + */ + @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 for video analyzer account. + * + * @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 for video analyzer account. + */ + @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 for video analyzer account. + * + * @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 for video analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourceListResultInner list(String resourceGroupName, String accountName) { + return listAsync(resourceGroupName, accountName).block(); + } + + /** + * Get list of group IDs for video analyzer account. + * + * @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 for video analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse( + String resourceGroupName, String accountName, Context context) { + return listWithResponseAsync(resourceGroupName, accountName, context).block(); + } + + /** + * Get group ID for video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Name of the private link resource (Group 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 group ID for video analyzer account. + */ + @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 for video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Name of the private link resource (Group 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 group ID for video analyzer account. + */ + @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 for video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Name of the private link resource (Group 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 group ID for video analyzer account. + */ + @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 for video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Name of the private link resource (Group 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 group ID for video analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourceInner get(String resourceGroupName, String accountName, String name) { + return getAsync(resourceGroupName, accountName, name).block(); + } + + /** + * Get group ID for video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Name of the private link resource (Group 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 group ID for video analyzer account. + */ + @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..e7d6dc1457708 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,25 @@ 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; @@ -50,10 +54,6 @@ public Map tags() { } } - public SystemData systemData() { - return this.innerModel().systemData(); - } - public VideoAnalyzerIdentity identity() { return this.innerModel().identity(); } @@ -80,6 +80,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()); } @@ -112,8 +147,7 @@ public VideoAnalyzer create() { serviceManager .serviceClient() .getVideoAnalyzers() - .createOrUpdateWithResponse(resourceGroupName, accountName, this.innerModel(), Context.NONE) - .getValue(); + .createOrUpdate(resourceGroupName, accountName, this.innerModel(), Context.NONE); return this; } @@ -122,8 +156,7 @@ public VideoAnalyzer create(Context context) { serviceManager .serviceClient() .getVideoAnalyzers() - .createOrUpdateWithResponse(resourceGroupName, accountName, this.innerModel(), context) - .getValue(); + .createOrUpdate(resourceGroupName, accountName, this.innerModel(), context); return this; } @@ -143,8 +176,7 @@ public VideoAnalyzer apply() { serviceManager .serviceClient() .getVideoAnalyzers() - .updateWithResponse(resourceGroupName, accountName, updateParameters, Context.NONE) - .getValue(); + .update(resourceGroupName, accountName, updateParameters, Context.NONE); return this; } @@ -153,8 +185,7 @@ public VideoAnalyzer apply(Context context) { serviceManager .serviceClient() .getVideoAnalyzers() - .updateWithResponse(resourceGroupName, accountName, updateParameters, context) - .getValue(); + .update(resourceGroupName, accountName, updateParameters, context); return this; } @@ -186,16 +217,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 +267,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..75cd02cc79a63 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,20 @@ 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.OperationResultsClient; +import com.azure.resourcemanager.videoanalyzer.fluent.OperationStatusesClient; 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 +126,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 +222,88 @@ 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 OperationStatusesClient object to access its operations. */ + private final OperationStatusesClient operationStatuses; + + /** + * Gets the OperationStatusesClient object to access its operations. + * + * @return the OperationStatusesClient object. + */ + public OperationStatusesClient getOperationStatuses() { + return this.operationStatuses; + } + + /** The OperationResultsClient object to access its operations. */ + private final OperationResultsClient operationResults; + + /** + * Gets the OperationResultsClient object to access its operations. + * + * @return the OperationResultsClient object. + */ + public OperationResultsClient getOperationResults() { + return this.operationResults; + } + + /** The 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 +352,22 @@ 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.operationStatuses = new OperationStatusesClientImpl(this); + this.operationResults = new OperationResultsClientImpl(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..e94122f7df9c4 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsClientImpl.java @@ -0,0 +1,309 @@ +// 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.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.VideoAnalyzerOperationResultsClient; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; +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 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/{operationId}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, + @PathParam("operationId") String operationId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getWithResponseAsync(String locationName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + locationName, + operationId, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getWithResponseAsync( + String locationName, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + locationName, + operationId, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, VideoAnalyzerInner> beginGetAsync( + String locationName, String operationId) { + Mono>> mono = getWithResponseAsync(locationName, operationId); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), VideoAnalyzerInner.class, VideoAnalyzerInner.class, Context.NONE); + } + + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, VideoAnalyzerInner> beginGetAsync( + String locationName, String operationId, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = getWithResponseAsync(locationName, operationId, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), VideoAnalyzerInner.class, VideoAnalyzerInner.class, context); + } + + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, VideoAnalyzerInner> beginGet( + String locationName, String operationId) { + return beginGetAsync(locationName, operationId).getSyncPoller(); + } + + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, VideoAnalyzerInner> beginGet( + String locationName, String operationId, Context context) { + return beginGetAsync(locationName, operationId, context).getSyncPoller(); + } + + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String locationName, String operationId) { + return beginGetAsync(locationName, operationId).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String locationName, String operationId, Context context) { + return beginGetAsync(locationName, operationId, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VideoAnalyzerInner get(String locationName, String operationId) { + return getAsync(locationName, operationId).block(); + } + + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VideoAnalyzerInner get(String locationName, String operationId, Context context) { + return getAsync(locationName, operationId, 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..99b370608f5fc --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationResultsImpl.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.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 operationId) { + VideoAnalyzerInner inner = this.serviceClient().get(locationName, operationId); + if (inner != null) { + return new VideoAnalyzerImpl(inner, this.manager()); + } else { + return null; + } + } + + public VideoAnalyzer get(String locationName, String operationId, Context context) { + VideoAnalyzerInner inner = this.serviceClient().get(locationName, operationId, context); + if (inner != null) { + return new VideoAnalyzerImpl(inner, 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..3feb79c00c864 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesClientImpl.java @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/{operationId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, + @PathParam("operationId") String operationId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get video analyzer operation status. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String locationName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + locationName, + operationId, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get video analyzer operation status. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String locationName, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + locationName, + operationId, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get video analyzer operation status. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String locationName, String operationId) { + return getWithResponseAsync(locationName, operationId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get video analyzer operation status. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VideoAnalyzerOperationStatusInner get(String locationName, String operationId) { + return getAsync(locationName, operationId).block(); + } + + /** + * Get video analyzer operation status. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String locationName, String operationId, Context context) { + return getWithResponseAsync(locationName, operationId, 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..1f5c6fe9c9e5c --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerOperationStatusesImpl.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.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 operationId) { + VideoAnalyzerOperationStatusInner inner = this.serviceClient().get(locationName, operationId); + if (inner != null) { + return new VideoAnalyzerOperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String locationName, String operationId, Context context) { + Response inner = + this.serviceClient().getWithResponse(locationName, operationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new 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/VideoAnalyzerPrivateEndpointConnectionOperationStatusImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerPrivateEndpointConnectionOperationStatusImpl.java new file mode 100644 index 0000000000000..31612b99f6410 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzerPrivateEndpointConnectionOperationStatusImpl.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerPrivateEndpointConnectionOperationStatusInner; +import com.azure.resourcemanager.videoanalyzer.models.VideoAnalyzerPrivateEndpointConnectionOperationStatus; + +public final class VideoAnalyzerPrivateEndpointConnectionOperationStatusImpl + implements VideoAnalyzerPrivateEndpointConnectionOperationStatus { + private VideoAnalyzerPrivateEndpointConnectionOperationStatusInner innerObject; + + private final com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager serviceManager; + + VideoAnalyzerPrivateEndpointConnectionOperationStatusImpl( + VideoAnalyzerPrivateEndpointConnectionOperationStatusInner 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 VideoAnalyzerPrivateEndpointConnectionOperationStatusInner 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/VideoAnalyzersClientImpl.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/implementation/VideoAnalyzersClientImpl.java index de323b7667a43..03b26d1443475 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; @@ -24,14 +23,18 @@ 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.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 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 VideoAnalyzersClient. */ @@ -97,7 +100,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 +129,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 +141,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 +445,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 Video Analyzer account. */ @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 +501,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 Video Analyzer account. */ @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,20 +553,115 @@ 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 Video Analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, VideoAnalyzerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, VideoAnalyzerInner parameters) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), VideoAnalyzerInner.class, VideoAnalyzerInner.class, Context.NONE); + } + + /** + * Create or update an instance of a 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 Video Analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, VideoAnalyzerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, VideoAnalyzerInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), VideoAnalyzerInner.class, VideoAnalyzerInner.class, context); + } + + /** + * Create or update an instance of a 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 Video Analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, VideoAnalyzerInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, VideoAnalyzerInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters).getSyncPoller(); + } + + /** + * Create or update an instance of a 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 Video Analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, VideoAnalyzerInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, VideoAnalyzerInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters, context).getSyncPoller(); + } + + /** + * Create or update an instance of a 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 Video Analyzer account. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( String resourceGroupName, String accountName, VideoAnalyzerInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update an instance of a 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 Video Analyzer account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String accountName, VideoAnalyzerInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -591,7 +673,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 Video Analyzer account. */ @ServiceMethod(returns = ReturnType.SINGLE) public VideoAnalyzerInner createOrUpdate( @@ -609,12 +691,12 @@ 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 Video Analyzer account. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public VideoAnalyzerInner createOrUpdate( String resourceGroupName, String accountName, VideoAnalyzerInner parameters, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, accountName, parameters, context).block(); + return createOrUpdateAsync(resourceGroupName, accountName, parameters, context).block(); } /** @@ -764,10 +846,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 Video Analyzer account. */ @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 +902,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 Video Analyzer account. */ @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,20 +954,16 @@ 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 Video Analyzer account. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private PollerFlux, VideoAnalyzerInner> beginUpdateAsync( String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters) { - return updateWithResponseAsync(resourceGroupName, accountName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + Mono>> mono = updateWithResponseAsync(resourceGroupName, accountName, parameters); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), VideoAnalyzerInner.class, VideoAnalyzerInner.class, Context.NONE); } /** @@ -894,14 +972,22 @@ private Mono updateAsync( * @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 a Video Analyzer account. + * @return the Video Analyzer account. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VideoAnalyzerInner update(String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters) { - return updateAsync(resourceGroupName, accountName, parameters).block(); + private PollerFlux, VideoAnalyzerInner> beginUpdateAsync( + String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, accountName, parameters, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), VideoAnalyzerInner.class, VideoAnalyzerInner.class, context); } /** @@ -910,146 +996,76 @@ public VideoAnalyzerInner update(String resourceGroupName, String accountName, V * @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 a Video Analyzer account. + * @return the Video Analyzer account. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, accountName, parameters, context).block(); + public SyncPoller, VideoAnalyzerInner> beginUpdate( + String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters) { + return beginUpdateAsync(resourceGroupName, accountName, parameters).getSyncPoller(); } /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. + * Updates an existing instance of 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. + * @return the Video Analyzer account. */ @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())); + public SyncPoller, VideoAnalyzerInner> beginUpdate( + String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, accountName, parameters, context).getSyncPoller(); } /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. + * Updates an existing instance of 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. + * @return the Video Analyzer account. */ @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); + private Mono updateAsync( + String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters) { + return beginUpdateAsync(resourceGroupName, accountName, parameters) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. + * Updates an existing instance of 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. + * @return the Video Analyzer account. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono syncStorageKeysAsync( - String resourceGroupName, String accountName, SyncStorageKeysInput parameters) { - return syncStorageKeysWithResponseAsync(resourceGroupName, accountName, parameters) - .flatMap((Response res) -> Mono.empty()); + private Mono updateAsync( + String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters, Context context) { + return beginUpdateAsync(resourceGroupName, accountName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. + * Updates an existing instance of Video Analyzer account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Video Analyzer account name. @@ -1057,14 +1073,15 @@ private Mono syncStorageKeysAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Video Analyzer account. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void syncStorageKeys(String resourceGroupName, String accountName, SyncStorageKeysInput parameters) { - syncStorageKeysAsync(resourceGroupName, accountName, parameters).block(); + public VideoAnalyzerInner update(String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters) { + return updateAsync(resourceGroupName, accountName, parameters).block(); } /** - * Synchronizes storage account keys for a storage account associated with the Video Analyzer account. + * Updates an existing instance of Video Analyzer account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Video Analyzer account name. @@ -1073,16 +1090,16 @@ public void syncStorageKeys(String resourceGroupName, String accountName, SyncSt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the Video Analyzer account. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response syncStorageKeysWithResponse( - String resourceGroupName, String accountName, SyncStorageKeysInput parameters, Context context) { - return syncStorageKeysWithResponseAsync(resourceGroupName, accountName, parameters, context).block(); + public VideoAnalyzerInner update( + String resourceGroupName, String accountName, VideoAnalyzerUpdate parameters, Context context) { + return updateAsync(resourceGroupName, accountName, parameters, context).block(); } /** - * Lists the Video Analyzer accounts in the specific subscription. + * List all Video Analyzer accounts in the specified subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1117,7 +1134,7 @@ private Mono> listBySubscriptionWithRespo } /** - * Lists the Video Analyzer accounts in the specific subscription. + * List all Video Analyzer accounts in the specified subscription. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1151,7 +1168,7 @@ private Mono> listBySubscriptionWithRespo } /** - * Lists the Video Analyzer accounts in the specific subscription. + * List all Video Analyzer accounts in the specified subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1171,7 +1188,7 @@ private Mono listBySubscriptionAsync() { } /** - * Lists the Video Analyzer accounts in the specific subscription. + * List all Video Analyzer accounts in the specified subscription. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1183,7 +1200,7 @@ public VideoAnalyzerCollectionInner listBySubscription() { } /** - * Lists the Video Analyzer accounts in the specific subscription. + * List all Video Analyzer accounts in the specified subscription. * * @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/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..055d187f75870 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 { @@ -32,10 +33,6 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - public String title() { return this.innerModel().title(); } @@ -52,14 +49,22 @@ 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 SystemData systemData() { + return this.innerModel().systemData(); + } + 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,9 @@ public VideoEntityImpl withDescription(String description) { this.innerModel().withDescription(description); 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..b96f8cf12b261 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. + * Retrieves a list of video resources that have been created, along with their JSON representations. * * @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. + * Retrieves a list of video resources that have been created, along with their JSON representations. * * @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. + * Retrieves a list of video resources that have been created, along with their JSON representations. * * @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. + * Retrieves a list of video resources that have been created, along with their JSON representations. * * @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. + * Retrieves a list of video resources that have been created, along with their JSON representations. * * @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. + * Retrieves a list of video resources that have been created, along with their JSON representations. * * @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. + * Retrieves a list of video resources that have been created, along with their JSON representations. * * @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 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 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 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 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 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 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 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 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 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 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 video resource 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 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 video resource 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 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 video resource 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 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 video resource 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 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 video resource 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 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. @@ -882,16 +882,16 @@ public Response deleteWithResponse( } /** - * Updates individual properties of an existing video resource. + * Updates individual properties of an existing video resource 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 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( @@ -942,17 +942,17 @@ private Mono> updateWithResponseAsync( } /** - * Updates individual properties of an existing video resource. + * Updates individual properties of an existing video resource 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 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( @@ -1000,16 +1000,16 @@ private Mono> updateWithResponseAsync( } /** - * Updates individual properties of an existing video resource. + * Updates individual properties of an existing video resource 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 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( @@ -1026,16 +1026,16 @@ private Mono updateAsync( } /** - * Updates individual properties of an existing video resource. + * Updates individual properties of an existing video resource 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 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( @@ -1044,17 +1044,17 @@ public VideoEntityInner update( } /** - * Updates individual properties of an existing video resource. + * Updates individual properties of an existing video resource 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 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,19 @@ 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, for a video resource + * 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 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 +1104,7 @@ private Mono> listStreamingTokenWithResponseA .withContext( context -> service - .listStreamingToken( + .listContentToken( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -1117,20 +1117,20 @@ 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, for a video resource + * 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 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 +1157,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 +1169,23 @@ 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, for a video resource + * 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 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 +1195,39 @@ 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, for a video resource + * 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 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, for a video resource + * 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 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..107dc4a0eb990 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. + * Retrieves all existing access policy resources, along with their JSON representations. * * @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. + * Retrieves all existing access policy resources, along with their JSON representations. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName The Azure Video Analyzer account name. @@ -38,39 +38,39 @@ 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 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 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 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 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); /** - * Deletes an existing access policy resource. + * Deletes an existing access policy resource 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 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. @@ -78,11 +78,11 @@ Response getWithResponse( void delete(String resourceGroupName, String accountName, String accessPolicyName); /** - * Deletes an existing access policy resource. + * Deletes an existing access policy resource 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 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,30 +93,30 @@ 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 with the given name. * * @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 with the given name. * * @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); /** - * Deletes an existing access policy resource. + * Deletes an existing access policy resource with the given name. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -126,7 +126,7 @@ Response deleteWithResponse( void deleteById(String id); /** - * Deletes an existing access policy resource. + * Deletes an existing access policy resource with the given name. * * @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/AccessPolicyEntity.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyEntity.java index 3c55093277ac0..1860c2f828455 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyEntity.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AccessPolicyEntity.java @@ -31,13 +31,6 @@ public interface AccessPolicyEntity { */ String type(); - /** - * Gets the systemData property: The system metadata relating to this resource. - * - * @return the systemData value. - */ - SystemData systemData(); - /** * Gets the role property: Defines the access level granted by this policy. * @@ -52,6 +45,13 @@ public interface AccessPolicyEntity { */ AuthenticationBase authentication(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.AccessPolicyEntityInner object. * 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/AudioEncoderAac.java similarity index 53% rename from sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerProperties.java rename to sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderAac.java index 2d2cba39a4c93..823e9586bf379 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/AudioEncoderAac.java @@ -4,27 +4,23 @@ 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; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; -/** The VideoAnalyzerProperties model. */ -@Immutable -public final class VideoAnalyzerProperties extends VideoAnalyzerPropertiesUpdate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoAnalyzerProperties.class); +/** A custom preset for encoding audio with the 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 VideoAnalyzerProperties withStorageAccounts(List storageAccounts) { - super.withStorageAccounts(storageAccounts); - return this; - } - - /** {@inheritDoc} */ - @Override - public VideoAnalyzerProperties withEncryption(AccountEncryption encryption) { - super.withEncryption(encryption); + public AudioEncoderAac withBitrateKbps(String bitrateKbps) { + super.withBitrateKbps(bitrateKbps); return this; } 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..a559ddf3689da --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/AudioEncoderBase.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.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Base type for all audio encoder presets, which define the recipe or instructions on how audio should be processed. + */ +@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); + + /* + * Bitrate, in kilobits per second or Kbps, at which audio should be + * encoded (2-channel stereo audio at a sampling rate of 48 kHz). Allowed + * values are 96, 112, 128, 160, 192, 224, and 256. If omitted, the bitrate + * of the input audio is used. + */ + @JsonProperty(value = "bitrateKbps") + private String bitrateKbps; + + /** + * Get the bitrateKbps property: Bitrate, in kilobits per second or Kbps, at which audio should be encoded + * (2-channel stereo audio at a sampling rate of 48 kHz). Allowed values are 96, 112, 128, 160, 192, 224, and 256. + * If omitted, the bitrate of the input audio is used. + * + * @return the bitrateKbps value. + */ + public String bitrateKbps() { + return this.bitrateKbps; + } + + /** + * Set the bitrateKbps property: Bitrate, in kilobits per second or Kbps, at which audio should be encoded + * (2-channel stereo audio at a sampling rate of 48 kHz). Allowed values are 96, 112, 128, 160, 192, 224, and 256. + * If omitted, the bitrate of the input audio is used. + * + * @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/EdgeModuleEntity.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModuleEntity.java index 377b90c427da0..ed8ef5d4c3f48 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModuleEntity.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EdgeModuleEntity.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.videoanalyzer.models; import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.videoanalyzer.fluent.models.EdgeModuleEntityInner; import java.util.UUID; @@ -33,13 +32,6 @@ public interface EdgeModuleEntity { */ String type(); - /** - * Gets the systemData property: The system metadata relating to this resource. - * - * @return the systemData value. - */ - SystemData systemData(); - /** * Gets the edgeModuleId property: Internal ID generated for the instance of the Video Analyzer edge module. * 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..ea8e5611077b5 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, along with their JSON representations. * * @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, along with their JSON representations. * * @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 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 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 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 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 with the given name. * * @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 with the given name. * * @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..f0242f5d1b33b --- /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; + +/** Describes a custom preset for encoding the input content using the encoder processor. */ +@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); + + /* + * Describes a custom preset for encoding audio. + */ + @JsonProperty(value = "audioEncoder") + private AudioEncoderBase audioEncoder; + + /* + * Describes a custom preset for encoding video. + */ + @JsonProperty(value = "videoEncoder") + private VideoEncoderBase videoEncoder; + + /** + * Get the audioEncoder property: Describes a custom preset for encoding audio. + * + * @return the audioEncoder value. + */ + public AudioEncoderBase audioEncoder() { + return this.audioEncoder; + } + + /** + * Set the audioEncoder property: Describes a custom preset for encoding audio. + * + * @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: Describes a custom preset for encoding video. + * + * @return the videoEncoder value. + */ + public VideoEncoderBase videoEncoder() { + return this.videoEncoder; + } + + /** + * Set the videoEncoder property: Describes a custom preset for encoding video. + * + * @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..6b61fec4b73f2 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderPresetBase.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.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Base type for all encoder presets, which define the recipe or instructions on how the input content should be + * processed. + */ +@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..eb8deaf5c4e7d --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EncoderProcessor.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; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * Encoder processor allows for encoding of the input content. For example, it can used to change the resolution from 4K + * to 1280x720. + */ +@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, which defines the recipe or instructions on how the + * input content should be processed. + */ + @JsonProperty(value = "preset", required = true) + private EncoderPresetBase preset; + + /** + * Get the preset property: The encoder preset, which defines the recipe or instructions on how the input content + * should be processed. + * + * @return the preset value. + */ + public EncoderPresetBase preset() { + return this.preset; + } + + /** + * Set the preset property: The encoder preset, which defines the recipe or instructions on how the input content + * should be processed. + * + * @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..d3be940ce2df6 --- /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; + +/** Describes a built-in preset for encoding the input content using the encoder processor. */ +@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); + + /* + * Name of the built-in encoding preset. + */ + @JsonProperty(value = "name", required = true) + private EncoderSystemPresetType name; + + /** + * Get the name property: Name of the built-in encoding preset. + * + * @return the name value. + */ + public EncoderSystemPresetType name() { + return this.name; + } + + /** + * Set the name property: Name of the built-in encoding preset. + * + * @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..c8919e0c0eb78 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/EndpointBase.java @@ -0,0 +1,130 @@ +// 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; + + /* + * Describes the tunnel through which Video Analyzer can connect to the + * endpoint URL. This is an optional property, typically used when the + * endpoint is behind a firewall. + */ + @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: Describes the tunnel through which Video Analyzer can connect to the endpoint URL. This + * is an optional property, typically used when the endpoint is behind a firewall. + * + * @return the tunnel value. + */ + public TunnelBase tunnel() { + return this.tunnel; + } + + /** + * Set the tunnel property: Describes the tunnel through which Video Analyzer can connect to the endpoint URL. This + * is an optional property, typically used when the endpoint is behind a firewall. + * + * @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..a53a63425ba8f --- /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; + +/** Group level network access control. */ +@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..8a6ad5902ac1f --- /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 resource identifier. + */ + @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 resource identifier. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The IoT Hub resource identifier. + * + * @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..4ebc689c7cf50 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipeline.java @@ -0,0 +1,337 @@ +// 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 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: Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range + * is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the service + * will disconnect temporarily from the camera. It will retry to re-establish connection (with exponential backoff), + * checking to see if the camera bitrate is now below the reserved capacity. Doing so will ensure that one 'noisy + * neighbor' does not affect other live pipelines in your account. + * + * @return the bitrateKbps value. + */ + Integer bitrateKbps(); + + /** + * Gets the state property: Current state of the pipeline (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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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: Maximum bitrate capacity in Kbps reserved for the live pipeline. The + * allowed range is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this + * capacity, then the service will disconnect temporarily from the camera. It will retry to re-establish + * connection (with exponential backoff), checking to see if the camera bitrate is now below the reserved + * capacity. Doing so will ensure that one 'noisy neighbor' does not affect other live pipelines in your + * account.. + * + * @param bitrateKbps Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range is + * from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the + * service will disconnect temporarily from the camera. It will retry to re-establish connection (with + * exponential backoff), checking to see if the camera bitrate is now below the reserved capacity. Doing + * so will ensure that one 'noisy neighbor' does not affect other live pipelines in your account. + * @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: Maximum bitrate capacity in Kbps reserved for the live pipeline. The + * allowed range is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this + * capacity, then the service will disconnect temporarily from the camera. It will retry to re-establish + * connection (with exponential backoff), checking to see if the camera bitrate is now below the reserved + * capacity. Doing so will ensure that one 'noisy neighbor' does not affect other live pipelines in your + * account.. + * + * @param bitrateKbps Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range is + * from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the + * service will disconnect temporarily from the camera. It will retry to re-establish connection (with + * exponential backoff), checking to see if the camera bitrate is now below the reserved capacity. Doing + * so will ensure that one 'noisy neighbor' does not affect other live pipelines in your account. + * @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 given name. + * + * @throws com.azure.core.management.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 given 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 activate(Context context); + + /** + * Deactivates a live pipeline with the given name. + * + * @throws com.azure.core.management.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 given 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 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/LivePipelineUpdate.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineUpdate.java new file mode 100644 index 0000000000000..1ab65d0b33785 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineUpdate.java @@ -0,0 +1,201 @@ +// 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.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving and publishing + * of content for a unique RTSP camera. + */ +@JsonFlatten +@Fluent +public class LivePipelineUpdate extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LivePipelineUpdate.class); + + /* + * 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; + + /* + * Maximum bitrate capacity in Kbps reserved for the live pipeline. The + * allowed range is from 500 to 3000 Kbps in increments of 100 Kbps. If the + * RTSP camera exceeds this capacity, then the service will disconnect + * temporarily from the camera. It will retry to re-establish connection + * (with exponential backoff), checking to see if the camera bitrate is now + * below the reserved capacity. Doing so will ensure that one 'noisy + * neighbor' does not affect other live pipelines in your account. + */ + @JsonProperty(value = "properties.bitrateKbps") + private Integer bitrateKbps; + + /* + * Current state of the pipeline (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; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData 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 LivePipelineUpdate object itself. + */ + public LivePipelineUpdate 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 LivePipelineUpdate object itself. + */ + public LivePipelineUpdate withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range + * is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the service + * will disconnect temporarily from the camera. It will retry to re-establish connection (with exponential backoff), + * checking to see if the camera bitrate is now below the reserved capacity. Doing so will ensure that one 'noisy + * neighbor' does not affect other live pipelines in your account. + * + * @return the bitrateKbps value. + */ + public Integer bitrateKbps() { + return this.bitrateKbps; + } + + /** + * Set the bitrateKbps property: Maximum bitrate capacity in Kbps reserved for the live pipeline. The allowed range + * is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds this capacity, then the service + * will disconnect temporarily from the camera. It will retry to re-establish connection (with exponential backoff), + * checking to see if the camera bitrate is now below the reserved capacity. Doing so will ensure that one 'noisy + * neighbor' does not affect other live pipelines in your account. + * + * @param bitrateKbps the bitrateKbps value to set. + * @return the LivePipelineUpdate object itself. + */ + public LivePipelineUpdate withBitrateKbps(Integer bitrateKbps) { + this.bitrateKbps = bitrateKbps; + return this; + } + + /** + * Get the state property: Current state of the pipeline (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 LivePipelineUpdate object itself. + */ + public LivePipelineUpdate withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * 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/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..beef61d50c42e --- /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 pipelines that have been created, along with their JSON representations. + * + * @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 pipelines that have been created, along with their JSON representations. + * + * @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 specific 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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + LivePipeline get(String resourceGroupName, String accountName, String livePipelineName); + + /** + * Retrieves a specific 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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + Response getWithResponse( + String resourceGroupName, String accountName, String livePipelineName, Context context); + + /** + * Deletes a live pipeline 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 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 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 specific 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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + LivePipeline getById(String id); + + /** + * Retrieves a specific 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 a unique instance of a live topology, used for real-time ingestion, archiving + * and publishing of content for a unique RTSP camera. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a live pipeline with the given name. + * + * @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 with the given name. + * + * @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/Locations.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Locations.java index 3e80c4cc55293..34536d9438e5c 100644 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Locations.java +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/Locations.java @@ -12,7 +12,7 @@ public interface Locations { /** * Checks whether the Video Analyzer resource name is available. * - * @param locationName The name of the location. + * @param locationName Location Name. * @param parameters The request parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -24,7 +24,7 @@ public interface Locations { /** * Checks whether the Video Analyzer resource name is available. * - * @param locationName The name of the location. + * @param locationName Location Name. * @param parameters The request parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/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..34e693f8dcc7a --- /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; + +/** Network access control for video analyzer account. */ +@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/OperationResults.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationResults.java new file mode 100644 index 0000000000000..2b0bb886aae53 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationResults.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.Context; + +/** Resource collection API of OperationResults. */ +public interface OperationResults { + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + PrivateEndpointConnection get(String resourceGroupName, String accountName, String name, String operationId); + + /** + * Get private endpoint connection operation result. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation result. + */ + PrivateEndpointConnection get( + String resourceGroupName, String accountName, String name, String operationId, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationStatuses.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationStatuses.java new file mode 100644 index 0000000000000..6862df13ededf --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/OperationStatuses.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 OperationStatuses. */ +public interface OperationStatuses { + /** + * Get private endpoint connection operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation status. + */ + VideoAnalyzerPrivateEndpointConnectionOperationStatus get( + String resourceGroupName, String accountName, String name, String operationId); + + /** + * Get private endpoint connection operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return private endpoint connection operation status. + */ + Response getWithResponse( + String resourceGroupName, String accountName, String name, String operationId, Context context); +} 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..7c0ebe79eea20 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJob.java @@ -0,0 +1,276 @@ +// 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 topologyName property: Reference to an existing pipeline topology. When activated, this pipeline job + * 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 state of the pipeline (read-only). + * + * @return the state value. + */ + PipelineJobState state(); + + /** + * Gets the expiration property: The date-time by when this pipeline job will be automatically deleted from your + * account. + * + * @return the expiration value. + */ + OffsetDateTime expiration(); + + /** + * Gets the error property: Details about the error, in case the pipeline job fails. + * + * @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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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: Reference to an existing pipeline topology. When activated, this + * pipeline job will process content according to the pipeline topology definition.. + * + * @param topologyName Reference to an existing pipeline topology. When activated, this pipeline job 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: Reference to an existing pipeline topology. When activated, this + * pipeline job will process content according to the pipeline topology definition.. + * + * @param topologyName Reference to an existing pipeline topology. When activated, this pipeline job 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 given name. + * + * @throws com.azure.core.management.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 given 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(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..df2bd44f53020 --- /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; + +/** Details about the error for a failed pipeline job. */ +@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..707068663cf75 --- /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 with the given operationId. + * + * @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 with the given operationId. + */ + PipelineJobOperationStatus get( + String resourceGroupName, String accountName, String pipelineJobName, String operationId); + + /** + * Get the operation status of a pipeline job with the given operationId. + * + * @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 with the given operationId. + */ + 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/PipelineJobUpdate.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobUpdate.java new file mode 100644 index 0000000000000..d375a65676a03 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobUpdate.java @@ -0,0 +1,195 @@ +// 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.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Pipeline job represents a unique instance of a batch topology, used for offline processing of selected portions of + * archived content. + */ +@JsonFlatten +@Fluent +public class PipelineJobUpdate extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PipelineJobUpdate.class); + + /* + * Reference to an existing pipeline topology. When activated, this + * pipeline job 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 state of the pipeline (read-only). + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private PipelineJobState state; + + /* + * The date-time by when this pipeline job will be automatically deleted + * from your account. + */ + @JsonProperty(value = "properties.expiration", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expiration; + + /* + * Details about the error, in case the pipeline job fails. + */ + @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; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the topologyName property: Reference to an existing pipeline topology. When activated, this pipeline job will + * process content according to the pipeline topology definition. + * + * @return the topologyName value. + */ + public String topologyName() { + return this.topologyName; + } + + /** + * Set the topologyName property: Reference to an existing pipeline topology. When activated, this pipeline job will + * process content according to the pipeline topology definition. + * + * @param topologyName the topologyName value to set. + * @return the PipelineJobUpdate object itself. + */ + public PipelineJobUpdate 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 PipelineJobUpdate object itself. + */ + public PipelineJobUpdate withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the state property: Current state of the pipeline (read-only). + * + * @return the state value. + */ + public PipelineJobState state() { + return this.state; + } + + /** + * Get the expiration property: The date-time by when this pipeline job will be automatically deleted from your + * account. + * + * @return the expiration value. + */ + public OffsetDateTime expiration() { + return this.expiration; + } + + /** + * Get the error property: Details about the error, in case the pipeline job fails. + * + * @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 PipelineJobUpdate object itself. + */ + public PipelineJobUpdate withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * 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/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..98fb343d8b6ff --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineJobs.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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 all live pipelines that have been created, along with their JSON representations. + * + * @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 all live pipelines that have been created, along with their JSON representations. + * + * @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 specific 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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + PipelineJob get(String resourceGroupName, String accountName, String pipelineJobName); + + /** + * Retrieves a specific 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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + Response getWithResponse( + String resourceGroupName, String accountName, String pipelineJobName, Context context); + + /** + * Deletes a pipeline job 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 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 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 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 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 specific 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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + PipelineJob getById(String id); + + /** + * Retrieves a specific 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 pipeline job represents a unique instance of a batch topology, used for offline processing of selected + * portions of archived content. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a pipeline job with the given name. + * + * @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 with the given name. + * + * @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..ade5581d3f177 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologies.java @@ -0,0 +1,163 @@ +// 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 to the account, if any, along with their JSON + * representation. + * + * @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 to the account, if any, along with their JSON + * representation. + * + * @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 specific 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 content for a particular + * outcome. + */ + PipelineTopology get(String resourceGroupName, String accountName, String pipelineTopologyName); + + /** + * Retrieves a specific 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 content 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 specific 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 content for a particular + * outcome. + */ + PipelineTopology getById(String id); + + /** + * Retrieves a specific 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 content 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..ecc793e8c1871 --- /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 kind property: Topology kind. + * + * @return the kind value. + */ + Kind kind(); + + /** + * Gets the sku property: Describes the properties of a SKU. + * + * @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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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: Describes the properties of a SKU.. + * + * @param sku Describes the properties of a SKU. + * @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: Describes the properties of a SKU.. + * + * @param sku Describes the properties of a SKU. + * @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/PipelineTopologyUpdate.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologyUpdate.java new file mode 100644 index 0000000000000..4bce7fa491457 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PipelineTopologyUpdate.java @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.videoanalyzer.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.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 content 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 captures content from a RTSP + * camera and archives the content can be reused across many different cameras, as long as the same processing is to 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. This allows individual pipelines refer to different + * values, such as individual cameras' RTSP endpoints and credentials. Overall a topology is composed of the following: + * + *

- Parameters: list of user defined parameters that can be references across the topology nodes. - Sources: list of + * one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras.\r\n - + * Processors: list of nodes which perform data analysis or transformations. -Sinks: list of one or more data sinks + * which allow for data to be stored or exported to other destinations. + */ +@JsonFlatten +@Fluent +public class PipelineTopologyUpdate extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PipelineTopologyUpdate.class); + + /* + * Topology kind. + */ + @JsonProperty(value = "kind") + private Kind kind; + + /* + * Describes the properties of a SKU. + */ + @JsonProperty(value = "sku") + 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; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy + * information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData 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 PipelineTopologyUpdate object itself. + */ + public PipelineTopologyUpdate withKind(Kind kind) { + this.kind = kind; + return this; + } + + /** + * Get the sku property: Describes the properties of a SKU. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: Describes the properties of a SKU. + * + * @param sku the sku value to set. + * @return the PipelineTopologyUpdate object itself. + */ + public PipelineTopologyUpdate 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 PipelineTopologyUpdate object itself. + */ + public PipelineTopologyUpdate 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 PipelineTopologyUpdate object itself. + */ + public PipelineTopologyUpdate 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 PipelineTopologyUpdate object itself. + */ + public PipelineTopologyUpdate 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 PipelineTopologyUpdate object itself. + */ + public PipelineTopologyUpdate 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 PipelineTopologyUpdate object itself. + */ + public PipelineTopologyUpdate withSinks(List sinks) { + this.sinks = sinks; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + 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/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..c1c6749e6e566 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateEndpointConnection.java @@ -0,0 +1,201 @@ +// 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.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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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..173ef54ad13e0 --- /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 under video analyzer account. + * + * @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 under video analyzer account. + */ + PrivateEndpointConnectionListResult list(String resourceGroupName, String accountName); + + /** + * Get all private endpoint connections under video analyzer account. + * + * @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 under video analyzer account. + */ + Response listWithResponse( + String resourceGroupName, String accountName, Context context); + + /** + * Get private endpoint connection under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 private endpoint connection under video analyzer account. + */ + PrivateEndpointConnection get(String resourceGroupName, String accountName, String name); + + /** + * Get private endpoint connection under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 private endpoint connection under video analyzer account. + */ + Response getWithResponse( + String resourceGroupName, String accountName, String name, Context context); + + /** + * Delete private endpoint connection under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 name); + + /** + * Delete private endpoint connection under video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Private endpoint connection 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 name, Context context); + + /** + * Get private endpoint connection under video analyzer account. + * + * @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 under video analyzer account. + */ + PrivateEndpointConnection getById(String id); + + /** + * Get private endpoint connection under video analyzer account. + * + * @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 under video analyzer account. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete private endpoint connection under video analyzer account. + * + * @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 under video analyzer account. + * + * @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..f620c6544542e --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/PrivateLinkResource.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.management.SystemData; +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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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..8158209ebd4bf --- /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 for video analyzer account. + * + * @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 for video analyzer account. + */ + PrivateLinkResourceListResult list(String resourceGroupName, String accountName); + + /** + * Get list of group IDs for video analyzer account. + * + * @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 for video analyzer account. + */ + Response listWithResponse( + String resourceGroupName, String accountName, Context context); + + /** + * Get group ID for video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Name of the private link resource (Group 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 group ID for video analyzer account. + */ + PrivateLinkResource get(String resourceGroupName, String accountName, String name); + + /** + * Get group ID for video analyzer account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The Video Analyzer account name. + * @param name Name of the private link resource (Group 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 group ID for video analyzer account. + */ + 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..145a418a7eae2 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SecureIotDeviceRemoteTunnel.java @@ -0,0 +1,97 @@ +// 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); + + /* + * Name of the IoT Hub. + */ + @JsonProperty(value = "iotHubName", required = true) + private String iotHubName; + + /* + * The IoT device id to use when establishing the remote tunnel. This + * string is case-sensitive. + */ + @JsonProperty(value = "deviceId", required = true) + private String deviceId; + + /** + * Get the iotHubName property: Name of the IoT Hub. + * + * @return the iotHubName value. + */ + public String iotHubName() { + return this.iotHubName; + } + + /** + * Set the iotHubName property: Name of the IoT Hub. + * + * @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 IoT device id to use when establishing the remote tunnel. This string is + * case-sensitive. + * + * @return the deviceId value. + */ + public String deviceId() { + return this.deviceId; + } + + /** + * Set the deviceId property: The IoT device id to use when establishing the remote tunnel. This string is + * case-sensitive. + * + * @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..48a73c2011ad5 --- /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 SkuTier 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 SkuTier 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/SkuTier.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SkuTier.java new file mode 100644 index 0000000000000..b9237702f20fb --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/SkuTier.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 SkuTier. */ +public final class SkuTier extends ExpandableStringEnum { + /** Static value Standard for SkuTier. */ + public static final SkuTier STANDARD = fromString("Standard"); + + /** + * Creates or finds a SkuTier from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuTier. + */ + @JsonCreator + public static SkuTier fromString(String name) { + return fromString(name, SkuTier.class); + } + + /** @return known SkuTier values. */ + public static Collection values() { + return values(SkuTier.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/TimeSequenceBase.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/TimeSequenceBase.java new file mode 100644 index 0000000000000..291f352943717 --- /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; + +/** A sequence of datetime ranges as a string. */ +@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..7bf411524a941 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,9 +4,7 @@ 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; import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerInner; import java.util.List; @@ -50,14 +48,7 @@ public interface VideoAnalyzer { Map tags(); /** - * Gets the systemData property: The system data of the Video Analyzer account. - * - * @return the systemData value. - */ - 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 +62,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 +75,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 +180,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 +212,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 +239,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 +284,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 +345,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 +392,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..21df1c97861eb --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerOperationResults.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.util.Context; + +/** Resource collection API of VideoAnalyzerOperationResults. */ +public interface VideoAnalyzerOperationResults { + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + VideoAnalyzer get(String locationName, String operationId); + + /** + * Get video analyzer operation result. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation result. + */ + VideoAnalyzer get(String locationName, String operationId, 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..b0390e246a8e5 --- /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: Operation identifier. + * + * @return the name value. + */ + String name(); + + /** + * Gets the id property: Operation resource ID. + * + * @return the id value. + */ + String id(); + + /** + * Gets the startTime property: Operation start time. + * + * @return the startTime value. + */ + String startTime(); + + /** + * Gets the endTime property: Operation end time. + * + * @return the endTime value. + */ + String endTime(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the error property: The error detail. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner com.azure.resourcemanager.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..3a96d67cc5ab5 --- /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 video analyzer operation status. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation status. + */ + VideoAnalyzerOperationStatus get(String locationName, String operationId); + + /** + * Get video analyzer operation status. + * + * @param locationName Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return video analyzer operation status. + */ + Response getWithResponse(String locationName, String operationId, Context context); +} diff --git a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerPrivateEndpointConnectionOperationStatus.java b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerPrivateEndpointConnectionOperationStatus.java new file mode 100644 index 0000000000000..cbffb540b2e64 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerPrivateEndpointConnectionOperationStatus.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.management.exception.ManagementError; +import com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerPrivateEndpointConnectionOperationStatusInner; + +/** An immutable client-side representation of VideoAnalyzerPrivateEndpointConnectionOperationStatus. */ +public interface VideoAnalyzerPrivateEndpointConnectionOperationStatus { + /** + * Gets the name property: Operation identifier. + * + * @return the name value. + */ + String name(); + + /** + * Gets the id property: Operation resource ID. + * + * @return the id value. + */ + String id(); + + /** + * Gets the startTime property: Operation start time. + * + * @return the startTime value. + */ + String startTime(); + + /** + * Gets the endTime property: Operation end time. + * + * @return the endTime value. + */ + String endTime(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the error property: The error detail. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner + * com.azure.resourcemanager.videoanalyzer.fluent.models.VideoAnalyzerPrivateEndpointConnectionOperationStatusInner + * object. + * + * @return the inner object. + */ + VideoAnalyzerPrivateEndpointConnectionOperationStatusInner innerModel(); +} 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 deleted file mode 100644 index 29e6a2725fe61..0000000000000 --- a/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoAnalyzerPropertiesUpdate.java +++ /dev/null @@ -1,101 +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; -import java.util.List; - -/** Properties of the Video Analyzer account. */ -@Fluent -public class VideoAnalyzerPropertiesUpdate { - @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; - } - - /** - * 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; - return this; - } - - /** - * Get the endpoints property: The list of 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 VideoAnalyzerPropertiesUpdate object itself. - */ - public VideoAnalyzerPropertiesUpdate withEncryption(AccountEncryption encryption) { - this.encryption = encryption; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storageAccounts() != null) { - storageAccounts().forEach(e -> e.validate()); - } - if (endpoints() != null) { - endpoints().forEach(e -> e.validate()); - } - if (encryption() != null) { - encryption().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..625ee4431d8b3 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 @@ -83,34 +83,7 @@ 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. + * List all Video Analyzer accounts in the specified subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -119,7 +92,7 @@ Response syncStorageKeysWithResponse( VideoAnalyzerCollection listBySubscription(); /** - * Lists the Video Analyzer accounts in the specific subscription. + * List all Video Analyzer accounts in the specified subscription. * * @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/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..bd0ed2e22d248 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoCreationProperties.java @@ -0,0 +1,165 @@ +// 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 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 title provided by the user. Value can be up to 256 characters + * long. + */ + @JsonProperty(value = "title") + private String title; + + /* + * Optional description provided by the user. Value can be up to 2048 + * characters long. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Segment length indicates the length of individual content 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 initial call to create the video resource can lead to + * errors when uploading content to the archive. Default value is 30 + * seconds. This property is only allowed for topologies where "kind" is + * set to "live". + */ + @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 10 years, in 1 day increments. When + * absent (null), all video content is retained indefinitely. This property + * is only allowed for topologies where "kind" is set to "live". + */ + @JsonProperty(value = "retentionPeriod") + private String retentionPeriod; + + /** + * Get the title property: Optional 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 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 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 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: Segment length indicates the length of individual content 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 initial call to + * create the video resource can lead to errors when uploading content to the archive. Default value is 30 seconds. + * This property is only allowed for topologies where "kind" is set to "live". + * + * @return the segmentLength value. + */ + public String segmentLength() { + return this.segmentLength; + } + + /** + * Set the segmentLength property: Segment length indicates the length of individual content 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 initial call to + * create the video resource can lead to errors when uploading content to the archive. Default value is 30 seconds. + * This property is only allowed for topologies where "kind" is set to "live". + * + * @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 10 years, + * in 1 day increments. When absent (null), all video content is retained indefinitely. This property is only + * allowed for topologies where "kind" is set to "live". + * + * @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 10 years, + * in 1 day increments. When absent (null), all video content is retained indefinitely. This property is only + * allowed for topologies where "kind" is set to "live". + * + * @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..281a1b5f6e2e8 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoEncoderBase.java @@ -0,0 +1,129 @@ +// 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 type for all video encoding presets, which define the recipe or instructions on how the input video should be + * processed. + */ +@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 maximum bitrate, in kilobits per second or Kbps, at which video + * should be encoded. If omitted, encoder sets it automatically to try and + * match the quality of the input video. + */ + @JsonProperty(value = "bitrateKbps") + private String bitrateKbps; + + /* + * The frame rate (in frames per second) of the encoded video. The value + * must be greater than zero, and less than or equal to 300. If omitted, + * the encoder uses the average frame rate of the input video. + */ + @JsonProperty(value = "frameRate") + private String frameRate; + + /* + * Describes the resolution of the encoded video. If omitted, the encoder + * uses the resolution of the input video. + */ + @JsonProperty(value = "scale") + private VideoScale scale; + + /** + * Get the bitrateKbps property: The maximum bitrate, in kilobits per second or Kbps, at which video should be + * encoded. If omitted, encoder sets it automatically to try and match the quality of the input video. + * + * @return the bitrateKbps value. + */ + public String bitrateKbps() { + return this.bitrateKbps; + } + + /** + * Set the bitrateKbps property: The maximum bitrate, in kilobits per second or Kbps, at which video should be + * encoded. If omitted, encoder sets it automatically to try and match the quality of the input video. + * + * @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: The frame rate (in frames per second) of the encoded video. The value must be greater + * than zero, and less than or equal to 300. If omitted, the encoder uses the average frame rate of the input video. + * + * @return the frameRate value. + */ + public String frameRate() { + return this.frameRate; + } + + /** + * Set the frameRate property: The frame rate (in frames per second) of the encoded video. The value must be greater + * than zero, and less than or equal to 300. If omitted, the encoder uses the average frame rate of the input video. + * + * @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: Describes the resolution of the encoded video. If omitted, the encoder uses the + * resolution of the input video. + * + * @return the scale value. + */ + public VideoScale scale() { + return this.scale; + } + + /** + * Set the scale property: Describes the resolution of the encoded video. If omitted, the encoder uses the + * resolution of the input video. + * + * @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..0c44c008dfe38 --- /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; + +/** A custom preset for encoding video with the H.264 (AVC) codec. */ +@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..092f4e5d2d803 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 @@ -32,13 +32,6 @@ public interface VideoEntity { */ String type(); - /** - * Gets the systemData property: The system metadata relating to this resource. - * - * @return the systemData value. - */ - SystemData systemData(); - /** * Gets the title property: Optional video title provided by the user. Value can be up to 256 characters long. * @@ -55,8 +48,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 +64,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 +77,20 @@ public interface VideoEntity { */ VideoMediaInfo mediaInfo(); + /** + * Gets the archival property: Video archival properties. + * + * @return the archival value. + */ + VideoArchival archival(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.videoanalyzer.fluent.models.VideoEntityInner object. * @@ -115,7 +122,8 @@ 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.WithArchival { /** * Executes the create request. * @@ -154,6 +162,16 @@ interface WithDescription { */ WithCreate withDescription(String description); } + /** 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 +181,7 @@ 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.WithArchival { /** * Executes the update request. * @@ -204,6 +222,16 @@ interface WithDescription { */ Update withDescription(String description); } + /** 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 +249,24 @@ 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, for a video resource + * with the given name. * * @throws com.azure.core.management.exception.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, for a video resource + * with the given 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(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..b26241dd18c71 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoPublishingOptions.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; + +/** + * Optional flags used to change how video is published. These are only allowed for topologies where "kind" is set to + * "live". + */ +@Fluent +public final class VideoPublishingOptions { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VideoPublishingOptions.class); + + /* + * When set to 'true' content will not be archived or recorded. This is + * used, for example, when the topology is used only for low latency video + * streaming. Default is 'false'. If set to 'true', then + * "disableRtspPublishing" must be set to 'false'. + */ + @JsonProperty(value = "disableArchive") + private String disableArchive; + + /* + * When set to 'true' the RTSP playback URL will not be published, + * disabling low latency streaming. This is used, for example, when the + * topology is used only for archiving content. Default is 'false'. If set + * to 'true', then "disableArchive" must be set to 'false'. + */ + @JsonProperty(value = "disableRtspPublishing") + private String disableRtspPublishing; + + /* + * When set to 'true' preview images will not be generated. This is used, + * for example, when the topology is used only for low latency video + * streaming. Default is 'false'. If set to 'false', then "disableArchive" + * must be set to 'false'. + */ + @JsonProperty(value = "disableVideoPreviewImage") + private String disableVideoPreviewImage; + + /** + * Get the disableArchive property: When set to 'true' content will not be archived or recorded. This is used, for + * example, when the topology is used only for low latency video streaming. Default is 'false'. If set to 'true', + * then "disableRtspPublishing" must be set to 'false'. + * + * @return the disableArchive value. + */ + public String disableArchive() { + return this.disableArchive; + } + + /** + * Set the disableArchive property: When set to 'true' content will not be archived or recorded. This is used, for + * example, when the topology is used only for low latency video streaming. Default is 'false'. If set to 'true', + * then "disableRtspPublishing" must be set to '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 RTSP playback URL will not be published, disabling + * low latency streaming. This is used, for example, when the topology is used only for archiving content. Default + * is 'false'. If set to 'true', then "disableArchive" must be set to 'false'. + * + * @return the disableRtspPublishing value. + */ + public String disableRtspPublishing() { + return this.disableRtspPublishing; + } + + /** + * Set the disableRtspPublishing property: When set to 'true' the RTSP playback URL will not be published, disabling + * low latency streaming. This is used, for example, when the topology is used only for archiving content. Default + * is 'false'. If set to 'true', then "disableArchive" must be set to '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' preview images will not be generated. This is used, + * for example, when the topology is used only for low latency video streaming. Default is 'false'. If set to + * 'false', then "disableArchive" must be set to 'false'. + * + * @return the disableVideoPreviewImage value. + */ + public String disableVideoPreviewImage() { + return this.disableVideoPreviewImage; + } + + /** + * Set the disableVideoPreviewImage property: When set to 'true' preview images will not be generated. This is used, + * for example, when the topology is used only for low latency video streaming. Default is 'false'. If set to + * 'false', then "disableArchive" must be set to '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..a1193585c38e7 --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoScale.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; + +/** 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'. + * If the mode is 'Pad' or 'Stretch' then both width and height must be + * specified. Else if the mode is 'PreserveAspectRatio' then only one of + * width or height need be provided. + */ + @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'. If the mode is + * 'Pad' or 'Stretch' then both width and height must be specified. Else if the mode is 'PreserveAspectRatio' then + * only one of width or height need be provided. + * + * @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'. If the mode is + * 'Pad' or 'Stretch' then both width and height must be specified. Else if the mode is 'PreserveAspectRatio' then + * only one of width or height need be provided. + * + * @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..a8c209cb8678a --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSequenceAbsoluteTimeMarkers.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.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * A sequence of absolute datetime ranges as a string. The datetime values should follow IS08601, and the sum of the + * ranges should add up to 24 hours or less. Currently, there can be only one range specified in the sequence. + */ +@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 sequence of datetime ranges. Example: '[["2021-10-05T03:30:00Z", + * "2021-10-05T03:40:00Z"]]'. + */ + @JsonProperty(value = "ranges", required = true) + private String ranges; + + /** + * Get the ranges property: The sequence of datetime ranges. Example: '[["2021-10-05T03:30:00Z", + * "2021-10-05T03:40:00Z"]]'. + * + * @return the ranges value. + */ + public String ranges() { + return this.ranges; + } + + /** + * Set the ranges property: The sequence of datetime ranges. Example: '[["2021-10-05T03:30:00Z", + * "2021-10-05T03:40:00Z"]]'. + * + * @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..ee106d1f76fef --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSink.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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 in a live topology allows for video and audio to be captured, optionally archived, and published via a + * video resource. If archiving is enabled, this results in a video of type 'archive'. If used in a batch topology, this + * allows for video and audio to be stored as a file, and published via a video resource of type 'file'. + */ +@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 resource used to capture and publish + * content. Note: if downstream of RTSP source, and if disableArchive is + * set to true, then no content is archived. + */ + @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; + + /* + * Options to change how the video sink publishes content via the video + * resource. This property is only allowed for topologies where "kind" is + * set to "live". + */ + @JsonProperty(value = "videoPublishingOptions") + private VideoPublishingOptions videoPublishingOptions; + + /** + * Get the videoName property: Name of a new or existing video resource used to capture and publish content. Note: + * if downstream of RTSP source, and if disableArchive is set to true, then no content is archived. + * + * @return the videoName value. + */ + public String videoName() { + return this.videoName; + } + + /** + * Set the videoName property: Name of a new or existing video resource used to capture and publish content. Note: + * if downstream of RTSP source, and if disableArchive is set to true, then no content is archived. + * + * @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: Options to change how the video sink publishes content via the video + * resource. This property is only allowed for topologies where "kind" is set to "live". + * + * @return the videoPublishingOptions value. + */ + public VideoPublishingOptions videoPublishingOptions() { + return this.videoPublishingOptions; + } + + /** + * Set the videoPublishingOptions property: Options to change how the video sink publishes content via the video + * resource. This property is only allowed for topologies where "kind" is set to "live". + * + * @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..c596dc82c5d8f --- /dev/null +++ b/sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/VideoSource.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.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; + +/** + * Video source allows for content from a Video Analyzer video resource to be ingested into a pipeline. Currently + * supported only with batch pipelines. + */ +@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); + + /* + * Name of the Video Analyzer video resource to be used as the source. + */ + @JsonProperty(value = "videoName", required = true) + private String videoName; + + /* + * Describes a sequence of datetime ranges. The video source only picks up + * recorded media within these ranges. + */ + @JsonProperty(value = "timeSequences", required = true) + private TimeSequenceBase timeSequences; + + /** + * Get the videoName property: Name of the Video Analyzer video resource to be used as the source. + * + * @return the videoName value. + */ + public String videoName() { + return this.videoName; + } + + /** + * Set the videoName property: Name of the Video Analyzer video resource to be used as the source. + * + * @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: Describes a sequence of datetime ranges. The video source only picks up recorded + * media within these ranges. + * + * @return the timeSequences value. + */ + public TimeSequenceBase timeSequences() { + return this.timeSequences; + } + + /** + * Set the timeSequences property: Describes a sequence of datetime ranges. The video source only picks up recorded + * media within these ranges. + * + * @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..a7047bb1d53e6 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. + * Retrieves a list of video resources that have been created, along with their JSON representations. * * @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. + * Retrieves a list of video resources that have been created, along with their JSON representations. * * @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 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 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 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 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,55 @@ 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, for a video resource + * 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 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, for a video resource + * 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 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 with the given name. * * @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 with the given name. * * @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);