Class NodeGroup.Builder

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

    public static final class NodeGroup.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<NodeGroup.Builder>
    implements NodeGroupOrBuilder
     Dataproc Node Group.
     **The Dataproc `NodeGroup` resource is not related to the
     Dataproc [NodeGroupAffinity][google.cloud.dataproc.v1.NodeGroupAffinity]
     resource.**
     
    Protobuf type google.cloud.dataproc.v1.NodeGroup
    • 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<NodeGroup.Builder>
      • internalGetMutableMapField

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

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

        public NodeGroup.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<NodeGroup.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<NodeGroup.Builder>
      • getDefaultInstanceForType

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

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

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

        public NodeGroup.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<NodeGroup.Builder>
      • setField

        public NodeGroup.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<NodeGroup.Builder>
      • clearField

        public NodeGroup.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<NodeGroup.Builder>
      • clearOneof

        public NodeGroup.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<NodeGroup.Builder>
      • setRepeatedField

        public NodeGroup.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<NodeGroup.Builder>
      • addRepeatedField

        public NodeGroup.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<NodeGroup.Builder>
      • mergeFrom

        public NodeGroup.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<NodeGroup.Builder>
      • isInitialized

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

        public NodeGroup.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<NodeGroup.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         The Node group [resource name](https://aip.dev/122).
         
        string name = 1;
        Specified by:
        getName in interface NodeGroupOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The Node group [resource name](https://aip.dev/122).
         
        string name = 1;
        Specified by:
        getNameBytes in interface NodeGroupOrBuilder
        Returns:
        The bytes for name.
      • setName

        public NodeGroup.Builder setName​(String value)
         The Node group [resource name](https://aip.dev/122).
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public NodeGroup.Builder clearName()
         The Node group [resource name](https://aip.dev/122).
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public NodeGroup.Builder setNameBytes​(com.google.protobuf.ByteString value)
         The Node group [resource name](https://aip.dev/122).
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getRolesList

        public List<NodeGroup.Role> getRolesList()
         Required. Node group roles.
         
        repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getRolesList in interface NodeGroupOrBuilder
        Returns:
        A list containing the roles.
      • getRolesCount

        public int getRolesCount()
         Required. Node group roles.
         
        repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getRolesCount in interface NodeGroupOrBuilder
        Returns:
        The count of roles.
      • getRoles

        public NodeGroup.Role getRoles​(int index)
         Required. Node group roles.
         
        repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getRoles in interface NodeGroupOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The roles at the given index.
      • setRoles

        public NodeGroup.Builder setRoles​(int index,
                                          NodeGroup.Role value)
         Required. Node group roles.
         
        repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        index - The index to set the value at.
        value - The roles to set.
        Returns:
        This builder for chaining.
      • addRoles

        public NodeGroup.Builder addRoles​(NodeGroup.Role value)
         Required. Node group roles.
         
        repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The roles to add.
        Returns:
        This builder for chaining.
      • addAllRoles

        public NodeGroup.Builder addAllRoles​(Iterable<? extends NodeGroup.Role> values)
         Required. Node group roles.
         
        repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        values - The roles to add.
        Returns:
        This builder for chaining.
      • clearRoles

        public NodeGroup.Builder clearRoles()
         Required. Node group roles.
         
        repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • getRolesValueList

        public List<Integer> getRolesValueList()
         Required. Node group roles.
         
        repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getRolesValueList in interface NodeGroupOrBuilder
        Returns:
        A list containing the enum numeric values on the wire for roles.
      • getRolesValue

        public int getRolesValue​(int index)
         Required. Node group roles.
         
        repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getRolesValue in interface NodeGroupOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The enum numeric value on the wire of roles at the given index.
      • setRolesValue

        public NodeGroup.Builder setRolesValue​(int index,
                                               int value)
         Required. Node group roles.
         
        repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        index - The index to set the value at.
        value - The enum numeric value on the wire for roles to set.
        Returns:
        This builder for chaining.
      • addRolesValue

        public NodeGroup.Builder addRolesValue​(int value)
         Required. Node group roles.
         
        repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The enum numeric value on the wire for roles to add.
        Returns:
        This builder for chaining.
      • addAllRolesValue

        public NodeGroup.Builder addAllRolesValue​(Iterable<Integer> values)
         Required. Node group roles.
         
        repeated .google.cloud.dataproc.v1.NodeGroup.Role roles = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        values - The enum numeric values on the wire for roles to add.
        Returns:
        This builder for chaining.
      • hasNodeGroupConfig

        public boolean hasNodeGroupConfig()
         Optional. The node group instance group configuration.
         
        .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        hasNodeGroupConfig in interface NodeGroupOrBuilder
        Returns:
        Whether the nodeGroupConfig field is set.
      • getNodeGroupConfig

        public InstanceGroupConfig getNodeGroupConfig()
         Optional. The node group instance group configuration.
         
        .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getNodeGroupConfig in interface NodeGroupOrBuilder
        Returns:
        The nodeGroupConfig.
      • setNodeGroupConfig

        public NodeGroup.Builder setNodeGroupConfig​(InstanceGroupConfig value)
         Optional. The node group instance group configuration.
         
        .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL];
      • setNodeGroupConfig

        public NodeGroup.Builder setNodeGroupConfig​(InstanceGroupConfig.Builder builderForValue)
         Optional. The node group instance group configuration.
         
        .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL];
      • mergeNodeGroupConfig

        public NodeGroup.Builder mergeNodeGroupConfig​(InstanceGroupConfig value)
         Optional. The node group instance group configuration.
         
        .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL];
      • clearNodeGroupConfig

        public NodeGroup.Builder clearNodeGroupConfig()
         Optional. The node group instance group configuration.
         
        .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL];
      • getNodeGroupConfigBuilder

        public InstanceGroupConfig.Builder getNodeGroupConfigBuilder()
         Optional. The node group instance group configuration.
         
        .google.cloud.dataproc.v1.InstanceGroupConfig node_group_config = 3 [(.google.api.field_behavior) = OPTIONAL];
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: NodeGroupOrBuilder
         Optional. Node group labels.
        
         * Label **keys** must consist of from 1 to 63 characters and conform to
           [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
         * Label **values** can be empty. If specified, they must consist of from
           1 to 63 characters and conform to [RFC 1035]
           (https://www.ietf.org/rfc/rfc1035.txt).
         * The node group must have no more than 32 labels.
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsCount in interface NodeGroupOrBuilder
      • containsLabels

        public boolean containsLabels​(String key)
         Optional. Node group labels.
        
         * Label **keys** must consist of from 1 to 63 characters and conform to
           [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
         * Label **values** can be empty. If specified, they must consist of from
           1 to 63 characters and conform to [RFC 1035]
           (https://www.ietf.org/rfc/rfc1035.txt).
         * The node group must have no more than 32 labels.
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        containsLabels in interface NodeGroupOrBuilder
      • getLabelsMap

        public Map<String,​String> getLabelsMap()
         Optional. Node group labels.
        
         * Label **keys** must consist of from 1 to 63 characters and conform to
           [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
         * Label **values** can be empty. If specified, they must consist of from
           1 to 63 characters and conform to [RFC 1035]
           (https://www.ietf.org/rfc/rfc1035.txt).
         * The node group must have no more than 32 labels.
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsMap in interface NodeGroupOrBuilder
      • getLabelsOrDefault

        public String getLabelsOrDefault​(String key,
                                         String defaultValue)
         Optional. Node group labels.
        
         * Label **keys** must consist of from 1 to 63 characters and conform to
           [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
         * Label **values** can be empty. If specified, they must consist of from
           1 to 63 characters and conform to [RFC 1035]
           (https://www.ietf.org/rfc/rfc1035.txt).
         * The node group must have no more than 32 labels.
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrDefault in interface NodeGroupOrBuilder
      • getLabelsOrThrow

        public String getLabelsOrThrow​(String key)
         Optional. Node group labels.
        
         * Label **keys** must consist of from 1 to 63 characters and conform to
           [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
         * Label **values** can be empty. If specified, they must consist of from
           1 to 63 characters and conform to [RFC 1035]
           (https://www.ietf.org/rfc/rfc1035.txt).
         * The node group must have no more than 32 labels.
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrThrow in interface NodeGroupOrBuilder
      • removeLabels

        public NodeGroup.Builder removeLabels​(String key)
         Optional. Node group labels.
        
         * Label **keys** must consist of from 1 to 63 characters and conform to
           [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
         * Label **values** can be empty. If specified, they must consist of from
           1 to 63 characters and conform to [RFC 1035]
           (https://www.ietf.org/rfc/rfc1035.txt).
         * The node group must have no more than 32 labels.
         
        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 NodeGroup.Builder putLabels​(String key,
                                           String value)
         Optional. Node group labels.
        
         * Label **keys** must consist of from 1 to 63 characters and conform to
           [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
         * Label **values** can be empty. If specified, they must consist of from
           1 to 63 characters and conform to [RFC 1035]
           (https://www.ietf.org/rfc/rfc1035.txt).
         * The node group must have no more than 32 labels.
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
      • putAllLabels

        public NodeGroup.Builder putAllLabels​(Map<String,​String> values)
         Optional. Node group labels.
        
         * Label **keys** must consist of from 1 to 63 characters and conform to
           [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
         * Label **values** can be empty. If specified, they must consist of from
           1 to 63 characters and conform to [RFC 1035]
           (https://www.ietf.org/rfc/rfc1035.txt).
         * The node group must have no more than 32 labels.
         
        map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
      • setUnknownFields

        public final NodeGroup.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<NodeGroup.Builder>
      • mergeUnknownFields

        public final NodeGroup.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<NodeGroup.Builder>