Class CustomVariable.Builder (0.4.0)

public static final class CustomVariable.Builder extends GeneratedMessage.Builder<CustomVariable.Builder> implements CustomVariableOrBuilder

Custom variable for ads conversions.

Protobuf type google.ads.datamanager.v1.CustomVariable

Static Methods

getDescriptor()

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

Methods

addAllDestinationReferences(Iterable<String> values)

public CustomVariable.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
CustomVariable.Builder

This builder for chaining.

addDestinationReferences(String value)

public CustomVariable.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
CustomVariable.Builder

This builder for chaining.

addDestinationReferencesBytes(ByteString value)

public CustomVariable.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
CustomVariable.Builder

This builder for chaining.

build()

public CustomVariable build()
Returns
Type Description
CustomVariable

buildPartial()

public CustomVariable buildPartial()
Returns
Type Description
CustomVariable

clear()

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

clearDestinationReferences()

public CustomVariable.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
CustomVariable.Builder

This builder for chaining.

clearValue()

public CustomVariable.Builder clearValue()

Optional. The value to store for the custom variable.

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

Returns
Type Description
CustomVariable.Builder

This builder for chaining.

clearVariable()

public CustomVariable.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
CustomVariable.Builder

This builder for chaining.

getDefaultInstanceForType()

public CustomVariable getDefaultInstanceForType()
Returns
Type Description
CustomVariable

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(CustomVariable other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setDestinationReferences(int index, String value)

public CustomVariable.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
CustomVariable.Builder

This builder for chaining.

setValue(String value)

public CustomVariable.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
CustomVariable.Builder

This builder for chaining.

setValueBytes(ByteString value)

public CustomVariable.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
CustomVariable.Builder

This builder for chaining.

setVariable(String value)

public CustomVariable.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
CustomVariable.Builder

This builder for chaining.

setVariableBytes(ByteString value)

public CustomVariable.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
CustomVariable.Builder

This builder for chaining.