diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md b/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md
index b1ab8bca2dc2d..f76ea4480b543 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.1.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2021-06-24)
+- Azure Resource Manager MediaServices client library for Java. This package contains Microsoft Azure SDK for MediaServices Management SDK. This Swagger was generated by the API Framework. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.1.0-beta.1 (2021-04-30)
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md b/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md
index 1e611e6962451..8670f6b68f3a8 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager MediaServices client library for Java.
-This package contains Microsoft Azure SDK for MediaServices Management SDK. This Swagger was generated by the API Framework. Package tag package-2021-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for MediaServices Management SDK. This Swagger was generated by the API Framework. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-mediaservices
- 1.1.0-beta.1
+ 1.1.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -74,13 +74,15 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+
+
## Troubleshooting
## Next steps
## Contributing
-For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/master/CONTRIBUTING.md).
1. Fork it
1. Create your feature branch (`git checkout -b my-new-feature`)
@@ -93,7 +95,7 @@ For details on contributing to this repository, see the [contributing guide](htt
[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[azure_subscription]: https://azure.microsoft.com/free/
-[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
-[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
-[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
-[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
+[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml
index f23669b4f481f..cf3529f93ceca 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/pom.xml
@@ -1,75 +1,86 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-mediaservices
- 1.1.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-mediaservices
+ 1.1.0-beta.2
+ jar
- Microsoft Azure SDK for MediaServices Management
- This package contains Microsoft Azure SDK for MediaServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. This Swagger was generated by the API Framework. Package tag package-2021-05.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for MediaServices Management
+ This package contains Microsoft Azure SDK for MediaServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. This Swagger was generated by the API Framework. Package tag package-2021-06.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
-
-
-
-
- com.azure
- azure-core
- 1.17.0
-
-
- com.azure
- azure-core-management
- 1.3.0
-
-
-
-
-
- org.jacoco
- jacoco-maven-plugin
- 0.8.5
-
- true
-
-
-
- org.revapi
- revapi-maven-plugin
- 0.11.2
-
- true
-
-
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+
+
+
+
+ com.azure
+ azure-core
+ 1.17.0
+
+
+ com.azure
+ azure-core-management
+ 1.3.0
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.5
+
+ true
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/MediaServicesManager.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/MediaServicesManager.java
index 389f94ec0fd36..3b6c98db1b3a6 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/MediaServicesManager.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/MediaServicesManager.java
@@ -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,6 +16,7 @@
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;
@@ -26,7 +26,6 @@
import com.azure.resourcemanager.mediaservices.implementation.AssetsImpl;
import com.azure.resourcemanager.mediaservices.implementation.AzureMediaServicesBuilder;
import com.azure.resourcemanager.mediaservices.implementation.ContentKeyPoliciesImpl;
-import com.azure.resourcemanager.mediaservices.implementation.JobsImpl;
import com.azure.resourcemanager.mediaservices.implementation.LiveEventsImpl;
import com.azure.resourcemanager.mediaservices.implementation.LiveOutputsImpl;
import com.azure.resourcemanager.mediaservices.implementation.LocationsImpl;
@@ -37,12 +36,10 @@
import com.azure.resourcemanager.mediaservices.implementation.StreamingEndpointsImpl;
import com.azure.resourcemanager.mediaservices.implementation.StreamingLocatorsImpl;
import com.azure.resourcemanager.mediaservices.implementation.StreamingPoliciesImpl;
-import com.azure.resourcemanager.mediaservices.implementation.TransformsImpl;
import com.azure.resourcemanager.mediaservices.models.AccountFilters;
import com.azure.resourcemanager.mediaservices.models.AssetFilters;
import com.azure.resourcemanager.mediaservices.models.Assets;
import com.azure.resourcemanager.mediaservices.models.ContentKeyPolicies;
-import com.azure.resourcemanager.mediaservices.models.Jobs;
import com.azure.resourcemanager.mediaservices.models.LiveEvents;
import com.azure.resourcemanager.mediaservices.models.LiveOutputs;
import com.azure.resourcemanager.mediaservices.models.Locations;
@@ -53,7 +50,6 @@
import com.azure.resourcemanager.mediaservices.models.StreamingEndpoints;
import com.azure.resourcemanager.mediaservices.models.StreamingLocators;
import com.azure.resourcemanager.mediaservices.models.StreamingPolicies;
-import com.azure.resourcemanager.mediaservices.models.Transforms;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -62,8 +58,6 @@
/** Entry point to MediaServicesManager. This Swagger was generated by the API Framework. */
public final class MediaServicesManager {
- private AccountFilters accountFilters;
-
private Operations operations;
private Mediaservices mediaservices;
@@ -74,16 +68,14 @@ public final class MediaServicesManager {
private Locations locations;
+ private AccountFilters accountFilters;
+
private Assets assets;
private AssetFilters assetFilters;
private ContentKeyPolicies contentKeyPolicies;
- private Transforms transforms;
-
- private Jobs jobs;
-
private StreamingPolicies streamingPolicies;
private StreamingLocators streamingLocators;
@@ -137,6 +129,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;
@@ -176,6 +169,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.
*
@@ -218,7 +222,7 @@ public MediaServicesManager authenticate(TokenCredential credential, AzureProfil
.append("-")
.append("com.azure.resourcemanager.mediaservices")
.append("/")
- .append("1.1.0-beta.1");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -232,6 +236,9 @@ public MediaServicesManager 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);
}
@@ -241,10 +248,7 @@ public MediaServicesManager 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));
@@ -257,14 +261,6 @@ public MediaServicesManager authenticate(TokenCredential credential, AzureProfil
}
}
- /** @return Resource collection API of AccountFilters. */
- public AccountFilters accountFilters() {
- if (this.accountFilters == null) {
- this.accountFilters = new AccountFiltersImpl(clientObject.getAccountFilters(), this);
- }
- return accountFilters;
- }
-
/** @return Resource collection API of Operations. */
public Operations operations() {
if (this.operations == null) {
@@ -306,6 +302,14 @@ public Locations locations() {
return locations;
}
+ /** @return Resource collection API of AccountFilters. */
+ public AccountFilters accountFilters() {
+ if (this.accountFilters == null) {
+ this.accountFilters = new AccountFiltersImpl(clientObject.getAccountFilters(), this);
+ }
+ return accountFilters;
+ }
+
/** @return Resource collection API of Assets. */
public Assets assets() {
if (this.assets == null) {
@@ -330,22 +334,6 @@ public ContentKeyPolicies contentKeyPolicies() {
return contentKeyPolicies;
}
- /** @return Resource collection API of Transforms. */
- public Transforms transforms() {
- if (this.transforms == null) {
- this.transforms = new TransformsImpl(clientObject.getTransforms(), this);
- }
- return transforms;
- }
-
- /** @return Resource collection API of Jobs. */
- public Jobs jobs() {
- if (this.jobs == null) {
- this.jobs = new JobsImpl(clientObject.getJobs(), this);
- }
- return jobs;
- }
-
/** @return Resource collection API of StreamingPolicies. */
public StreamingPolicies streamingPolicies() {
if (this.streamingPolicies == null) {
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java
index 0371eb663c9d7..67a36e0cf272f 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/AzureMediaServices.java
@@ -23,6 +23,13 @@ public interface AzureMediaServices {
*/
String getEndpoint();
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
/**
* Gets The HTTP pipeline to send requests through.
*
@@ -37,13 +44,6 @@ public interface AzureMediaServices {
*/
Duration getDefaultPollInterval();
- /**
- * Gets the AccountFiltersClient object to access its operations.
- *
- * @return the AccountFiltersClient object.
- */
- AccountFiltersClient getAccountFilters();
-
/**
* Gets the OperationsClient object to access its operations.
*
@@ -79,6 +79,13 @@ public interface AzureMediaServices {
*/
LocationsClient getLocations();
+ /**
+ * Gets the AccountFiltersClient object to access its operations.
+ *
+ * @return the AccountFiltersClient object.
+ */
+ AccountFiltersClient getAccountFilters();
+
/**
* Gets the AssetsClient object to access its operations.
*
@@ -100,20 +107,6 @@ public interface AzureMediaServices {
*/
ContentKeyPoliciesClient getContentKeyPolicies();
- /**
- * Gets the TransformsClient object to access its operations.
- *
- * @return the TransformsClient object.
- */
- TransformsClient getTransforms();
-
- /**
- * Gets the JobsClient object to access its operations.
- *
- * @return the JobsClient object.
- */
- JobsClient getJobs();
-
/**
* Gets the StreamingPoliciesClient object to access its operations.
*
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/JobsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/JobsClient.java
deleted file mode 100644
index df4d5e3565592..0000000000000
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/JobsClient.java
+++ /dev/null
@@ -1,228 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mediaservices.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.mediaservices.fluent.models.JobInner;
-
-/** An instance of this class provides access to all the operations defined in JobsClient. */
-public interface JobsClient {
- /**
- * Lists all of the Jobs for the Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform 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 Job items.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String resourceGroupName, String accountName, String transformName);
-
- /**
- * Lists all of the Jobs for the Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param filter Restricts the set of items returned.
- * @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 Job items.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(
- String resourceGroupName,
- String accountName,
- String transformName,
- String filter,
- String orderby,
- Context context);
-
- /**
- * Gets a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- JobInner get(String resourceGroupName, String accountName, String transformName, String jobName);
-
- /**
- * Gets a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName, String accountName, String transformName, String jobName, Context context);
-
- /**
- * Creates a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job resource type.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- JobInner create(
- String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters);
-
- /**
- * Creates a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job resource type.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response createWithResponse(
- String resourceGroupName,
- String accountName,
- String transformName,
- String jobName,
- JobInner parameters,
- Context context);
-
- /**
- * Deletes a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 transformName, String jobName);
-
- /**
- * Deletes a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 transformName, String jobName, Context context);
-
- /**
- * Update is only supported for description and priority. Updating Priority will take effect when the Job state is
- * Queued or Scheduled and depending on the timing the priority update may be ignored.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job resource type.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- JobInner update(
- String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters);
-
- /**
- * Update is only supported for description and priority. Updating Priority will take effect when the Job state is
- * Queued or Scheduled and depending on the timing the priority update may be ignored.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job resource type.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(
- String resourceGroupName,
- String accountName,
- String transformName,
- String jobName,
- JobInner parameters,
- Context context);
-
- /**
- * Cancel a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 cancelJob(String resourceGroupName, String accountName, String transformName, String jobName);
-
- /**
- * Cancel a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 cancelJobWithResponse(
- String resourceGroupName, String accountName, String transformName, String jobName, Context context);
-}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationsClient.java
index 052bb9e5c7531..d6b4ee0aff031 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationsClient.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/OperationsClient.java
@@ -6,9 +6,9 @@
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.mediaservices.fluent.models.OperationInner;
+import com.azure.resourcemanager.mediaservices.fluent.models.OperationCollectionInner;
/** An instance of this class provides access to all the operations defined in OperationsClient. */
public interface OperationsClient {
@@ -19,8 +19,8 @@ public interface OperationsClient {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a collection of Operation items.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationCollectionInner list();
/**
* Lists all the Media Services operations.
@@ -31,6 +31,6 @@ public interface OperationsClient {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return a collection of Operation items.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listWithResponse(Context context);
}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/TransformsClient.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/TransformsClient.java
deleted file mode 100644
index 93fa7e220a7f4..0000000000000
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/TransformsClient.java
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mediaservices.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.mediaservices.fluent.models.TransformInner;
-
-/** An instance of this class provides access to all the operations defined in TransformsClient. */
-public interface TransformsClient {
- /**
- * Lists the Transforms in the account.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a collection of Transform items.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String resourceGroupName, String accountName);
-
- /**
- * Lists the Transforms in the account.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param filter Restricts the set of items returned.
- * @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 Transform items.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(
- String resourceGroupName, String accountName, String filter, String orderby, Context context);
-
- /**
- * Gets a Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform 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 Transform.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- TransformInner get(String resourceGroupName, String accountName, String transformName);
-
- /**
- * Gets a Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a Transform.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(
- String resourceGroupName, String accountName, String transformName, Context context);
-
- /**
- * Creates or updates a new Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such
- * as by transcoding or by extracting insights.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- TransformInner createOrUpdate(
- String resourceGroupName, String accountName, String transformName, TransformInner parameters);
-
- /**
- * Creates or updates a new Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such
- * as by transcoding or by extracting insights.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateWithResponse(
- String resourceGroupName, String accountName, String transformName, TransformInner parameters, Context context);
-
- /**
- * Deletes a Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform 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 transformName);
-
- /**
- * Deletes a Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform 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 transformName, Context context);
-
- /**
- * Updates a Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such
- * as by transcoding or by extracting insights.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- TransformInner update(
- String resourceGroupName, String accountName, String transformName, TransformInner parameters);
-
- /**
- * Updates a Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform 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 a Transform encapsulates the rules or instructions for generating desired outputs from input media, such
- * as by transcoding or by extracting insights.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(
- String resourceGroupName, String accountName, String transformName, TransformInner parameters, Context context);
-}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/JobInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/JobInner.java
deleted file mode 100644
index b048a694c7e49..0000000000000
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/JobInner.java
+++ /dev/null
@@ -1,275 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mediaservices.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.mediaservices.models.JobInput;
-import com.azure.resourcemanager.mediaservices.models.JobOutput;
-import com.azure.resourcemanager.mediaservices.models.JobState;
-import com.azure.resourcemanager.mediaservices.models.Priority;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.time.OffsetDateTime;
-import java.util.List;
-import java.util.Map;
-
-/**
- * A Job resource type. The progress and state can be obtained by polling a Job or subscribing to events using
- * EventGrid.
- */
-@JsonFlatten
-@Fluent
-public class JobInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(JobInner.class);
-
- /*
- * The system metadata relating to this resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
- /*
- * The UTC date and time when the customer has created the Job, in
- * 'YYYY-MM-DDThh:mm:ssZ' format.
- */
- @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime created;
-
- /*
- * The current state of the job.
- */
- @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY)
- private JobState state;
-
- /*
- * Optional customer supplied description of the Job.
- */
- @JsonProperty(value = "properties.description")
- private String description;
-
- /*
- * The inputs for the Job.
- */
- @JsonProperty(value = "properties.input")
- private JobInput input;
-
- /*
- * The UTC date and time when the customer has last updated the Job, in
- * 'YYYY-MM-DDThh:mm:ssZ' format.
- */
- @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime lastModified;
-
- /*
- * The outputs for the Job.
- */
- @JsonProperty(value = "properties.outputs")
- private List outputs;
-
- /*
- * Priority with which the job should be processed. Higher priority jobs
- * are processed before lower priority jobs. If not set, the default is
- * normal.
- */
- @JsonProperty(value = "properties.priority")
- private Priority priority;
-
- /*
- * Customer provided key, value pairs that will be returned in Job and
- * JobOutput state events.
- */
- @JsonProperty(value = "properties.correlationData")
- private Map correlationData;
-
- /*
- * The UTC date and time at which this Job began processing.
- */
- @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime startTime;
-
- /*
- * The UTC date and time at which this Job finished processing.
- */
- @JsonProperty(value = "properties.endTime", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime endTime;
-
- /**
- * Get the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
- /**
- * Get the created property: The UTC date and time when the customer has created the Job, in 'YYYY-MM-DDThh:mm:ssZ'
- * format.
- *
- * @return the created value.
- */
- public OffsetDateTime created() {
- return this.created;
- }
-
- /**
- * Get the state property: The current state of the job.
- *
- * @return the state value.
- */
- public JobState state() {
- return this.state;
- }
-
- /**
- * Get the description property: Optional customer supplied description of the Job.
- *
- * @return the description value.
- */
- public String description() {
- return this.description;
- }
-
- /**
- * Set the description property: Optional customer supplied description of the Job.
- *
- * @param description the description value to set.
- * @return the JobInner object itself.
- */
- public JobInner withDescription(String description) {
- this.description = description;
- return this;
- }
-
- /**
- * Get the input property: The inputs for the Job.
- *
- * @return the input value.
- */
- public JobInput input() {
- return this.input;
- }
-
- /**
- * Set the input property: The inputs for the Job.
- *
- * @param input the input value to set.
- * @return the JobInner object itself.
- */
- public JobInner withInput(JobInput input) {
- this.input = input;
- return this;
- }
-
- /**
- * Get the lastModified property: The UTC date and time when the customer has last updated the Job, in
- * 'YYYY-MM-DDThh:mm:ssZ' format.
- *
- * @return the lastModified value.
- */
- public OffsetDateTime lastModified() {
- return this.lastModified;
- }
-
- /**
- * Get the outputs property: The outputs for the Job.
- *
- * @return the outputs value.
- */
- public List outputs() {
- return this.outputs;
- }
-
- /**
- * Set the outputs property: The outputs for the Job.
- *
- * @param outputs the outputs value to set.
- * @return the JobInner object itself.
- */
- public JobInner withOutputs(List outputs) {
- this.outputs = outputs;
- return this;
- }
-
- /**
- * Get the priority property: Priority with which the job should be processed. Higher priority jobs are processed
- * before lower priority jobs. If not set, the default is normal.
- *
- * @return the priority value.
- */
- public Priority priority() {
- return this.priority;
- }
-
- /**
- * Set the priority property: Priority with which the job should be processed. Higher priority jobs are processed
- * before lower priority jobs. If not set, the default is normal.
- *
- * @param priority the priority value to set.
- * @return the JobInner object itself.
- */
- public JobInner withPriority(Priority priority) {
- this.priority = priority;
- return this;
- }
-
- /**
- * Get the correlationData property: Customer provided key, value pairs that will be returned in Job and JobOutput
- * state events.
- *
- * @return the correlationData value.
- */
- public Map correlationData() {
- return this.correlationData;
- }
-
- /**
- * Set the correlationData property: Customer provided key, value pairs that will be returned in Job and JobOutput
- * state events.
- *
- * @param correlationData the correlationData value to set.
- * @return the JobInner object itself.
- */
- public JobInner withCorrelationData(Map correlationData) {
- this.correlationData = correlationData;
- return this;
- }
-
- /**
- * Get the startTime property: The UTC date and time at which this Job began processing.
- *
- * @return the startTime value.
- */
- public OffsetDateTime startTime() {
- return this.startTime;
- }
-
- /**
- * Get the endTime property: The UTC date and time at which this Job finished processing.
- *
- * @return the endTime value.
- */
- public OffsetDateTime endTime() {
- return this.endTime;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (input() != null) {
- input().validate();
- }
- if (outputs() != null) {
- outputs().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputInner.java
index 1b51b55a390c5..6d9be1687e7da 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputInner.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/LiveOutputInner.java
@@ -7,6 +7,7 @@
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.mediaservices.models.Hls;
import com.azure.resourcemanager.mediaservices.models.LiveOutputResourceState;
@@ -21,6 +22,12 @@
public class LiveOutputInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(LiveOutputInner.class);
+ /*
+ * The system metadata relating to this resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
/*
* The description of the live output.
*/
@@ -87,6 +94,15 @@ public class LiveOutputInner extends ProxyResource {
@JsonProperty(value = "properties.resourceState", access = JsonProperty.Access.WRITE_ONLY)
private LiveOutputResourceState resourceState;
+ /**
+ * Get the systemData property: The system metadata relating to this resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Get the description property: The description of the live output.
*
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceInner.java
index 037d2aa8ad677..b5d2c57d143b6 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceInner.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/MediaServiceInner.java
@@ -12,6 +12,7 @@
import com.azure.resourcemanager.mediaservices.models.AccountEncryption;
import com.azure.resourcemanager.mediaservices.models.KeyDelivery;
import com.azure.resourcemanager.mediaservices.models.MediaServiceIdentity;
+import com.azure.resourcemanager.mediaservices.models.PublicNetworkAccess;
import com.azure.resourcemanager.mediaservices.models.StorageAccount;
import com.azure.resourcemanager.mediaservices.models.StorageAuthentication;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -68,6 +69,13 @@ public class MediaServiceInner extends Resource {
@JsonProperty(value = "properties.keyDelivery")
private KeyDelivery keyDelivery;
+ /*
+ * Whether or not public network access is allowed for resources under the
+ * Media Services account.
+ */
+ @JsonProperty(value = "properties.publicNetworkAccess")
+ private PublicNetworkAccess publicNetworkAccess;
+
/**
* Get the identity property: The Managed Identity for the Media Services account.
*
@@ -186,6 +194,28 @@ public MediaServiceInner withKeyDelivery(KeyDelivery keyDelivery) {
return this;
}
+ /**
+ * Get the publicNetworkAccess property: Whether or not public network access is allowed for resources under the
+ * Media Services account.
+ *
+ * @return the publicNetworkAccess value.
+ */
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.publicNetworkAccess;
+ }
+
+ /**
+ * Set the publicNetworkAccess property: Whether or not public network access is allowed for resources under the
+ * Media Services account.
+ *
+ * @param publicNetworkAccess the publicNetworkAccess value to set.
+ * @return the MediaServiceInner object itself.
+ */
+ public MediaServiceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ this.publicNetworkAccess = publicNetworkAccess;
+ return this;
+ }
+
/** {@inheritDoc} */
@Override
public MediaServiceInner withLocation(String location) {
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/OperationCollectionInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/OperationCollectionInner.java
new file mode 100644
index 0000000000000..a601225f9f430
--- /dev/null
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/OperationCollectionInner.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.mediaservices.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.mediaservices.models.Operation;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A collection of Operation items. */
+@Fluent
+public final class OperationCollectionInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationCollectionInner.class);
+
+ /*
+ * A collection of Operation items.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /**
+ * Get the value property: A collection of Operation items.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: A collection of Operation items.
+ *
+ * @param value the value value to set.
+ * @return the OperationCollectionInner object itself.
+ */
+ public OperationCollectionInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/OperationInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/OperationInner.java
deleted file mode 100644
index b600e9eeaef24..0000000000000
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/OperationInner.java
+++ /dev/null
@@ -1,194 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mediaservices.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.mediaservices.models.ActionType;
-import com.azure.resourcemanager.mediaservices.models.OperationDisplay;
-import com.azure.resourcemanager.mediaservices.models.Properties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** An operation. */
-@Fluent
-public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
- /*
- * The operation name.
- */
- @JsonProperty(value = "name", required = true)
- private String name;
-
- /*
- * The operation display name.
- */
- @JsonProperty(value = "display")
- private OperationDisplay display;
-
- /*
- * Origin of the operation.
- */
- @JsonProperty(value = "origin")
- private String origin;
-
- /*
- * Operation properties format.
- */
- @JsonProperty(value = "properties")
- private Properties properties;
-
- /*
- * Whether the operation applies to data-plane.
- */
- @JsonProperty(value = "isDataAction")
- private Boolean isDataAction;
-
- /*
- * Indicates the action type.
- */
- @JsonProperty(value = "actionType")
- private ActionType actionType;
-
- /**
- * Get the name property: The operation name.
- *
- * @return the name value.
- */
- public String name() {
- return this.name;
- }
-
- /**
- * Set the name property: The operation name.
- *
- * @param name the name value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withName(String name) {
- this.name = name;
- return this;
- }
-
- /**
- * Get the display property: The operation display name.
- *
- * @return the display value.
- */
- public OperationDisplay display() {
- return this.display;
- }
-
- /**
- * Set the display property: The operation display name.
- *
- * @param display the display value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withDisplay(OperationDisplay display) {
- this.display = display;
- return this;
- }
-
- /**
- * Get the origin property: Origin of the operation.
- *
- * @return the origin value.
- */
- public String origin() {
- return this.origin;
- }
-
- /**
- * Set the origin property: Origin of the operation.
- *
- * @param origin the origin value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withOrigin(String origin) {
- this.origin = origin;
- return this;
- }
-
- /**
- * Get the properties property: Operation properties format.
- *
- * @return the properties value.
- */
- public Properties properties() {
- return this.properties;
- }
-
- /**
- * Set the properties property: Operation properties format.
- *
- * @param properties the properties value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withProperties(Properties properties) {
- this.properties = properties;
- return this;
- }
-
- /**
- * Get the isDataAction property: Whether the operation applies to data-plane.
- *
- * @return the isDataAction value.
- */
- public Boolean isDataAction() {
- return this.isDataAction;
- }
-
- /**
- * Set the isDataAction property: Whether the operation applies to data-plane.
- *
- * @param isDataAction the isDataAction value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withIsDataAction(Boolean isDataAction) {
- this.isDataAction = isDataAction;
- return this;
- }
-
- /**
- * Get the actionType property: Indicates the action type.
- *
- * @return the actionType value.
- */
- public ActionType actionType() {
- return this.actionType;
- }
-
- /**
- * Set the actionType property: Indicates the action type.
- *
- * @param actionType the actionType value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withActionType(ActionType actionType) {
- this.actionType = actionType;
- 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 OperationInner"));
- }
- if (display() != null) {
- display().validate();
- }
- if (properties() != null) {
- properties().validate();
- }
- }
-}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/TransformInner.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/TransformInner.java
deleted file mode 100644
index bcbc457b633fe..0000000000000
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/fluent/models/TransformInner.java
+++ /dev/null
@@ -1,139 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mediaservices.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.mediaservices.models.TransformOutput;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.time.OffsetDateTime;
-import java.util.List;
-
-/**
- * A Transform encapsulates the rules or instructions for generating desired outputs from input media, such as by
- * transcoding or by extracting insights. After the Transform is created, it can be applied to input media by creating
- * Jobs.
- */
-@JsonFlatten
-@Fluent
-public class TransformInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(TransformInner.class);
-
- /*
- * The system metadata relating to this resource.
- */
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
- private SystemData systemData;
-
- /*
- * The UTC date and time when the Transform was created, in
- * 'YYYY-MM-DDThh:mm:ssZ' format.
- */
- @JsonProperty(value = "properties.created", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime created;
-
- /*
- * An optional verbose description of the Transform.
- */
- @JsonProperty(value = "properties.description")
- private String description;
-
- /*
- * The UTC date and time when the Transform was last updated, in
- * 'YYYY-MM-DDThh:mm:ssZ' format.
- */
- @JsonProperty(value = "properties.lastModified", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime lastModified;
-
- /*
- * An array of one or more TransformOutputs that the Transform should
- * generate.
- */
- @JsonProperty(value = "properties.outputs")
- private List outputs;
-
- /**
- * Get the systemData property: The system metadata relating to this resource.
- *
- * @return the systemData value.
- */
- public SystemData systemData() {
- return this.systemData;
- }
-
- /**
- * Get the created property: The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format.
- *
- * @return the created value.
- */
- public OffsetDateTime created() {
- return this.created;
- }
-
- /**
- * Get the description property: An optional verbose description of the Transform.
- *
- * @return the description value.
- */
- public String description() {
- return this.description;
- }
-
- /**
- * Set the description property: An optional verbose description of the Transform.
- *
- * @param description the description value to set.
- * @return the TransformInner object itself.
- */
- public TransformInner withDescription(String description) {
- this.description = description;
- return this;
- }
-
- /**
- * Get the lastModified property: The UTC date and time when the Transform was last updated, in
- * 'YYYY-MM-DDThh:mm:ssZ' format.
- *
- * @return the lastModified value.
- */
- public OffsetDateTime lastModified() {
- return this.lastModified;
- }
-
- /**
- * Get the outputs property: An array of one or more TransformOutputs that the Transform should generate.
- *
- * @return the outputs value.
- */
- public List outputs() {
- return this.outputs;
- }
-
- /**
- * Set the outputs property: An array of one or more TransformOutputs that the Transform should generate.
- *
- * @param outputs the outputs value to set.
- * @return the TransformInner object itself.
- */
- public TransformInner withOutputs(List outputs) {
- this.outputs = outputs;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (outputs() != null) {
- outputs().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AccountFiltersClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AccountFiltersClientImpl.java
index 48356ab8f7879..76d824182bc56 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AccountFiltersClientImpl.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AccountFiltersClientImpl.java
@@ -186,7 +186,6 @@ private Mono> listSinglePageAsync(String resou
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -197,7 +196,7 @@ private Mono> listSinglePageAsync(String resou
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.>map(
@@ -245,7 +244,6 @@ private Mono> listSinglePageAsync(
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -254,7 +252,7 @@ private Mono> listSinglePageAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context)
.map(
@@ -369,7 +367,6 @@ private Mono> getWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -381,7 +378,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -424,7 +421,6 @@ private Mono> getWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -434,7 +430,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -539,7 +535,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -551,7 +546,7 @@ private Mono> createOrUpdateWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -605,7 +600,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -615,7 +609,7 @@ private Mono> createOrUpdateWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -724,7 +718,6 @@ private Mono> deleteWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -736,7 +729,7 @@ private Mono> deleteWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -779,7 +772,6 @@ private Mono> deleteWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -789,7 +781,7 @@ private Mono> deleteWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -886,7 +878,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -898,7 +889,7 @@ private Mono> updateWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -952,7 +943,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -962,7 +952,7 @@ private Mono> updateWithResponseAsync(
resourceGroupName,
accountName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersClientImpl.java
index 63eb81cd9fc08..dadf89fae0195 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersClientImpl.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetFiltersClientImpl.java
@@ -196,7 +196,6 @@ private Mono> listSinglePageAsync(
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -208,7 +207,7 @@ private Mono> listSinglePageAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.>map(
@@ -260,7 +259,6 @@ private Mono> listSinglePageAsync(
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -270,7 +268,7 @@ private Mono> listSinglePageAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context)
.map(
@@ -396,7 +394,6 @@ private Mono> getWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -409,7 +406,7 @@ private Mono> getWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -456,7 +453,6 @@ private Mono> getWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -467,7 +463,7 @@ private Mono> getWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -584,7 +580,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -597,7 +592,7 @@ private Mono> createOrUpdateWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -656,7 +651,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -667,7 +661,7 @@ private Mono> createOrUpdateWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -794,7 +788,6 @@ private Mono> deleteWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -807,7 +800,7 @@ private Mono> deleteWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -854,7 +847,6 @@ private Mono> deleteWithResponseAsync(
if (filterName == null) {
return Mono.error(new IllegalArgumentException("Parameter filterName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -865,7 +857,7 @@ private Mono> deleteWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -973,7 +965,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -986,7 +977,7 @@ private Mono> updateWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -1045,7 +1036,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1056,7 +1046,7 @@ private Mono> updateWithResponseAsync(
accountName,
assetName,
filterName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsClientImpl.java
index 2a2a50977c9f0..ea7553186a957 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsClientImpl.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AssetsClientImpl.java
@@ -247,7 +247,6 @@ private Mono> listSinglePageAsync(
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -258,7 +257,7 @@ private Mono> listSinglePageAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
filter,
top,
orderby,
@@ -313,7 +312,6 @@ private Mono> listSinglePageAsync(
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -322,7 +320,7 @@ private Mono> listSinglePageAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
filter,
top,
orderby,
@@ -479,7 +477,6 @@ private Mono> getWithResponseAsync(
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -491,7 +488,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -534,7 +531,6 @@ private Mono> getWithResponseAsync(
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -544,7 +540,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -649,7 +645,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -661,7 +656,7 @@ private Mono> createOrUpdateWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -711,7 +706,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -721,7 +715,7 @@ private Mono> createOrUpdateWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -826,7 +820,6 @@ private Mono> deleteWithResponseAsync(
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -838,7 +831,7 @@ private Mono> deleteWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -881,7 +874,6 @@ private Mono> deleteWithResponseAsync(
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -891,7 +883,7 @@ private Mono> deleteWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -988,7 +980,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1000,7 +991,7 @@ private Mono> updateWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -1050,7 +1041,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1060,7 +1050,7 @@ private Mono> updateWithResponseAsync(
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -1171,7 +1161,6 @@ private Mono> listContainerSasWithResponseAsync
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1183,7 +1172,7 @@ private Mono> listContainerSasWithResponseAsync
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -1238,7 +1227,6 @@ private Mono> listContainerSasWithResponseAsync
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1248,7 +1236,7 @@ private Mono> listContainerSasWithResponseAsync
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -1361,7 +1349,6 @@ private Mono> getEncryptionKe
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1373,7 +1360,7 @@ private Mono> getEncryptionKe
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -1416,7 +1403,6 @@ private Mono> getEncryptionKe
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1426,7 +1412,7 @@ private Mono> getEncryptionKe
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -1527,7 +1513,6 @@ private Mono> listStreamingLocators
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1539,7 +1524,7 @@ private Mono> listStreamingLocators
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -1582,7 +1567,6 @@ private Mono> listStreamingLocators
if (assetName == null) {
return Mono.error(new IllegalArgumentException("Parameter assetName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1592,7 +1576,7 @@ private Mono> listStreamingLocators
resourceGroupName,
accountName,
assetName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesImpl.java
index d316d8fd8d832..792d7559cd2fc 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesImpl.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/AzureMediaServicesImpl.java
@@ -26,7 +26,6 @@
import com.azure.resourcemanager.mediaservices.fluent.AssetsClient;
import com.azure.resourcemanager.mediaservices.fluent.AzureMediaServices;
import com.azure.resourcemanager.mediaservices.fluent.ContentKeyPoliciesClient;
-import com.azure.resourcemanager.mediaservices.fluent.JobsClient;
import com.azure.resourcemanager.mediaservices.fluent.LiveEventsClient;
import com.azure.resourcemanager.mediaservices.fluent.LiveOutputsClient;
import com.azure.resourcemanager.mediaservices.fluent.LocationsClient;
@@ -37,7 +36,6 @@
import com.azure.resourcemanager.mediaservices.fluent.StreamingEndpointsClient;
import com.azure.resourcemanager.mediaservices.fluent.StreamingLocatorsClient;
import com.azure.resourcemanager.mediaservices.fluent.StreamingPoliciesClient;
-import com.azure.resourcemanager.mediaservices.fluent.TransformsClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -77,6 +75,18 @@ public String getEndpoint() {
return this.endpoint;
}
+ /** Api Version. */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
/** The HTTP pipeline to send requests through. */
private final HttpPipeline httpPipeline;
@@ -113,18 +123,6 @@ public Duration getDefaultPollInterval() {
return this.defaultPollInterval;
}
- /** The AccountFiltersClient object to access its operations. */
- private final AccountFiltersClient accountFilters;
-
- /**
- * Gets the AccountFiltersClient object to access its operations.
- *
- * @return the AccountFiltersClient object.
- */
- public AccountFiltersClient getAccountFilters() {
- return this.accountFilters;
- }
-
/** The OperationsClient object to access its operations. */
private final OperationsClient operations;
@@ -185,6 +183,18 @@ public LocationsClient getLocations() {
return this.locations;
}
+ /** The AccountFiltersClient object to access its operations. */
+ private final AccountFiltersClient accountFilters;
+
+ /**
+ * Gets the AccountFiltersClient object to access its operations.
+ *
+ * @return the AccountFiltersClient object.
+ */
+ public AccountFiltersClient getAccountFilters() {
+ return this.accountFilters;
+ }
+
/** The AssetsClient object to access its operations. */
private final AssetsClient assets;
@@ -221,30 +231,6 @@ public ContentKeyPoliciesClient getContentKeyPolicies() {
return this.contentKeyPolicies;
}
- /** The TransformsClient object to access its operations. */
- private final TransformsClient transforms;
-
- /**
- * Gets the TransformsClient object to access its operations.
- *
- * @return the TransformsClient object.
- */
- public TransformsClient getTransforms() {
- return this.transforms;
- }
-
- /** The JobsClient object to access its operations. */
- private final JobsClient jobs;
-
- /**
- * Gets the JobsClient object to access its operations.
- *
- * @return the JobsClient object.
- */
- public JobsClient getJobs() {
- return this.jobs;
- }
-
/** The StreamingPoliciesClient object to access its operations. */
private final StreamingPoliciesClient streamingPolicies;
@@ -327,17 +313,16 @@ public StreamingEndpointsClient getStreamingEndpoints() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.accountFilters = new AccountFiltersClientImpl(this);
+ this.apiVersion = "2021-06-01";
this.operations = new OperationsClientImpl(this);
this.mediaservices = new MediaservicesClientImpl(this);
this.privateLinkResources = new PrivateLinkResourcesClientImpl(this);
this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this);
this.locations = new LocationsClientImpl(this);
+ this.accountFilters = new AccountFiltersClientImpl(this);
this.assets = new AssetsClientImpl(this);
this.assetFilters = new AssetFiltersClientImpl(this);
this.contentKeyPolicies = new ContentKeyPoliciesClientImpl(this);
- this.transforms = new TransformsClientImpl(this);
- this.jobs = new JobsClientImpl(this);
this.streamingPolicies = new StreamingPoliciesClientImpl(this);
this.streamingLocators = new StreamingLocatorsClientImpl(this);
this.liveEvents = new LiveEventsClientImpl(this);
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesClientImpl.java
index 748ce1c2737bf..8ce5526600b4d 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesClientImpl.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesClientImpl.java
@@ -153,7 +153,7 @@ Mono> update(
@Post(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices"
+ "/{accountName}/contentKeyPolicies/{contentKeyPolicyName}/getPolicyPropertiesWithSecrets")
- @ExpectedResponses({200, 404})
+ @ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> getPolicyPropertiesWithSecrets(
@HostParam("$host") String endpoint,
@@ -212,7 +212,6 @@ private Mono> listSinglePageAsync(
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -223,7 +222,7 @@ private Mono> listSinglePageAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
filter,
top,
orderby,
@@ -278,7 +277,6 @@ private Mono> listSinglePageAsync(
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -287,7 +285,7 @@ private Mono> listSinglePageAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
filter,
top,
orderby,
@@ -445,7 +443,6 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -457,7 +454,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -501,7 +498,6 @@ private Mono> getWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -511,7 +507,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -618,7 +614,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -630,7 +625,7 @@ private Mono> createOrUpdateWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -685,7 +680,6 @@ private Mono> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -695,7 +689,7 @@ private Mono> createOrUpdateWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -807,7 +801,6 @@ private Mono> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -819,7 +812,7 @@ private Mono> deleteWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -863,7 +856,6 @@ private Mono> deleteWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -873,7 +865,7 @@ private Mono> deleteWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -971,7 +963,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -983,7 +974,7 @@ private Mono> updateWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -1038,7 +1029,6 @@ private Mono> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1048,7 +1038,7 @@ private Mono> updateWithResponseAsync(
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -1159,7 +1149,6 @@ private Mono> getPolicyPropertiesWithS
return Mono
.error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1171,7 +1160,7 @@ private Mono> getPolicyPropertiesWithS
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -1215,7 +1204,6 @@ private Mono> getPolicyPropertiesWithS
return Mono
.error(new IllegalArgumentException("Parameter contentKeyPolicyName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1225,7 +1213,7 @@ private Mono> getPolicyPropertiesWithS
resourceGroupName,
accountName,
contentKeyPolicyName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobImpl.java
deleted file mode 100644
index 379872b2fb623..0000000000000
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobImpl.java
+++ /dev/null
@@ -1,230 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mediaservices.implementation;
-
-import com.azure.core.http.rest.Response;
-import com.azure.core.management.SystemData;
-import com.azure.core.util.Context;
-import com.azure.resourcemanager.mediaservices.fluent.models.JobInner;
-import com.azure.resourcemanager.mediaservices.models.Job;
-import com.azure.resourcemanager.mediaservices.models.JobInput;
-import com.azure.resourcemanager.mediaservices.models.JobOutput;
-import com.azure.resourcemanager.mediaservices.models.JobState;
-import com.azure.resourcemanager.mediaservices.models.Priority;
-import java.time.OffsetDateTime;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-public final class JobImpl implements Job, Job.Definition, Job.Update {
- private JobInner innerObject;
-
- private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager;
-
- public String id() {
- return this.innerModel().id();
- }
-
- public String name() {
- return this.innerModel().name();
- }
-
- public String type() {
- return this.innerModel().type();
- }
-
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
- public OffsetDateTime created() {
- return this.innerModel().created();
- }
-
- public JobState state() {
- return this.innerModel().state();
- }
-
- public String description() {
- return this.innerModel().description();
- }
-
- public JobInput input() {
- return this.innerModel().input();
- }
-
- public OffsetDateTime lastModified() {
- return this.innerModel().lastModified();
- }
-
- public List outputs() {
- List inner = this.innerModel().outputs();
- if (inner != null) {
- return Collections.unmodifiableList(inner);
- } else {
- return Collections.emptyList();
- }
- }
-
- public Priority priority() {
- return this.innerModel().priority();
- }
-
- public Map correlationData() {
- Map inner = this.innerModel().correlationData();
- if (inner != null) {
- return Collections.unmodifiableMap(inner);
- } else {
- return Collections.emptyMap();
- }
- }
-
- public OffsetDateTime startTime() {
- return this.innerModel().startTime();
- }
-
- public OffsetDateTime endTime() {
- return this.innerModel().endTime();
- }
-
- public JobInner innerModel() {
- return this.innerObject;
- }
-
- private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() {
- return this.serviceManager;
- }
-
- private String resourceGroupName;
-
- private String accountName;
-
- private String transformName;
-
- private String jobName;
-
- public JobImpl withExistingTransform(String resourceGroupName, String accountName, String transformName) {
- this.resourceGroupName = resourceGroupName;
- this.accountName = accountName;
- this.transformName = transformName;
- return this;
- }
-
- public Job create() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getJobs()
- .createWithResponse(
- resourceGroupName, accountName, transformName, jobName, this.innerModel(), Context.NONE)
- .getValue();
- return this;
- }
-
- public Job create(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getJobs()
- .createWithResponse(resourceGroupName, accountName, transformName, jobName, this.innerModel(), context)
- .getValue();
- return this;
- }
-
- JobImpl(String name, com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) {
- this.innerObject = new JobInner();
- this.serviceManager = serviceManager;
- this.jobName = name;
- }
-
- public JobImpl update() {
- return this;
- }
-
- public Job apply() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getJobs()
- .updateWithResponse(
- resourceGroupName, accountName, transformName, jobName, this.innerModel(), Context.NONE)
- .getValue();
- return this;
- }
-
- public Job apply(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getJobs()
- .updateWithResponse(resourceGroupName, accountName, transformName, jobName, this.innerModel(), context)
- .getValue();
- return this;
- }
-
- JobImpl(JobInner innerObject, com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) {
- this.innerObject = innerObject;
- this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.accountName = Utils.getValueFromIdByName(innerObject.id(), "mediaServices");
- this.transformName = Utils.getValueFromIdByName(innerObject.id(), "transforms");
- this.jobName = Utils.getValueFromIdByName(innerObject.id(), "jobs");
- }
-
- public Job refresh() {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getJobs()
- .getWithResponse(resourceGroupName, accountName, transformName, jobName, Context.NONE)
- .getValue();
- return this;
- }
-
- public Job refresh(Context context) {
- this.innerObject =
- serviceManager
- .serviceClient()
- .getJobs()
- .getWithResponse(resourceGroupName, accountName, transformName, jobName, context)
- .getValue();
- return this;
- }
-
- public void cancelJob() {
- serviceManager.jobs().cancelJob(resourceGroupName, accountName, transformName, jobName);
- }
-
- public Response cancelJobWithResponse(Context context) {
- return serviceManager
- .jobs()
- .cancelJobWithResponse(resourceGroupName, accountName, transformName, jobName, context);
- }
-
- public JobImpl withDescription(String description) {
- this.innerModel().withDescription(description);
- return this;
- }
-
- public JobImpl withInput(JobInput input) {
- this.innerModel().withInput(input);
- return this;
- }
-
- public JobImpl withOutputs(List outputs) {
- this.innerModel().withOutputs(outputs);
- return this;
- }
-
- public JobImpl withPriority(Priority priority) {
- this.innerModel().withPriority(priority);
- return this;
- }
-
- public JobImpl withCorrelationData(Map correlationData) {
- this.innerModel().withCorrelationData(correlationData);
- return this;
- }
-}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsClientImpl.java
deleted file mode 100644
index 733501187c2f4..0000000000000
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsClientImpl.java
+++ /dev/null
@@ -1,1436 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mediaservices.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.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.mediaservices.fluent.JobsClient;
-import com.azure.resourcemanager.mediaservices.fluent.models.JobInner;
-import com.azure.resourcemanager.mediaservices.models.JobCollection;
-import reactor.core.publisher.Mono;
-
-/** An instance of this class provides access to all the operations defined in JobsClient. */
-public final class JobsClientImpl implements JobsClient {
- private final ClientLogger logger = new ClientLogger(JobsClientImpl.class);
-
- /** The proxy service used to perform REST calls. */
- private final JobsService service;
-
- /** The service client containing this operation class. */
- private final AzureMediaServicesImpl client;
-
- /**
- * Initializes an instance of JobsClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- JobsClientImpl(AzureMediaServicesImpl client) {
- this.service = RestProxy.create(JobsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for AzureMediaServicesJobs to be used by the proxy service to perform
- * REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "AzureMediaServicesJo")
- private interface JobsService {
- @Headers({"Content-Type: application/json"})
- @Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices"
- + "/{accountName}/transforms/{transformName}/jobs")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(
- @HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("accountName") String accountName,
- @PathParam("transformName") String transformName,
- @QueryParam("api-version") String apiVersion,
- @QueryParam("$filter") String filter,
- @QueryParam("$orderby") String orderby,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices"
- + "/{accountName}/transforms/{transformName}/jobs/{jobName}")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> get(
- @HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("accountName") String accountName,
- @PathParam("transformName") String transformName,
- @PathParam("jobName") String jobName,
- @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices"
- + "/{accountName}/transforms/{transformName}/jobs/{jobName}")
- @ExpectedResponses({201})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> create(
- @HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("accountName") String accountName,
- @PathParam("transformName") String transformName,
- @PathParam("jobName") String jobName,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") JobInner parameters,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Delete(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices"
- + "/{accountName}/transforms/{transformName}/jobs/{jobName}")
- @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("transformName") String transformName,
- @PathParam("jobName") String jobName,
- @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Patch(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices"
- + "/{accountName}/transforms/{transformName}/jobs/{jobName}")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> update(
- @HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("accountName") String accountName,
- @PathParam("transformName") String transformName,
- @PathParam("jobName") String jobName,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") JobInner parameters,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices"
- + "/{accountName}/transforms/{transformName}/jobs/{jobName}/cancelJob")
- @ExpectedResponses({200})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> cancelJob(
- @HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("accountName") String accountName,
- @PathParam("transformName") String transformName,
- @PathParam("jobName") String jobName,
- @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);
- }
-
- /**
- * Lists all of the Jobs for the Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param filter Restricts the set of items returned.
- * @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 Job items.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(
- String resourceGroupName, String accountName, String transformName, String filter, String orderby) {
- 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 (transformName == null) {
- return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null."));
- }
- final String apiVersion = "2020-05-01";
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .list(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- accountName,
- transformName,
- apiVersion,
- filter,
- orderby,
- accept,
- context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().odataNextLink(),
- null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Lists all of the Jobs for the Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param filter Restricts the set of items returned.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a collection of Job items.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(
- String resourceGroupName,
- String accountName,
- String transformName,
- String filter,
- String orderby,
- 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 (transformName == null) {
- return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null."));
- }
- final String apiVersion = "2020-05-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- accountName,
- transformName,
- apiVersion,
- filter,
- orderby,
- accept,
- context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().odataNextLink(),
- null));
- }
-
- /**
- * Lists all of the Jobs for the Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param filter Restricts the set of items returned.
- * @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 Job items.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(
- String resourceGroupName, String accountName, String transformName, String filter, String orderby) {
- return new PagedFlux<>(
- () -> listSinglePageAsync(resourceGroupName, accountName, transformName, filter, orderby),
- nextLink -> listNextSinglePageAsync(nextLink));
- }
-
- /**
- * Lists all of the Jobs for the Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform 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 Job items.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceGroupName, String accountName, String transformName) {
- final String filter = null;
- final String orderby = null;
- return new PagedFlux<>(
- () -> listSinglePageAsync(resourceGroupName, accountName, transformName, filter, orderby),
- nextLink -> listNextSinglePageAsync(nextLink));
- }
-
- /**
- * Lists all of the Jobs for the Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param filter Restricts the set of items returned.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a collection of Job items.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(
- String resourceGroupName,
- String accountName,
- String transformName,
- String filter,
- String orderby,
- Context context) {
- return new PagedFlux<>(
- () -> listSinglePageAsync(resourceGroupName, accountName, transformName, filter, orderby, context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Lists all of the Jobs for the Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform 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 Job items.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String resourceGroupName, String accountName, String transformName) {
- final String filter = null;
- final String orderby = null;
- return new PagedIterable<>(listAsync(resourceGroupName, accountName, transformName, filter, orderby));
- }
-
- /**
- * Lists all of the Jobs for the Transform.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param filter Restricts the set of items returned.
- * @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.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a collection of Job items.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(
- String resourceGroupName,
- String accountName,
- String transformName,
- String filter,
- String orderby,
- Context context) {
- return new PagedIterable<>(listAsync(resourceGroupName, accountName, transformName, filter, orderby, context));
- }
-
- /**
- * Gets a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(
- String resourceGroupName, String accountName, String transformName, String jobName) {
- 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 (transformName == null) {
- return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null."));
- }
- if (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- final String apiVersion = "2020-05-01";
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .get(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- accountName,
- transformName,
- jobName,
- apiVersion,
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(
- String resourceGroupName, String accountName, String transformName, String jobName, 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 (transformName == null) {
- return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null."));
- }
- if (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- final String apiVersion = "2020-05-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .get(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- accountName,
- transformName,
- jobName,
- apiVersion,
- accept,
- context);
- }
-
- /**
- * Gets a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getAsync(
- String resourceGroupName, String accountName, String transformName, String jobName) {
- return getWithResponseAsync(resourceGroupName, accountName, transformName, jobName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
- }
-
- /**
- * Gets a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public JobInner get(String resourceGroupName, String accountName, String transformName, String jobName) {
- return getAsync(resourceGroupName, accountName, transformName, jobName).block();
- }
-
- /**
- * Gets a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(
- String resourceGroupName, String accountName, String transformName, String jobName, Context context) {
- return getWithResponseAsync(resourceGroupName, accountName, transformName, jobName, context).block();
- }
-
- /**
- * Creates a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job resource type.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createWithResponseAsync(
- String resourceGroupName, String accountName, String transformName, String jobName, JobInner 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 (transformName == null) {
- return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null."));
- }
- if (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName 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 apiVersion = "2020-05-01";
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .create(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- accountName,
- transformName,
- jobName,
- apiVersion,
- parameters,
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Creates a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job resource type.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> createWithResponseAsync(
- String resourceGroupName,
- String accountName,
- String transformName,
- String jobName,
- JobInner 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 (transformName == null) {
- return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null."));
- }
- if (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName 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 apiVersion = "2020-05-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .create(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- accountName,
- transformName,
- jobName,
- apiVersion,
- parameters,
- accept,
- context);
- }
-
- /**
- * Creates a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job resource type.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createAsync(
- String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters) {
- return createWithResponseAsync(resourceGroupName, accountName, transformName, jobName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
- }
-
- /**
- * Creates a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job resource type.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public JobInner create(
- String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters) {
- return createAsync(resourceGroupName, accountName, transformName, jobName, parameters).block();
- }
-
- /**
- * Creates a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job resource type.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response createWithResponse(
- String resourceGroupName,
- String accountName,
- String transformName,
- String jobName,
- JobInner parameters,
- Context context) {
- return createWithResponseAsync(resourceGroupName, accountName, transformName, jobName, parameters, context)
- .block();
- }
-
- /**
- * Deletes a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 transformName, String jobName) {
- 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 (transformName == null) {
- return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null."));
- }
- if (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- final String apiVersion = "2020-05-01";
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .delete(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- accountName,
- transformName,
- jobName,
- apiVersion,
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Deletes a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 transformName, String jobName, 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 (transformName == null) {
- return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null."));
- }
- if (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- final String apiVersion = "2020-05-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .delete(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- accountName,
- transformName,
- jobName,
- apiVersion,
- accept,
- context);
- }
-
- /**
- * Deletes a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 transformName, String jobName) {
- return deleteWithResponseAsync(resourceGroupName, accountName, transformName, jobName)
- .flatMap((Response res) -> Mono.empty());
- }
-
- /**
- * Deletes a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 transformName, String jobName) {
- deleteAsync(resourceGroupName, accountName, transformName, jobName).block();
- }
-
- /**
- * Deletes a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 transformName, String jobName, Context context) {
- return deleteWithResponseAsync(resourceGroupName, accountName, transformName, jobName, context).block();
- }
-
- /**
- * Update is only supported for description and priority. Updating Priority will take effect when the Job state is
- * Queued or Scheduled and depending on the timing the priority update may be ignored.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job resource type.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
- String resourceGroupName, String accountName, String transformName, String jobName, JobInner 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 (transformName == null) {
- return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null."));
- }
- if (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName 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 apiVersion = "2020-05-01";
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .update(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- accountName,
- transformName,
- jobName,
- apiVersion,
- parameters,
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Update is only supported for description and priority. Updating Priority will take effect when the Job state is
- * Queued or Scheduled and depending on the timing the priority update may be ignored.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job resource type.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
- String resourceGroupName,
- String accountName,
- String transformName,
- String jobName,
- JobInner 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 (transformName == null) {
- return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null."));
- }
- if (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName 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 apiVersion = "2020-05-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .update(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- accountName,
- transformName,
- jobName,
- apiVersion,
- parameters,
- accept,
- context);
- }
-
- /**
- * Update is only supported for description and priority. Updating Priority will take effect when the Job state is
- * Queued or Scheduled and depending on the timing the priority update may be ignored.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job resource type.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(
- String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters) {
- return updateWithResponseAsync(resourceGroupName, accountName, transformName, jobName, parameters)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
- }
-
- /**
- * Update is only supported for description and priority. Updating Priority will take effect when the Job state is
- * Queued or Scheduled and depending on the timing the priority update may be ignored.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job resource type.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public JobInner update(
- String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters) {
- return updateAsync(resourceGroupName, accountName, transformName, jobName, parameters).block();
- }
-
- /**
- * Update is only supported for description and priority. Updating Priority will take effect when the Job state is
- * Queued or Scheduled and depending on the timing the priority update may be ignored.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 a Job resource type.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response updateWithResponse(
- String resourceGroupName,
- String accountName,
- String transformName,
- String jobName,
- JobInner parameters,
- Context context) {
- return updateWithResponseAsync(resourceGroupName, accountName, transformName, jobName, parameters, context)
- .block();
- }
-
- /**
- * Cancel a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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> cancelJobWithResponseAsync(
- String resourceGroupName, String accountName, String transformName, String jobName) {
- 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 (transformName == null) {
- return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null."));
- }
- if (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- final String apiVersion = "2020-05-01";
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .cancelJob(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- accountName,
- transformName,
- jobName,
- apiVersion,
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Cancel a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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> cancelJobWithResponseAsync(
- String resourceGroupName, String accountName, String transformName, String jobName, 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 (transformName == null) {
- return Mono.error(new IllegalArgumentException("Parameter transformName is required and cannot be null."));
- }
- if (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- final String apiVersion = "2020-05-01";
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .cancelJob(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- accountName,
- transformName,
- jobName,
- apiVersion,
- accept,
- context);
- }
-
- /**
- * Cancel a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 cancelJobAsync(
- String resourceGroupName, String accountName, String transformName, String jobName) {
- return cancelJobWithResponseAsync(resourceGroupName, accountName, transformName, jobName)
- .flatMap((Response res) -> Mono.empty());
- }
-
- /**
- * Cancel a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 cancelJob(String resourceGroupName, String accountName, String transformName, String jobName) {
- cancelJobAsync(resourceGroupName, accountName, transformName, jobName).block();
- }
-
- /**
- * Cancel a Job.
- *
- * @param resourceGroupName The name of the resource group within the Azure subscription.
- * @param accountName The Media Services account name.
- * @param transformName The Transform name.
- * @param jobName The 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 cancelJobWithResponse(
- String resourceGroupName, String accountName, String transformName, String jobName, Context context) {
- return cancelJobWithResponseAsync(resourceGroupName, accountName, transformName, jobName, 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 Job 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().odataNextLink(),
- 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 Job 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().odataNextLink(),
- null));
- }
-}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsImpl.java
deleted file mode 100644
index cdf45eebc40be..0000000000000
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsImpl.java
+++ /dev/null
@@ -1,235 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.mediaservices.implementation;
-
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.SimpleResponse;
-import com.azure.core.util.Context;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.mediaservices.fluent.JobsClient;
-import com.azure.resourcemanager.mediaservices.fluent.models.JobInner;
-import com.azure.resourcemanager.mediaservices.models.Job;
-import com.azure.resourcemanager.mediaservices.models.Jobs;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public final class JobsImpl implements Jobs {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(JobsImpl.class);
-
- private final JobsClient innerClient;
-
- private final com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager;
-
- public JobsImpl(
- JobsClient innerClient, com.azure.resourcemanager.mediaservices.MediaServicesManager serviceManager) {
- this.innerClient = innerClient;
- this.serviceManager = serviceManager;
- }
-
- public PagedIterable list(String resourceGroupName, String accountName, String transformName) {
- PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, transformName);
- return Utils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager()));
- }
-
- public PagedIterable list(
- String resourceGroupName,
- String accountName,
- String transformName,
- String filter,
- String orderby,
- Context context) {
- PagedIterable inner =
- this.serviceClient().list(resourceGroupName, accountName, transformName, filter, orderby, context);
- return Utils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager()));
- }
-
- public Job get(String resourceGroupName, String accountName, String transformName, String jobName) {
- JobInner inner = this.serviceClient().get(resourceGroupName, accountName, transformName, jobName);
- if (inner != null) {
- return new JobImpl(inner, this.manager());
- } else {
- return null;
- }
- }
-
- public Response getWithResponse(
- String resourceGroupName, String accountName, String transformName, String jobName, Context context) {
- Response inner =
- this.serviceClient().getWithResponse(resourceGroupName, accountName, transformName, jobName, context);
- if (inner != null) {
- return new SimpleResponse<>(
- inner.getRequest(),
- inner.getStatusCode(),
- inner.getHeaders(),
- new JobImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
- }
-
- public void delete(String resourceGroupName, String accountName, String transformName, String jobName) {
- this.serviceClient().delete(resourceGroupName, accountName, transformName, jobName);
- }
-
- public Response deleteWithResponse(
- String resourceGroupName, String accountName, String transformName, String jobName, Context context) {
- return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, transformName, jobName, context);
- }
-
- public void cancelJob(String resourceGroupName, String accountName, String transformName, String jobName) {
- this.serviceClient().cancelJob(resourceGroupName, accountName, transformName, jobName);
- }
-
- public Response cancelJobWithResponse(
- String resourceGroupName, String accountName, String transformName, String jobName, Context context) {
- return this
- .serviceClient()
- .cancelJobWithResponse(resourceGroupName, accountName, transformName, jobName, context);
- }
-
- public Job getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
- if (resourceGroupName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String
- .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
- }
- String accountName = Utils.getValueFromIdByName(id, "mediaServices");
- if (accountName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id)));
- }
- String transformName = Utils.getValueFromIdByName(id, "transforms");
- if (transformName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'transforms'.", id)));
- }
- String jobName = Utils.getValueFromIdByName(id, "jobs");
- if (jobName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id)));
- }
- return this.getWithResponse(resourceGroupName, accountName, transformName, jobName, Context.NONE).getValue();
- }
-
- public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
- if (resourceGroupName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String
- .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
- }
- String accountName = Utils.getValueFromIdByName(id, "mediaServices");
- if (accountName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id)));
- }
- String transformName = Utils.getValueFromIdByName(id, "transforms");
- if (transformName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'transforms'.", id)));
- }
- String jobName = Utils.getValueFromIdByName(id, "jobs");
- if (jobName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id)));
- }
- return this.getWithResponse(resourceGroupName, accountName, transformName, jobName, context);
- }
-
- public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
- if (resourceGroupName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String
- .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
- }
- String accountName = Utils.getValueFromIdByName(id, "mediaServices");
- if (accountName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id)));
- }
- String transformName = Utils.getValueFromIdByName(id, "transforms");
- if (transformName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'transforms'.", id)));
- }
- String jobName = Utils.getValueFromIdByName(id, "jobs");
- if (jobName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id)));
- }
- this.deleteWithResponse(resourceGroupName, accountName, transformName, jobName, Context.NONE).getValue();
- }
-
- 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, "mediaServices");
- if (accountName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'mediaServices'.", id)));
- }
- String transformName = Utils.getValueFromIdByName(id, "transforms");
- if (transformName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'transforms'.", id)));
- }
- String jobName = Utils.getValueFromIdByName(id, "jobs");
- if (jobName == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id)));
- }
- return this.deleteWithResponse(resourceGroupName, accountName, transformName, jobName, context);
- }
-
- private JobsClient serviceClient() {
- return this.innerClient;
- }
-
- private com.azure.resourcemanager.mediaservices.MediaServicesManager manager() {
- return this.serviceManager;
- }
-
- public JobImpl define(String name) {
- return new JobImpl(name, this.manager());
- }
-}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventsClientImpl.java
index 0b4a2a3ce0444..8182f925da399 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventsClientImpl.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveEventsClientImpl.java
@@ -259,7 +259,6 @@ private Mono> listSinglePageAsync(String resourceG
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -270,7 +269,7 @@ private Mono> listSinglePageAsync(String resourceG
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.>map(
@@ -318,7 +317,6 @@ private Mono> listSinglePageAsync(
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -327,7 +325,7 @@ private Mono> listSinglePageAsync(
this.client.getSubscriptionId(),
resourceGroupName,
accountName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context)
.map(
@@ -442,7 +440,6 @@ private Mono> getWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -454,7 +451,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -497,7 +494,6 @@ private Mono> getWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -507,7 +503,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -617,7 +613,6 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -629,7 +624,7 @@ private Mono>> createWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
autoStart,
parameters,
accept,
@@ -686,7 +681,6 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -696,7 +690,7 @@ private Mono>> createWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
autoStart,
parameters,
accept,
@@ -993,7 +987,6 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1005,7 +998,7 @@ private Mono>> updateWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -1059,7 +1052,6 @@ private Mono>> updateWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1069,7 +1061,7 @@ private Mono>> updateWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -1290,7 +1282,6 @@ private Mono>> deleteWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1302,7 +1293,7 @@ private Mono>> deleteWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -1345,7 +1336,6 @@ private Mono>> deleteWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1355,7 +1345,7 @@ private Mono>> deleteWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -1543,7 +1533,6 @@ private Mono>> allocateWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1555,7 +1544,7 @@ private Mono>> allocateWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -1598,7 +1587,6 @@ private Mono>> allocateWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1608,7 +1596,7 @@ private Mono>> allocateWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -1797,7 +1785,6 @@ private Mono>> startWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1809,7 +1796,7 @@ private Mono>> startWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -1852,7 +1839,6 @@ private Mono>> startWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -1862,7 +1848,7 @@ private Mono>> startWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -2055,7 +2041,6 @@ private Mono>> stopWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -2067,7 +2052,7 @@ private Mono>> stopWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -2121,7 +2106,6 @@ private Mono>> stopWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -2131,7 +2115,7 @@ private Mono>> stopWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -2350,7 +2334,6 @@ private Mono>> resetWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -2362,7 +2345,7 @@ private Mono>> resetWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -2407,7 +2390,6 @@ private Mono>> resetWithResponseAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -2417,7 +2399,7 @@ private Mono>> resetWithResponseAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputImpl.java
index 14263b8bba43f..905ffe617c950 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputImpl.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputImpl.java
@@ -4,6 +4,7 @@
package com.azure.resourcemanager.mediaservices.implementation;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.mediaservices.fluent.models.LiveOutputInner;
import com.azure.resourcemanager.mediaservices.models.Hls;
@@ -35,6 +36,10 @@ public String type() {
return this.innerModel().type();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public String description() {
return this.innerModel().description();
}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputsClientImpl.java
index 55a6960be7a32..59357c3e0e788 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputsClientImpl.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LiveOutputsClientImpl.java
@@ -182,7 +182,6 @@ private Mono> listSinglePageAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -194,7 +193,7 @@ private Mono> listSinglePageAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.>map(
@@ -246,7 +245,6 @@ private Mono> listSinglePageAsync(
if (liveEventName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveEventName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -256,7 +254,7 @@ private Mono> listSinglePageAsync(
resourceGroupName,
accountName,
liveEventName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context)
.map(
@@ -382,7 +380,6 @@ private Mono> getWithResponseAsync(
if (liveOutputName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveOutputName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -395,7 +392,7 @@ private Mono> getWithResponseAsync(
accountName,
liveEventName,
liveOutputName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -442,7 +439,6 @@ private Mono> getWithResponseAsync(
if (liveOutputName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveOutputName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -453,7 +449,7 @@ private Mono> getWithResponseAsync(
accountName,
liveEventName,
liveOutputName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
@@ -571,7 +567,6 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -584,7 +579,7 @@ private Mono>> createWithResponseAsync(
accountName,
liveEventName,
liveOutputName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -643,7 +638,6 @@ private Mono>> createWithResponseAsync(
} else {
parameters.validate();
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -654,7 +648,7 @@ private Mono>> createWithResponseAsync(
accountName,
liveEventName,
liveOutputName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
@@ -909,7 +903,6 @@ private Mono>> deleteWithResponseAsync(
if (liveOutputName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveOutputName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -922,7 +915,7 @@ private Mono>> deleteWithResponseAsync(
accountName,
liveEventName,
liveOutputName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -969,7 +962,6 @@ private Mono>> deleteWithResponseAsync(
if (liveOutputName == null) {
return Mono.error(new IllegalArgumentException("Parameter liveOutputName is required and cannot be null."));
}
- final String apiVersion = "2020-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -980,7 +972,7 @@ private Mono>> deleteWithResponseAsync(
accountName,
liveEventName,
liveOutputName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context);
}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LocationsClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LocationsClientImpl.java
index 6c9f0aafb37e5..3cfa950cbd97f 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LocationsClientImpl.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/LocationsClientImpl.java
@@ -104,7 +104,6 @@ private Mono> checkNameAvailabi
} else {
parameters.validate();
}
- final String apiVersion = "2021-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -114,7 +113,7 @@ private Mono> checkNameAvailabi
this.client.getEndpoint(),
this.client.getSubscriptionId(),
locationName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context))
@@ -155,7 +154,6 @@ private Mono> checkNameAvailabi
} else {
parameters.validate();
}
- final String apiVersion = "2021-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -163,7 +161,7 @@ private Mono> checkNameAvailabi
this.client.getEndpoint(),
this.client.getSubscriptionId(),
locationName,
- apiVersion,
+ this.client.getApiVersion(),
parameters,
accept,
context);
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceImpl.java
index fda25e248d1bf..6ba1c7bbfb0ae 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceImpl.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaServiceImpl.java
@@ -16,6 +16,7 @@
import com.azure.resourcemanager.mediaservices.models.MediaService;
import com.azure.resourcemanager.mediaservices.models.MediaServiceIdentity;
import com.azure.resourcemanager.mediaservices.models.MediaServiceUpdate;
+import com.azure.resourcemanager.mediaservices.models.PublicNetworkAccess;
import com.azure.resourcemanager.mediaservices.models.StorageAccount;
import com.azure.resourcemanager.mediaservices.models.StorageAuthentication;
import com.azure.resourcemanager.mediaservices.models.SyncStorageKeysInput;
@@ -87,6 +88,10 @@ public KeyDelivery keyDelivery() {
return this.innerModel().keyDelivery();
}
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.innerModel().publicNetworkAccess();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -283,6 +288,16 @@ public MediaServiceImpl withKeyDelivery(KeyDelivery keyDelivery) {
}
}
+ public MediaServiceImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ if (isInCreateMode()) {
+ this.innerModel().withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ } else {
+ this.updateParameters.withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ }
+ }
+
private boolean isInCreateMode() {
return this.innerModel().id() == null;
}
diff --git a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesClientImpl.java b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesClientImpl.java
index 0b93f8b1d7a8e..aa82a318be8b9 100644
--- a/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesClientImpl.java
+++ b/sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/MediaservicesClientImpl.java
@@ -235,7 +235,6 @@ private Mono> listByResourceGroupSinglePageAsyn
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- final String apiVersion = "2021-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -245,7 +244,7 @@ private Mono> listByResourceGroupSinglePageAsyn
this.client.getEndpoint(),
this.client.getSubscriptionId(),
resourceGroupName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context))
.>map(
@@ -289,7 +288,6 @@ private Mono> listByResourceGroupSinglePageAsyn
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- final String apiVersion = "2021-05-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -297,7 +295,7 @@ private Mono> listByResourceGroupSinglePageAsyn
this.client.getEndpoint(),
this.client.getSubscriptionId(),
resourceGroupName,
- apiVersion,
+ this.client.getApiVersion(),
accept,
context)
.map(
@@ -404,7 +402,6 @@ private Mono> getByResourceGroupWithResponseAsync(
if (accountName == null) {
return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
}
- final String apiVersion = "2021-05-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -415,7 +412,7 @@ private Mono