diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md index 1fa818252c6e..05f15769dfa3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2021-07-01) +- Azure Resource Manager RecoveryServicesBackup client library for Java. This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2021-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-05-24) diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md index 5c2914d45b0b..fd9a4db9ee05 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/README.md @@ -2,7 +2,7 @@ Azure Resource Manager RecoveryServicesBackup client library for Java. -This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2021-01. 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 RecoveryServicesBackup Management SDK. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2021-04. 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-recoveryservicesbackup - 1.0.0-beta.1 + 1.0.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/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml index 9caad6eb4d40..a571f23e3d8b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/pom.xml @@ -1,67 +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-recoveryservicesbackup - 1.0.0-beta.2 - jar + com.azure.resourcemanager + azure-resourcemanager-recoveryservicesbackup + 1.0.0-beta.2 + jar - Microsoft Azure SDK for RecoveryServicesBackup Management - This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2021-01. - https://github.com/Azure/azure-sdk-for-java + Microsoft Azure SDK for RecoveryServicesBackup Management + This package contains Microsoft Azure SDK for RecoveryServicesBackup Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure RecoveryServices Backup service. Package tag package-2021-04. + 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 - - - - + + 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/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManager.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManager.java index a0f76d117657..5162c9c30c18 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManager.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/RecoveryServicesBackupManager.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; @@ -53,8 +53,8 @@ import com.azure.resourcemanager.recoveryservicesbackup.implementation.JobDetailsImpl; import com.azure.resourcemanager.recoveryservicesbackup.implementation.JobOperationResultsImpl; import com.azure.resourcemanager.recoveryservicesbackup.implementation.JobsImpl; +import com.azure.resourcemanager.recoveryservicesbackup.implementation.OperationOperationsImpl; import com.azure.resourcemanager.recoveryservicesbackup.implementation.OperationsImpl; -import com.azure.resourcemanager.recoveryservicesbackup.implementation.OperationsOperationsImpl; import com.azure.resourcemanager.recoveryservicesbackup.implementation.PrivateEndpointConnectionsImpl; import com.azure.resourcemanager.recoveryservicesbackup.implementation.PrivateEndpointsImpl; import com.azure.resourcemanager.recoveryservicesbackup.implementation.ProtectableContainersImpl; @@ -107,8 +107,8 @@ import com.azure.resourcemanager.recoveryservicesbackup.models.JobDetails; import com.azure.resourcemanager.recoveryservicesbackup.models.JobOperationResults; import com.azure.resourcemanager.recoveryservicesbackup.models.Jobs; +import com.azure.resourcemanager.recoveryservicesbackup.models.OperationOperations; import com.azure.resourcemanager.recoveryservicesbackup.models.Operations; -import com.azure.resourcemanager.recoveryservicesbackup.models.OperationsOperations; import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpointConnections; import com.azure.resourcemanager.recoveryservicesbackup.models.PrivateEndpoints; import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectableContainers; @@ -136,6 +136,18 @@ /** Entry point to RecoveryServicesBackupManager. Open API 2.0 Specs for Azure RecoveryServices Backup service. */ public final class RecoveryServicesBackupManager { + private ProtectionIntents protectionIntents; + + private BackupStatus backupStatus; + + private FeatureSupports featureSupports; + + private BackupProtectionIntents backupProtectionIntents; + + private BackupUsageSummaries backupUsageSummaries; + + private Operations operations; + private BackupResourceVaultConfigs backupResourceVaultConfigs; private BackupResourceEncryptionConfigs backupResourceEncryptionConfigs; @@ -176,7 +188,7 @@ public final class RecoveryServicesBackupManager { private BackupProtectedItems backupProtectedItems; - private Operations operations; + private OperationOperations operationOperations; private BackupEngines backupEngines; @@ -230,18 +242,6 @@ public final class RecoveryServicesBackupManager { private BackupProtectedItemsCrrs backupProtectedItemsCrrs; - private ProtectionIntents protectionIntents; - - private BackupStatus backupStatus; - - private FeatureSupports featureSupports; - - private BackupProtectionIntents backupProtectionIntents; - - private BackupUsageSummaries backupUsageSummaries; - - private OperationsOperations operationsOperations; - private final RecoveryServicesBackupClient clientObject; private RecoveryServicesBackupManager( @@ -287,6 +287,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; @@ -326,6 +327,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. * @@ -382,6 +394,9 @@ public RecoveryServicesBackupManager authenticate(TokenCredential credential, Az userAgentBuilder.append(" (auto-generated)"); } + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } if (retryPolicy == null) { retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); } @@ -391,10 +406,7 @@ public RecoveryServicesBackupManager authenticate(TokenCredential credential, Az 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)); @@ -407,6 +419,55 @@ public RecoveryServicesBackupManager authenticate(TokenCredential credential, Az } } + /** @return Resource collection API of ProtectionIntents. */ + public ProtectionIntents protectionIntents() { + if (this.protectionIntents == null) { + this.protectionIntents = new ProtectionIntentsImpl(clientObject.getProtectionIntents(), this); + } + return protectionIntents; + } + + /** @return Resource collection API of BackupStatus. */ + public BackupStatus backupStatus() { + if (this.backupStatus == null) { + this.backupStatus = new BackupStatusImpl(clientObject.getBackupStatus(), this); + } + return backupStatus; + } + + /** @return Resource collection API of FeatureSupports. */ + public FeatureSupports featureSupports() { + if (this.featureSupports == null) { + this.featureSupports = new FeatureSupportsImpl(clientObject.getFeatureSupports(), this); + } + return featureSupports; + } + + /** @return Resource collection API of BackupProtectionIntents. */ + public BackupProtectionIntents backupProtectionIntents() { + if (this.backupProtectionIntents == null) { + this.backupProtectionIntents = + new BackupProtectionIntentsImpl(clientObject.getBackupProtectionIntents(), this); + } + return backupProtectionIntents; + } + + /** @return Resource collection API of BackupUsageSummaries. */ + public BackupUsageSummaries backupUsageSummaries() { + if (this.backupUsageSummaries == null) { + this.backupUsageSummaries = new BackupUsageSummariesImpl(clientObject.getBackupUsageSummaries(), this); + } + return backupUsageSummaries; + } + + /** @return Resource collection API of Operations. */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + /** @return Resource collection API of BackupResourceVaultConfigs. */ public BackupResourceVaultConfigs backupResourceVaultConfigs() { if (this.backupResourceVaultConfigs == null) { @@ -574,12 +635,12 @@ public BackupProtectedItems backupProtectedItems() { return backupProtectedItems; } - /** @return Resource collection API of Operations. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); + /** @return Resource collection API of OperationOperations. */ + public OperationOperations operationOperations() { + if (this.operationOperations == null) { + this.operationOperations = new OperationOperationsImpl(clientObject.getOperationOperations(), this); } - return operations; + return operationOperations; } /** @return Resource collection API of BackupEngines. */ @@ -806,55 +867,6 @@ public BackupProtectedItemsCrrs backupProtectedItemsCrrs() { return backupProtectedItemsCrrs; } - /** @return Resource collection API of ProtectionIntents. */ - public ProtectionIntents protectionIntents() { - if (this.protectionIntents == null) { - this.protectionIntents = new ProtectionIntentsImpl(clientObject.getProtectionIntents(), this); - } - return protectionIntents; - } - - /** @return Resource collection API of BackupStatus. */ - public BackupStatus backupStatus() { - if (this.backupStatus == null) { - this.backupStatus = new BackupStatusImpl(clientObject.getBackupStatus(), this); - } - return backupStatus; - } - - /** @return Resource collection API of FeatureSupports. */ - public FeatureSupports featureSupports() { - if (this.featureSupports == null) { - this.featureSupports = new FeatureSupportsImpl(clientObject.getFeatureSupports(), this); - } - return featureSupports; - } - - /** @return Resource collection API of BackupProtectionIntents. */ - public BackupProtectionIntents backupProtectionIntents() { - if (this.backupProtectionIntents == null) { - this.backupProtectionIntents = - new BackupProtectionIntentsImpl(clientObject.getBackupProtectionIntents(), this); - } - return backupProtectionIntents; - } - - /** @return Resource collection API of BackupUsageSummaries. */ - public BackupUsageSummaries backupUsageSummaries() { - if (this.backupUsageSummaries == null) { - this.backupUsageSummaries = new BackupUsageSummariesImpl(clientObject.getBackupUsageSummaries(), this); - } - return backupUsageSummaries; - } - - /** @return Resource collection API of OperationsOperations. */ - public OperationsOperations operationsOperations() { - if (this.operationsOperations == null) { - this.operationsOperations = new OperationsOperationsImpl(clientObject.getOperationsOperations(), this); - } - return operationsOperations; - } - /** * @return Wrapped service client RecoveryServicesBackupClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceEncryptionConfigsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceEncryptionConfigsClient.java index f3a81d0a093f..1532b546fcbc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceEncryptionConfigsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/BackupResourceEncryptionConfigsClient.java @@ -8,7 +8,8 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigExtendedResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource; /** An instance of this class provides access to all the operations defined in BackupResourceEncryptionConfigsClient. */ public interface BackupResourceEncryptionConfigsClient { @@ -23,7 +24,7 @@ public interface BackupResourceEncryptionConfigsClient { * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BackupResourceEncryptionConfigResourceInner get(String vaultName, String resourceGroupName); + BackupResourceEncryptionConfigExtendedResourceInner get(String vaultName, String resourceGroupName); /** * Fetches Vault Encryption config. @@ -37,7 +38,7 @@ public interface BackupResourceEncryptionConfigsClient { * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + Response getWithResponse( String vaultName, String resourceGroupName, Context context); /** @@ -51,7 +52,7 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update(String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResourceInner parameters); + void update(String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters); /** * Updates Vault encryption config. @@ -67,8 +68,5 @@ Response getWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( - String vaultName, - String resourceGroupName, - BackupResourceEncryptionConfigResourceInner parameters, - Context context); + String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters, Context context); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationOperationsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationOperationsClient.java new file mode 100644 index 000000000000..3464c8afe218 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationOperationsClient.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ValidateOperationsResponseInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest; + +/** An instance of this class provides access to all the operations defined in OperationOperationsClient. */ +public interface OperationOperationsClient { + /** + * Validate operation for specified backed up item. This is a synchronous operation. + * + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param parameters resource validate operation request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + ValidateOperationsResponseInner validate( + String vaultName, String resourceGroupName, ValidateOperationRequest parameters); + + /** + * Validate operation for specified backed up item. This is a synchronous operation. + * + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param parameters resource validate operation request. + * @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 validateWithResponse( + String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context); +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsClient.java index 81d4d9b71a78..d1a8170127b7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsClient.java @@ -6,41 +6,31 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ValidateOperationsResponseInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest; +import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner; /** An instance of this class provides access to all the operations defined in OperationsClient. */ public interface OperationsClient { /** - * Validate operation for specified backed up item. This is a synchronous operation. + * Returns the list of available operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters resource validate operation request. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return operations List response which contains list of available APIs. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ValidateOperationsResponseInner validate( - String vaultName, String resourceGroupName, ValidateOperationRequest parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Validate operation for specified backed up item. This is a synchronous operation. + * Returns the list of available operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters resource validate operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return operations List response which contains list of available APIs. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response validateWithResponse( - String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsOperationsClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsOperationsClient.java deleted file mode 100644 index 69497872e4fa..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/OperationsOperationsClient.java +++ /dev/null @@ -1,36 +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.recoveryservicesbackup.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner; - -/** An instance of this class provides access to all the operations defined in OperationsOperationsClient. */ -public interface OperationsOperationsClient { - /** - * Returns the list of available operations. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operations List response which contains list of available APIs. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Returns the list of available operations. - * - * @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 operations List response which contains list of available APIs. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryServicesBackupClient.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryServicesBackupClient.java index a07639990acd..574030e71a37 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryServicesBackupClient.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/RecoveryServicesBackupClient.java @@ -37,6 +37,48 @@ public interface RecoveryServicesBackupClient { */ Duration getDefaultPollInterval(); + /** + * Gets the ProtectionIntentsClient object to access its operations. + * + * @return the ProtectionIntentsClient object. + */ + ProtectionIntentsClient getProtectionIntents(); + + /** + * Gets the BackupStatusClient object to access its operations. + * + * @return the BackupStatusClient object. + */ + BackupStatusClient getBackupStatus(); + + /** + * Gets the FeatureSupportsClient object to access its operations. + * + * @return the FeatureSupportsClient object. + */ + FeatureSupportsClient getFeatureSupports(); + + /** + * Gets the BackupProtectionIntentsClient object to access its operations. + * + * @return the BackupProtectionIntentsClient object. + */ + BackupProtectionIntentsClient getBackupProtectionIntents(); + + /** + * Gets the BackupUsageSummariesClient object to access its operations. + * + * @return the BackupUsageSummariesClient object. + */ + BackupUsageSummariesClient getBackupUsageSummaries(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + /** * Gets the BackupResourceVaultConfigsClient object to access its operations. * @@ -178,11 +220,11 @@ public interface RecoveryServicesBackupClient { BackupProtectedItemsClient getBackupProtectedItems(); /** - * Gets the OperationsClient object to access its operations. + * Gets the OperationOperationsClient object to access its operations. * - * @return the OperationsClient object. + * @return the OperationOperationsClient object. */ - OperationsClient getOperations(); + OperationOperationsClient getOperationOperations(); /** * Gets the BackupEnginesClient object to access its operations. @@ -365,46 +407,4 @@ public interface RecoveryServicesBackupClient { * @return the BackupProtectedItemsCrrsClient object. */ BackupProtectedItemsCrrsClient getBackupProtectedItemsCrrs(); - - /** - * Gets the ProtectionIntentsClient object to access its operations. - * - * @return the ProtectionIntentsClient object. - */ - ProtectionIntentsClient getProtectionIntents(); - - /** - * Gets the BackupStatusClient object to access its operations. - * - * @return the BackupStatusClient object. - */ - BackupStatusClient getBackupStatus(); - - /** - * Gets the FeatureSupportsClient object to access its operations. - * - * @return the FeatureSupportsClient object. - */ - FeatureSupportsClient getFeatureSupports(); - - /** - * Gets the BackupProtectionIntentsClient object to access its operations. - * - * @return the BackupProtectionIntentsClient object. - */ - BackupProtectionIntentsClient getBackupProtectionIntents(); - - /** - * Gets the BackupUsageSummariesClient object to access its operations. - * - * @return the BackupUsageSummariesClient object. - */ - BackupUsageSummariesClient getBackupUsageSummaries(); - - /** - * Gets the OperationsOperationsClient object to access its operations. - * - * @return the OperationsOperationsClient object. - */ - OperationsOperationsClient getOperationsOperations(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigResourceInner.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigExtendedResourceInner.java similarity index 61% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigResourceInner.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigExtendedResourceInner.java index 13013f6d8068..248ad0d4a921 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigResourceInner.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/fluent/models/BackupResourceEncryptionConfigExtendedResourceInner.java @@ -7,21 +7,22 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfig; +import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtended; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The BackupResourceEncryptionConfigResource model. */ +/** The BackupResourceEncryptionConfigExtendedResource model. */ @Fluent -public final class BackupResourceEncryptionConfigResourceInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupResourceEncryptionConfigResourceInner.class); +public final class BackupResourceEncryptionConfigExtendedResourceInner extends Resource { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(BackupResourceEncryptionConfigExtendedResourceInner.class); /* - * BackupResourceEncryptionConfigResource properties + * BackupResourceEncryptionConfigExtendedResource properties */ @JsonProperty(value = "properties") - private BackupResourceEncryptionConfig properties; + private BackupResourceEncryptionConfigExtended properties; /* * Optional ETag. @@ -30,21 +31,22 @@ public final class BackupResourceEncryptionConfigResourceInner extends Resource private String etag; /** - * Get the properties property: BackupResourceEncryptionConfigResource properties. + * Get the properties property: BackupResourceEncryptionConfigExtendedResource properties. * * @return the properties value. */ - public BackupResourceEncryptionConfig properties() { + public BackupResourceEncryptionConfigExtended properties() { return this.properties; } /** - * Set the properties property: BackupResourceEncryptionConfigResource properties. + * Set the properties property: BackupResourceEncryptionConfigExtendedResource properties. * * @param properties the properties value to set. - * @return the BackupResourceEncryptionConfigResourceInner object itself. + * @return the BackupResourceEncryptionConfigExtendedResourceInner object itself. */ - public BackupResourceEncryptionConfigResourceInner withProperties(BackupResourceEncryptionConfig properties) { + public BackupResourceEncryptionConfigExtendedResourceInner withProperties( + BackupResourceEncryptionConfigExtended properties) { this.properties = properties; return this; } @@ -62,23 +64,23 @@ public String etag() { * Set the etag property: Optional ETag. * * @param etag the etag value to set. - * @return the BackupResourceEncryptionConfigResourceInner object itself. + * @return the BackupResourceEncryptionConfigExtendedResourceInner object itself. */ - public BackupResourceEncryptionConfigResourceInner withEtag(String etag) { + public BackupResourceEncryptionConfigExtendedResourceInner withEtag(String etag) { this.etag = etag; return this; } /** {@inheritDoc} */ @Override - public BackupResourceEncryptionConfigResourceInner withLocation(String location) { + public BackupResourceEncryptionConfigExtendedResourceInner withLocation(String location) { super.withLocation(location); return this; } /** {@inheritDoc} */ @Override - public BackupResourceEncryptionConfigResourceInner withTags(Map tags) { + public BackupResourceEncryptionConfigExtendedResourceInner withTags(Map tags) { super.withTags(tags); return this; } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesClientImpl.java index 10eca34be43f..14dbdb50d182 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupEnginesClientImpl.java @@ -139,7 +139,7 @@ private Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -202,7 +202,7 @@ private Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -362,7 +362,7 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter backupEngineName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -427,7 +427,7 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter backupEngineName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsClientImpl.java index ebee30211e67..6caceeefece7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupJobsClientImpl.java @@ -121,7 +121,7 @@ private Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -184,7 +184,7 @@ private Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsClientImpl.java index a5a06443ab6a..0d7f92e8e0b7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationResultsClientImpl.java @@ -109,7 +109,7 @@ private Mono> getWithResponseAsync(String vaultName, String resou if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -167,7 +167,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesClientImpl.java index 5b5c0f307307..63b90ee39a2c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupOperationStatusesClientImpl.java @@ -110,7 +110,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -167,7 +167,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesClientImpl.java index c119cd2f9f2b..0291562e70dc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupPoliciesClientImpl.java @@ -120,7 +120,7 @@ private Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -182,7 +182,7 @@ private Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsClientImpl.java index 88562b612fcf..51a0c79ac1c3 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectableItemsClientImpl.java @@ -123,7 +123,7 @@ private Mono> listSinglePage new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -187,7 +187,7 @@ private Mono> listSinglePage new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsClientImpl.java index 96df48994127..5fffe1c8c0e0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectedItemsClientImpl.java @@ -122,7 +122,7 @@ private Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -185,7 +185,7 @@ private Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersClientImpl.java index 823d4ecbbbd6..04ea0a263de8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionContainersClientImpl.java @@ -121,7 +121,7 @@ private Mono> listSinglePageAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -182,7 +182,7 @@ private Mono> listSinglePageAsyn new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsClientImpl.java index fbbf246f8773..771340f0a73a 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupProtectionIntentsClientImpl.java @@ -122,7 +122,7 @@ private Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -185,7 +185,7 @@ private Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigResourceImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigExtendedResourceImpl.java similarity index 72% rename from sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigResourceImpl.java rename to sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigExtendedResourceImpl.java index a9348ea5cdc1..c84fdfdd56c5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigResourceImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigExtendedResourceImpl.java @@ -4,19 +4,20 @@ package com.azure.resourcemanager.recoveryservicesbackup.implementation; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigResourceInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfig; -import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource; +import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigExtendedResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtended; +import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtendedResource; import java.util.Collections; import java.util.Map; -public final class BackupResourceEncryptionConfigResourceImpl implements BackupResourceEncryptionConfigResource { - private BackupResourceEncryptionConfigResourceInner innerObject; +public final class BackupResourceEncryptionConfigExtendedResourceImpl + implements BackupResourceEncryptionConfigExtendedResource { + private BackupResourceEncryptionConfigExtendedResourceInner innerObject; private final com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager; - BackupResourceEncryptionConfigResourceImpl( - BackupResourceEncryptionConfigResourceInner innerObject, + BackupResourceEncryptionConfigExtendedResourceImpl( + BackupResourceEncryptionConfigExtendedResourceInner innerObject, com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -47,7 +48,7 @@ public Map tags() { } } - public BackupResourceEncryptionConfig properties() { + public BackupResourceEncryptionConfigExtended properties() { return this.innerModel().properties(); } @@ -55,7 +56,7 @@ public String etag() { return this.innerModel().etag(); } - public BackupResourceEncryptionConfigResourceInner innerModel() { + public BackupResourceEncryptionConfigExtendedResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsClientImpl.java index 0bc8650e23f2..a90f7a404502 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsClientImpl.java @@ -25,7 +25,8 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceEncryptionConfigsClient; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigExtendedResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in BackupResourceEncryptionConfigsClient. */ @@ -66,7 +67,7 @@ private interface BackupResourceEncryptionConfigsService { + "/vaults/{vaultName}/backupEncryptionConfigs/backupResourceEncryptionConfig") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono> get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("vaultName") String vaultName, @@ -87,7 +88,7 @@ Mono> update( @PathParam("vaultName") String vaultName, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") BackupResourceEncryptionConfigResourceInner parameters, + @BodyParam("application/json") BackupResourceEncryptionConfigResource parameters, @HeaderParam("Accept") String accept, Context context); } @@ -103,7 +104,7 @@ Mono> update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String vaultName, String resourceGroupName) { if (this.client.getEndpoint() == null) { return Mono @@ -124,7 +125,7 @@ private Mono> getWithRespo new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -153,7 +154,7 @@ private Mono> getWithRespo * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( + private Mono> getWithResponseAsync( String vaultName, String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -174,7 +175,7 @@ private Mono> getWithRespo new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -199,10 +200,11 @@ private Mono> getWithRespo * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String vaultName, String resourceGroupName) { + private Mono getAsync( + String vaultName, String resourceGroupName) { return getWithResponseAsync(vaultName, resourceGroupName) .flatMap( - (Response res) -> { + (Response res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { @@ -222,7 +224,7 @@ private Mono getAsync(String vaultN * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BackupResourceEncryptionConfigResourceInner get(String vaultName, String resourceGroupName) { + public BackupResourceEncryptionConfigExtendedResourceInner get(String vaultName, String resourceGroupName) { return getAsync(vaultName, resourceGroupName).block(); } @@ -238,7 +240,7 @@ public BackupResourceEncryptionConfigResourceInner get(String vaultName, String * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public Response getWithResponse( String vaultName, String resourceGroupName, Context context) { return getWithResponseAsync(vaultName, resourceGroupName, context).block(); } @@ -256,7 +258,7 @@ public Response getWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( - String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResourceInner parameters) { + String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -281,7 +283,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -315,7 +317,7 @@ private Mono> updateWithResponseAsync( private Mono> updateWithResponseAsync( String vaultName, String resourceGroupName, - BackupResourceEncryptionConfigResourceInner parameters, + BackupResourceEncryptionConfigResource parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -341,7 +343,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -369,7 +371,7 @@ private Mono> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( - String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResourceInner parameters) { + String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters) { return updateWithResponseAsync(vaultName, resourceGroupName, parameters) .flatMap((Response res) -> Mono.empty()); } @@ -385,8 +387,7 @@ private Mono updateAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update( - String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResourceInner parameters) { + public void update(String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters) { updateAsync(vaultName, resourceGroupName, parameters).block(); } @@ -406,7 +407,7 @@ public void update( public Response updateWithResponse( String vaultName, String resourceGroupName, - BackupResourceEncryptionConfigResourceInner parameters, + BackupResourceEncryptionConfigResource parameters, Context context) { return updateWithResponseAsync(vaultName, resourceGroupName, parameters, context).block(); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsImpl.java index 004b68190cef..9bee7c6c8da6 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceEncryptionConfigsImpl.java @@ -9,7 +9,8 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.recoveryservicesbackup.fluent.BackupResourceEncryptionConfigsClient; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigExtendedResourceInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigExtendedResource; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigResource; import com.azure.resourcemanager.recoveryservicesbackup.models.BackupResourceEncryptionConfigs; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -28,39 +29,39 @@ public BackupResourceEncryptionConfigsImpl( this.serviceManager = serviceManager; } - public BackupResourceEncryptionConfigResource get(String vaultName, String resourceGroupName) { - BackupResourceEncryptionConfigResourceInner inner = this.serviceClient().get(vaultName, resourceGroupName); + public BackupResourceEncryptionConfigExtendedResource get(String vaultName, String resourceGroupName) { + BackupResourceEncryptionConfigExtendedResourceInner inner = + this.serviceClient().get(vaultName, resourceGroupName); if (inner != null) { - return new BackupResourceEncryptionConfigResourceImpl(inner, this.manager()); + return new BackupResourceEncryptionConfigExtendedResourceImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( + public Response getWithResponse( String vaultName, String resourceGroupName, Context context) { - Response inner = + Response inner = this.serviceClient().getWithResponse(vaultName, resourceGroupName, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BackupResourceEncryptionConfigResourceImpl(inner.getValue(), this.manager())); + new BackupResourceEncryptionConfigExtendedResourceImpl(inner.getValue(), this.manager())); } else { return null; } } - public void update( - String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResourceInner parameters) { + public void update(String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters) { this.serviceClient().update(vaultName, resourceGroupName, parameters); } public Response updateWithResponse( String vaultName, String resourceGroupName, - BackupResourceEncryptionConfigResourceInner parameters, + BackupResourceEncryptionConfigResource parameters, Context context) { return this.serviceClient().updateWithResponse(vaultName, resourceGroupName, parameters, context); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsClientImpl.java index 31c00591ce30..5076985c08be 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupResourceVaultConfigsClientImpl.java @@ -139,7 +139,7 @@ private Mono> getWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -189,7 +189,7 @@ private Mono> getWithResponseAs new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -296,7 +296,7 @@ private Mono> updateWithRespons } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -356,7 +356,7 @@ private Mono> updateWithRespons } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -472,7 +472,7 @@ private Mono> putWithResponseAs } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -532,7 +532,7 @@ private Mono> putWithResponseAs } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusClientImpl.java index 84436e2cc1f4..1bb105582385 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupStatusClientImpl.java @@ -104,7 +104,7 @@ private Mono> getWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -155,7 +155,7 @@ private Mono> getWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesClientImpl.java index 47c6ec55d22e..8c80c02ec2b5 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupUsageSummariesClientImpl.java @@ -112,7 +112,7 @@ private Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -170,7 +170,7 @@ private Mono> listSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsClientImpl.java index f1db06b8ccff..d728a7b3ee48 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupWorkloadItemsClientImpl.java @@ -137,7 +137,7 @@ private Mono> listSinglePageAsync( if (containerName == null) { return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -217,7 +217,7 @@ private Mono> listSinglePageAsync( if (containerName == null) { return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsClientImpl.java index 73abd39bea99..80f3d79d2222 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BackupsClientImpl.java @@ -132,7 +132,7 @@ private Mono> triggerWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -212,7 +212,7 @@ private Mono> triggerWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsClientImpl.java index 8a30b07b0b1c..402c55098819 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/BmsPrepareDataMoveOperationResultsClientImpl.java @@ -113,7 +113,7 @@ private Mono> getWithRe if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -168,7 +168,7 @@ private Mono> getWithRe if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsClientImpl.java index d25ec78c0d09..b59b8f3e21b1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ExportJobsOperationResultsClientImpl.java @@ -111,7 +111,7 @@ private Mono> getWithResponseAsyn if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -168,7 +168,7 @@ private Mono> getWithResponseAsyn if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsClientImpl.java index fd362449ff2c..acee77662254 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/FeatureSupportsClientImpl.java @@ -105,7 +105,7 @@ private Mono> validateWithR } else { parameters.validate(); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -156,7 +156,7 @@ private Mono> validateWithR } else { parameters.validate(); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsClientImpl.java index 839c6a266c0a..ef29f3c4a677 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ItemLevelRecoveryConnectionsClientImpl.java @@ -164,7 +164,7 @@ private Mono> provisionWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -253,7 +253,7 @@ private Mono> provisionWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -433,7 +433,7 @@ private Mono> revokeWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -513,7 +513,7 @@ private Mono> revokeWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsClientImpl.java index 9b75b70f9ed1..5e28b1999359 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobCancellationsClientImpl.java @@ -106,7 +106,7 @@ private Mono> triggerWithResponseAsync(String vaultName, String r if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -162,7 +162,7 @@ private Mono> triggerWithResponseAsync( if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsClientImpl.java index 9c2e77b88554..18d3a56eb787 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobDetailsClientImpl.java @@ -107,7 +107,7 @@ private Mono> getWithResponseAsync( if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -162,7 +162,7 @@ private Mono> getWithResponseAsync( if (jobName == null) { return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsClientImpl.java index 713cca38d69c..f844ecb18e7e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobOperationResultsClientImpl.java @@ -111,7 +111,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -171,7 +171,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsClientImpl.java index 9ed5cf355b5d..36caedac26a7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/JobsClientImpl.java @@ -101,7 +101,7 @@ private Mono> exportWithResponseAsync(String vaultName, String re new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -153,7 +153,7 @@ private Mono> exportWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsClientImpl.java new file mode 100644 index 000000000000..5605c4f3a1ee --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsClientImpl.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationOperationsClient; +import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ValidateOperationsResponseInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in OperationOperationsClient. */ +public final class OperationOperationsClientImpl implements OperationOperationsClient { + private final ClientLogger logger = new ClientLogger(OperationOperationsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final OperationOperationsService service; + + /** The service client containing this operation class. */ + private final RecoveryServicesBackupClientImpl client; + + /** + * Initializes an instance of OperationOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationOperationsClientImpl(RecoveryServicesBackupClientImpl client) { + this.service = + RestProxy.create(OperationOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for RecoveryServicesBackupClientOperationOperations to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "RecoveryServicesBack") + private interface OperationOperationsService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" + + "/vaults/{vaultName}/backupValidateOperation") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> validate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("vaultName") String vaultName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") ValidateOperationRequest parameters, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Validate operation for specified backed up item. This is a synchronous operation. + * + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param parameters resource validate operation request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Mono> validateWithResponseAsync( + String vaultName, String resourceGroupName, ValidateOperationRequest parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-04-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .validate( + this.client.getEndpoint(), + apiVersion, + vaultName, + resourceGroupName, + this.client.getSubscriptionId(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Validate operation for specified backed up item. This is a synchronous operation. + * + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param parameters resource validate operation request. + * @param context The 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) + private Mono> validateWithResponseAsync( + String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String apiVersion = "2021-04-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .validate( + this.client.getEndpoint(), + apiVersion, + vaultName, + resourceGroupName, + this.client.getSubscriptionId(), + parameters, + accept, + context); + } + + /** + * Validate operation for specified backed up item. This is a synchronous operation. + * + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param parameters resource validate operation request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Mono validateAsync( + String vaultName, String resourceGroupName, ValidateOperationRequest parameters) { + return validateWithResponseAsync(vaultName, resourceGroupName, parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Validate operation for specified backed up item. This is a synchronous operation. + * + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param parameters resource validate operation request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ValidateOperationsResponseInner validate( + String vaultName, String resourceGroupName, ValidateOperationRequest parameters) { + return validateAsync(vaultName, resourceGroupName, parameters).block(); + } + + /** + * Validate operation for specified backed up item. This is a synchronous operation. + * + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param parameters resource validate operation request. + * @param context The 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 validateWithResponse( + String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context) { + return validateWithResponseAsync(vaultName, resourceGroupName, parameters, context).block(); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsImpl.java new file mode 100644 index 000000000000..9236ff19cfee --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationOperationsImpl.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationOperationsClient; +import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ValidateOperationsResponseInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.OperationOperations; +import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest; +import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationsResponse; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class OperationOperationsImpl implements OperationOperations { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationOperationsImpl.class); + + private final OperationOperationsClient innerClient; + + private final com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager; + + public OperationOperationsImpl( + OperationOperationsClient innerClient, + com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public ValidateOperationsResponse validate( + String vaultName, String resourceGroupName, ValidateOperationRequest parameters) { + ValidateOperationsResponseInner inner = this.serviceClient().validate(vaultName, resourceGroupName, parameters); + if (inner != null) { + return new ValidateOperationsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response validateWithResponse( + String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context) { + Response inner = + this.serviceClient().validateWithResponse(vaultName, resourceGroupName, parameters, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ValidateOperationsResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private OperationOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsClientImpl.java index 5d5726755217..675790786254 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsClientImpl.java @@ -4,19 +4,22 @@ package com.azure.resourcemanager.recoveryservicesbackup.implementation; -import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; 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; @@ -24,8 +27,8 @@ import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationsClient; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ValidateOperationsResponseInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest; +import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryResponse; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationsClient. */ @@ -57,189 +60,212 @@ public final class OperationsClientImpl implements OperationsClient { @ServiceInterface(name = "RecoveryServicesBack") private interface OperationsService { @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices" - + "/vaults/{vaultName}/backupValidateOperation") + @Get("/providers/Microsoft.RecoveryServices/operations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> validate( + Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("vaultName") String vaultName, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ValidateOperationRequest parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Validate operation for specified backed up item. This is a synchronous operation. + * Returns the list of available operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters resource validate operation request. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return operations List response which contains list of available APIs. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> validateWithResponseAsync( - String vaultName, String resourceGroupName, ValidateOperationRequest parameters) { + private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .validate( - this.client.getEndpoint(), - apiVersion, - vaultName, - resourceGroupName, - this.client.getSubscriptionId(), - parameters, - accept, - context)) + .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Validate operation for specified backed up item. This is a synchronous operation. + * Returns the list of available operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters resource validate operation request. * @param context The 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. + * @return operations List response which contains list of available APIs. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> validateWithResponseAsync( - String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context) { + private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (vaultName == null) { - return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service - .validate( - this.client.getEndpoint(), - apiVersion, - vaultName, - resourceGroupName, - this.client.getSubscriptionId(), - parameters, - accept, - context); + .list(this.client.getEndpoint(), apiVersion, accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); } /** - * Validate operation for specified backed up item. This is a synchronous operation. + * Returns the list of available operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters resource validate operation request. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operations List response which contains list of available APIs. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Returns the list of available operations. + * + * @param context The 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. + * @return operations List response which contains list of available APIs. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateAsync( - String vaultName, String resourceGroupName, ValidateOperationRequest parameters) { - return validateWithResponseAsync(vaultName, resourceGroupName, parameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Validate operation for specified backed up item. This is a synchronous operation. + * Returns the list of available operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters resource validate operation request. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return operations List response which contains list of available APIs. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Returns the list of available operations. + * + * @param context The 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. + * @return operations List response which contains list of available APIs. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * 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 operations List response which contains list of available APIs. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ValidateOperationsResponseInner validate( - String vaultName, String resourceGroupName, ValidateOperationRequest parameters) { - return validateAsync(vaultName, resourceGroupName, parameters).block(); + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Validate operation for specified backed up item. This is a synchronous operation. + * Get the next page of items. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters resource validate operation request. + * @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 the response. + * @return operations List response which contains list of available APIs. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response validateWithResponse( - String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context) { - return validateWithResponseAsync(vaultName, resourceGroupName, parameters, context).block(); + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsImpl.java index 26b4097213b5..52ce425f547e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsImpl.java @@ -4,15 +4,13 @@ package com.azure.resourcemanager.recoveryservicesbackup.implementation; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationsClient; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ValidateOperationsResponseInner; +import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner; +import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryValueForSingleApi; import com.azure.resourcemanager.recoveryservicesbackup.models.Operations; -import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationRequest; -import com.azure.resourcemanager.recoveryservicesbackup.models.ValidateOperationsResponse; import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { @@ -29,29 +27,14 @@ public OperationsImpl( this.serviceManager = serviceManager; } - public ValidateOperationsResponse validate( - String vaultName, String resourceGroupName, ValidateOperationRequest parameters) { - ValidateOperationsResponseInner inner = this.serviceClient().validate(vaultName, resourceGroupName, parameters); - if (inner != null) { - return new ValidateOperationsResponseImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager())); } - public Response validateWithResponse( - String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context) { - Response inner = - this.serviceClient().validateWithResponse(vaultName, resourceGroupName, parameters, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ValidateOperationsResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsOperationsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsOperationsClientImpl.java deleted file mode 100644 index af4e5b0de8ff..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsOperationsClientImpl.java +++ /dev/null @@ -1,272 +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.recoveryservicesbackup.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.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.recoveryservicesbackup.fluent.OperationsOperationsClient; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryResponse; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OperationsOperationsClient. */ -public final class OperationsOperationsClientImpl implements OperationsOperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsOperationsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final OperationsOperationsService service; - - /** The service client containing this operation class. */ - private final RecoveryServicesBackupClientImpl client; - - /** - * Initializes an instance of OperationsOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsOperationsClientImpl(RecoveryServicesBackupClientImpl client) { - this.service = - RestProxy - .create(OperationsOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for RecoveryServicesBackupClientOperationsOperations to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "RecoveryServicesBack") - private interface OperationsOperationsService { - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.RecoveryServices/operations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @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); - } - - /** - * Returns the list of available operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operations List response which contains list of available APIs. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String apiVersion = "2016-08-10"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns the list of available operations. - * - * @param context The 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 operations List response which contains list of available APIs. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String apiVersion = "2016-08-10"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), apiVersion, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Returns the list of available operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operations List response which contains list of available APIs. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Returns the list of available operations. - * - * @param context The 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 operations List response which contains list of available APIs. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns the list of available operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operations List response which contains list of available APIs. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Returns the list of available operations. - * - * @param context The 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 operations List response which contains list of available APIs. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * 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 operations List response which contains list of available APIs. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operations List response which contains list of available APIs. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsOperationsImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsOperationsImpl.java deleted file mode 100644 index f47b287a17cb..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/OperationsOperationsImpl.java +++ /dev/null @@ -1,47 +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.recoveryservicesbackup.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationsOperationsClient; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.ClientDiscoveryValueForSingleApiInner; -import com.azure.resourcemanager.recoveryservicesbackup.models.ClientDiscoveryValueForSingleApi; -import com.azure.resourcemanager.recoveryservicesbackup.models.OperationsOperations; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class OperationsOperationsImpl implements OperationsOperations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsOperationsImpl.class); - - private final OperationsOperationsClient innerClient; - - private final com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager; - - public OperationsOperationsImpl( - OperationsOperationsClient innerClient, - com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ClientDiscoveryValueForSingleApiImpl(inner1, this.manager())); - } - - private OperationsOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsClientImpl.java index 47b54106822b..d42c045e419b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointConnectionsClientImpl.java @@ -153,7 +153,7 @@ private Mono> getWithResponseAs new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -211,7 +211,7 @@ private Mono> getWithResponseAs new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -334,7 +334,7 @@ private Mono>> putWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -403,7 +403,7 @@ private Mono>> putWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -662,7 +662,7 @@ private Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -720,7 +720,7 @@ private Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsClientImpl.java index d7264242d9c0..8f74cc2564b8 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/PrivateEndpointsClientImpl.java @@ -116,7 +116,7 @@ private Mono> getOperationStatusWithResponseAsync if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -183,7 +183,7 @@ private Mono> getOperationStatusWithResponseAsync if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersClientImpl.java index 589c59d02327..55cc8bee54fc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectableContainersClientImpl.java @@ -125,7 +125,7 @@ private Mono> listSinglePageAsy if (fabricName == null) { return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -191,7 +191,7 @@ private Mono> listSinglePageAsy if (fabricName == null) { return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsClientImpl.java index 2686b088d7e5..ea279327b9cf 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationResultsClientImpl.java @@ -133,7 +133,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -210,7 +210,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesClientImpl.java index b4d8a6b31d64..ba24130d5580 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemOperationStatusesClientImpl.java @@ -135,7 +135,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -214,7 +214,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsClientImpl.java index a12a3bed50bf..7a1a045c2de1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectedItemsClientImpl.java @@ -169,7 +169,7 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -244,7 +244,7 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -433,7 +433,7 @@ private Mono> createOrUpdateWithResponseAsy } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -513,7 +513,7 @@ private Mono> createOrUpdateWithResponseAsy } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -670,7 +670,7 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -742,7 +742,7 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsClientImpl.java index e304ccaecbbc..124945b3c3c1 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerOperationResultsClientImpl.java @@ -124,7 +124,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -194,7 +194,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsClientImpl.java index 8aa1a8d8b9b5..8e92a59e71fc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainerRefreshOperationResultsClientImpl.java @@ -120,7 +120,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -180,7 +180,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersClientImpl.java index 6ccb751eecfc..6c1422f12efd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionContainersClientImpl.java @@ -187,7 +187,7 @@ private Mono> getWithResponseAsync( if (containerName == null) { return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -247,7 +247,7 @@ private Mono> getWithResponseAsync( if (containerName == null) { return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -377,7 +377,7 @@ private Mono> registerWithResponseAsy } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -450,7 +450,7 @@ private Mono> registerWithResponseAsy } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -592,7 +592,7 @@ private Mono> unregisterWithResponseAsync( if (containerName == null) { return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -654,7 +654,7 @@ private Mono> unregisterWithResponseAsync( if (containerName == null) { return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -771,7 +771,7 @@ private Mono> inquireWithResponseAsync( if (containerName == null) { return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -838,7 +838,7 @@ private Mono> inquireWithResponseAsync( if (containerName == null) { return Mono.error(new IllegalArgumentException("Parameter containerName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -976,7 +976,7 @@ private Mono> refreshWithResponseAsync( if (fabricName == null) { return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1034,7 +1034,7 @@ private Mono> refreshWithResponseAsync( if (fabricName == null) { return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentsClientImpl.java index 8f89a284b4e2..2d03e4ad6f2b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionIntentsClientImpl.java @@ -161,7 +161,7 @@ private Mono> validateWithRespons } else { parameters.validate(); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -213,7 +213,7 @@ private Mono> validateWithRespons } else { parameters.validate(); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -329,7 +329,7 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter intentObjectName is required and cannot be null.")); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -391,7 +391,7 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter intentObjectName is required and cannot be null.")); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -524,7 +524,7 @@ private Mono> createOrUpdateWithResponse } else { parameters.validate(); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -597,7 +597,7 @@ private Mono> createOrUpdateWithResponse } else { parameters.validate(); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -736,7 +736,7 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter intentObjectName is required and cannot be null.")); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; return FluxUtil .withContext( context -> @@ -795,7 +795,7 @@ private Mono> deleteWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter intentObjectName is required and cannot be null.")); } - final String apiVersion = "2017-07-01"; + final String apiVersion = "2021-04-01"; context = this.client.mergeContext(context); return service .delete( diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPoliciesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPoliciesClientImpl.java index d5dea5bfdaa2..46d2c004492c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPoliciesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPoliciesClientImpl.java @@ -149,7 +149,7 @@ private Mono> getWithResponseAsync( if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -205,7 +205,7 @@ private Mono> getWithResponseAsync( if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -325,7 +325,7 @@ private Mono> createOrUpdateWithResponse } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -392,7 +392,7 @@ private Mono> createOrUpdateWithResponse } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -515,7 +515,7 @@ private Mono>> deleteWithResponseAsync( if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -571,7 +571,7 @@ private Mono>> deleteWithResponseAsync( if (policyName == null) { return Mono.error(new IllegalArgumentException("Parameter policyName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationResultsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationResultsClientImpl.java index d72672781cce..106d111c7e84 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationResultsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationResultsClientImpl.java @@ -118,7 +118,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -178,7 +178,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationStatusesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationStatusesClientImpl.java index 8449442d2724..ad54dbbff022 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationStatusesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ProtectionPolicyOperationStatusesClientImpl.java @@ -120,7 +120,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -182,7 +182,7 @@ private Mono> getWithResponseAsync( if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsClientImpl.java index 39f621bd1522..be95172baa1d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsClientImpl.java @@ -186,7 +186,7 @@ private Mono> listSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -269,7 +269,7 @@ private Mono> listSinglePageAsync( return Mono .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -483,7 +483,7 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -562,7 +562,7 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter recoveryPointId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsRecommendedForMovesClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsRecommendedForMovesClientImpl.java index 8786f7152bb9..e62c4974ab9c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsRecommendedForMovesClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryPointsRecommendedForMovesClientImpl.java @@ -155,7 +155,7 @@ private Mono> listSinglePageAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -243,7 +243,7 @@ private Mono> listSinglePageAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupClientImpl.java index f8ad2d541c33..36a12ad4f998 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RecoveryServicesBackupClientImpl.java @@ -53,8 +53,8 @@ import com.azure.resourcemanager.recoveryservicesbackup.fluent.JobDetailsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.JobOperationResultsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.JobsClient; +import com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationOperationsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationsClient; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.OperationsOperationsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.PrivateEndpointsClient; import com.azure.resourcemanager.recoveryservicesbackup.fluent.ProtectableContainersClient; @@ -150,6 +150,78 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** The ProtectionIntentsClient object to access its operations. */ + private final ProtectionIntentsClient protectionIntents; + + /** + * Gets the ProtectionIntentsClient object to access its operations. + * + * @return the ProtectionIntentsClient object. + */ + public ProtectionIntentsClient getProtectionIntents() { + return this.protectionIntents; + } + + /** The BackupStatusClient object to access its operations. */ + private final BackupStatusClient backupStatus; + + /** + * Gets the BackupStatusClient object to access its operations. + * + * @return the BackupStatusClient object. + */ + public BackupStatusClient getBackupStatus() { + return this.backupStatus; + } + + /** The FeatureSupportsClient object to access its operations. */ + private final FeatureSupportsClient featureSupports; + + /** + * Gets the FeatureSupportsClient object to access its operations. + * + * @return the FeatureSupportsClient object. + */ + public FeatureSupportsClient getFeatureSupports() { + return this.featureSupports; + } + + /** The BackupProtectionIntentsClient object to access its operations. */ + private final BackupProtectionIntentsClient backupProtectionIntents; + + /** + * Gets the BackupProtectionIntentsClient object to access its operations. + * + * @return the BackupProtectionIntentsClient object. + */ + public BackupProtectionIntentsClient getBackupProtectionIntents() { + return this.backupProtectionIntents; + } + + /** The BackupUsageSummariesClient object to access its operations. */ + private final BackupUsageSummariesClient backupUsageSummaries; + + /** + * Gets the BackupUsageSummariesClient object to access its operations. + * + * @return the BackupUsageSummariesClient object. + */ + public BackupUsageSummariesClient getBackupUsageSummaries() { + return this.backupUsageSummaries; + } + + /** The OperationsClient object to access its operations. */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + /** The BackupResourceVaultConfigsClient object to access its operations. */ private final BackupResourceVaultConfigsClient backupResourceVaultConfigs; @@ -390,16 +462,16 @@ public BackupProtectedItemsClient getBackupProtectedItems() { return this.backupProtectedItems; } - /** The OperationsClient object to access its operations. */ - private final OperationsClient operations; + /** The OperationOperationsClient object to access its operations. */ + private final OperationOperationsClient operationOperations; /** - * Gets the OperationsClient object to access its operations. + * Gets the OperationOperationsClient object to access its operations. * - * @return the OperationsClient object. + * @return the OperationOperationsClient object. */ - public OperationsClient getOperations() { - return this.operations; + public OperationOperationsClient getOperationOperations() { + return this.operationOperations; } /** The BackupEnginesClient object to access its operations. */ @@ -714,78 +786,6 @@ public BackupProtectedItemsCrrsClient getBackupProtectedItemsCrrs() { return this.backupProtectedItemsCrrs; } - /** The ProtectionIntentsClient object to access its operations. */ - private final ProtectionIntentsClient protectionIntents; - - /** - * Gets the ProtectionIntentsClient object to access its operations. - * - * @return the ProtectionIntentsClient object. - */ - public ProtectionIntentsClient getProtectionIntents() { - return this.protectionIntents; - } - - /** The BackupStatusClient object to access its operations. */ - private final BackupStatusClient backupStatus; - - /** - * Gets the BackupStatusClient object to access its operations. - * - * @return the BackupStatusClient object. - */ - public BackupStatusClient getBackupStatus() { - return this.backupStatus; - } - - /** The FeatureSupportsClient object to access its operations. */ - private final FeatureSupportsClient featureSupports; - - /** - * Gets the FeatureSupportsClient object to access its operations. - * - * @return the FeatureSupportsClient object. - */ - public FeatureSupportsClient getFeatureSupports() { - return this.featureSupports; - } - - /** The BackupProtectionIntentsClient object to access its operations. */ - private final BackupProtectionIntentsClient backupProtectionIntents; - - /** - * Gets the BackupProtectionIntentsClient object to access its operations. - * - * @return the BackupProtectionIntentsClient object. - */ - public BackupProtectionIntentsClient getBackupProtectionIntents() { - return this.backupProtectionIntents; - } - - /** The BackupUsageSummariesClient object to access its operations. */ - private final BackupUsageSummariesClient backupUsageSummaries; - - /** - * Gets the BackupUsageSummariesClient object to access its operations. - * - * @return the BackupUsageSummariesClient object. - */ - public BackupUsageSummariesClient getBackupUsageSummaries() { - return this.backupUsageSummaries; - } - - /** The OperationsOperationsClient object to access its operations. */ - private final OperationsOperationsClient operationsOperations; - - /** - * Gets the OperationsOperationsClient object to access its operations. - * - * @return the OperationsOperationsClient object. - */ - public OperationsOperationsClient getOperationsOperations() { - return this.operationsOperations; - } - /** * Initializes an instance of RecoveryServicesBackupClient client. * @@ -808,6 +808,12 @@ public OperationsOperationsClient getOperationsOperations() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; + this.protectionIntents = new ProtectionIntentsClientImpl(this); + this.backupStatus = new BackupStatusClientImpl(this); + this.featureSupports = new FeatureSupportsClientImpl(this); + this.backupProtectionIntents = new BackupProtectionIntentsClientImpl(this); + this.backupUsageSummaries = new BackupUsageSummariesClientImpl(this); + this.operations = new OperationsClientImpl(this); this.backupResourceVaultConfigs = new BackupResourceVaultConfigsClientImpl(this); this.backupResourceEncryptionConfigs = new BackupResourceEncryptionConfigsClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); @@ -828,7 +834,7 @@ public OperationsOperationsClient getOperationsOperations() { this.exportJobsOperationResults = new ExportJobsOperationResultsClientImpl(this); this.jobs = new JobsClientImpl(this); this.backupProtectedItems = new BackupProtectedItemsClientImpl(this); - this.operations = new OperationsClientImpl(this); + this.operationOperations = new OperationOperationsClientImpl(this); this.backupEngines = new BackupEnginesClientImpl(this); this.protectionContainerRefreshOperationResults = new ProtectionContainerRefreshOperationResultsClientImpl(this); @@ -856,12 +862,6 @@ public OperationsOperationsClient getOperationsOperations() { this.backupResourceStorageConfigs = new BackupResourceStorageConfigsClientImpl(this); this.recoveryPointsCrrs = new RecoveryPointsCrrsClientImpl(this); this.backupProtectedItemsCrrs = new BackupProtectedItemsCrrsClientImpl(this); - this.protectionIntents = new ProtectionIntentsClientImpl(this); - this.backupStatus = new BackupStatusClientImpl(this); - this.featureSupports = new FeatureSupportsClientImpl(this); - this.backupProtectionIntents = new BackupProtectionIntentsClientImpl(this); - this.backupUsageSummaries = new BackupUsageSummariesClientImpl(this); - this.operationsOperations = new OperationsOperationsClientImpl(this); } /** diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceProvidersClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceProvidersClientImpl.java index 08c2706beb9b..1e698ba21eb0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceProvidersClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/ResourceProvidersClientImpl.java @@ -170,7 +170,7 @@ private Mono> getOperationStatusWithResponseAsync if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -225,7 +225,7 @@ private Mono> getOperationStatusWithResponseAsync if (operationId == null) { return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -337,7 +337,7 @@ private Mono>> bmsPrepareDataMoveWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -394,7 +394,7 @@ private Mono>> bmsPrepareDataMoveWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -597,7 +597,7 @@ private Mono>> bmsTriggerDataMoveWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -654,7 +654,7 @@ private Mono>> bmsTriggerDataMoveWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -881,7 +881,7 @@ private Mono>> moveRecoveryPointWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -967,7 +967,7 @@ private Mono>> moveRecoveryPointWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RestoresClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RestoresClientImpl.java index da8cf759c029..681cac905b76 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RestoresClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/RestoresClientImpl.java @@ -144,7 +144,7 @@ private Mono>> triggerWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -231,7 +231,7 @@ private Mono>> triggerWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/SecurityPINsClientImpl.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/SecurityPINsClientImpl.java index 134627bfbb41..c32a2e4c8253 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/SecurityPINsClientImpl.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/implementation/SecurityPINsClientImpl.java @@ -101,7 +101,7 @@ private Mono> getWithResponseAsync(String vaultN new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -151,7 +151,7 @@ private Mono> getWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-01-01"; + final String apiVersion = "2021-04-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadPointInTimeRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadPointInTimeRestoreRequest.java index 0ea80d73336c..4c34b0e048bd 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadPointInTimeRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadPointInTimeRestoreRequest.java @@ -81,6 +81,13 @@ public AzureWorkloadPointInTimeRestoreRequest withRecoveryMode(RecoveryMode reco return this; } + /** {@inheritDoc} */ + @Override + public AzureWorkloadPointInTimeRestoreRequest withTargetVirtualMachineId(String targetVirtualMachineId) { + super.withTargetVirtualMachineId(targetVirtualMachineId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadPointInTimeRestoreRequestAutoGenerated.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadPointInTimeRestoreRequestAutoGenerated.java deleted file mode 100644 index b7881f3ffdcd..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadPointInTimeRestoreRequestAutoGenerated.java +++ /dev/null @@ -1,103 +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.recoveryservicesbackup.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.Map; - -/** AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") -@JsonTypeName("AzureWorkloadPointInTimeRestoreRequest") -@Fluent -public final class AzureWorkloadPointInTimeRestoreRequestAutoGenerated - extends AzureWorkloadRestoreRequestAutoGenerated { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AzureWorkloadPointInTimeRestoreRequestAutoGenerated.class); - - /* - * PointInTime value - */ - @JsonProperty(value = "pointInTime") - private OffsetDateTime pointInTime; - - /** - * Get the pointInTime property: PointInTime value. - * - * @return the pointInTime value. - */ - public OffsetDateTime pointInTime() { - return this.pointInTime; - } - - /** - * Set the pointInTime property: PointInTime value. - * - * @param pointInTime the pointInTime value to set. - * @return the AzureWorkloadPointInTimeRestoreRequestAutoGenerated object itself. - */ - public AzureWorkloadPointInTimeRestoreRequestAutoGenerated withPointInTime(OffsetDateTime pointInTime) { - this.pointInTime = pointInTime; - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadPointInTimeRestoreRequestAutoGenerated withRecoveryType(RecoveryType recoveryType) { - super.withRecoveryType(recoveryType); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadPointInTimeRestoreRequestAutoGenerated withSourceResourceId(String sourceResourceId) { - super.withSourceResourceId(sourceResourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadPointInTimeRestoreRequestAutoGenerated withPropertyBag(Map propertyBag) { - super.withPropertyBag(propertyBag); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadPointInTimeRestoreRequestAutoGenerated withTargetInfo(TargetRestoreInfo targetInfo) { - super.withTargetInfo(targetInfo); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadPointInTimeRestoreRequestAutoGenerated withRecoveryMode(RecoveryMode recoveryMode) { - super.withRecoveryMode(recoveryMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadPointInTimeRestoreRequestAutoGenerated withTargetVirtualMachineId( - String targetVirtualMachineId) { - super.withTargetVirtualMachineId(targetVirtualMachineId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRestoreRequest.java index eb76e4b99271..266d02167a80 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRestoreRequest.java @@ -63,6 +63,14 @@ public class AzureWorkloadRestoreRequest extends RestoreRequest { @JsonProperty(value = "recoveryMode") private RecoveryMode recoveryMode; + /* + * This is the complete ARM Id of the target VM + * For e.g. + * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + */ + @JsonProperty(value = "targetVirtualMachineId") + private String targetVirtualMachineId; + /** * Get the recoveryType property: Type of this recovery. * @@ -165,6 +173,28 @@ public AzureWorkloadRestoreRequest withRecoveryMode(RecoveryMode recoveryMode) { return this; } + /** + * Get the targetVirtualMachineId property: This is the complete ARM Id of the target VM For e.g. + * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + * + * @return the targetVirtualMachineId value. + */ + public String targetVirtualMachineId() { + return this.targetVirtualMachineId; + } + + /** + * Set the targetVirtualMachineId property: This is the complete ARM Id of the target VM For e.g. + * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + * + * @param targetVirtualMachineId the targetVirtualMachineId value to set. + * @return the AzureWorkloadRestoreRequest object itself. + */ + public AzureWorkloadRestoreRequest withTargetVirtualMachineId(String targetVirtualMachineId) { + this.targetVirtualMachineId = targetVirtualMachineId; + return this; + } + /** * Validates the instance. * diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRestoreRequestAutoGenerated.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRestoreRequestAutoGenerated.java deleted file mode 100644 index e63f04f5cbc9..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadRestoreRequestAutoGenerated.java +++ /dev/null @@ -1,214 +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.recoveryservicesbackup.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** AzureWorkload-specific restore. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "objectType", - defaultImpl = AzureWorkloadRestoreRequestAutoGenerated.class) -@JsonTypeName("AzureWorkloadRestoreRequest") -@JsonSubTypes({ - @JsonSubTypes.Type( - name = "AzureWorkloadPointInTimeRestoreRequest", - value = AzureWorkloadPointInTimeRestoreRequestAutoGenerated.class), - @JsonSubTypes.Type( - name = "AzureWorkloadSAPHanaRestoreRequest", - value = AzureWorkloadSapHanaRestoreRequestAutoGenerated.class), - @JsonSubTypes.Type( - name = "AzureWorkloadSQLRestoreRequest", - value = AzureWorkloadSqlRestoreRequestAutoGenerated.class) -}) -@Fluent -public class AzureWorkloadRestoreRequestAutoGenerated extends RestoreRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureWorkloadRestoreRequestAutoGenerated.class); - - /* - * Type of this recovery. - */ - @JsonProperty(value = "recoveryType") - private RecoveryType recoveryType; - - /* - * Fully qualified ARM ID of the VM on which workload that was running is - * being recovered. - */ - @JsonProperty(value = "sourceResourceId") - private String sourceResourceId; - - /* - * Workload specific property bag. - */ - @JsonProperty(value = "propertyBag") - private Map propertyBag; - - /* - * Details of target database - */ - @JsonProperty(value = "targetInfo") - private TargetRestoreInfo targetInfo; - - /* - * Defines whether the current recovery mode is file restore or database - * restore - */ - @JsonProperty(value = "recoveryMode") - private RecoveryMode recoveryMode; - - /* - * This is the complete ARM Id of the target VM - * For e.g. - * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} - */ - @JsonProperty(value = "targetVirtualMachineId") - private String targetVirtualMachineId; - - /** - * Get the recoveryType property: Type of this recovery. - * - * @return the recoveryType value. - */ - public RecoveryType recoveryType() { - return this.recoveryType; - } - - /** - * Set the recoveryType property: Type of this recovery. - * - * @param recoveryType the recoveryType value to set. - * @return the AzureWorkloadRestoreRequestAutoGenerated object itself. - */ - public AzureWorkloadRestoreRequestAutoGenerated withRecoveryType(RecoveryType recoveryType) { - this.recoveryType = recoveryType; - return this; - } - - /** - * Get the sourceResourceId property: Fully qualified ARM ID of the VM on which workload that was running is being - * recovered. - * - * @return the sourceResourceId value. - */ - public String sourceResourceId() { - return this.sourceResourceId; - } - - /** - * Set the sourceResourceId property: Fully qualified ARM ID of the VM on which workload that was running is being - * recovered. - * - * @param sourceResourceId the sourceResourceId value to set. - * @return the AzureWorkloadRestoreRequestAutoGenerated object itself. - */ - public AzureWorkloadRestoreRequestAutoGenerated withSourceResourceId(String sourceResourceId) { - this.sourceResourceId = sourceResourceId; - return this; - } - - /** - * Get the propertyBag property: Workload specific property bag. - * - * @return the propertyBag value. - */ - public Map propertyBag() { - return this.propertyBag; - } - - /** - * Set the propertyBag property: Workload specific property bag. - * - * @param propertyBag the propertyBag value to set. - * @return the AzureWorkloadRestoreRequestAutoGenerated object itself. - */ - public AzureWorkloadRestoreRequestAutoGenerated withPropertyBag(Map propertyBag) { - this.propertyBag = propertyBag; - return this; - } - - /** - * Get the targetInfo property: Details of target database. - * - * @return the targetInfo value. - */ - public TargetRestoreInfo targetInfo() { - return this.targetInfo; - } - - /** - * Set the targetInfo property: Details of target database. - * - * @param targetInfo the targetInfo value to set. - * @return the AzureWorkloadRestoreRequestAutoGenerated object itself. - */ - public AzureWorkloadRestoreRequestAutoGenerated withTargetInfo(TargetRestoreInfo targetInfo) { - this.targetInfo = targetInfo; - return this; - } - - /** - * Get the recoveryMode property: Defines whether the current recovery mode is file restore or database restore. - * - * @return the recoveryMode value. - */ - public RecoveryMode recoveryMode() { - return this.recoveryMode; - } - - /** - * Set the recoveryMode property: Defines whether the current recovery mode is file restore or database restore. - * - * @param recoveryMode the recoveryMode value to set. - * @return the AzureWorkloadRestoreRequestAutoGenerated object itself. - */ - public AzureWorkloadRestoreRequestAutoGenerated withRecoveryMode(RecoveryMode recoveryMode) { - this.recoveryMode = recoveryMode; - return this; - } - - /** - * Get the targetVirtualMachineId property: This is the complete ARM Id of the target VM For e.g. - * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - * - * @return the targetVirtualMachineId value. - */ - public String targetVirtualMachineId() { - return this.targetVirtualMachineId; - } - - /** - * Set the targetVirtualMachineId property: This is the complete ARM Id of the target VM For e.g. - * /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. - * - * @param targetVirtualMachineId the targetVirtualMachineId value to set. - * @return the AzureWorkloadRestoreRequestAutoGenerated object itself. - */ - public AzureWorkloadRestoreRequestAutoGenerated withTargetVirtualMachineId(String targetVirtualMachineId) { - this.targetVirtualMachineId = targetVirtualMachineId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (targetInfo() != null) { - targetInfo().validate(); - } - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreRequest.java index 6261dc78b8d0..cfad19f8793b 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreRequest.java @@ -92,6 +92,13 @@ public AzureWorkloadSapHanaPointInTimeRestoreRequest withRecoveryMode(RecoveryMo return this; } + /** {@inheritDoc} */ + @Override + public AzureWorkloadSapHanaPointInTimeRestoreRequest withTargetVirtualMachineId(String targetVirtualMachineId) { + super.withTargetVirtualMachineId(targetVirtualMachineId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreRequestAutoGenerated.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreRequestAutoGenerated.java deleted file mode 100644 index b354d317c139..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreRequestAutoGenerated.java +++ /dev/null @@ -1,104 +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.recoveryservicesbackup.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.Map; - -/** AzureWorkload SAP Hana -specific restore. Specifically for PointInTime/Log restore. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") -@JsonTypeName("AzureWorkloadSAPHanaPointInTimeRestoreRequest") -@Fluent -public final class AzureWorkloadSapHanaPointInTimeRestoreRequestAutoGenerated - extends AzureWorkloadSapHanaRestoreRequestAutoGenerated { - @JsonIgnore - private final ClientLogger logger = - new ClientLogger(AzureWorkloadSapHanaPointInTimeRestoreRequestAutoGenerated.class); - - /* - * PointInTime value - */ - @JsonProperty(value = "pointInTime") - private OffsetDateTime pointInTime; - - /** - * Get the pointInTime property: PointInTime value. - * - * @return the pointInTime value. - */ - public OffsetDateTime pointInTime() { - return this.pointInTime; - } - - /** - * Set the pointInTime property: PointInTime value. - * - * @param pointInTime the pointInTime value to set. - * @return the AzureWorkloadSapHanaPointInTimeRestoreRequestAutoGenerated object itself. - */ - public AzureWorkloadSapHanaPointInTimeRestoreRequestAutoGenerated withPointInTime(OffsetDateTime pointInTime) { - this.pointInTime = pointInTime; - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSapHanaPointInTimeRestoreRequestAutoGenerated withRecoveryType(RecoveryType recoveryType) { - super.withRecoveryType(recoveryType); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSapHanaPointInTimeRestoreRequestAutoGenerated withSourceResourceId(String sourceResourceId) { - super.withSourceResourceId(sourceResourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSapHanaPointInTimeRestoreRequestAutoGenerated withPropertyBag(Map propertyBag) { - super.withPropertyBag(propertyBag); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSapHanaPointInTimeRestoreRequestAutoGenerated withTargetInfo(TargetRestoreInfo targetInfo) { - super.withTargetInfo(targetInfo); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSapHanaPointInTimeRestoreRequestAutoGenerated withRecoveryMode(RecoveryMode recoveryMode) { - super.withRecoveryMode(recoveryMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSapHanaPointInTimeRestoreRequestAutoGenerated withTargetVirtualMachineId( - String targetVirtualMachineId) { - super.withTargetVirtualMachineId(targetVirtualMachineId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.java index 03ace5b0f30f..90152820ee3c 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest.java @@ -92,6 +92,14 @@ public AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest withRecoveryMo return this; } + /** {@inheritDoc} */ + @Override + public AzureWorkloadSapHanaPointInTimeRestoreWithRehydrateRequest withTargetVirtualMachineId( + String targetVirtualMachineId) { + super.withTargetVirtualMachineId(targetVirtualMachineId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreRequest.java index c44d56d6c65e..32e40dd7ba0d 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreRequest.java @@ -66,6 +66,13 @@ public AzureWorkloadSapHanaRestoreRequest withRecoveryMode(RecoveryMode recovery return this; } + /** {@inheritDoc} */ + @Override + public AzureWorkloadSapHanaRestoreRequest withTargetVirtualMachineId(String targetVirtualMachineId) { + super.withTargetVirtualMachineId(targetVirtualMachineId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreRequestAutoGenerated.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreRequestAutoGenerated.java deleted file mode 100644 index 283b1302861b..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreRequestAutoGenerated.java +++ /dev/null @@ -1,83 +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.recoveryservicesbackup.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** AzureWorkload SAP Hana-specific restore. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "objectType", - defaultImpl = AzureWorkloadSapHanaRestoreRequestAutoGenerated.class) -@JsonTypeName("AzureWorkloadSAPHanaRestoreRequest") -@JsonSubTypes({ - @JsonSubTypes.Type( - name = "AzureWorkloadSAPHanaPointInTimeRestoreRequest", - value = AzureWorkloadSapHanaPointInTimeRestoreRequestAutoGenerated.class) -}) -@Immutable -public class AzureWorkloadSapHanaRestoreRequestAutoGenerated extends AzureWorkloadRestoreRequestAutoGenerated { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AzureWorkloadSapHanaRestoreRequestAutoGenerated.class); - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSapHanaRestoreRequestAutoGenerated withRecoveryType(RecoveryType recoveryType) { - super.withRecoveryType(recoveryType); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSapHanaRestoreRequestAutoGenerated withSourceResourceId(String sourceResourceId) { - super.withSourceResourceId(sourceResourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSapHanaRestoreRequestAutoGenerated withPropertyBag(Map propertyBag) { - super.withPropertyBag(propertyBag); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSapHanaRestoreRequestAutoGenerated withTargetInfo(TargetRestoreInfo targetInfo) { - super.withTargetInfo(targetInfo); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSapHanaRestoreRequestAutoGenerated withRecoveryMode(RecoveryMode recoveryMode) { - super.withRecoveryMode(recoveryMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSapHanaRestoreRequestAutoGenerated withTargetVirtualMachineId(String targetVirtualMachineId) { - super.withTargetVirtualMachineId(targetVirtualMachineId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreWithRehydrateRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreWithRehydrateRequest.java index 2a030d8591f4..1650ffb8b4f9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreWithRehydrateRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSapHanaRestoreWithRehydrateRequest.java @@ -82,6 +82,13 @@ public AzureWorkloadSapHanaRestoreWithRehydrateRequest withRecoveryMode(Recovery return this; } + /** {@inheritDoc} */ + @Override + public AzureWorkloadSapHanaRestoreWithRehydrateRequest withTargetVirtualMachineId(String targetVirtualMachineId) { + super.withTargetVirtualMachineId(targetVirtualMachineId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreRequest.java index e7fab2ebed2a..5e3fe22c088f 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreRequest.java @@ -115,6 +115,13 @@ public AzureWorkloadSqlPointInTimeRestoreRequest withRecoveryMode(RecoveryMode r return this; } + /** {@inheritDoc} */ + @Override + public AzureWorkloadSqlPointInTimeRestoreRequest withTargetVirtualMachineId(String targetVirtualMachineId) { + super.withTargetVirtualMachineId(targetVirtualMachineId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated.java deleted file mode 100644 index 319df87d4d3c..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated.java +++ /dev/null @@ -1,127 +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.recoveryservicesbackup.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** AzureWorkload SQL -specific restore. Specifically for PointInTime/Log restore. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") -@JsonTypeName("AzureWorkloadSQLPointInTimeRestoreRequest") -@Fluent -public final class AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated - extends AzureWorkloadSqlRestoreRequestAutoGenerated { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated.class); - - /* - * PointInTime value - */ - @JsonProperty(value = "pointInTime") - private OffsetDateTime pointInTime; - - /** - * Get the pointInTime property: PointInTime value. - * - * @return the pointInTime value. - */ - public OffsetDateTime pointInTime() { - return this.pointInTime; - } - - /** - * Set the pointInTime property: PointInTime value. - * - * @param pointInTime the pointInTime value to set. - * @return the AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated object itself. - */ - public AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated withPointInTime(OffsetDateTime pointInTime) { - this.pointInTime = pointInTime; - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated withShouldUseAlternateTargetLocation( - Boolean shouldUseAlternateTargetLocation) { - super.withShouldUseAlternateTargetLocation(shouldUseAlternateTargetLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated withIsNonRecoverable(Boolean isNonRecoverable) { - super.withIsNonRecoverable(isNonRecoverable); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated withAlternateDirectoryPaths( - List alternateDirectoryPaths) { - super.withAlternateDirectoryPaths(alternateDirectoryPaths); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated withRecoveryType(RecoveryType recoveryType) { - super.withRecoveryType(recoveryType); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated withSourceResourceId(String sourceResourceId) { - super.withSourceResourceId(sourceResourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated withPropertyBag(Map propertyBag) { - super.withPropertyBag(propertyBag); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated withTargetInfo(TargetRestoreInfo targetInfo) { - super.withTargetInfo(targetInfo); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated withRecoveryMode(RecoveryMode recoveryMode) { - super.withRecoveryMode(recoveryMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated withTargetVirtualMachineId( - String targetVirtualMachineId) { - super.withTargetVirtualMachineId(targetVirtualMachineId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.java index 0728ce4d2282..df69ac771ccc 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest.java @@ -115,6 +115,14 @@ public AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest withRecoveryMode(R return this; } + /** {@inheritDoc} */ + @Override + public AzureWorkloadSqlPointInTimeRestoreWithRehydrateRequest withTargetVirtualMachineId( + String targetVirtualMachineId) { + super.withTargetVirtualMachineId(targetVirtualMachineId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreRequest.java index 96d591f60a0b..7d513c312f79 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreRequest.java @@ -154,6 +154,13 @@ public AzureWorkloadSqlRestoreRequest withRecoveryMode(RecoveryMode recoveryMode return this; } + /** {@inheritDoc} */ + @Override + public AzureWorkloadSqlRestoreRequest withTargetVirtualMachineId(String targetVirtualMachineId) { + super.withTargetVirtualMachineId(targetVirtualMachineId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreRequestAutoGenerated.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreRequestAutoGenerated.java deleted file mode 100644 index b56bc58fd5b5..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreRequestAutoGenerated.java +++ /dev/null @@ -1,173 +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.recoveryservicesbackup.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import java.util.Map; - -/** AzureWorkload SQL -specific restore. Specifically for full/diff restore. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "objectType", - defaultImpl = AzureWorkloadSqlRestoreRequestAutoGenerated.class) -@JsonTypeName("AzureWorkloadSQLRestoreRequest") -@JsonSubTypes({ - @JsonSubTypes.Type( - name = "AzureWorkloadSQLPointInTimeRestoreRequest", - value = AzureWorkloadSqlPointInTimeRestoreRequestAutoGenerated.class) -}) -@Fluent -public class AzureWorkloadSqlRestoreRequestAutoGenerated extends AzureWorkloadRestoreRequestAutoGenerated { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureWorkloadSqlRestoreRequestAutoGenerated.class); - - /* - * Default option set to true. If this is set to false, alternate data - * directory must be provided - */ - @JsonProperty(value = "shouldUseAlternateTargetLocation") - private Boolean shouldUseAlternateTargetLocation; - - /* - * SQL specific property where user can chose to set no-recovery when - * restore operation is tried - */ - @JsonProperty(value = "isNonRecoverable") - private Boolean isNonRecoverable; - - /* - * Data directory details - */ - @JsonProperty(value = "alternateDirectoryPaths") - private List alternateDirectoryPaths; - - /** - * Get the shouldUseAlternateTargetLocation property: Default option set to true. If this is set to false, alternate - * data directory must be provided. - * - * @return the shouldUseAlternateTargetLocation value. - */ - public Boolean shouldUseAlternateTargetLocation() { - return this.shouldUseAlternateTargetLocation; - } - - /** - * Set the shouldUseAlternateTargetLocation property: Default option set to true. If this is set to false, alternate - * data directory must be provided. - * - * @param shouldUseAlternateTargetLocation the shouldUseAlternateTargetLocation value to set. - * @return the AzureWorkloadSqlRestoreRequestAutoGenerated object itself. - */ - public AzureWorkloadSqlRestoreRequestAutoGenerated withShouldUseAlternateTargetLocation( - Boolean shouldUseAlternateTargetLocation) { - this.shouldUseAlternateTargetLocation = shouldUseAlternateTargetLocation; - return this; - } - - /** - * Get the isNonRecoverable property: SQL specific property where user can chose to set no-recovery when restore - * operation is tried. - * - * @return the isNonRecoverable value. - */ - public Boolean isNonRecoverable() { - return this.isNonRecoverable; - } - - /** - * Set the isNonRecoverable property: SQL specific property where user can chose to set no-recovery when restore - * operation is tried. - * - * @param isNonRecoverable the isNonRecoverable value to set. - * @return the AzureWorkloadSqlRestoreRequestAutoGenerated object itself. - */ - public AzureWorkloadSqlRestoreRequestAutoGenerated withIsNonRecoverable(Boolean isNonRecoverable) { - this.isNonRecoverable = isNonRecoverable; - return this; - } - - /** - * Get the alternateDirectoryPaths property: Data directory details. - * - * @return the alternateDirectoryPaths value. - */ - public List alternateDirectoryPaths() { - return this.alternateDirectoryPaths; - } - - /** - * Set the alternateDirectoryPaths property: Data directory details. - * - * @param alternateDirectoryPaths the alternateDirectoryPaths value to set. - * @return the AzureWorkloadSqlRestoreRequestAutoGenerated object itself. - */ - public AzureWorkloadSqlRestoreRequestAutoGenerated withAlternateDirectoryPaths( - List alternateDirectoryPaths) { - this.alternateDirectoryPaths = alternateDirectoryPaths; - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSqlRestoreRequestAutoGenerated withRecoveryType(RecoveryType recoveryType) { - super.withRecoveryType(recoveryType); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSqlRestoreRequestAutoGenerated withSourceResourceId(String sourceResourceId) { - super.withSourceResourceId(sourceResourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSqlRestoreRequestAutoGenerated withPropertyBag(Map propertyBag) { - super.withPropertyBag(propertyBag); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSqlRestoreRequestAutoGenerated withTargetInfo(TargetRestoreInfo targetInfo) { - super.withTargetInfo(targetInfo); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSqlRestoreRequestAutoGenerated withRecoveryMode(RecoveryMode recoveryMode) { - super.withRecoveryMode(recoveryMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureWorkloadSqlRestoreRequestAutoGenerated withTargetVirtualMachineId(String targetVirtualMachineId) { - super.withTargetVirtualMachineId(targetVirtualMachineId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (alternateDirectoryPaths() != null) { - alternateDirectoryPaths().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreWithRehydrateRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreWithRehydrateRequest.java index 1c91ba913389..5e04a48a82d9 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreWithRehydrateRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureWorkloadSqlRestoreWithRehydrateRequest.java @@ -105,6 +105,13 @@ public AzureWorkloadSqlRestoreWithRehydrateRequest withRecoveryMode(RecoveryMode return this; } + /** {@inheritDoc} */ + @Override + public AzureWorkloadSqlRestoreWithRehydrateRequest withTargetVirtualMachineId(String targetVirtualMachineId) { + super.withTargetVirtualMachineId(targetVirtualMachineId); + return this; + } + /** * Validates the instance. * diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfig.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfig.java index 790dc86dbc1e..4da821052e8e 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfig.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfig.java @@ -11,7 +11,7 @@ /** The BackupResourceEncryptionConfig model. */ @Fluent -public final class BackupResourceEncryptionConfig { +public class BackupResourceEncryptionConfig { @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupResourceEncryptionConfig.class); /* diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtended.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtended.java new file mode 100644 index 000000000000..352070705bb5 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtended.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The BackupResourceEncryptionConfigExtended model. */ +@Fluent +public final class BackupResourceEncryptionConfigExtended extends BackupResourceEncryptionConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupResourceEncryptionConfigExtended.class); + + /* + * User Assigned Identity Id + */ + @JsonProperty(value = "userAssignedIdentity") + private String userAssignedIdentity; + + /* + * bool to indicate whether to use system Assigned Identity or not + */ + @JsonProperty(value = "useSystemAssignedIdentity") + private Boolean useSystemAssignedIdentity; + + /** + * Get the userAssignedIdentity property: User Assigned Identity Id. + * + * @return the userAssignedIdentity value. + */ + public String userAssignedIdentity() { + return this.userAssignedIdentity; + } + + /** + * Set the userAssignedIdentity property: User Assigned Identity Id. + * + * @param userAssignedIdentity the userAssignedIdentity value to set. + * @return the BackupResourceEncryptionConfigExtended object itself. + */ + public BackupResourceEncryptionConfigExtended withUserAssignedIdentity(String userAssignedIdentity) { + this.userAssignedIdentity = userAssignedIdentity; + return this; + } + + /** + * Get the useSystemAssignedIdentity property: bool to indicate whether to use system Assigned Identity or not. + * + * @return the useSystemAssignedIdentity value. + */ + public Boolean useSystemAssignedIdentity() { + return this.useSystemAssignedIdentity; + } + + /** + * Set the useSystemAssignedIdentity property: bool to indicate whether to use system Assigned Identity or not. + * + * @param useSystemAssignedIdentity the useSystemAssignedIdentity value to set. + * @return the BackupResourceEncryptionConfigExtended object itself. + */ + public BackupResourceEncryptionConfigExtended withUseSystemAssignedIdentity(Boolean useSystemAssignedIdentity) { + this.useSystemAssignedIdentity = useSystemAssignedIdentity; + return this; + } + + /** {@inheritDoc} */ + @Override + public BackupResourceEncryptionConfigExtended withEncryptionAtRestType(EncryptionAtRestType encryptionAtRestType) { + super.withEncryptionAtRestType(encryptionAtRestType); + return this; + } + + /** {@inheritDoc} */ + @Override + public BackupResourceEncryptionConfigExtended withKeyUri(String keyUri) { + super.withKeyUri(keyUri); + return this; + } + + /** {@inheritDoc} */ + @Override + public BackupResourceEncryptionConfigExtended withSubscriptionId(String subscriptionId) { + super.withSubscriptionId(subscriptionId); + return this; + } + + /** {@inheritDoc} */ + @Override + public BackupResourceEncryptionConfigExtended withLastUpdateStatus(LastUpdateStatus lastUpdateStatus) { + super.withLastUpdateStatus(lastUpdateStatus); + return this; + } + + /** {@inheritDoc} */ + @Override + public BackupResourceEncryptionConfigExtended withInfrastructureEncryptionState( + InfrastructureEncryptionState infrastructureEncryptionState) { + super.withInfrastructureEncryptionState(infrastructureEncryptionState); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtendedResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtendedResource.java new file mode 100644 index 000000000000..476b539c2f98 --- /dev/null +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigExtendedResource.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.recoveryservicesbackup.models; + +import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigExtendedResourceInner; +import java.util.Map; + +/** An immutable client-side representation of BackupResourceEncryptionConfigExtendedResource. */ +public interface BackupResourceEncryptionConfigExtendedResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: BackupResourceEncryptionConfigExtendedResource properties. + * + * @return the properties value. + */ + BackupResourceEncryptionConfigExtended properties(); + + /** + * Gets the etag property: Optional ETag. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the inner + * com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigExtendedResourceInner + * object. + * + * @return the inner object. + */ + BackupResourceEncryptionConfigExtendedResourceInner innerModel(); +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigResource.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigResource.java index b246f71403ce..792aab4caae7 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigResource.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigResource.java @@ -4,66 +4,92 @@ package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigResourceInner; +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** An immutable client-side representation of BackupResourceEncryptionConfigResource. */ -public interface BackupResourceEncryptionConfigResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); +/** The BackupResourceEncryptionConfigResource model. */ +@Fluent +public final class BackupResourceEncryptionConfigResource extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupResourceEncryptionConfigResource.class); - /** - * Gets the name property: The name of the resource. - * - * @return the name value. + /* + * BackupResourceEncryptionConfigResource properties */ - String name(); + @JsonProperty(value = "properties") + private BackupResourceEncryptionConfig properties; - /** - * Gets the type property: The type of the resource. - * - * @return the type value. + /* + * Optional ETag. */ - String type(); + @JsonProperty(value = "eTag") + private String etag; /** - * Gets the location property: The geo-location where the resource lives. + * Get the properties property: BackupResourceEncryptionConfigResource properties. * - * @return the location value. + * @return the properties value. */ - String location(); + public BackupResourceEncryptionConfig properties() { + return this.properties; + } /** - * Gets the tags property: Resource tags. + * Set the properties property: BackupResourceEncryptionConfigResource properties. * - * @return the tags value. + * @param properties the properties value to set. + * @return the BackupResourceEncryptionConfigResource object itself. */ - Map tags(); + public BackupResourceEncryptionConfigResource withProperties(BackupResourceEncryptionConfig properties) { + this.properties = properties; + return this; + } /** - * Gets the properties property: BackupResourceEncryptionConfigResource properties. + * Get the etag property: Optional ETag. * - * @return the properties value. + * @return the etag value. */ - BackupResourceEncryptionConfig properties(); + public String etag() { + return this.etag; + } /** - * Gets the etag property: Optional ETag. + * Set the etag property: Optional ETag. * - * @return the etag value. + * @param etag the etag value to set. + * @return the BackupResourceEncryptionConfigResource object itself. */ - String etag(); + public BackupResourceEncryptionConfigResource withEtag(String etag) { + this.etag = etag; + return this; + } + + /** {@inheritDoc} */ + @Override + public BackupResourceEncryptionConfigResource withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public BackupResourceEncryptionConfigResource withTags(Map tags) { + super.withTags(tags); + return this; + } /** - * Gets the inner - * com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigResourceInner - * object. + * Validates the instance. * - * @return the inner object. + * @throws IllegalArgumentException thrown if the instance is not valid. */ - BackupResourceEncryptionConfigResourceInner innerModel(); + public void validate() { + if (properties() != null) { + properties().validate(); + } + } } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigs.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigs.java index ed743352a46f..f6fb59bc1da0 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigs.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/BackupResourceEncryptionConfigs.java @@ -6,7 +6,6 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.recoveryservicesbackup.fluent.models.BackupResourceEncryptionConfigResourceInner; /** Resource collection API of BackupResourceEncryptionConfigs. */ public interface BackupResourceEncryptionConfigs { @@ -20,7 +19,7 @@ public interface BackupResourceEncryptionConfigs { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - BackupResourceEncryptionConfigResource get(String vaultName, String resourceGroupName); + BackupResourceEncryptionConfigExtendedResource get(String vaultName, String resourceGroupName); /** * Fetches Vault Encryption config. @@ -33,7 +32,7 @@ public interface BackupResourceEncryptionConfigs { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - Response getWithResponse( + Response getWithResponse( String vaultName, String resourceGroupName, Context context); /** @@ -46,7 +45,7 @@ Response getWithResponse( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void update(String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResourceInner parameters); + void update(String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters); /** * Updates Vault encryption config. @@ -61,8 +60,5 @@ Response getWithResponse( * @return the response. */ Response updateWithResponse( - String vaultName, - String resourceGroupName, - BackupResourceEncryptionConfigResourceInner parameters, - Context context); + String vaultName, String resourceGroupName, BackupResourceEncryptionConfigResource parameters, Context context); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LastUpdateStatus.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LastUpdateStatus.java index 4747da65b7f3..d073ca911281 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LastUpdateStatus.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/LastUpdateStatus.java @@ -28,6 +28,12 @@ public final class LastUpdateStatus extends ExpandableStringEnum validateWithResponse( + String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context); +} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Operations.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Operations.java index 5b574951c83a..cbaec3760867 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Operations.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/Operations.java @@ -4,37 +4,28 @@ package com.azure.resourcemanager.recoveryservicesbackup.models; -import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; /** Resource collection API of Operations. */ public interface Operations { /** - * Validate operation for specified backed up item. This is a synchronous operation. + * Returns the list of available operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters resource validate operation request. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return operations List response which contains list of available APIs. */ - ValidateOperationsResponse validate( - String vaultName, String resourceGroupName, ValidateOperationRequest parameters); + PagedIterable list(); /** - * Validate operation for specified backed up item. This is a synchronous operation. + * Returns the list of available operations. * - * @param vaultName The name of the recovery services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is present. - * @param parameters resource validate operation request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return operations List response which contains list of available APIs. */ - Response validateWithResponse( - String vaultName, String resourceGroupName, ValidateOperationRequest parameters, Context context); + PagedIterable list(Context context); } diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationsOperations.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationsOperations.java deleted file mode 100644 index d6bca099827f..000000000000 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/OperationsOperations.java +++ /dev/null @@ -1,31 +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.recoveryservicesbackup.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of OperationsOperations. */ -public interface OperationsOperations { - /** - * Returns the list of available operations. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return operations List response which contains list of available APIs. - */ - PagedIterable list(); - - /** - * Returns the list of available operations. - * - * @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 operations List response which contains list of available APIs. - */ - PagedIterable list(Context context); -} diff --git a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequest.java b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequest.java index 9151b75529e8..e1bd16316fe4 100644 --- a/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequest.java +++ b/sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/RestoreRequest.java @@ -21,8 +21,7 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "AzureFileShareRestoreRequest", value = AzureFileShareRestoreRequest.class), @JsonSubTypes.Type(name = "AzureWorkloadRestoreRequest", value = AzureWorkloadRestoreRequest.class), - @JsonSubTypes.Type(name = "IaasVMRestoreRequest", value = IaasVMRestoreRequest.class), - @JsonSubTypes.Type(name = "AzureWorkloadRestoreRequest", value = AzureWorkloadRestoreRequestAutoGenerated.class) + @JsonSubTypes.Type(name = "IaasVMRestoreRequest", value = IaasVMRestoreRequest.class) }) @Immutable public class RestoreRequest {