Class TargetAttribute.Builder (1.39.0)

public static final class TargetAttribute.Builder extends GeneratedMessageV3.Builder<TargetAttribute.Builder> implements TargetAttributeOrBuilder

Contains criteria for selecting Targets.

Protobuf type google.cloud.deploy.v1.TargetAttribute

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public TargetAttribute build()
Returns
TypeDescription
TargetAttribute

buildPartial()

public TargetAttribute buildPartial()
Returns
TypeDescription
TargetAttribute

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearId()

public TargetAttribute.Builder clearId()

ID of the Target. The value of this field could be one of the following:

  • The last segment of a target name. It only needs the ID to determine which target is being referred to
  • "*", all targets in a location.

string id = 1;

Returns
TypeDescription
TargetAttribute.Builder

This builder for chaining.

clearLabels()

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public TargetAttribute.Builder clone()
Returns
TypeDescription
TargetAttribute.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Target labels.

map<string, string> labels = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public TargetAttribute getDefaultInstanceForType()
Returns
TypeDescription
TargetAttribute

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getId()

public String getId()

ID of the Target. The value of this field could be one of the following:

  • The last segment of a target name. It only needs the ID to determine which target is being referred to
  • "*", all targets in a location.

string id = 1;

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

ID of the Target. The value of this field could be one of the following:

  • The last segment of a target name. It only needs the ID to determine which target is being referred to
  • "*", all targets in a location.

string id = 1;

Returns
TypeDescription
ByteString

The bytes for id.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Target labels.

map<string, string> labels = 2;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Target labels.

map<string, string> labels = 2;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Target labels.

map<string, string> labels = 2;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Target labels.

map<string, string> labels = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(TargetAttribute other)

public TargetAttribute.Builder mergeFrom(TargetAttribute other)
Parameter
NameDescription
otherTargetAttribute
Returns
TypeDescription
TargetAttribute.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllLabels(Map<String,String> values)

public TargetAttribute.Builder putAllLabels(Map<String,String> values)

Target labels.

map<string, string> labels = 2;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
TargetAttribute.Builder

putLabels(String key, String value)

public TargetAttribute.Builder putLabels(String key, String value)

Target labels.

map<string, string> labels = 2;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
TargetAttribute.Builder

removeLabels(String key)

public TargetAttribute.Builder removeLabels(String key)

Target labels.

map<string, string> labels = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
TargetAttribute.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setId(String value)

public TargetAttribute.Builder setId(String value)

ID of the Target. The value of this field could be one of the following:

  • The last segment of a target name. It only needs the ID to determine which target is being referred to
  • "*", all targets in a location.

string id = 1;

Parameter
NameDescription
valueString

The id to set.

Returns
TypeDescription
TargetAttribute.Builder

This builder for chaining.

setIdBytes(ByteString value)

public TargetAttribute.Builder setIdBytes(ByteString value)

ID of the Target. The value of this field could be one of the following:

  • The last segment of a target name. It only needs the ID to determine which target is being referred to
  • "*", all targets in a location.

string id = 1;

Parameter
NameDescription
valueByteString

The bytes for id to set.

Returns
TypeDescription
TargetAttribute.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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