Class Namespace.Builder

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

    public static final class Namespace.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Namespace.Builder>
    implements NamespaceOrBuilder
     A container for [services][google.cloud.servicedirectory.v1beta1.Service].
     Namespaces allow administrators to group services together and define
     permissions for a collection of services.
     
    Protobuf type google.cloud.servicedirectory.v1beta1.Namespace
    • 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<Namespace.Builder>
      • internalGetMutableMapField

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public String getName()
         Immutable. The resource name for the namespace in the format
         `projects/*/locations/*/namespaces/*`.
         
        string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getName in interface NamespaceOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Immutable. The resource name for the namespace in the format
         `projects/*/locations/*/namespaces/*`.
         
        string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getNameBytes in interface NamespaceOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Namespace.Builder setName​(String value)
         Immutable. The resource name for the namespace in the format
         `projects/*/locations/*/namespaces/*`.
         
        string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Namespace.Builder clearName()
         Immutable. The resource name for the namespace in the format
         `projects/*/locations/*/namespaces/*`.
         
        string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
        Returns:
        This builder for chaining.
      • setNameBytes

        public Namespace.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Immutable. The resource name for the namespace in the format
         `projects/*/locations/*/namespaces/*`.
         
        string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: NamespaceOrBuilder
         Optional. Resource labels associated with this namespace.
         No more than 64 user labels can be associated with a given resource. Label
         keys and values can be no longer than 63 characters.
         
        map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsCount in interface NamespaceOrBuilder
      • containsLabels

        public boolean containsLabels​(String key)
         Optional. Resource labels associated with this namespace.
         No more than 64 user labels can be associated with a given resource. Label
         keys and values can be no longer than 63 characters.
         
        map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        containsLabels in interface NamespaceOrBuilder
      • getLabelsMap

        public Map<String,​String> getLabelsMap()
         Optional. Resource labels associated with this namespace.
         No more than 64 user labels can be associated with a given resource. Label
         keys and values can be no longer than 63 characters.
         
        map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsMap in interface NamespaceOrBuilder
      • getLabelsOrDefault

        public String getLabelsOrDefault​(String key,
                                         String defaultValue)
         Optional. Resource labels associated with this namespace.
         No more than 64 user labels can be associated with a given resource. Label
         keys and values can be no longer than 63 characters.
         
        map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrDefault in interface NamespaceOrBuilder
      • getLabelsOrThrow

        public String getLabelsOrThrow​(String key)
         Optional. Resource labels associated with this namespace.
         No more than 64 user labels can be associated with a given resource. Label
         keys and values can be no longer than 63 characters.
         
        map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrThrow in interface NamespaceOrBuilder
      • removeLabels

        public Namespace.Builder removeLabels​(String key)
         Optional. Resource labels associated with this namespace.
         No more than 64 user labels can be associated with a given resource. Label
         keys and values can be no longer than 63 characters.
         
        map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
      • getMutableLabels

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

        public Namespace.Builder putLabels​(String key,
                                           String value)
         Optional. Resource labels associated with this namespace.
         No more than 64 user labels can be associated with a given resource. Label
         keys and values can be no longer than 63 characters.
         
        map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
      • putAllLabels

        public Namespace.Builder putAllLabels​(Map<String,​String> values)
         Optional. Resource labels associated with this namespace.
         No more than 64 user labels can be associated with a given resource. Label
         keys and values can be no longer than 63 characters.
         
        map<string, string> labels = 2 [(.google.api.field_behavior) = OPTIONAL];
      • hasCreateTime

        public boolean hasCreateTime()
         Output only. The timestamp when the namespace was created.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCreateTime in interface NamespaceOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. The timestamp when the namespace was created.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTime in interface NamespaceOrBuilder
        Returns:
        The createTime.
      • setCreateTime

        public Namespace.Builder setCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The timestamp when the namespace was created.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setCreateTime

        public Namespace.Builder setCreateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. The timestamp when the namespace was created.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeCreateTime

        public Namespace.Builder mergeCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The timestamp when the namespace was created.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearCreateTime

        public Namespace.Builder clearCreateTime()
         Output only. The timestamp when the namespace was created.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
         Output only. The timestamp when the namespace was created.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. The timestamp when the namespace was created.
         
        .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTimeOrBuilder in interface NamespaceOrBuilder
      • hasUpdateTime

        public boolean hasUpdateTime()
         Output only. The timestamp when the namespace was last updated.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasUpdateTime in interface NamespaceOrBuilder
        Returns:
        Whether the updateTime field is set.
      • getUpdateTime

        public com.google.protobuf.Timestamp getUpdateTime()
         Output only. The timestamp when the namespace was last updated.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTime in interface NamespaceOrBuilder
        Returns:
        The updateTime.
      • setUpdateTime

        public Namespace.Builder setUpdateTime​(com.google.protobuf.Timestamp value)
         Output only. The timestamp when the namespace was last updated.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setUpdateTime

        public Namespace.Builder setUpdateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. The timestamp when the namespace was last updated.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeUpdateTime

        public Namespace.Builder mergeUpdateTime​(com.google.protobuf.Timestamp value)
         Output only. The timestamp when the namespace was last updated.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearUpdateTime

        public Namespace.Builder clearUpdateTime()
         Output only. The timestamp when the namespace was last updated.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getUpdateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
         Output only. The timestamp when the namespace was last updated.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getUpdateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
         Output only. The timestamp when the namespace was last updated.
         
        .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTimeOrBuilder in interface NamespaceOrBuilder
      • getUid

        public String getUid()
         Output only. A globally unique identifier (in UUID4 format) for this
         namespace.
         
        string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUid in interface NamespaceOrBuilder
        Returns:
        The uid.
      • getUidBytes

        public com.google.protobuf.ByteString getUidBytes()
         Output only. A globally unique identifier (in UUID4 format) for this
         namespace.
         
        string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUidBytes in interface NamespaceOrBuilder
        Returns:
        The bytes for uid.
      • setUid

        public Namespace.Builder setUid​(String value)
         Output only. A globally unique identifier (in UUID4 format) for this
         namespace.
         
        string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The uid to set.
        Returns:
        This builder for chaining.
      • clearUid

        public Namespace.Builder clearUid()
         Output only. A globally unique identifier (in UUID4 format) for this
         namespace.
         
        string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setUidBytes

        public Namespace.Builder setUidBytes​(com.google.protobuf.ByteString value)
         Output only. A globally unique identifier (in UUID4 format) for this
         namespace.
         
        string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for uid to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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