Class Label.Builder (0.52.0)

public static final class Label.Builder extends GeneratedMessage.Builder<Label.Builder> implements LabelOrBuilder

A Label is additional information that can be added to an entity.

Protobuf type google.ads.admanager.v1.Label

Implements

LabelOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllTypes(Iterable<? extends LabelTypeEnum.LabelType> values)

public Label.Builder addAllTypes(Iterable<? extends LabelTypeEnum.LabelType> values)

Required. Unordered list. The types of the Label.

repeated .google.ads.admanager.v1.LabelTypeEnum.LabelType types = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
values Iterable<? extends com.google.ads.admanager.v1.LabelTypeEnum.LabelType>

The types to add.

Returns
Type Description
Label.Builder

This builder for chaining.

addAllTypesValue(Iterable<Integer> values)

public Label.Builder addAllTypesValue(Iterable<Integer> values)

Required. Unordered list. The types of the Label.

repeated .google.ads.admanager.v1.LabelTypeEnum.LabelType types = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
values Iterable<Integer>

The enum numeric values on the wire for types to add.

Returns
Type Description
Label.Builder

This builder for chaining.

addTypes(LabelTypeEnum.LabelType value)

public Label.Builder addTypes(LabelTypeEnum.LabelType value)

Required. Unordered list. The types of the Label.

repeated .google.ads.admanager.v1.LabelTypeEnum.LabelType types = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
value LabelTypeEnum.LabelType

The types to add.

Returns
Type Description
Label.Builder

This builder for chaining.

addTypesValue(int value)

public Label.Builder addTypesValue(int value)

Required. Unordered list. The types of the Label.

repeated .google.ads.admanager.v1.LabelTypeEnum.LabelType types = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
value int

The enum numeric value on the wire for types to add.

Returns
Type Description
Label.Builder

This builder for chaining.

build()

public Label build()
Returns
Type Description
Label

buildPartial()

public Label buildPartial()
Returns
Type Description
Label

clear()

public Label.Builder clear()
Returns
Type Description
Label.Builder
Overrides

clearActive()

public Label.Builder clearActive()

Output only. Specifies whether or not the label is active.

optional bool active = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Label.Builder

This builder for chaining.

clearDescription()

public Label.Builder clearDescription()

Optional. A description of the label. This attribute has a maximum length of 255 characters.

optional string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Label.Builder

This builder for chaining.

clearDisplayName()

public Label.Builder clearDisplayName()

Required. Display name of the Label. This attribute has a maximum length of 127 characters.

optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Label.Builder

This builder for chaining.

clearName()

public Label.Builder clearName()

Identifier. The resource name of the Label. Format: networks/{network_code}/labels/{label_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
Label.Builder

This builder for chaining.

clearTypes()

public Label.Builder clearTypes()

Required. Unordered list. The types of the Label.

repeated .google.ads.admanager.v1.LabelTypeEnum.LabelType types = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Returns
Type Description
Label.Builder

This builder for chaining.

getActive()

public boolean getActive()

Output only. Specifies whether or not the label is active.

optional bool active = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The active.

getDefaultInstanceForType()

public Label getDefaultInstanceForType()
Returns
Type Description
Label

getDescription()

public String getDescription()

Optional. A description of the label. This attribute has a maximum length of 255 characters.

optional string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. A description of the label. This attribute has a maximum length of 255 characters.

optional string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

Required. Display name of the Label. This attribute has a maximum length of 127 characters.

optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. Display name of the Label. This attribute has a maximum length of 127 characters.

optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getName()

public String getName()

Identifier. The resource name of the Label. Format: networks/{network_code}/labels/{label_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The resource name of the Label. Format: networks/{network_code}/labels/{label_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getTypes(int index)

public LabelTypeEnum.LabelType getTypes(int index)

Required. Unordered list. The types of the Label.

repeated .google.ads.admanager.v1.LabelTypeEnum.LabelType types = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
LabelTypeEnum.LabelType

The types at the given index.

getTypesCount()

public int getTypesCount()

Required. Unordered list. The types of the Label.

repeated .google.ads.admanager.v1.LabelTypeEnum.LabelType types = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Returns
Type Description
int

The count of types.

getTypesList()

public List<LabelTypeEnum.LabelType> getTypesList()

Required. Unordered list. The types of the Label.

repeated .google.ads.admanager.v1.LabelTypeEnum.LabelType types = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Returns
Type Description
List<LabelType>

A list containing the types.

getTypesValue(int index)

public int getTypesValue(int index)

Required. Unordered list. The types of the Label.

repeated .google.ads.admanager.v1.LabelTypeEnum.LabelType types = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of types at the given index.

getTypesValueList()

public List<Integer> getTypesValueList()

Required. Unordered list. The types of the Label.

repeated .google.ads.admanager.v1.LabelTypeEnum.LabelType types = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for types.

hasActive()

public boolean hasActive()

Output only. Specifies whether or not the label is active.

optional bool active = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the active field is set.

hasDescription()

public boolean hasDescription()

Optional. A description of the label. This attribute has a maximum length of 255 characters.

optional string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the description field is set.

hasDisplayName()

public boolean hasDisplayName()

Required. Display name of the Label. This attribute has a maximum length of 127 characters.

optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the displayName field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Label other)

public Label.Builder mergeFrom(Label other)
Parameter
Name Description
other Label
Returns
Type Description
Label.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Label.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Label.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Label.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Label.Builder
Overrides

setActive(boolean value)

public Label.Builder setActive(boolean value)

Output only. Specifies whether or not the label is active.

optional bool active = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The active to set.

Returns
Type Description
Label.Builder

This builder for chaining.

setDescription(String value)

public Label.Builder setDescription(String value)

Optional. A description of the label. This attribute has a maximum length of 255 characters.

optional string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Label.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Label.Builder setDescriptionBytes(ByteString value)

Optional. A description of the label. This attribute has a maximum length of 255 characters.

optional string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Label.Builder

This builder for chaining.

setDisplayName(String value)

public Label.Builder setDisplayName(String value)

Required. Display name of the Label. This attribute has a maximum length of 127 characters.

optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Label.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Label.Builder setDisplayNameBytes(ByteString value)

Required. Display name of the Label. This attribute has a maximum length of 127 characters.

optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Label.Builder

This builder for chaining.

setName(String value)

public Label.Builder setName(String value)

Identifier. The resource name of the Label. Format: networks/{network_code}/labels/{label_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Label.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Label.Builder setNameBytes(ByteString value)

Identifier. The resource name of the Label. Format: networks/{network_code}/labels/{label_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Label.Builder

This builder for chaining.

setTypes(int index, LabelTypeEnum.LabelType value)

public Label.Builder setTypes(int index, LabelTypeEnum.LabelType value)

Required. Unordered list. The types of the Label.

repeated .google.ads.admanager.v1.LabelTypeEnum.LabelType types = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameters
Name Description
index int

The index to set the value at.

value LabelTypeEnum.LabelType

The types to set.

Returns
Type Description
Label.Builder

This builder for chaining.

setTypesValue(int index, int value)

public Label.Builder setTypesValue(int index, int value)

Required. Unordered list. The types of the Label.

repeated .google.ads.admanager.v1.LabelTypeEnum.LabelType types = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = UNORDERED_LIST];

Parameters
Name Description
index int

The index to set the value at.

value int

The enum numeric value on the wire for types to set.

Returns
Type Description
Label.Builder

This builder for chaining.