Skip to content

Commit

Permalink
[AutoPR sql/resource-manager] [Don't Merge, Service Rolling out ~Jan/…
Browse files Browse the repository at this point in the history
…28/18] Adding API Specs for Long Term Retention V2 (#294)

* Generated from c3aa875664e691c5cfd9237039358ebc522544ee

Updating more references to BackupLongTermRetentionPolic(y|ies)

* Generated from c3aa875664e691c5cfd9237039358ebc522544ee

Updating more references to BackupLongTermRetentionPolic(y|ies)

* Generated from 68173d9459aa56809cfef2ead837c976af0adc15

Update more references of LongTermRetentionPolicy to BackupLongTermRetentionPolicy
  • Loading branch information
AutorestCI authored Mar 15, 2018
1 parent d8d1b9d commit a7dda78
Show file tree
Hide file tree
Showing 8 changed files with 2,341 additions and 140 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.sql;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for DatabaseState.
*/
public final class DatabaseState extends ExpandableStringEnum<DatabaseState> {
/** Static value All for DatabaseState. */
public static final DatabaseState ALL = fromString("All");

/** Static value Live for DatabaseState. */
public static final DatabaseState LIVE = fromString("Live");

/** Static value Deleted for DatabaseState. */
public static final DatabaseState DELETED = fromString("Deleted");

/**
* Creates or finds a DatabaseState from its string representation.
* @param name a name to look for
* @return the corresponding DatabaseState
*/
@JsonCreator
public static DatabaseState fromString(String name) {
return fromString(name, DatabaseState.class);
}

/**
* @return known DatabaseState values
*/
public static Collection<DatabaseState> values() {
return values(DatabaseState.class);
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.sql.implementation;

import org.joda.time.DateTime;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;

/**
* A long term retention backup.
*/
@JsonFlatten
public class LongTermRetentionBackupInner extends ProxyResourceInner {
/**
* The server name that the backup database belong to.
*/
@JsonProperty(value = "properties.serverName", access = JsonProperty.Access.WRITE_ONLY)
private String serverName;

/**
* The create time of the server.
*/
@JsonProperty(value = "properties.serverCreateTime", access = JsonProperty.Access.WRITE_ONLY)
private DateTime serverCreateTime;

/**
* The name of the database the backup belong to.
*/
@JsonProperty(value = "properties.databaseName", access = JsonProperty.Access.WRITE_ONLY)
private String databaseName;

/**
* The delete time of the database.
*/
@JsonProperty(value = "properties.databaseDeletionTime", access = JsonProperty.Access.WRITE_ONLY)
private DateTime databaseDeletionTime;

/**
* The time the backup was taken.
*/
@JsonProperty(value = "properties.backupTime", access = JsonProperty.Access.WRITE_ONLY)
private DateTime backupTime;

/**
* The time the long term retention backup will expire.
*/
@JsonProperty(value = "properties.backupExpirationTime", access = JsonProperty.Access.WRITE_ONLY)
private DateTime backupExpirationTime;

/**
* Get the serverName value.
*
* @return the serverName value
*/
public String serverName() {
return this.serverName;
}

/**
* Get the serverCreateTime value.
*
* @return the serverCreateTime value
*/
public DateTime serverCreateTime() {
return this.serverCreateTime;
}

/**
* Get the databaseName value.
*
* @return the databaseName value
*/
public String databaseName() {
return this.databaseName;
}

/**
* Get the databaseDeletionTime value.
*
* @return the databaseDeletionTime value
*/
public DateTime databaseDeletionTime() {
return this.databaseDeletionTime;
}

/**
* Get the backupTime value.
*
* @return the backupTime value
*/
public DateTime backupTime() {
return this.backupTime;
}

/**
* Get the backupExpirationTime value.
*
* @return the backupExpirationTime value
*/
public DateTime backupExpirationTime() {
return this.backupExpirationTime;
}

}
Loading

0 comments on commit a7dda78

Please sign in to comment.