Class CustomTargetingKey.Builder (0.14.0)

public static final class CustomTargetingKey.Builder extends GeneratedMessageV3.Builder<CustomTargetingKey.Builder> implements CustomTargetingKeyOrBuilder

The CustomTargetingKey resource.

Protobuf type google.ads.admanager.v1.CustomTargetingKey

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CustomTargetingKey.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CustomTargetingKey.Builder
Overrides

build()

public CustomTargetingKey build()
Returns
Type Description
CustomTargetingKey

buildPartial()

public CustomTargetingKey buildPartial()
Returns
Type Description
CustomTargetingKey

clear()

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

clearAdTagName()

public CustomTargetingKey.Builder clearAdTagName()

Immutable. Name of the key. Keys can contain up to 10 characters each. You can use alphanumeric characters and symbols other than the following: ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ], the white space character.

string ad_tag_name = 3 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

clearCustomTargetingKeyId()

public CustomTargetingKey.Builder clearCustomTargetingKeyId()

Output only. CustomTargetingKey ID.

int64 custom_targeting_key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

clearDisplayName()

public CustomTargetingKey.Builder clearDisplayName()

Optional. Descriptive name for the CustomTargetingKey.

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

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public CustomTargetingKey.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CustomTargetingKey.Builder
Overrides

clearName()

public CustomTargetingKey.Builder clearName()

Identifier. The resource name of the CustomTargetingKey. Format: networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}

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

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public CustomTargetingKey.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CustomTargetingKey.Builder
Overrides

clearReportableType()

public CustomTargetingKey.Builder clearReportableType()

Required. Reportable state of the CustomTargetingKey.

.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType reportable_type = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

clearStatus()

public CustomTargetingKey.Builder clearStatus()

Output only. Status of the CustomTargetingKey.

.google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

clearType()

public CustomTargetingKey.Builder clearType()

Required. Indicates whether users will select from predefined values or create new targeting values, while specifying targeting criteria for a line item.

.google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

clone()

public CustomTargetingKey.Builder clone()
Returns
Type Description
CustomTargetingKey.Builder
Overrides

getAdTagName()

public String getAdTagName()

Immutable. Name of the key. Keys can contain up to 10 characters each. You can use alphanumeric characters and symbols other than the following: ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ], the white space character.

string ad_tag_name = 3 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The adTagName.

getAdTagNameBytes()

public ByteString getAdTagNameBytes()

Immutable. Name of the key. Keys can contain up to 10 characters each. You can use alphanumeric characters and symbols other than the following: ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ], the white space character.

string ad_tag_name = 3 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for adTagName.

getCustomTargetingKeyId()

public long getCustomTargetingKeyId()

Output only. CustomTargetingKey ID.

int64 custom_targeting_key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The customTargetingKeyId.

getDefaultInstanceForType()

public CustomTargetingKey getDefaultInstanceForType()
Returns
Type Description
CustomTargetingKey

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Optional. Descriptive name for the CustomTargetingKey.

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

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Optional. Descriptive name for the CustomTargetingKey.

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

Returns
Type Description
ByteString

The bytes for displayName.

getName()

public String getName()

Identifier. The resource name of the CustomTargetingKey. Format: networks/{network_code}/customTargetingKeys/{custom_targeting_key_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 CustomTargetingKey. Format: networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}

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

Returns
Type Description
ByteString

The bytes for name.

getReportableType()

public CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType getReportableType()

Required. Reportable state of the CustomTargetingKey.

.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType reportable_type = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType

The reportableType.

getReportableTypeValue()

public int getReportableTypeValue()

Required. Reportable state of the CustomTargetingKey.

.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType reportable_type = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for reportableType.

getStatus()

public CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus getStatus()

Output only. Status of the CustomTargetingKey.

.google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus

The status.

getStatusValue()

public int getStatusValue()

Output only. Status of the CustomTargetingKey.

.google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for status.

getType()

public CustomTargetingKeyTypeEnum.CustomTargetingKeyType getType()

Required. Indicates whether users will select from predefined values or create new targeting values, while specifying targeting criteria for a line item.

.google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CustomTargetingKeyTypeEnum.CustomTargetingKeyType

The type.

getTypeValue()

public int getTypeValue()

Required. Indicates whether users will select from predefined values or create new targeting values, while specifying targeting criteria for a line item.

.google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for type.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CustomTargetingKey other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CustomTargetingKey.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CustomTargetingKey.Builder
Overrides

setAdTagName(String value)

public CustomTargetingKey.Builder setAdTagName(String value)

Immutable. Name of the key. Keys can contain up to 10 characters each. You can use alphanumeric characters and symbols other than the following: ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ], the white space character.

string ad_tag_name = 3 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The adTagName to set.

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

setAdTagNameBytes(ByteString value)

public CustomTargetingKey.Builder setAdTagNameBytes(ByteString value)

Immutable. Name of the key. Keys can contain up to 10 characters each. You can use alphanumeric characters and symbols other than the following: ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ], the white space character.

string ad_tag_name = 3 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for adTagName to set.

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

setCustomTargetingKeyId(long value)

public CustomTargetingKey.Builder setCustomTargetingKeyId(long value)

Output only. CustomTargetingKey ID.

int64 custom_targeting_key_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The customTargetingKeyId to set.

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

setDisplayName(String value)

public CustomTargetingKey.Builder setDisplayName(String value)

Optional. Descriptive name for the CustomTargetingKey.

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

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public CustomTargetingKey.Builder setDisplayNameBytes(ByteString value)

Optional. Descriptive name for the CustomTargetingKey.

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

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public CustomTargetingKey.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CustomTargetingKey.Builder
Overrides

setName(String value)

public CustomTargetingKey.Builder setName(String value)

Identifier. The resource name of the CustomTargetingKey. Format: networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

setNameBytes(ByteString value)

public CustomTargetingKey.Builder setNameBytes(ByteString value)

Identifier. The resource name of the CustomTargetingKey. Format: networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

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

public CustomTargetingKey.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CustomTargetingKey.Builder
Overrides

setReportableType(CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType value)

public CustomTargetingKey.Builder setReportableType(CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType value)

Required. Reportable state of the CustomTargetingKey.

.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType reportable_type = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType

The reportableType to set.

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

setReportableTypeValue(int value)

public CustomTargetingKey.Builder setReportableTypeValue(int value)

Required. Reportable state of the CustomTargetingKey.

.google.ads.admanager.v1.CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType reportable_type = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

setStatus(CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus value)

public CustomTargetingKey.Builder setStatus(CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus value)

Output only. Status of the CustomTargetingKey.

.google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus

The status to set.

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

setStatusValue(int value)

public CustomTargetingKey.Builder setStatusValue(int value)

Output only. Status of the CustomTargetingKey.

.google.ads.admanager.v1.CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

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

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

setType(CustomTargetingKeyTypeEnum.CustomTargetingKeyType value)

public CustomTargetingKey.Builder setType(CustomTargetingKeyTypeEnum.CustomTargetingKeyType value)

Required. Indicates whether users will select from predefined values or create new targeting values, while specifying targeting criteria for a line item.

.google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value CustomTargetingKeyTypeEnum.CustomTargetingKeyType

The type to set.

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

setTypeValue(int value)

public CustomTargetingKey.Builder setTypeValue(int value)

Required. Indicates whether users will select from predefined values or create new targeting values, while specifying targeting criteria for a line item.

.google.ads.admanager.v1.CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
CustomTargetingKey.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final CustomTargetingKey.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CustomTargetingKey.Builder
Overrides