Skip to content

Commit

Permalink
Generated SQL SDK as per new swagger spec
Browse files Browse the repository at this point in the history
  • Loading branch information
anudeepsharma committed Oct 26, 2016
1 parent 20d734b commit 49bf336
Show file tree
Hide file tree
Showing 22 changed files with 902 additions and 1,113 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/**
* 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 com.fasterxml.jackson.annotation.JsonValue;

/**
* Defines values for ElasticPoolState.
*/
public final class ElasticPoolState {
/** Static value Creating for ElasticPoolState. */
public static final ElasticPoolState CREATING = new ElasticPoolState("Creating");

/** Static value Ready for ElasticPoolState. */
public static final ElasticPoolState READY = new ElasticPoolState("Ready");

/** Static value Disabled for ElasticPoolState. */
public static final ElasticPoolState DISABLED = new ElasticPoolState("Disabled");

private String value;

/**
* Creates a custom value for ElasticPoolState.
* @param value the custom value
*/
public ElasticPoolState(String value) {
this.value = value;
}

@JsonValue
@Override
public String toString() {
return value;
}

@Override
public int hashCode() {
return value.hashCode();
}

@Override
public boolean equals(Object obj) {
if (!(obj instanceof ElasticPoolState)) {
return false;
}
if (obj == this) {
return true;
}
ElasticPoolState rhs = (ElasticPoolState) obj;
if (value == null) {
return rhs.value == null;
} else {
return value.equals(rhs.value);
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/**
* 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 com.fasterxml.jackson.annotation.JsonValue;

/**
* Defines values for ServiceObjectiveName.
*/
public final class ServiceObjectiveName {
/** Static value Basic for ServiceObjectiveName. */
public static final ServiceObjectiveName BASIC = new ServiceObjectiveName("Basic");

/** Static value S0 for ServiceObjectiveName. */
public static final ServiceObjectiveName S0 = new ServiceObjectiveName("S0");

/** Static value S1 for ServiceObjectiveName. */
public static final ServiceObjectiveName S1 = new ServiceObjectiveName("S1");

/** Static value S2 for ServiceObjectiveName. */
public static final ServiceObjectiveName S2 = new ServiceObjectiveName("S2");

/** Static value S3 for ServiceObjectiveName. */
public static final ServiceObjectiveName S3 = new ServiceObjectiveName("S3");

/** Static value P1 for ServiceObjectiveName. */
public static final ServiceObjectiveName P1 = new ServiceObjectiveName("P1");

/** Static value P2 for ServiceObjectiveName. */
public static final ServiceObjectiveName P2 = new ServiceObjectiveName("P2");

/** Static value P3 for ServiceObjectiveName. */
public static final ServiceObjectiveName P3 = new ServiceObjectiveName("P3");

private String value;

/**
* Creates a custom value for ServiceObjectiveName.
* @param value the custom value
*/
public ServiceObjectiveName(String value) {
this.value = value;
}

@JsonValue
@Override
public String toString() {
return value;
}

@Override
public int hashCode() {
return value.hashCode();
}

@Override
public boolean equals(Object obj) {
if (!(obj instanceof ServiceObjectiveName)) {
return false;
}
if (obj == this) {
return true;
}
ServiceObjectiveName rhs = (ServiceObjectiveName) obj;
if (value == null) {
return rhs.value == null;
} else {
return value.equals(rhs.value);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ public interface SqlDatabase extends
* SQL Database, this is the Service Level Objective that is being
* applied to the Azure SQL Database
*/
String requestedServiceObjectiveName();
ServiceObjectiveName requestedServiceObjectiveName();

/**
* @return the Service Level Objective of the Azure SQL Database.
*/
String serviceLevelObjective();
ServiceObjectiveName serviceLevelObjective();

/**
* @return the status of the Azure SQL Database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public interface SqlElasticPool extends
/**
* @return the state of the Azure SQL Elastic Pool
*/
String state();
ElasticPoolState state();

/**
* @return the edition of Azure SQL Elastic Pool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.microsoft.azure.management.resources.fluentcore.model.Refreshable;
import com.microsoft.azure.management.resources.fluentcore.model.Updatable;
import com.microsoft.azure.management.resources.fluentcore.model.Wrapper;
import com.microsoft.azure.management.sql.implementation.FirewallRuleInner;
import com.microsoft.azure.management.sql.implementation.ServerFirewallRuleInner;

/**
* An immutable client-side representation of an Azure SQL Server FirewallRule.
Expand All @@ -22,7 +22,7 @@ public interface SqlFirewallRule extends
IndependentChild,
Refreshable<SqlFirewallRule>,
Updatable<SqlFirewallRule.Update>,
Wrapper<FirewallRuleInner> {
Wrapper<ServerFirewallRuleInner> {

/**
* @return the SQL Server name to which this firewall rule belongs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.joda.time.DateTime;
import java.util.UUID;
import com.microsoft.azure.management.sql.DatabaseEditions;
import com.microsoft.azure.management.sql.ServiceObjectiveName;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;
Expand Down Expand Up @@ -80,25 +81,30 @@ public class DatabaseInner extends Resource {

/**
* The configured Service Level Objective Id of the Azure SQL Database.
* This is the Service Level Objective that is being applied to the Azure
* SQL Database.
* This is the Service Level Objective that is in the process of being
* applied to the Azure SQL Database. Once successfully updated, it will
* match the value of currentServiceObjectiveId property.
*/
@JsonProperty(value = "properties.requestedServiceObjectiveId")
private UUID requestedServiceObjectiveId;

/**
* The name of the configured Service Level Objective of the Azure SQL
* Database. This is the Service Level Objective that is being applied to
* the Azure SQL Database.
* Database. This is the Service Level Objective that is in the process
* of being applied to the Azure SQL Database. Once successfully
* updated, it will match the value of serviceLevelObjective property.
* Possible values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', 'P2',
* 'P3'.
*/
@JsonProperty(value = "properties.requestedServiceObjectiveName")
private String requestedServiceObjectiveName;
private ServiceObjectiveName requestedServiceObjectiveName;

/**
* The Service Level Objective of the Azure SQL Database.
* The current Service Level Objective of the Azure SQL Database. Possible
* values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', 'P2', 'P3'.
*/
@JsonProperty(value = "properties.serviceLevelObjective", access = JsonProperty.Access.WRITE_ONLY)
private String serviceLevelObjective;
private ServiceObjectiveName serviceLevelObjective;

/**
* The status of the Azure SQL Database.
Expand Down Expand Up @@ -278,7 +284,7 @@ public DatabaseInner withRequestedServiceObjectiveId(UUID requestedServiceObject
*
* @return the requestedServiceObjectiveName value
*/
public String requestedServiceObjectiveName() {
public ServiceObjectiveName requestedServiceObjectiveName() {
return this.requestedServiceObjectiveName;
}

Expand All @@ -288,7 +294,7 @@ public String requestedServiceObjectiveName() {
* @param requestedServiceObjectiveName the requestedServiceObjectiveName value to set
* @return the DatabaseInner object itself.
*/
public DatabaseInner withRequestedServiceObjectiveName(String requestedServiceObjectiveName) {
public DatabaseInner withRequestedServiceObjectiveName(ServiceObjectiveName requestedServiceObjectiveName) {
this.requestedServiceObjectiveName = requestedServiceObjectiveName;
return this;
}
Expand All @@ -298,7 +304,7 @@ public DatabaseInner withRequestedServiceObjectiveName(String requestedServiceOb
*
* @return the serviceLevelObjective value
*/
public String serviceLevelObjective() {
public ServiceObjectiveName serviceLevelObjective() {
return this.serviceLevelObjective;
}

Expand Down
Loading

0 comments on commit 49bf336

Please sign in to comment.