From 4df96be93c7538fdccdc0d49a97b2f921e578366 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 20 Mar 2018 18:49:00 +0000 Subject: [PATCH] Generated from a6e24f1e4205f46b865a197f080aaea9ec0994b0 Error descriptions changed in instanceFailoverGroup swagger --- .../BackupLongTermRetentionPoliciesInner.java | 157 +++++++++--------- .../BackupLongTermRetentionPolicyInner.java | 99 ++++------- .../DatabaseOperationsInner.java | 4 +- .../SqlManagementClientImpl.java | 84 ++++------ 4 files changed, 149 insertions(+), 195 deletions(-) diff --git a/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/BackupLongTermRetentionPoliciesInner.java b/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/BackupLongTermRetentionPoliciesInner.java index 628ed65af89..aa391ba7f30 100644 --- a/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/BackupLongTermRetentionPoliciesInner.java +++ b/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/BackupLongTermRetentionPoliciesInner.java @@ -16,6 +16,7 @@ import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; import java.io.IOException; +import java.util.List; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; @@ -55,25 +56,25 @@ public BackupLongTermRetentionPoliciesInner(Retrofit retrofit, SqlManagementClie */ interface BackupLongTermRetentionPoliciesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.BackupLongTermRetentionPolicies get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("policyName") String policyName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{backupLongTermRetentionPolicyName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("backupLongTermRetentionPolicyName") String backupLongTermRetentionPolicyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.BackupLongTermRetentionPolicies createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("policyName") String policyName, @Path("subscriptionId") String subscriptionId, @Body BackupLongTermRetentionPolicyInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{backupLongTermRetentionPolicyName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("backupLongTermRetentionPolicyName") String backupLongTermRetentionPolicyName, @Query("api-version") String apiVersion, @Body BackupLongTermRetentionPolicyInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.BackupLongTermRetentionPolicies beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("policyName") String policyName, @Path("subscriptionId") String subscriptionId, @Body BackupLongTermRetentionPolicyInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{backupLongTermRetentionPolicyName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("backupLongTermRetentionPolicyName") String backupLongTermRetentionPolicyName, @Query("api-version") String apiVersion, @Body BackupLongTermRetentionPolicyInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.BackupLongTermRetentionPolicies listByDatabase" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies") - Observable> listByDatabase(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listByDatabase(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } /** - * Gets a database's long term retention policy. + * Returns a database backup long term retention policy. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. @@ -88,7 +89,7 @@ public BackupLongTermRetentionPolicyInner get(String resourceGroupName, String s } /** - * Gets a database's long term retention policy. + * Returns a database backup long term retention policy. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. @@ -102,7 +103,7 @@ public ServiceFuture getAsync(String resourc } /** - * Gets a database's long term retention policy. + * Returns a database backup long term retention policy. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. @@ -120,7 +121,7 @@ public BackupLongTermRetentionPolicyInner call(ServiceResponse> getWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -138,12 +142,9 @@ public Observable> getWithSe if (databaseName == null) { throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String policyName = "default"; - final String apiVersion = "2017-03-01-preview"; - return service.get(resourceGroupName, serverName, databaseName, policyName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + final String backupLongTermRetentionPolicyName = "Default"; + final String apiVersion = "2014-04-01"; + return service.get(this.client.subscriptionId(), resourceGroupName, serverName, databaseName, backupLongTermRetentionPolicyName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -165,12 +166,12 @@ private ServiceResponse getDelegate(Response } /** - * Sets a database's long term retention policy. + * Creates or updates a database backup long term retention policy. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The long term retention policy info. + * @param databaseName The name of the database + * @param parameters The required parameters to update a backup long term retention policy * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -181,12 +182,12 @@ public BackupLongTermRetentionPolicyInner createOrUpdate(String resourceGroupNam } /** - * Sets a database's long term retention policy. + * Creates or updates a database backup long term retention policy. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The long term retention policy info. + * @param databaseName The name of the database + * @param parameters The required parameters to update a backup long term retention policy * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -196,12 +197,12 @@ public ServiceFuture createOrUpdateAsync(Str } /** - * Sets a database's long term retention policy. + * Creates or updates a database backup long term retention policy. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The long term retention policy info. + * @param databaseName The name of the database + * @param parameters The required parameters to update a backup long term retention policy * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ @@ -215,16 +216,19 @@ public BackupLongTermRetentionPolicyInner call(ServiceResponse> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, BackupLongTermRetentionPolicyInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -234,26 +238,23 @@ public Observable> createOrU if (databaseName == null) { throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String policyName = "default"; - final String apiVersion = "2017-03-01-preview"; - Observable> observable = service.createOrUpdate(resourceGroupName, serverName, databaseName, policyName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + final String backupLongTermRetentionPolicyName = "Default"; + final String apiVersion = "2014-04-01"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, serverName, databaseName, backupLongTermRetentionPolicyName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** - * Sets a database's long term retention policy. + * Creates or updates a database backup long term retention policy. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The long term retention policy info. + * @param databaseName The name of the database + * @param parameters The required parameters to update a backup long term retention policy * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -264,12 +265,12 @@ public BackupLongTermRetentionPolicyInner beginCreateOrUpdate(String resourceGro } /** - * Sets a database's long term retention policy. + * Creates or updates a database backup long term retention policy. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The long term retention policy info. + * @param databaseName The name of the database + * @param parameters The required parameters to update a backup long term retention policy * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -279,12 +280,12 @@ public ServiceFuture beginCreateOrUpdateAsyn } /** - * Sets a database's long term retention policy. + * Creates or updates a database backup long term retention policy. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param parameters The long term retention policy info. + * @param databaseName The name of the database + * @param parameters The required parameters to update a backup long term retention policy * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BackupLongTermRetentionPolicyInner object */ @@ -298,16 +299,19 @@ public BackupLongTermRetentionPolicyInner call(ServiceResponse> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, BackupLongTermRetentionPolicyInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -317,16 +321,13 @@ public Observable> beginCrea if (databaseName == null) { throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String policyName = "default"; - final String apiVersion = "2017-03-01-preview"; - return service.beginCreateOrUpdate(resourceGroupName, serverName, databaseName, policyName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + final String backupLongTermRetentionPolicyName = "Default"; + final String apiVersion = "2014-04-01"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, serverName, databaseName, backupLongTermRetentionPolicyName, apiVersion, parameters, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -343,13 +344,14 @@ public Observable> call(Resp private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets a database's long term retention policy. + * Returns a database backup long term retention policy. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. @@ -357,14 +359,14 @@ private ServiceResponse beginCreateOrUpdateD * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the BackupLongTermRetentionPolicyInner object if successful. + * @return the List<BackupLongTermRetentionPolicyInner> object if successful. */ - public BackupLongTermRetentionPolicyInner listByDatabase(String resourceGroupName, String serverName, String databaseName) { + public List listByDatabase(String resourceGroupName, String serverName, String databaseName) { return listByDatabaseWithServiceResponseAsync(resourceGroupName, serverName, databaseName).toBlocking().single().body(); } /** - * Gets a database's long term retention policy. + * Returns a database backup long term retention policy. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. @@ -373,38 +375,41 @@ public BackupLongTermRetentionPolicyInner listByDatabase(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName, final ServiceCallback serviceCallback) { + public ServiceFuture> listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName, final ServiceCallback> serviceCallback) { return ServiceFuture.fromResponse(listByDatabaseWithServiceResponseAsync(resourceGroupName, serverName, databaseName), serviceCallback); } /** - * Gets a database's long term retention policy. + * Returns a database backup long term retention policy. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BackupLongTermRetentionPolicyInner object + * @return the observable to the List<BackupLongTermRetentionPolicyInner> object */ - public Observable listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName) { - return listByDatabaseWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1, BackupLongTermRetentionPolicyInner>() { + public Observable> listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName) { + return listByDatabaseWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1>, List>() { @Override - public BackupLongTermRetentionPolicyInner call(ServiceResponse response) { + public List call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets a database's long term retention policy. + * Returns a database backup long term retention policy. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BackupLongTermRetentionPolicyInner object + * @return the observable to the List<BackupLongTermRetentionPolicyInner> object */ - public Observable> listByDatabaseWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName) { + public Observable>> listByDatabaseWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -414,16 +419,14 @@ public Observable> listByDat if (databaseName == null) { throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - final String apiVersion = "2017-03-01-preview"; - return service.listByDatabase(resourceGroupName, serverName, databaseName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2014-04-01"; + return service.listByDatabase(this.client.subscriptionId(), resourceGroupName, serverName, databaseName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = listByDatabaseDelegate(response); + ServiceResponse> result = listByDatabaseDelegate(response); + ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -432,9 +435,9 @@ public Observable> call(Resp }); } - private ServiceResponse listByDatabaseDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listByDatabaseDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/BackupLongTermRetentionPolicyInner.java b/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/BackupLongTermRetentionPolicyInner.java index fa8e34765d6..f82ed116e2d 100644 --- a/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/BackupLongTermRetentionPolicyInner.java +++ b/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/BackupLongTermRetentionPolicyInner.java @@ -8,115 +8,80 @@ package com.microsoft.azure.management.sql.implementation; +import com.microsoft.azure.management.sql.BackupLongTermRetentionPolicyState; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; /** - * A long term retention policy. + * A backup long term retention policy. */ @JsonFlatten public class BackupLongTermRetentionPolicyInner extends ProxyResourceInner { /** - * The weekly retention policy for an LTR backup in an ISO 8601 format. + * The geo-location where the resource lives. */ - @JsonProperty(value = "properties.weeklyRetention") - private String weeklyRetention; + @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) + private String location; /** - * The montly retention policy for an LTR backup in an ISO 8601 format. + * The status of the backup long term retention policy. Possible values + * include: 'Disabled', 'Enabled'. */ - @JsonProperty(value = "properties.monthlyRetention") - private String monthlyRetention; + @JsonProperty(value = "properties.state", required = true) + private BackupLongTermRetentionPolicyState state; /** - * The yearly retention policy for an LTR backup in an ISO 8601 format. + * The azure recovery services backup protection policy resource id. */ - @JsonProperty(value = "properties.yearlyRetention") - private String yearlyRetention; + @JsonProperty(value = "properties.recoveryServicesBackupPolicyResourceId", required = true) + private String recoveryServicesBackupPolicyResourceId; /** - * The week of year to take the yearly backup in an ISO 8601 format. - */ - @JsonProperty(value = "properties.weekOfYear") - private Integer weekOfYear; - - /** - * Get the weeklyRetention value. - * - * @return the weeklyRetention value - */ - public String weeklyRetention() { - return this.weeklyRetention; - } - - /** - * Set the weeklyRetention value. - * - * @param weeklyRetention the weeklyRetention value to set - * @return the BackupLongTermRetentionPolicyInner object itself. - */ - public BackupLongTermRetentionPolicyInner withWeeklyRetention(String weeklyRetention) { - this.weeklyRetention = weeklyRetention; - return this; - } - - /** - * Get the monthlyRetention value. + * Get the location value. * - * @return the monthlyRetention value + * @return the location value */ - public String monthlyRetention() { - return this.monthlyRetention; - } - - /** - * Set the monthlyRetention value. - * - * @param monthlyRetention the monthlyRetention value to set - * @return the BackupLongTermRetentionPolicyInner object itself. - */ - public BackupLongTermRetentionPolicyInner withMonthlyRetention(String monthlyRetention) { - this.monthlyRetention = monthlyRetention; - return this; + public String location() { + return this.location; } /** - * Get the yearlyRetention value. + * Get the state value. * - * @return the yearlyRetention value + * @return the state value */ - public String yearlyRetention() { - return this.yearlyRetention; + public BackupLongTermRetentionPolicyState state() { + return this.state; } /** - * Set the yearlyRetention value. + * Set the state value. * - * @param yearlyRetention the yearlyRetention value to set + * @param state the state value to set * @return the BackupLongTermRetentionPolicyInner object itself. */ - public BackupLongTermRetentionPolicyInner withYearlyRetention(String yearlyRetention) { - this.yearlyRetention = yearlyRetention; + public BackupLongTermRetentionPolicyInner withState(BackupLongTermRetentionPolicyState state) { + this.state = state; return this; } /** - * Get the weekOfYear value. + * Get the recoveryServicesBackupPolicyResourceId value. * - * @return the weekOfYear value + * @return the recoveryServicesBackupPolicyResourceId value */ - public Integer weekOfYear() { - return this.weekOfYear; + public String recoveryServicesBackupPolicyResourceId() { + return this.recoveryServicesBackupPolicyResourceId; } /** - * Set the weekOfYear value. + * Set the recoveryServicesBackupPolicyResourceId value. * - * @param weekOfYear the weekOfYear value to set + * @param recoveryServicesBackupPolicyResourceId the recoveryServicesBackupPolicyResourceId value to set * @return the BackupLongTermRetentionPolicyInner object itself. */ - public BackupLongTermRetentionPolicyInner withWeekOfYear(Integer weekOfYear) { - this.weekOfYear = weekOfYear; + public BackupLongTermRetentionPolicyInner withRecoveryServicesBackupPolicyResourceId(String recoveryServicesBackupPolicyResourceId) { + this.recoveryServicesBackupPolicyResourceId = recoveryServicesBackupPolicyResourceId; return this; } diff --git a/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/DatabaseOperationsInner.java b/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/DatabaseOperationsInner.java index 60f84b914cf..a38aea96c5c 100644 --- a/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/DatabaseOperationsInner.java +++ b/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/DatabaseOperationsInner.java @@ -148,7 +148,7 @@ public Observable> cancelWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-10-01-preview"; + final String apiVersion = "2017-03-01-preview"; return service.cancel(resourceGroupName, serverName, databaseName, operationId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -277,7 +277,7 @@ public Observable>> listByDatabaseS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-10-01-preview"; + final String apiVersion = "2017-03-01-preview"; return service.listByDatabase(resourceGroupName, serverName, databaseName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/SqlManagementClientImpl.java b/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/SqlManagementClientImpl.java index 84996f18414..9b452d28e44 100644 --- a/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/SqlManagementClientImpl.java +++ b/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/implementation/SqlManagementClientImpl.java @@ -120,6 +120,32 @@ public SqlManagementClientImpl withGenerateClientRequestId(boolean generateClien return this; } + /** + * The BackupLongTermRetentionPoliciesInner object to access its operations. + */ + private BackupLongTermRetentionPoliciesInner backupLongTermRetentionPolicies; + + /** + * Gets the BackupLongTermRetentionPoliciesInner object to access its operations. + * @return the BackupLongTermRetentionPoliciesInner object. + */ + public BackupLongTermRetentionPoliciesInner backupLongTermRetentionPolicies() { + return this.backupLongTermRetentionPolicies; + } + + /** + * The BackupLongTermRetentionVaultsInner object to access its operations. + */ + private BackupLongTermRetentionVaultsInner backupLongTermRetentionVaults; + + /** + * Gets the BackupLongTermRetentionVaultsInner object to access its operations. + * @return the BackupLongTermRetentionVaultsInner object. + */ + public BackupLongTermRetentionVaultsInner backupLongTermRetentionVaults() { + return this.backupLongTermRetentionVaults; + } + /** * The RecoverableDatabasesInner object to access its operations. */ @@ -576,29 +602,16 @@ public VirtualNetworkRulesInner virtualNetworkRules() { } /** - * The LongTermRetentionBackupsInner object to access its operations. - */ - private LongTermRetentionBackupsInner longTermRetentionBackups; - - /** - * Gets the LongTermRetentionBackupsInner object to access its operations. - * @return the LongTermRetentionBackupsInner object. - */ - public LongTermRetentionBackupsInner longTermRetentionBackups() { - return this.longTermRetentionBackups; - } - - /** - * The BackupLongTermRetentionPoliciesInner object to access its operations. + * The DatabaseOperationsInner object to access its operations. */ - private BackupLongTermRetentionPoliciesInner backupLongTermRetentionPolicies; + private DatabaseOperationsInner databaseOperations; /** - * Gets the BackupLongTermRetentionPoliciesInner object to access its operations. - * @return the BackupLongTermRetentionPoliciesInner object. + * Gets the DatabaseOperationsInner object to access its operations. + * @return the DatabaseOperationsInner object. */ - public BackupLongTermRetentionPoliciesInner backupLongTermRetentionPolicies() { - return this.backupLongTermRetentionPolicies; + public DatabaseOperationsInner databaseOperations() { + return this.databaseOperations; } /** @@ -640,32 +653,6 @@ public RestorePointsInner restorePoints() { return this.restorePoints; } - /** - * The DatabaseOperationsInner object to access its operations. - */ - private DatabaseOperationsInner databaseOperations; - - /** - * Gets the DatabaseOperationsInner object to access its operations. - * @return the DatabaseOperationsInner object. - */ - public DatabaseOperationsInner databaseOperations() { - return this.databaseOperations; - } - - /** - * The ElasticPoolOperationsInner object to access its operations. - */ - private ElasticPoolOperationsInner elasticPoolOperations; - - /** - * Gets the ElasticPoolOperationsInner object to access its operations. - * @return the ElasticPoolOperationsInner object. - */ - public ElasticPoolOperationsInner elasticPoolOperations() { - return this.elasticPoolOperations; - } - /** * Initializes an instance of SqlManagementClient client. * @@ -700,6 +687,8 @@ protected void initialize() { this.acceptLanguage = "en-US"; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; + this.backupLongTermRetentionPolicies = new BackupLongTermRetentionPoliciesInner(restClient().retrofit(), this); + this.backupLongTermRetentionVaults = new BackupLongTermRetentionVaultsInner(restClient().retrofit(), this); this.recoverableDatabases = new RecoverableDatabasesInner(restClient().retrofit(), this); this.restorableDroppedDatabases = new RestorableDroppedDatabasesInner(restClient().retrofit(), this); this.capabilities = new CapabilitiesInner(restClient().retrofit(), this); @@ -735,13 +724,10 @@ protected void initialize() { this.syncMembers = new SyncMembersInner(restClient().retrofit(), this); this.subscriptionUsages = new SubscriptionUsagesInner(restClient().retrofit(), this); this.virtualNetworkRules = new VirtualNetworkRulesInner(restClient().retrofit(), this); - this.longTermRetentionBackups = new LongTermRetentionBackupsInner(restClient().retrofit(), this); - this.backupLongTermRetentionPolicies = new BackupLongTermRetentionPoliciesInner(restClient().retrofit(), this); + this.databaseOperations = new DatabaseOperationsInner(restClient().retrofit(), this); this.serverAutomaticTunings = new ServerAutomaticTuningsInner(restClient().retrofit(), this); this.serverDnsAliases = new ServerDnsAliasesInner(restClient().retrofit(), this); this.restorePoints = new RestorePointsInner(restClient().retrofit(), this); - this.databaseOperations = new DatabaseOperationsInner(restClient().retrofit(), this); - this.elasticPoolOperations = new ElasticPoolOperationsInner(restClient().retrofit(), this); this.azureClient = new AzureClient(this); }