Class Namespace.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Namespace.Builder>
com.google.cloud.servicedirectory.v1.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.GeneratedMessage.Builder<Namespace.Builder> implements NamespaceOrBuilder
 A container for [services][google.cloud.servicedirectory.v1.Service].
 Namespaces allow administrators to group services together and define
 permissions for a collection of services.
 
Protobuf type google.cloud.servicedirectory.v1.Namespace
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<Namespace.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<Namespace.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.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
    • 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>
    • mergeFrom

      public Namespace.Builder mergeFrom(Namespace other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.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
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels 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
    • clearLabels

      public Namespace.Builder clearLabels()
    • 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];
    • getUid

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

      public com.google.protobuf.ByteString getUidBytes()
       Output only. The globally unique identifier of the namespace in the UUID4
       format.
       
      string uid = 5 [(.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. The globally unique identifier of the namespace in the UUID4
       format.
       
      string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The uid to set.
      Returns:
      This builder for chaining.
    • clearUid

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

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