Class ItemCustomVariable.Builder (0.14.0)

public static final class ItemCustomVariable.Builder extends GeneratedMessage.Builder<ItemCustomVariable.Builder> implements ItemCustomVariableOrBuilder

Item-level custom variable for ads conversions.

Protobuf type google.ads.datamanager.v1.ItemCustomVariable

Static Methods

getDescriptor()

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

Methods

addAllDestinationReferences(Iterable<String> values)

public ItemCustomVariable.Builder addAllDestinationReferences(Iterable<String> values)

Optional. Reference string used to determine which of the Event.destination_references the custom variable should be sent to. If empty, the Event.destination_references will be used.

repeated string destination_references = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The destinationReferences to add.

Returns
Type Description
ItemCustomVariable.Builder

This builder for chaining.

addDestinationReferences(String value)

public ItemCustomVariable.Builder addDestinationReferences(String value)

Optional. Reference string used to determine which of the Event.destination_references the custom variable should be sent to. If empty, the Event.destination_references will be used.

repeated string destination_references = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The destinationReferences to add.

Returns
Type Description
ItemCustomVariable.Builder

This builder for chaining.

addDestinationReferencesBytes(ByteString value)

public ItemCustomVariable.Builder addDestinationReferencesBytes(ByteString value)

Optional. Reference string used to determine which of the Event.destination_references the custom variable should be sent to. If empty, the Event.destination_references will be used.

repeated string destination_references = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the destinationReferences to add.

Returns
Type Description
ItemCustomVariable.Builder

This builder for chaining.

build()

public ItemCustomVariable build()
Returns
Type Description
ItemCustomVariable

buildPartial()

public ItemCustomVariable buildPartial()
Returns
Type Description
ItemCustomVariable

clear()

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

clearDestinationReferences()

public ItemCustomVariable.Builder clearDestinationReferences()

Optional. Reference string used to determine which of the Event.destination_references the custom variable should be sent to. If empty, the Event.destination_references will be used.

repeated string destination_references = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ItemCustomVariable.Builder

This builder for chaining.

clearValue()

public ItemCustomVariable.Builder clearValue()

Optional. The value to store for the custom variable.

string value = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ItemCustomVariable.Builder

This builder for chaining.

clearVariable()

public ItemCustomVariable.Builder clearVariable()

Optional. The name of the custom variable to set. If the variable is not found for the given destination, it will be ignored.

string variable = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ItemCustomVariable.Builder

This builder for chaining.

getDefaultInstanceForType()

public ItemCustomVariable getDefaultInstanceForType()
Returns
Type Description
ItemCustomVariable

getDescriptorForType()

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

getDestinationReferences(int index)

public String getDestinationReferences(int index)

Optional. Reference string used to determine which of the Event.destination_references the custom variable should be sent to. If empty, the Event.destination_references will be used.

repeated string destination_references = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The destinationReferences at the given index.

getDestinationReferencesBytes(int index)

public ByteString getDestinationReferencesBytes(int index)

Optional. Reference string used to determine which of the Event.destination_references the custom variable should be sent to. If empty, the Event.destination_references will be used.

repeated string destination_references = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the destinationReferences at the given index.

getDestinationReferencesCount()

public int getDestinationReferencesCount()

Optional. Reference string used to determine which of the Event.destination_references the custom variable should be sent to. If empty, the Event.destination_references will be used.

repeated string destination_references = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of destinationReferences.

getDestinationReferencesList()

public ProtocolStringList getDestinationReferencesList()

Optional. Reference string used to determine which of the Event.destination_references the custom variable should be sent to. If empty, the Event.destination_references will be used.

repeated string destination_references = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the destinationReferences.

getValue()

public String getValue()

Optional. The value to store for the custom variable.

string value = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The value.

getValueBytes()

public ByteString getValueBytes()

Optional. The value to store for the custom variable.

string value = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for value.

getVariable()

public String getVariable()

Optional. The name of the custom variable to set. If the variable is not found for the given destination, it will be ignored.

string variable = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The variable.

getVariableBytes()

public ByteString getVariableBytes()

Optional. The name of the custom variable to set. If the variable is not found for the given destination, it will be ignored.

string variable = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for variable.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ItemCustomVariable other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setDestinationReferences(int index, String value)

public ItemCustomVariable.Builder setDestinationReferences(int index, String value)

Optional. Reference string used to determine which of the Event.destination_references the custom variable should be sent to. If empty, the Event.destination_references will be used.

repeated string destination_references = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The destinationReferences to set.

Returns
Type Description
ItemCustomVariable.Builder

This builder for chaining.

setValue(String value)

public ItemCustomVariable.Builder setValue(String value)

Optional. The value to store for the custom variable.

string value = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The value to set.

Returns
Type Description
ItemCustomVariable.Builder

This builder for chaining.

setValueBytes(ByteString value)

public ItemCustomVariable.Builder setValueBytes(ByteString value)

Optional. The value to store for the custom variable.

string value = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for value to set.

Returns
Type Description
ItemCustomVariable.Builder

This builder for chaining.

setVariable(String value)

public ItemCustomVariable.Builder setVariable(String value)

Optional. The name of the custom variable to set. If the variable is not found for the given destination, it will be ignored.

string variable = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The variable to set.

Returns
Type Description
ItemCustomVariable.Builder

This builder for chaining.

setVariableBytes(ByteString value)

public ItemCustomVariable.Builder setVariableBytes(ByteString value)

Optional. The name of the custom variable to set. If the variable is not found for the given destination, it will be ignored.

string variable = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for variable to set.

Returns
Type Description
ItemCustomVariable.Builder

This builder for chaining.