Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR cosmos-db/resource-manager] added descriptions to include Cosmos DB ARM template values #336

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* 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.cosmosdb;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Cosmos DB capability object.
*/
public class Capability {
/**
* Name of the Cosmos DB capability. For example, "name":
* "EnableCassandra". Current values also include "EnableTable" and
* "EnableGremlin".
*/
@JsonProperty(value = "name")
private String name;

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

/**
* Set the name value.
*
* @param name the name value to set
* @return the Capability object itself.
*/
public Capability withName(String name) {
this.name = name;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The consistency policy for the DocumentDB database account.
* The consistency policy for the Cosmos DB database account.
*/
public class ConsistencyPolicy {
/**
* The default consistency level and configuration settings of the
* DocumentDB account. Possible values include: 'Eventual', 'Session',
* 'BoundedStaleness', 'Strong'.
* The default consistency level and configuration settings of the Cosmos
* DB account. Possible values include: 'Eventual', 'Session',
* 'BoundedStaleness', 'Strong', 'ConsistentPrefix'.
*/
@JsonProperty(value = "defaultConsistencyLevel", required = true)
private DefaultConsistencyLevel defaultConsistencyLevel;
Expand All @@ -34,8 +34,8 @@ public class ConsistencyPolicy {
/**
* When used with the Bounded Staleness consistency level, this value
* represents the time amount of staleness (in seconds) tolerated. Accepted
* range for this value is 1 - 100. Required when defaultConsistencyPolicy
* is set to 'BoundedStaleness'.
* range for this value is 5 - 86400. Required when
* defaultConsistencyPolicy is set to 'BoundedStaleness'.
*/
@JsonProperty(value = "maxIntervalInSeconds")
private Integer maxIntervalInSeconds;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Connection string for the DocumentDB account.
* Connection string for the Cosmos DB account.
*/
public class DatabaseAccountConnectionString {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,37 @@

package com.microsoft.azure.management.cosmosdb;

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

/**
* Defines values for DatabaseAccountKind.
*/
public final class DatabaseAccountKind {
public final class DatabaseAccountKind extends ExpandableStringEnum<DatabaseAccountKind> {
/** Static value GlobalDocumentDB for DatabaseAccountKind. */
public static final DatabaseAccountKind GLOBAL_DOCUMENT_DB = new DatabaseAccountKind("GlobalDocumentDB");
public static final DatabaseAccountKind GLOBAL_DOCUMENT_DB = fromString("GlobalDocumentDB");

/** Static value MongoDB for DatabaseAccountKind. */
public static final DatabaseAccountKind MONGO_DB = new DatabaseAccountKind("MongoDB");
public static final DatabaseAccountKind MONGO_DB = fromString("MongoDB");

/** Static value Parse for DatabaseAccountKind. */
public static final DatabaseAccountKind PARSE = new DatabaseAccountKind("Parse");

private String value;
public static final DatabaseAccountKind PARSE = fromString("Parse");

/**
* Creates a custom value for DatabaseAccountKind.
* @param value the custom value
* Creates or finds a DatabaseAccountKind from its string representation.
* @param name a name to look for
* @return the corresponding DatabaseAccountKind
*/
public DatabaseAccountKind(String value) {
this.value = value;
}

@JsonValue
@Override
public String toString() {
return value;
@JsonCreator
public static DatabaseAccountKind fromString(String name) {
return fromString(name, DatabaseAccountKind.class);
}

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

@Override
public boolean equals(Object obj) {
if (!(obj instanceof DatabaseAccountKind)) {
return false;
}
if (obj == this) {
return true;
}
DatabaseAccountKind rhs = (DatabaseAccountKind) obj;
if (value == null) {
return rhs.value == null;
} else {
return value.equals(rhs.value);
}
/**
* @return known DatabaseAccountKind values
*/
public static Collection<DatabaseAccountKind> values() {
return values(DatabaseAccountKind.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ public enum DefaultConsistencyLevel {
BOUNDED_STALENESS("BoundedStaleness"),

/** Enum value Strong. */
STRONG("Strong");
STRONG("Strong"),

/** Enum value ConsistentPrefix. */
CONSISTENT_PREFIX("ConsistentPrefix");

/** The actual serialized value for a DefaultConsistencyLevel instance. */
private String value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class FailoverPolicies {
/**
* List of failover policies.
*/
@JsonProperty(value = "failoverPolicies")
@JsonProperty(value = "failoverPolicies", required = true)
private List<FailoverPolicyInner> failoverPolicies;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,58 +8,40 @@

package com.microsoft.azure.management.cosmosdb;

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

/**
* Defines values for KeyKind.
*/
public final class KeyKind {
public final class KeyKind extends ExpandableStringEnum<KeyKind> {
/** Static value primary for KeyKind. */
public static final KeyKind PRIMARY = new KeyKind("primary");
public static final KeyKind PRIMARY = fromString("primary");

/** Static value secondary for KeyKind. */
public static final KeyKind SECONDARY = new KeyKind("secondary");
public static final KeyKind SECONDARY = fromString("secondary");

/** Static value primaryReadonly for KeyKind. */
public static final KeyKind PRIMARY_READONLY = new KeyKind("primaryReadonly");
public static final KeyKind PRIMARY_READONLY = fromString("primaryReadonly");

/** Static value secondaryReadonly for KeyKind. */
public static final KeyKind SECONDARY_READONLY = new KeyKind("secondaryReadonly");

private String value;
public static final KeyKind SECONDARY_READONLY = fromString("secondaryReadonly");

/**
* Creates a custom value for KeyKind.
* @param value the custom value
* Creates or finds a KeyKind from its string representation.
* @param name a name to look for
* @return the corresponding KeyKind
*/
public KeyKind(String value) {
this.value = value;
}

@JsonValue
@Override
public String toString() {
return value;
@JsonCreator
public static KeyKind fromString(String name) {
return fromString(name, KeyKind.class);
}

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

@Override
public boolean equals(Object obj) {
if (!(obj instanceof KeyKind)) {
return false;
}
if (obj == this) {
return true;
}
KeyKind rhs = (KeyKind) obj;
if (value == null) {
return rhs.value == null;
} else {
return value.equals(rhs.value);
}
/**
* @return known KeyKind values
*/
public static Collection<KeyKind> values() {
return values(KeyKind.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* A region in which the Azure DocumentDB database account is deployed.
* A region in which the Azure Cosmos DB database account is deployed.
*/
public class Location {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* 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.cosmosdb;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The availability of the metric.
*/
public class MetricAvailability {
/**
* The time grain to be used to summarize the metric values.
*/
@JsonProperty(value = "timeGrain", access = JsonProperty.Access.WRITE_ONLY)
private String timeGrain;

/**
* The retention for the metric values.
*/
@JsonProperty(value = "retention", access = JsonProperty.Access.WRITE_ONLY)
private String retention;

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

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

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* 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.cosmosdb;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* A metric name.
*/
public class MetricName {
/**
* The name of the metric.
*/
@JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
private String value;

/**
* The friendly name of the metric.
*/
@JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY)
private String localizedValue;

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

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

}
Loading