Class Namespace.Builder (2.21.0)

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.v1beta1.Namespace

Implements

NamespaceOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Namespace.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Namespace.Builder
Overrides

build()

public Namespace build()
Returns
TypeDescription
Namespace

buildPartial()

public Namespace buildPartial()
Returns
TypeDescription
Namespace

clear()

public Namespace.Builder clear()
Returns
TypeDescription
Namespace.Builder
Overrides

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];

Returns
TypeDescription
Namespace.Builder

clearField(Descriptors.FieldDescriptor field)

public Namespace.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Namespace.Builder
Overrides

clearLabels()

public Namespace.Builder clearLabels()
Returns
TypeDescription
Namespace.Builder

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
TypeDescription
Namespace.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Namespace.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Namespace.Builder
Overrides

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];

Returns
TypeDescription
Namespace.Builder

clone()

public Namespace.Builder clone()
Returns
TypeDescription
Namespace.Builder
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
NameDescription
keyString
Returns
TypeDescription
boolean

getCreateTime()

public Timestamp getCreateTime()

Output only. The timestamp when the namespace was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The timestamp when the namespace was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The timestamp when the namespace was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Namespace getDefaultInstanceForType()
Returns
TypeDescription
Namespace

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

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
TypeDescription
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];

Returns
TypeDescription
Map<String,String>

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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

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];

Returns
TypeDescription
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
TypeDescription
ByteString

The bytes for name.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The timestamp when the namespace was last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeBuilder()

public 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];

Returns
TypeDescription
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The timestamp when the namespace was last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

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];

Returns
TypeDescription
boolean

Whether the createTime field is set.

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];

Returns
TypeDescription
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCreateTime(Timestamp value)

public Namespace.Builder mergeCreateTime(Timestamp value)

Output only. The timestamp when the namespace was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Namespace.Builder

mergeFrom(Namespace other)

public Namespace.Builder mergeFrom(Namespace other)
Parameter
NameDescription
otherNamespace
Returns
TypeDescription
Namespace.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Namespace.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Namespace.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Namespace.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Namespace.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Namespace.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Namespace.Builder
Overrides

mergeUpdateTime(Timestamp value)

public Namespace.Builder mergeUpdateTime(Timestamp value)

Output only. The timestamp when the namespace was last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Namespace.Builder

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
NameDescription
valuesMap<String,String>
Returns
TypeDescription
Namespace.Builder

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
NameDescription
keyString
valueString
Returns
TypeDescription
Namespace.Builder

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
NameDescription
keyString
Returns
TypeDescription
Namespace.Builder

setCreateTime(Timestamp value)

public Namespace.Builder setCreateTime(Timestamp value)

Output only. The timestamp when the namespace was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Namespace.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Namespace.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The timestamp when the namespace was created.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Namespace.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Namespace.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Namespace.Builder
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
Namespace.Builder

This builder for chaining.

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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Namespace.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Namespace.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Namespace.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Namespace.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Namespace.Builder
Overrides

setUpdateTime(Timestamp value)

public Namespace.Builder setUpdateTime(Timestamp value)

Output only. The timestamp when the namespace was last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Namespace.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Namespace.Builder setUpdateTime(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];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Namespace.Builder