Skip to content
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,38 @@
/**
* 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.v2015_04_08;

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

/**
* Defines values for ConnectorOffer.
*/
public final class ConnectorOffer extends ExpandableStringEnum<ConnectorOffer> {
/** Static value Small for ConnectorOffer. */
public static final ConnectorOffer SMALL = fromString("Small");

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

/**
* @return known ConnectorOffer values
*/
public static Collection<ConnectorOffer> values() {
return values(ConnectorOffer.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ public interface DatabaseAccount extends HasInner<DatabaseAccountInner>, Resourc
*/
List<Capability> capabilities();

/**
* @return the connectorOffer value.
*/
ConnectorOffer connectorOffer();

/**
* @return the consistencyPolicy value.
*/
Expand All @@ -50,6 +55,11 @@ public interface DatabaseAccount extends HasInner<DatabaseAccountInner>, Resourc
*/
Boolean enableAutomaticFailover();

/**
* @return the enableCassandraConnector value.
*/
Boolean enableCassandraConnector();

/**
* @return the enableMultipleWriteLocations value.
*/
Expand Down Expand Up @@ -153,6 +163,18 @@ interface WithCapabilities {
WithCreate withCapabilities(List<Capability> capabilities);
}

/**
* The stage of the databaseaccount definition allowing to specify ConnectorOffer.
*/
interface WithConnectorOffer {
/**
* Specifies connectorOffer.
* @param connectorOffer The cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small'
* @return the next definition stage
*/
WithCreate withConnectorOffer(ConnectorOffer connectorOffer);
}

/**
* The stage of the databaseaccount definition allowing to specify ConsistencyPolicy.
*/
Expand All @@ -177,6 +199,18 @@ interface WithEnableAutomaticFailover {
WithCreate withEnableAutomaticFailover(Boolean enableAutomaticFailover);
}

/**
* The stage of the databaseaccount definition allowing to specify EnableCassandraConnector.
*/
interface WithEnableCassandraConnector {
/**
* Specifies enableCassandraConnector.
* @param enableCassandraConnector Enables the cassandra connector on the Cosmos DB C* account
* @return the next definition stage
*/
WithCreate withEnableCassandraConnector(Boolean enableCassandraConnector);
}

/**
* The stage of the databaseaccount definition allowing to specify EnableMultipleWriteLocations.
*/
Expand Down Expand Up @@ -242,7 +276,7 @@ interface WithVirtualNetworkRules {
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
interface WithCreate extends Creatable<DatabaseAccount>, Resource.DefinitionWithTags<WithCreate>, DefinitionStages.WithCapabilities, DefinitionStages.WithConsistencyPolicy, DefinitionStages.WithEnableAutomaticFailover, DefinitionStages.WithEnableMultipleWriteLocations, DefinitionStages.WithIpRangeFilter, DefinitionStages.WithIsVirtualNetworkFilterEnabled, DefinitionStages.WithKind, DefinitionStages.WithVirtualNetworkRules {
interface WithCreate extends Creatable<DatabaseAccount>, Resource.DefinitionWithTags<WithCreate>, DefinitionStages.WithCapabilities, DefinitionStages.WithConnectorOffer, DefinitionStages.WithConsistencyPolicy, DefinitionStages.WithEnableAutomaticFailover, DefinitionStages.WithEnableCassandraConnector, DefinitionStages.WithEnableMultipleWriteLocations, DefinitionStages.WithIpRangeFilter, DefinitionStages.WithIsVirtualNetworkFilterEnabled, DefinitionStages.WithKind, DefinitionStages.WithVirtualNetworkRules {
}
}
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@ public class DatabaseAccountCreateUpdateParameters extends Resource {
@JsonProperty(value = "properties.enableMultipleWriteLocations")
private Boolean enableMultipleWriteLocations;

/**
* Enables the cassandra connector on the Cosmos DB C* account.
*/
@JsonProperty(value = "properties.enableCassandraConnector")
private Boolean enableCassandraConnector;

/**
* The cassandra connector offer type for the Cosmos DB database C*
* account. Possible values include: 'Small'.
*/
@JsonProperty(value = "properties.connectorOffer")
private ConnectorOffer connectorOffer;

/**
* Creates an instance of DatabaseAccountCreateUpdateParameters class.
* @param locations an array that contains the georeplication locations enabled for the Cosmos DB account.
Expand Down Expand Up @@ -297,4 +310,44 @@ public DatabaseAccountCreateUpdateParameters withEnableMultipleWriteLocations(Bo
return this;
}

/**
* Get enables the cassandra connector on the Cosmos DB C* account.
*
* @return the enableCassandraConnector value
*/
public Boolean enableCassandraConnector() {
return this.enableCassandraConnector;
}

/**
* Set enables the cassandra connector on the Cosmos DB C* account.
*
* @param enableCassandraConnector the enableCassandraConnector value to set
* @return the DatabaseAccountCreateUpdateParameters object itself.
*/
public DatabaseAccountCreateUpdateParameters withEnableCassandraConnector(Boolean enableCassandraConnector) {
this.enableCassandraConnector = enableCassandraConnector;
return this;
}

/**
* Get the cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small'.
*
* @return the connectorOffer value
*/
public ConnectorOffer connectorOffer() {
return this.connectorOffer;
}

/**
* Set the cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small'.
*
* @param connectorOffer the connectorOffer value to set
* @return the DatabaseAccountCreateUpdateParameters object itself.
*/
public DatabaseAccountCreateUpdateParameters withConnectorOffer(ConnectorOffer connectorOffer) {
this.connectorOffer = connectorOffer;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.List;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.DatabaseAccountCreateUpdateParameters;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.Capability;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.ConnectorOffer;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.ConsistencyPolicy;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.DatabaseAccountOfferType;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.FailoverPolicy;
Expand Down Expand Up @@ -83,6 +84,11 @@ public List<Capability> capabilities() {
return this.inner().capabilities();
}

@Override
public ConnectorOffer connectorOffer() {
return this.inner().connectorOffer();
}

@Override
public ConsistencyPolicy consistencyPolicy() {
return this.inner().consistencyPolicy();
Expand All @@ -103,6 +109,11 @@ public Boolean enableAutomaticFailover() {
return this.inner().enableAutomaticFailover();
}

@Override
public Boolean enableCassandraConnector() {
return this.inner().enableCassandraConnector();
}

@Override
public Boolean enableMultipleWriteLocations() {
return this.inner().enableMultipleWriteLocations();
Expand Down Expand Up @@ -160,6 +171,12 @@ public DatabaseAccountImpl withLocations(List<Location> locations) {
return this;
}

@Override
public DatabaseAccountImpl withConnectorOffer(ConnectorOffer connectorOffer) {
this.createParameter.withConnectorOffer(connectorOffer);
return this;
}

@Override
public DatabaseAccountImpl withConsistencyPolicy(ConsistencyPolicy consistencyPolicy) {
this.createParameter.withConsistencyPolicy(consistencyPolicy);
Expand All @@ -172,6 +189,12 @@ public DatabaseAccountImpl withEnableAutomaticFailover(Boolean enableAutomaticFa
return this;
}

@Override
public DatabaseAccountImpl withEnableCassandraConnector(Boolean enableCassandraConnector) {
this.createParameter.withEnableCassandraConnector(enableCassandraConnector);
return this;
}

@Override
public DatabaseAccountImpl withEnableMultipleWriteLocations(Boolean enableMultipleWriteLocations) {
this.createParameter.withEnableMultipleWriteLocations(enableMultipleWriteLocations);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.microsoft.azure.management.cosmosdb.v2015_04_08.Location;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.FailoverPolicy;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.VirtualNetworkRule;
import com.microsoft.azure.management.cosmosdb.v2015_04_08.ConnectorOffer;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;
import com.microsoft.rest.SkipParentValidation;
Expand Down Expand Up @@ -121,6 +122,19 @@ public class DatabaseAccountInner extends Resource {
@JsonProperty(value = "properties.enableMultipleWriteLocations")
private Boolean enableMultipleWriteLocations;

/**
* Enables the cassandra connector on the Cosmos DB C* account.
*/
@JsonProperty(value = "properties.enableCassandraConnector")
private Boolean enableCassandraConnector;

/**
* The cassandra connector offer type for the Cosmos DB database C*
* account. Possible values include: 'Small'.
*/
@JsonProperty(value = "properties.connectorOffer")
private ConnectorOffer connectorOffer;

/**
* Get indicates the type of database account. This can only be set at database account creation. Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'.
*
Expand Down Expand Up @@ -346,4 +360,44 @@ public DatabaseAccountInner withEnableMultipleWriteLocations(Boolean enableMulti
return this;
}

/**
* Get enables the cassandra connector on the Cosmos DB C* account.
*
* @return the enableCassandraConnector value
*/
public Boolean enableCassandraConnector() {
return this.enableCassandraConnector;
}

/**
* Set enables the cassandra connector on the Cosmos DB C* account.
*
* @param enableCassandraConnector the enableCassandraConnector value to set
* @return the DatabaseAccountInner object itself.
*/
public DatabaseAccountInner withEnableCassandraConnector(Boolean enableCassandraConnector) {
this.enableCassandraConnector = enableCassandraConnector;
return this;
}

/**
* Get the cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small'.
*
* @return the connectorOffer value
*/
public ConnectorOffer connectorOffer() {
return this.connectorOffer;
}

/**
* Set the cassandra connector offer type for the Cosmos DB database C* account. Possible values include: 'Small'.
*
* @param connectorOffer the connectorOffer value to set
* @return the DatabaseAccountInner object itself.
*/
public DatabaseAccountInner withConnectorOffer(ConnectorOffer connectorOffer) {
this.connectorOffer = connectorOffer;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
package com.microsoft.azure.management.cosmosdb.v2015_04_08.implementation;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;

/**
* The access keys for the given database account.
*/
@JsonFlatten
public class DatabaseAccountListKeysResultInner {
public class DatabaseAccountListKeysResultInner extends DatabaseAccountListReadOnlyKeysResultInner {
/**
* Base 64 encoded value of the primary read-write key.
*/
Expand All @@ -28,18 +26,6 @@ public class DatabaseAccountListKeysResultInner {
@JsonProperty(value = "secondaryMasterKey", access = JsonProperty.Access.WRITE_ONLY)
private String secondaryMasterKey;

/**
* Base 64 encoded value of the primary read-only key.
*/
@JsonProperty(value = "properties.primaryReadonlyMasterKey", access = JsonProperty.Access.WRITE_ONLY)
private String primaryReadonlyMasterKey;

/**
* Base 64 encoded value of the secondary read-only key.
*/
@JsonProperty(value = "properties.secondaryReadonlyMasterKey", access = JsonProperty.Access.WRITE_ONLY)
private String secondaryReadonlyMasterKey;

/**
* Get base 64 encoded value of the primary read-write key.
*
Expand All @@ -58,22 +44,4 @@ public String secondaryMasterKey() {
return this.secondaryMasterKey;
}

/**
* Get base 64 encoded value of the primary read-only key.
*
* @return the primaryReadonlyMasterKey value
*/
public String primaryReadonlyMasterKey() {
return this.primaryReadonlyMasterKey;
}

/**
* Get base 64 encoded value of the secondary read-only key.
*
* @return the secondaryReadonlyMasterKey value
*/
public String secondaryReadonlyMasterKey() {
return this.secondaryReadonlyMasterKey;
}

}