Class InstanceConfig

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, InstanceConfigOrBuilder, Serializable

    public final class InstanceConfig
    extends com.google.protobuf.GeneratedMessageV3
    implements InstanceConfigOrBuilder
     A possible configuration for a Cloud Spanner instance. Configurations
     define the geographic placement of nodes and their replication.
     
    Protobuf type google.spanner.admin.instance.v1.InstanceConfig
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getName

        public String getName()
         A unique identifier for the instance configuration.  Values
         are of the form
         `projects/<project>/instanceConfigs/[a-z][-a-z0-9]*`.
         
        string name = 1;
        Specified by:
        getName in interface InstanceConfigOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         A unique identifier for the instance configuration.  Values
         are of the form
         `projects/<project>/instanceConfigs/[a-z][-a-z0-9]*`.
         
        string name = 1;
        Specified by:
        getNameBytes in interface InstanceConfigOrBuilder
        Returns:
        The bytes for name.
      • getDisplayName

        public String getDisplayName()
         The name of this instance configuration as it appears in UIs.
         
        string display_name = 2;
        Specified by:
        getDisplayName in interface InstanceConfigOrBuilder
        Returns:
        The displayName.
      • getDisplayNameBytes

        public com.google.protobuf.ByteString getDisplayNameBytes()
         The name of this instance configuration as it appears in UIs.
         
        string display_name = 2;
        Specified by:
        getDisplayNameBytes in interface InstanceConfigOrBuilder
        Returns:
        The bytes for displayName.
      • getConfigTypeValue

        public int getConfigTypeValue()
         Output only. Whether this instance config is a Google or User Managed
         Configuration.
         
        .google.spanner.admin.instance.v1.InstanceConfig.Type config_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getConfigTypeValue in interface InstanceConfigOrBuilder
        Returns:
        The enum numeric value on the wire for configType.
      • getConfigType

        public InstanceConfig.Type getConfigType()
         Output only. Whether this instance config is a Google or User Managed
         Configuration.
         
        .google.spanner.admin.instance.v1.InstanceConfig.Type config_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getConfigType in interface InstanceConfigOrBuilder
        Returns:
        The configType.
      • getReplicasList

        public List<ReplicaInfo> getReplicasList()
         The geographic placement of nodes in this instance configuration and their
         replication properties.
         
        repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;
        Specified by:
        getReplicasList in interface InstanceConfigOrBuilder
      • getReplicasCount

        public int getReplicasCount()
         The geographic placement of nodes in this instance configuration and their
         replication properties.
         
        repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;
        Specified by:
        getReplicasCount in interface InstanceConfigOrBuilder
      • getReplicas

        public ReplicaInfo getReplicas​(int index)
         The geographic placement of nodes in this instance configuration and their
         replication properties.
         
        repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;
        Specified by:
        getReplicas in interface InstanceConfigOrBuilder
      • getReplicasOrBuilder

        public ReplicaInfoOrBuilder getReplicasOrBuilder​(int index)
         The geographic placement of nodes in this instance configuration and their
         replication properties.
         
        repeated .google.spanner.admin.instance.v1.ReplicaInfo replicas = 3;
        Specified by:
        getReplicasOrBuilder in interface InstanceConfigOrBuilder
      • getOptionalReplicasList

        public List<ReplicaInfo> getOptionalReplicasList()
         Output only. The available optional replicas to choose from for user
         managed configurations. Populated for Google managed configurations.
         
        repeated .google.spanner.admin.instance.v1.ReplicaInfo optional_replicas = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getOptionalReplicasList in interface InstanceConfigOrBuilder
      • getOptionalReplicasOrBuilderList

        public List<? extends ReplicaInfoOrBuilder> getOptionalReplicasOrBuilderList()
         Output only. The available optional replicas to choose from for user
         managed configurations. Populated for Google managed configurations.
         
        repeated .google.spanner.admin.instance.v1.ReplicaInfo optional_replicas = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getOptionalReplicasOrBuilderList in interface InstanceConfigOrBuilder
      • getOptionalReplicasCount

        public int getOptionalReplicasCount()
         Output only. The available optional replicas to choose from for user
         managed configurations. Populated for Google managed configurations.
         
        repeated .google.spanner.admin.instance.v1.ReplicaInfo optional_replicas = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getOptionalReplicasCount in interface InstanceConfigOrBuilder
      • getOptionalReplicas

        public ReplicaInfo getOptionalReplicas​(int index)
         Output only. The available optional replicas to choose from for user
         managed configurations. Populated for Google managed configurations.
         
        repeated .google.spanner.admin.instance.v1.ReplicaInfo optional_replicas = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getOptionalReplicas in interface InstanceConfigOrBuilder
      • getOptionalReplicasOrBuilder

        public ReplicaInfoOrBuilder getOptionalReplicasOrBuilder​(int index)
         Output only. The available optional replicas to choose from for user
         managed configurations. Populated for Google managed configurations.
         
        repeated .google.spanner.admin.instance.v1.ReplicaInfo optional_replicas = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getOptionalReplicasOrBuilder in interface InstanceConfigOrBuilder
      • getBaseConfig

        public String getBaseConfig()
         Base configuration name, e.g. projects/<project_name>/instanceConfigs/nam3,
         based on which this configuration is created. Only set for user managed
         configurations. `base_config` must refer to a configuration of type
         GOOGLE_MANAGED in the same project as this configuration.
         
        string base_config = 7 [(.google.api.resource_reference) = { ... }
        Specified by:
        getBaseConfig in interface InstanceConfigOrBuilder
        Returns:
        The baseConfig.
      • getBaseConfigBytes

        public com.google.protobuf.ByteString getBaseConfigBytes()
         Base configuration name, e.g. projects/<project_name>/instanceConfigs/nam3,
         based on which this configuration is created. Only set for user managed
         configurations. `base_config` must refer to a configuration of type
         GOOGLE_MANAGED in the same project as this configuration.
         
        string base_config = 7 [(.google.api.resource_reference) = { ... }
        Specified by:
        getBaseConfigBytes in interface InstanceConfigOrBuilder
        Returns:
        The bytes for baseConfig.
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: InstanceConfigOrBuilder
         Cloud Labels are a flexible and lightweight mechanism for organizing cloud
         resources into groups that reflect a customer's organizational needs and
         deployment strategies. Cloud Labels can be used to filter collections of
         resources. They can be used to control how resource metrics are aggregated.
         And they can be used as arguments to policy management rules (e.g. route,
         firewall, load balancing, etc.).
        
          * Label keys must be between 1 and 63 characters long and must conform to
            the following regular expression: `[a-z][a-z0-9_-]{0,62}`.
          * Label values must be between 0 and 63 characters long and must conform
            to the regular expression `[a-z0-9_-]{0,63}`.
          * No more than 64 labels can be associated with a given resource.
        
         See https://goo.gl/xmQnxf for more information on and examples of labels.
        
         If you plan to use labels in your own code, please note that additional
         characters may be allowed in the future. Therefore, you are advised to use
         an internal label representation, such as JSON, which doesn't rely upon
         specific characters being disallowed.  For example, representing labels
         as the string:  name + "_" + value  would prove problematic if we were to
         allow "_" in a future release.
         
        map<string, string> labels = 8;
        Specified by:
        getLabelsCount in interface InstanceConfigOrBuilder
      • containsLabels

        public boolean containsLabels​(String key)
         Cloud Labels are a flexible and lightweight mechanism for organizing cloud
         resources into groups that reflect a customer's organizational needs and
         deployment strategies. Cloud Labels can be used to filter collections of
         resources. They can be used to control how resource metrics are aggregated.
         And they can be used as arguments to policy management rules (e.g. route,
         firewall, load balancing, etc.).
        
          * Label keys must be between 1 and 63 characters long and must conform to
            the following regular expression: `[a-z][a-z0-9_-]{0,62}`.
          * Label values must be between 0 and 63 characters long and must conform
            to the regular expression `[a-z0-9_-]{0,63}`.
          * No more than 64 labels can be associated with a given resource.
        
         See https://goo.gl/xmQnxf for more information on and examples of labels.
        
         If you plan to use labels in your own code, please note that additional
         characters may be allowed in the future. Therefore, you are advised to use
         an internal label representation, such as JSON, which doesn't rely upon
         specific characters being disallowed.  For example, representing labels
         as the string:  name + "_" + value  would prove problematic if we were to
         allow "_" in a future release.
         
        map<string, string> labels = 8;
        Specified by:
        containsLabels in interface InstanceConfigOrBuilder
      • getLabelsMap

        public Map<String,​String> getLabelsMap()
         Cloud Labels are a flexible and lightweight mechanism for organizing cloud
         resources into groups that reflect a customer's organizational needs and
         deployment strategies. Cloud Labels can be used to filter collections of
         resources. They can be used to control how resource metrics are aggregated.
         And they can be used as arguments to policy management rules (e.g. route,
         firewall, load balancing, etc.).
        
          * Label keys must be between 1 and 63 characters long and must conform to
            the following regular expression: `[a-z][a-z0-9_-]{0,62}`.
          * Label values must be between 0 and 63 characters long and must conform
            to the regular expression `[a-z0-9_-]{0,63}`.
          * No more than 64 labels can be associated with a given resource.
        
         See https://goo.gl/xmQnxf for more information on and examples of labels.
        
         If you plan to use labels in your own code, please note that additional
         characters may be allowed in the future. Therefore, you are advised to use
         an internal label representation, such as JSON, which doesn't rely upon
         specific characters being disallowed.  For example, representing labels
         as the string:  name + "_" + value  would prove problematic if we were to
         allow "_" in a future release.
         
        map<string, string> labels = 8;
        Specified by:
        getLabelsMap in interface InstanceConfigOrBuilder
      • getLabelsOrDefault

        public String getLabelsOrDefault​(String key,
                                         String defaultValue)
         Cloud Labels are a flexible and lightweight mechanism for organizing cloud
         resources into groups that reflect a customer's organizational needs and
         deployment strategies. Cloud Labels can be used to filter collections of
         resources. They can be used to control how resource metrics are aggregated.
         And they can be used as arguments to policy management rules (e.g. route,
         firewall, load balancing, etc.).
        
          * Label keys must be between 1 and 63 characters long and must conform to
            the following regular expression: `[a-z][a-z0-9_-]{0,62}`.
          * Label values must be between 0 and 63 characters long and must conform
            to the regular expression `[a-z0-9_-]{0,63}`.
          * No more than 64 labels can be associated with a given resource.
        
         See https://goo.gl/xmQnxf for more information on and examples of labels.
        
         If you plan to use labels in your own code, please note that additional
         characters may be allowed in the future. Therefore, you are advised to use
         an internal label representation, such as JSON, which doesn't rely upon
         specific characters being disallowed.  For example, representing labels
         as the string:  name + "_" + value  would prove problematic if we were to
         allow "_" in a future release.
         
        map<string, string> labels = 8;
        Specified by:
        getLabelsOrDefault in interface InstanceConfigOrBuilder
      • getLabelsOrThrow

        public String getLabelsOrThrow​(String key)
         Cloud Labels are a flexible and lightweight mechanism for organizing cloud
         resources into groups that reflect a customer's organizational needs and
         deployment strategies. Cloud Labels can be used to filter collections of
         resources. They can be used to control how resource metrics are aggregated.
         And they can be used as arguments to policy management rules (e.g. route,
         firewall, load balancing, etc.).
        
          * Label keys must be between 1 and 63 characters long and must conform to
            the following regular expression: `[a-z][a-z0-9_-]{0,62}`.
          * Label values must be between 0 and 63 characters long and must conform
            to the regular expression `[a-z0-9_-]{0,63}`.
          * No more than 64 labels can be associated with a given resource.
        
         See https://goo.gl/xmQnxf for more information on and examples of labels.
        
         If you plan to use labels in your own code, please note that additional
         characters may be allowed in the future. Therefore, you are advised to use
         an internal label representation, such as JSON, which doesn't rely upon
         specific characters being disallowed.  For example, representing labels
         as the string:  name + "_" + value  would prove problematic if we were to
         allow "_" in a future release.
         
        map<string, string> labels = 8;
        Specified by:
        getLabelsOrThrow in interface InstanceConfigOrBuilder
      • getEtag

        public String getEtag()
         etag is used for optimistic concurrency control as a way
         to help prevent simultaneous updates of a instance config from overwriting
         each other. It is strongly suggested that systems make use of the etag in
         the read-modify-write cycle to perform instance config updates in order to
         avoid race conditions: An etag is returned in the response which contains
         instance configs, and systems are expected to put that etag in the request
         to update instance config to ensure that their change will be applied to
         the same version of the instance config.
         If no etag is provided in the call to update instance config, then the
         existing instance config is overwritten blindly.
         
        string etag = 9;
        Specified by:
        getEtag in interface InstanceConfigOrBuilder
        Returns:
        The etag.
      • getEtagBytes

        public com.google.protobuf.ByteString getEtagBytes()
         etag is used for optimistic concurrency control as a way
         to help prevent simultaneous updates of a instance config from overwriting
         each other. It is strongly suggested that systems make use of the etag in
         the read-modify-write cycle to perform instance config updates in order to
         avoid race conditions: An etag is returned in the response which contains
         instance configs, and systems are expected to put that etag in the request
         to update instance config to ensure that their change will be applied to
         the same version of the instance config.
         If no etag is provided in the call to update instance config, then the
         existing instance config is overwritten blindly.
         
        string etag = 9;
        Specified by:
        getEtagBytes in interface InstanceConfigOrBuilder
        Returns:
        The bytes for etag.
      • getLeaderOptionsList

        public com.google.protobuf.ProtocolStringList getLeaderOptionsList()
         Allowed values of the "default_leader" schema option for databases in
         instances that use this instance configuration.
         
        repeated string leader_options = 4;
        Specified by:
        getLeaderOptionsList in interface InstanceConfigOrBuilder
        Returns:
        A list containing the leaderOptions.
      • getLeaderOptionsCount

        public int getLeaderOptionsCount()
         Allowed values of the "default_leader" schema option for databases in
         instances that use this instance configuration.
         
        repeated string leader_options = 4;
        Specified by:
        getLeaderOptionsCount in interface InstanceConfigOrBuilder
        Returns:
        The count of leaderOptions.
      • getLeaderOptions

        public String getLeaderOptions​(int index)
         Allowed values of the "default_leader" schema option for databases in
         instances that use this instance configuration.
         
        repeated string leader_options = 4;
        Specified by:
        getLeaderOptions in interface InstanceConfigOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The leaderOptions at the given index.
      • getLeaderOptionsBytes

        public com.google.protobuf.ByteString getLeaderOptionsBytes​(int index)
         Allowed values of the "default_leader" schema option for databases in
         instances that use this instance configuration.
         
        repeated string leader_options = 4;
        Specified by:
        getLeaderOptionsBytes in interface InstanceConfigOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the leaderOptions at the given index.
      • getReconciling

        public boolean getReconciling()
         Output only. If true, the instance config is being created or updated. If
         false, there are no ongoing operations for the instance config.
         
        bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getReconciling in interface InstanceConfigOrBuilder
        Returns:
        The reconciling.
      • getStateValue

        public int getStateValue()
         Output only. The current instance config state.
         
        .google.spanner.admin.instance.v1.InstanceConfig.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getStateValue in interface InstanceConfigOrBuilder
        Returns:
        The enum numeric value on the wire for state.
      • getState

        public InstanceConfig.State getState()
         Output only. The current instance config state.
         
        .google.spanner.admin.instance.v1.InstanceConfig.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getState in interface InstanceConfigOrBuilder
        Returns:
        The state.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static InstanceConfig parseFrom​(ByteBuffer data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static InstanceConfig parseFrom​(ByteBuffer data,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static InstanceConfig parseFrom​(com.google.protobuf.ByteString data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static InstanceConfig parseFrom​(com.google.protobuf.ByteString data,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static InstanceConfig parseFrom​(byte[] data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static InstanceConfig parseFrom​(byte[] data,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static InstanceConfig parseFrom​(com.google.protobuf.CodedInputStream input,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws IOException
        Throws:
        IOException
      • newBuilderForType

        public InstanceConfig.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public InstanceConfig.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected InstanceConfig.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static InstanceConfig getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<InstanceConfig> parser()
      • getParserForType

        public com.google.protobuf.Parser<InstanceConfig> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public InstanceConfig getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder