/** * 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.documentdb.implementation; import com.microsoft.azure.management.documentdb.DatabaseAccountKind; import com.microsoft.azure.management.documentdb.DatabaseAccountOfferType; import com.microsoft.azure.management.documentdb.ConsistencyPolicy; import java.util.List; import com.microsoft.azure.management.documentdb.Location; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; /** * A DocumentDB database account. */ @JsonFlatten public class DatabaseAccountInner extends Resource { /** * Indicates the type of database account. This can only be set at database * account creation. Possible values include: 'GlobalDocumentDB', * 'MongoDB', 'Parse'. */ @JsonProperty(value = "kind") private DatabaseAccountKind kind; /** * The provisioningState property. */ @JsonProperty(value = "properties.provisioningState") private String provisioningState; /** * The connection endpoint for the DocumentDB database account. */ @JsonProperty(value = "properties.documentEndpoint", access = JsonProperty.Access.WRITE_ONLY) private String documentEndpoint; /** * The offer type for the DocumentDB database account. Default value: * Standard. Possible values include: 'Standard'. */ @JsonProperty(value = "properties.databaseAccountOfferType", access = JsonProperty.Access.WRITE_ONLY) private DatabaseAccountOfferType databaseAccountOfferType; /** * DocumentDB Firewall Support: This value specifies the set of IP * addresses or IP address ranges in CIDR form to be included as the * allowed list of client IPs for a given database account. IP * addresses/ranges must be comma separated and must not contain any * spaces. */ @JsonProperty(value = "properties.ipRangeFilter") private String ipRangeFilter; /** * The consistency policy for the DocumentDB database account. */ @JsonProperty(value = "properties.consistencyPolicy") private ConsistencyPolicy consistencyPolicy; /** * An array that contains the write location for the DocumentDB account. */ @JsonProperty(value = "properties.writeLocations", access = JsonProperty.Access.WRITE_ONLY) private List<Location> writeLocations; /** * An array that contains of the read locations enabled for the DocumentDB * account. */ @JsonProperty(value = "properties.readLocations", access = JsonProperty.Access.WRITE_ONLY) private List<Location> readLocations; /** * An array that contains the regions ordered by their failover priorities. */ @JsonProperty(value = "properties.failoverPolicies", access = JsonProperty.Access.WRITE_ONLY) private List<FailoverPolicyInner> failoverPolicies; /** * Get the kind value. * * @return the kind value */ public DatabaseAccountKind kind() { return this.kind; } /** * Set the kind value. * * @param kind the kind value to set * @return the DatabaseAccountInner object itself. */ public DatabaseAccountInner withKind(DatabaseAccountKind kind) { this.kind = kind; return this; } /** * Get the provisioningState value. * * @return the provisioningState value */ public String provisioningState() { return this.provisioningState; } /** * Set the provisioningState value. * * @param provisioningState the provisioningState value to set * @return the DatabaseAccountInner object itself. */ public DatabaseAccountInner withProvisioningState(String provisioningState) { this.provisioningState = provisioningState; return this; } /** * Get the documentEndpoint value. * * @return the documentEndpoint value */ public String documentEndpoint() { return this.documentEndpoint; } /** * Get the databaseAccountOfferType value. * * @return the databaseAccountOfferType value */ public DatabaseAccountOfferType databaseAccountOfferType() { return this.databaseAccountOfferType; } /** * Get the ipRangeFilter value. * * @return the ipRangeFilter value */ public String ipRangeFilter() { return this.ipRangeFilter; } /** * Set the ipRangeFilter value. * * @param ipRangeFilter the ipRangeFilter value to set * @return the DatabaseAccountInner object itself. */ public DatabaseAccountInner withIpRangeFilter(String ipRangeFilter) { this.ipRangeFilter = ipRangeFilter; return this; } /** * Get the consistencyPolicy value. * * @return the consistencyPolicy value */ public ConsistencyPolicy consistencyPolicy() { return this.consistencyPolicy; } /** * Set the consistencyPolicy value. * * @param consistencyPolicy the consistencyPolicy value to set * @return the DatabaseAccountInner object itself. */ public DatabaseAccountInner withConsistencyPolicy(ConsistencyPolicy consistencyPolicy) { this.consistencyPolicy = consistencyPolicy; return this; } /** * Get the writeLocations value. * * @return the writeLocations value */ public List<Location> writeLocations() { return this.writeLocations; } /** * Get the readLocations value. * * @return the readLocations value */ public List<Location> readLocations() { return this.readLocations; } /** * Get the failoverPolicies value. * * @return the failoverPolicies value */ public List<FailoverPolicyInner> failoverPolicies() { return this.failoverPolicies; } }