public static final class Namespace.Builder extends GeneratedMessageV3.Builder<Namespace.Builder> implements NamespaceOrBuilder
A container for services.
Namespaces allow administrators to group services together and define
permissions for a collection of services.
Protobuf type google.cloud.servicedirectory.v1.Namespace
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Namespace.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
Returns
buildPartial()
public Namespace buildPartial()
Returns
clear()
public Namespace.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public Namespace.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearLabels()
public Namespace.Builder clearLabels()
Returns
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
clearOneof(Descriptors.OneofDescriptor oneof)
public Namespace.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public Namespace.Builder clone()
Returns
Overrides
containsLabels(String key)
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];
Parameter
Returns
getDefaultInstanceForType()
public Namespace getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getLabels()
public Map<String,String> getLabels()
Returns
getLabelsCount()
public int getLabelsCount()
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];
Returns
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];
Returns
getLabelsOrDefault(String key, String defaultValue)
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];
Parameters
Returns
getLabelsOrThrow(String key)
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];
Parameter
Returns
getMutableLabels()
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
Returns
getName()
Immutable. The resource name for the namespace in the format
projects/*/locations/*/namespaces/*
.
string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
Returns
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
Immutable. The resource name for the namespace in the format
projects/*/locations/*/namespaces/*
.
string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
Returns
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(Namespace other)
public Namespace.Builder mergeFrom(Namespace other)
Parameter
Returns
public Namespace.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public Namespace.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Namespace.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
putAllLabels(Map<String,String> values)
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];
Parameter
Returns
putLabels(String key, String value)
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];
Parameters
Returns
removeLabels(String key)
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];
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public Namespace.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setName(String value)
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];
Parameter
Name | Description |
value | String
The name to set.
|
Returns
setNameBytes(ByteString value)
public Namespace.Builder setNameBytes(ByteString value)
Immutable. The resource name for the namespace in the format
projects/*/locations/*/namespaces/*
.
string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
Parameter
Name | Description |
value | ByteString
The bytes for name to set.
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Namespace.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final Namespace.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides