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 aa391ba7f30..628ed65af89 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,7 +16,6 @@ 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; @@ -56,25 +55,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/{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); + @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); @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/{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); + @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); @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/{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); + @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); @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("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); + 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); } /** - * Returns a database backup long term retention policy. + * Gets a database's 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. @@ -89,7 +88,7 @@ public BackupLongTermRetentionPolicyInner get(String resourceGroupName, String s } /** - * Returns a database backup long term retention policy. + * Gets a database's 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. @@ -103,7 +102,7 @@ public ServiceFuture getAsync(String resourc } /** - * Returns a database backup long term retention policy. + * Gets a database's 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. @@ -121,7 +120,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."); } @@ -142,9 +138,12 @@ public Observable> getWithSe if (databaseName == null) { throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); } - 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()) + 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()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -166,12 +165,12 @@ private ServiceResponse getDelegate(Response } /** - * Creates or updates a database backup long term retention policy. + * Sets a database's 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 required parameters to update a backup long term retention policy + * @param databaseName The name of the database. + * @param parameters The long term retention policy info. * @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 @@ -182,12 +181,12 @@ public BackupLongTermRetentionPolicyInner createOrUpdate(String resourceGroupNam } /** - * Creates or updates a database backup long term retention policy. + * Sets a database's 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 required parameters to update a backup long term retention policy + * @param databaseName The name of the database. + * @param parameters The long term retention policy info. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -197,12 +196,12 @@ public ServiceFuture createOrUpdateAsync(Str } /** - * Creates or updates a database backup long term retention policy. + * Sets a database's 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 required parameters to update a backup long term retention policy + * @param databaseName The name of the database. + * @param parameters The long term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ @@ -216,19 +215,16 @@ 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."); } @@ -238,23 +234,26 @@ 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 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()); + 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()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** - * Creates or updates a database backup long term retention policy. + * Sets a database's 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 required parameters to update a backup long term retention policy + * @param databaseName The name of the database. + * @param parameters The long term retention policy info. * @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 @@ -265,12 +264,12 @@ public BackupLongTermRetentionPolicyInner beginCreateOrUpdate(String resourceGro } /** - * Creates or updates a database backup long term retention policy. + * Sets a database's 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 required parameters to update a backup long term retention policy + * @param databaseName The name of the database. + * @param parameters The long term retention policy info. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -280,12 +279,12 @@ public ServiceFuture beginCreateOrUpdateAsyn } /** - * Creates or updates a database backup long term retention policy. + * Sets a database's 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 required parameters to update a backup long term retention policy + * @param databaseName The name of the database. + * @param parameters The long term retention policy info. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the BackupLongTermRetentionPolicyInner object */ @@ -299,19 +298,16 @@ 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."); } @@ -321,13 +317,16 @@ 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 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()) + 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()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -344,14 +343,13 @@ 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); } /** - * Returns a database backup long term retention policy. + * Gets a database's 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. @@ -359,14 +357,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 List<BackupLongTermRetentionPolicyInner> object if successful. + * @return the BackupLongTermRetentionPolicyInner object if successful. */ - public List listByDatabase(String resourceGroupName, String serverName, String databaseName) { + public BackupLongTermRetentionPolicyInner listByDatabase(String resourceGroupName, String serverName, String databaseName) { return listByDatabaseWithServiceResponseAsync(resourceGroupName, serverName, databaseName).toBlocking().single().body(); } /** - * Returns a database backup long term retention policy. + * Gets a database's 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. @@ -375,41 +373,38 @@ public List listByDatabase(String resourceGr * @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); } /** - * Returns a database backup long term retention policy. + * Gets a database's 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 List<BackupLongTermRetentionPolicyInner> object + * @return the observable to the BackupLongTermRetentionPolicyInner object */ - public Observable> listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName) { - return listByDatabaseWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1>, List>() { + public Observable listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName) { + return listByDatabaseWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1, BackupLongTermRetentionPolicyInner>() { @Override - public List call(ServiceResponse> response) { + public BackupLongTermRetentionPolicyInner call(ServiceResponse response) { return response.body(); } }); } /** - * Returns a database backup long term retention policy. + * Gets a database's 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 List<BackupLongTermRetentionPolicyInner> object + * @return the observable to the BackupLongTermRetentionPolicyInner object */ - 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."); - } + public Observable> listByDatabaseWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -419,14 +414,16 @@ public Observable>> lis if (databaseName == null) { throw new IllegalArgumentException("Parameter databaseName is required and cannot be null."); } - 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>>>() { + 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>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = listByDatabaseDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); + ServiceResponse clientResponse = listByDatabaseDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -435,9 +432,9 @@ public Observable>> cal }); } - private ServiceResponse> listByDatabaseDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse listByDatabaseDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().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 f82ed116e2d..fa8e34765d6 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,80 +8,115 @@ 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 backup long term retention policy. + * A long term retention policy. */ @JsonFlatten public class BackupLongTermRetentionPolicyInner extends ProxyResourceInner { /** - * The geo-location where the resource lives. + * The weekly retention policy for an LTR backup in an ISO 8601 format. */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) - private String location; + @JsonProperty(value = "properties.weeklyRetention") + private String weeklyRetention; /** - * The status of the backup long term retention policy. Possible values - * include: 'Disabled', 'Enabled'. + * The montly retention policy for an LTR backup in an ISO 8601 format. */ - @JsonProperty(value = "properties.state", required = true) - private BackupLongTermRetentionPolicyState state; + @JsonProperty(value = "properties.monthlyRetention") + private String monthlyRetention; /** - * The azure recovery services backup protection policy resource id. + * The yearly retention policy for an LTR backup in an ISO 8601 format. */ - @JsonProperty(value = "properties.recoveryServicesBackupPolicyResourceId", required = true) - private String recoveryServicesBackupPolicyResourceId; + @JsonProperty(value = "properties.yearlyRetention") + private String yearlyRetention; /** - * Get the location value. + * 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. * - * @return the location value + * @return the monthlyRetention value */ - public String location() { - return this.location; + 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; } /** - * Get the state value. + * Get the yearlyRetention value. * - * @return the state value + * @return the yearlyRetention value */ - public BackupLongTermRetentionPolicyState state() { - return this.state; + public String yearlyRetention() { + return this.yearlyRetention; } /** - * Set the state value. + * Set the yearlyRetention value. * - * @param state the state value to set + * @param yearlyRetention the yearlyRetention value to set * @return the BackupLongTermRetentionPolicyInner object itself. */ - public BackupLongTermRetentionPolicyInner withState(BackupLongTermRetentionPolicyState state) { - this.state = state; + public BackupLongTermRetentionPolicyInner withYearlyRetention(String yearlyRetention) { + this.yearlyRetention = yearlyRetention; return this; } /** - * Get the recoveryServicesBackupPolicyResourceId value. + * Get the weekOfYear value. * - * @return the recoveryServicesBackupPolicyResourceId value + * @return the weekOfYear value */ - public String recoveryServicesBackupPolicyResourceId() { - return this.recoveryServicesBackupPolicyResourceId; + public Integer weekOfYear() { + return this.weekOfYear; } /** - * Set the recoveryServicesBackupPolicyResourceId value. + * Set the weekOfYear value. * - * @param recoveryServicesBackupPolicyResourceId the recoveryServicesBackupPolicyResourceId value to set + * @param weekOfYear the weekOfYear value to set * @return the BackupLongTermRetentionPolicyInner object itself. */ - public BackupLongTermRetentionPolicyInner withRecoveryServicesBackupPolicyResourceId(String recoveryServicesBackupPolicyResourceId) { - this.recoveryServicesBackupPolicyResourceId = recoveryServicesBackupPolicyResourceId; + public BackupLongTermRetentionPolicyInner withWeekOfYear(Integer weekOfYear) { + this.weekOfYear = weekOfYear; 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 a38aea96c5c..60f84b914cf 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-03-01-preview"; + final String apiVersion = "2017-10-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-03-01-preview"; + final String apiVersion = "2017-10-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 9b452d28e44..84996f18414 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,32 +120,6 @@ 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. */ @@ -602,16 +576,29 @@ public VirtualNetworkRulesInner virtualNetworkRules() { } /** - * The DatabaseOperationsInner object to access its operations. + * The LongTermRetentionBackupsInner object to access its operations. */ - private DatabaseOperationsInner databaseOperations; + private LongTermRetentionBackupsInner longTermRetentionBackups; /** - * Gets the DatabaseOperationsInner object to access its operations. - * @return the DatabaseOperationsInner object. + * Gets the LongTermRetentionBackupsInner object to access its operations. + * @return the LongTermRetentionBackupsInner object. */ - public DatabaseOperationsInner databaseOperations() { - return this.databaseOperations; + public LongTermRetentionBackupsInner longTermRetentionBackups() { + return this.longTermRetentionBackups; + } + + /** + * 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; } /** @@ -653,6 +640,32 @@ 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. * @@ -687,8 +700,6 @@ 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); @@ -724,10 +735,13 @@ 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.databaseOperations = new DatabaseOperationsInner(restClient().retrofit(), this); + this.longTermRetentionBackups = new LongTermRetentionBackupsInner(restClient().retrofit(), this); + this.backupLongTermRetentionPolicies = new BackupLongTermRetentionPoliciesInner(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); }