Class ManagedCluster.Builder

  • All Implemented Interfaces:
    ManagedClusterOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    ManagedCluster

    public static final class ManagedCluster.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<ManagedCluster.Builder>
    implements ManagedClusterOrBuilder
     Cluster that is managed by the workflow.
     
    Protobuf type google.cloud.dataproc.v1.ManagedCluster
    • Method Detail

      • 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.Builder<ManagedCluster.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<ManagedCluster.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<ManagedCluster.Builder>
      • clear

        public ManagedCluster.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<ManagedCluster.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<ManagedCluster.Builder>
      • getDefaultInstanceForType

        public ManagedCluster getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public ManagedCluster build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public ManagedCluster buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public ManagedCluster.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<ManagedCluster.Builder>
      • setField

        public ManagedCluster.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<ManagedCluster.Builder>
      • clearField

        public ManagedCluster.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<ManagedCluster.Builder>
      • clearOneof

        public ManagedCluster.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ManagedCluster.Builder>
      • setRepeatedField

        public ManagedCluster.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       int index,
                                                       Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ManagedCluster.Builder>
      • addRepeatedField

        public ManagedCluster.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ManagedCluster.Builder>
      • mergeFrom

        public ManagedCluster.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ManagedCluster.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<ManagedCluster.Builder>
      • mergeFrom

        public ManagedCluster.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ManagedCluster.Builder>
        Throws:
        IOException
      • getClusterName

        public String getClusterName()
         Required. The cluster name prefix. A unique cluster name will be formed by
         appending a random suffix.
        
         The name must contain only lower-case letters (a-z), numbers (0-9),
         and hyphens (-). Must begin with a letter. Cannot begin or end with
         hyphen. Must consist of between 2 and 35 characters.
         
        string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getClusterName in interface ManagedClusterOrBuilder
        Returns:
        The clusterName.
      • getClusterNameBytes

        public com.google.protobuf.ByteString getClusterNameBytes()
         Required. The cluster name prefix. A unique cluster name will be formed by
         appending a random suffix.
        
         The name must contain only lower-case letters (a-z), numbers (0-9),
         and hyphens (-). Must begin with a letter. Cannot begin or end with
         hyphen. Must consist of between 2 and 35 characters.
         
        string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getClusterNameBytes in interface ManagedClusterOrBuilder
        Returns:
        The bytes for clusterName.
      • setClusterName

        public ManagedCluster.Builder setClusterName​(String value)
         Required. The cluster name prefix. A unique cluster name will be formed by
         appending a random suffix.
        
         The name must contain only lower-case letters (a-z), numbers (0-9),
         and hyphens (-). Must begin with a letter. Cannot begin or end with
         hyphen. Must consist of between 2 and 35 characters.
         
        string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The clusterName to set.
        Returns:
        This builder for chaining.
      • clearClusterName

        public ManagedCluster.Builder clearClusterName()
         Required. The cluster name prefix. A unique cluster name will be formed by
         appending a random suffix.
        
         The name must contain only lower-case letters (a-z), numbers (0-9),
         and hyphens (-). Must begin with a letter. Cannot begin or end with
         hyphen. Must consist of between 2 and 35 characters.
         
        string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setClusterNameBytes

        public ManagedCluster.Builder setClusterNameBytes​(com.google.protobuf.ByteString value)
         Required. The cluster name prefix. A unique cluster name will be formed by
         appending a random suffix.
        
         The name must contain only lower-case letters (a-z), numbers (0-9),
         and hyphens (-). Must begin with a letter. Cannot begin or end with
         hyphen. Must consist of between 2 and 35 characters.
         
        string cluster_name = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for clusterName to set.
        Returns:
        This builder for chaining.
      • hasConfig

        public boolean hasConfig()
         Required. The cluster configuration.
         
        .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasConfig in interface ManagedClusterOrBuilder
        Returns:
        Whether the config field is set.
      • getConfig

        public ClusterConfig getConfig()
         Required. The cluster configuration.
         
        .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getConfig in interface ManagedClusterOrBuilder
        Returns:
        The config.
      • setConfig

        public ManagedCluster.Builder setConfig​(ClusterConfig value)
         Required. The cluster configuration.
         
        .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED];
      • setConfig

        public ManagedCluster.Builder setConfig​(ClusterConfig.Builder builderForValue)
         Required. The cluster configuration.
         
        .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED];
      • mergeConfig

        public ManagedCluster.Builder mergeConfig​(ClusterConfig value)
         Required. The cluster configuration.
         
        .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED];
      • clearConfig

        public ManagedCluster.Builder clearConfig()
         Required. The cluster configuration.
         
        .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED];
      • getConfigBuilder

        public ClusterConfig.Builder getConfigBuilder()
         Required. The cluster configuration.
         
        .google.cloud.dataproc.v1.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED];
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: ManagedClusterOrBuilder
         Optional. The labels to associate with this cluster.
        
         Label keys must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression:
         [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
        
         Label values must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
        
         No more than 32 labels can be associated with a given cluster.
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsCount in interface ManagedClusterOrBuilder
      • containsLabels

        public boolean containsLabels​(String key)
         Optional. The labels to associate with this cluster.
        
         Label keys must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression:
         [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
        
         Label values must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
        
         No more than 32 labels can be associated with a given cluster.
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        containsLabels in interface ManagedClusterOrBuilder
      • getLabelsMap

        public Map<String,​String> getLabelsMap()
         Optional. The labels to associate with this cluster.
        
         Label keys must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression:
         [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
        
         Label values must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
        
         No more than 32 labels can be associated with a given cluster.
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsMap in interface ManagedClusterOrBuilder
      • getLabelsOrDefault

        public String getLabelsOrDefault​(String key,
                                         String defaultValue)
         Optional. The labels to associate with this cluster.
        
         Label keys must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression:
         [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
        
         Label values must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
        
         No more than 32 labels can be associated with a given cluster.
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrDefault in interface ManagedClusterOrBuilder
      • getLabelsOrThrow

        public String getLabelsOrThrow​(String key)
         Optional. The labels to associate with this cluster.
        
         Label keys must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression:
         [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
        
         Label values must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
        
         No more than 32 labels can be associated with a given cluster.
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrThrow in interface ManagedClusterOrBuilder
      • removeLabels

        public ManagedCluster.Builder removeLabels​(String key)
         Optional. The labels to associate with this cluster.
        
         Label keys must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression:
         [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
        
         Label values must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
        
         No more than 32 labels can be associated with a given cluster.
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
      • getMutableLabels

        @Deprecated
        public Map<String,​String> getMutableLabels()
        Deprecated.
        Use alternate mutation accessors instead.
      • putLabels

        public ManagedCluster.Builder putLabels​(String key,
                                                String value)
         Optional. The labels to associate with this cluster.
        
         Label keys must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression:
         [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
        
         Label values must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
        
         No more than 32 labels can be associated with a given cluster.
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
      • putAllLabels

        public ManagedCluster.Builder putAllLabels​(Map<String,​String> values)
         Optional. The labels to associate with this cluster.
        
         Label keys must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression:
         [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
        
         Label values must be between 1 and 63 characters long, and must conform to
         the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
        
         No more than 32 labels can be associated with a given cluster.
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
      • setUnknownFields

        public final ManagedCluster.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ManagedCluster.Builder>
      • mergeUnknownFields

        public final ManagedCluster.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ManagedCluster.Builder>