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.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Namespace.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
buildPartial()
public Namespace buildPartial()
clear()
public Namespace.Builder clear()
Overrides
clearField(Descriptors.FieldDescriptor field)
public Namespace.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearLabels()
public Namespace.Builder clearLabels()
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];
clearOneof(Descriptors.OneofDescriptor oneof)
public Namespace.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
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];
clone()
public Namespace.Builder clone()
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 |
Name |
Description |
key |
String
|
getDefaultInstanceForType()
public Namespace getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getLabels() (deprecated)
public Map<String,String> getLabels()
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 |
Type |
Description |
int |
|
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];
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];
Returns |
Type |
Description |
String |
|
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 |
Name |
Description |
key |
String
|
Returns |
Type |
Description |
String |
|
getMutableLabels() (deprecated)
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
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 |
Type |
Description |
ByteString |
The bytes for name.
|
getUid()
Output only. The globally unique identifier of the namespace in the UUID4
format.
string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
String |
The uid.
|
getUidBytes()
public ByteString getUidBytes()
Output only. The globally unique identifier of the namespace in the UUID4
format.
string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
ByteString |
The bytes for uid.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter |
Name |
Description |
number |
int
|
Returns |
Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
internalGetMutableMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter |
Name |
Description |
number |
int
|
Returns |
Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(Namespace other)
public Namespace.Builder mergeFrom(Namespace other)
public Namespace.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public Namespace.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Namespace.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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];
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];
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 |
Name |
Description |
key |
String
|
setField(Descriptors.FieldDescriptor field, Object value)
public Namespace.Builder setField(Descriptors.FieldDescriptor field, Object value)
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.
|
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.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Namespace.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUid(String value)
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];
Parameter |
Name |
Description |
value |
String
The uid to set.
|
setUidBytes(ByteString value)
public Namespace.Builder setUidBytes(ByteString value)
Output only. The globally unique identifier of the namespace in the UUID4
format.
string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
Name |
Description |
value |
ByteString
The bytes for uid to set.
|
setUnknownFields(UnknownFieldSet unknownFields)
public final Namespace.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides