Class ContextualTargeting.Builder (0.62.0)

public static final class ContextualTargeting.Builder extends GeneratedMessage.Builder<ContextualTargeting.Builder> implements ContextualTargetingOrBuilder

Contextual Targeting

Protobuf type google.ads.admanager.v1.ContextualTargeting

Static Methods

getDescriptor()

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

Methods

addAllExcludedContentLabels(Iterable<String> values)

public ContextualTargeting.Builder addAllExcludedContentLabels(Iterable<String> values)

Optional. A list of content labels that should be excluded.

repeated string excluded_content_labels = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
values Iterable<String>

The excludedContentLabels to add.

Returns
Type Description
ContextualTargeting.Builder

This builder for chaining.

addAllExcludedVerticals(Iterable<String> values)

public ContextualTargeting.Builder addAllExcludedVerticals(Iterable<String> values)

Optional. A list of verticals that should be excluded. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string excluded_verticals = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
values Iterable<String>

The excludedVerticals to add.

Returns
Type Description
ContextualTargeting.Builder

This builder for chaining.

addAllTargetedVerticals(Iterable<String> values)

public ContextualTargeting.Builder addAllTargetedVerticals(Iterable<String> values)

Optional. A list of verticals that should be targeted/included. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string targeted_verticals = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
values Iterable<String>

The targetedVerticals to add.

Returns
Type Description
ContextualTargeting.Builder

This builder for chaining.

addExcludedContentLabels(String value)

public ContextualTargeting.Builder addExcludedContentLabels(String value)

Optional. A list of content labels that should be excluded.

repeated string excluded_content_labels = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The excludedContentLabels to add.

Returns
Type Description
ContextualTargeting.Builder

This builder for chaining.

addExcludedContentLabelsBytes(ByteString value)

public ContextualTargeting.Builder addExcludedContentLabelsBytes(ByteString value)

Optional. A list of content labels that should be excluded.

repeated string excluded_content_labels = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes of the excludedContentLabels to add.

Returns
Type Description
ContextualTargeting.Builder

This builder for chaining.

addExcludedVerticals(String value)

public ContextualTargeting.Builder addExcludedVerticals(String value)

Optional. A list of verticals that should be excluded. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string excluded_verticals = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The excludedVerticals to add.

Returns
Type Description
ContextualTargeting.Builder

This builder for chaining.

addExcludedVerticalsBytes(ByteString value)

public ContextualTargeting.Builder addExcludedVerticalsBytes(ByteString value)

Optional. A list of verticals that should be excluded. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string excluded_verticals = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes of the excludedVerticals to add.

Returns
Type Description
ContextualTargeting.Builder

This builder for chaining.

addTargetedVerticals(String value)

public ContextualTargeting.Builder addTargetedVerticals(String value)

Optional. A list of verticals that should be targeted/included. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string targeted_verticals = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The targetedVerticals to add.

Returns
Type Description
ContextualTargeting.Builder

This builder for chaining.

addTargetedVerticalsBytes(ByteString value)

public ContextualTargeting.Builder addTargetedVerticalsBytes(ByteString value)

Optional. A list of verticals that should be targeted/included. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string targeted_verticals = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes of the targetedVerticals to add.

Returns
Type Description
ContextualTargeting.Builder

This builder for chaining.

build()

public ContextualTargeting build()
Returns
Type Description
ContextualTargeting

buildPartial()

public ContextualTargeting buildPartial()
Returns
Type Description
ContextualTargeting

clear()

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

clearExcludedContentLabels()

public ContextualTargeting.Builder clearExcludedContentLabels()

Optional. A list of content labels that should be excluded.

repeated string excluded_content_labels = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ContextualTargeting.Builder

This builder for chaining.

clearExcludedVerticals()

public ContextualTargeting.Builder clearExcludedVerticals()

Optional. A list of verticals that should be excluded. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string excluded_verticals = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ContextualTargeting.Builder

This builder for chaining.

clearTargetedVerticals()

public ContextualTargeting.Builder clearTargetedVerticals()

Optional. A list of verticals that should be targeted/included. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string targeted_verticals = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ContextualTargeting.Builder

This builder for chaining.

getDefaultInstanceForType()

public ContextualTargeting getDefaultInstanceForType()
Returns
Type Description
ContextualTargeting

getDescriptorForType()

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

getExcludedContentLabels(int index)

public String getExcludedContentLabels(int index)

Optional. A list of content labels that should be excluded.

repeated string excluded_content_labels = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The excludedContentLabels at the given index.

getExcludedContentLabelsBytes(int index)

public ByteString getExcludedContentLabelsBytes(int index)

Optional. A list of content labels that should be excluded.

repeated string excluded_content_labels = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the excludedContentLabels at the given index.

getExcludedContentLabelsCount()

public int getExcludedContentLabelsCount()

Optional. A list of content labels that should be excluded.

repeated string excluded_content_labels = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of excludedContentLabels.

getExcludedContentLabelsList()

public ProtocolStringList getExcludedContentLabelsList()

Optional. A list of content labels that should be excluded.

repeated string excluded_content_labels = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the excludedContentLabels.

getExcludedVerticals(int index)

public String getExcludedVerticals(int index)

Optional. A list of verticals that should be excluded. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string excluded_verticals = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The excludedVerticals at the given index.

getExcludedVerticalsBytes(int index)

public ByteString getExcludedVerticalsBytes(int index)

Optional. A list of verticals that should be excluded. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string excluded_verticals = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the excludedVerticals at the given index.

getExcludedVerticalsCount()

public int getExcludedVerticalsCount()

Optional. A list of verticals that should be excluded. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string excluded_verticals = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of excludedVerticals.

getExcludedVerticalsList()

public ProtocolStringList getExcludedVerticalsList()

Optional. A list of verticals that should be excluded. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string excluded_verticals = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the excludedVerticals.

getTargetedVerticals(int index)

public String getTargetedVerticals(int index)

Optional. A list of verticals that should be targeted/included. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string targeted_verticals = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The targetedVerticals at the given index.

getTargetedVerticalsBytes(int index)

public ByteString getTargetedVerticalsBytes(int index)

Optional. A list of verticals that should be targeted/included. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string targeted_verticals = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the targetedVerticals at the given index.

getTargetedVerticalsCount()

public int getTargetedVerticalsCount()

Optional. A list of verticals that should be targeted/included. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string targeted_verticals = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of targetedVerticals.

getTargetedVerticalsList()

public ProtocolStringList getTargetedVerticalsList()

Optional. A list of verticals that should be targeted/included. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string targeted_verticals = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the targetedVerticals.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ContextualTargeting other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setExcludedContentLabels(int index, String value)

public ContextualTargeting.Builder setExcludedContentLabels(int index, String value)

Optional. A list of content labels that should be excluded.

repeated string excluded_content_labels = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameters
Name Description
index int

The index to set the value at.

value String

The excludedContentLabels to set.

Returns
Type Description
ContextualTargeting.Builder

This builder for chaining.

setExcludedVerticals(int index, String value)

public ContextualTargeting.Builder setExcludedVerticals(int index, String value)

Optional. A list of verticals that should be excluded. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string excluded_verticals = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameters
Name Description
index int

The index to set the value at.

value String

The excludedVerticals to set.

Returns
Type Description
ContextualTargeting.Builder

This builder for chaining.

setTargetedVerticals(int index, String value)

public ContextualTargeting.Builder setTargetedVerticals(int index, String value)

Optional. A list of verticals that should be targeted/included. Verticals are AdCategory resources of type VERTICAL. Format: networks/{network_code}/adCategories/{ad_category_id}

repeated string targeted_verticals = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameters
Name Description
index int

The index to set the value at.

value String

The targetedVerticals to set.

Returns
Type Description
ContextualTargeting.Builder

This builder for chaining.