Class AudienceSegment.Builder (0.58.0)

public static final class AudienceSegment.Builder extends GeneratedMessage.Builder<AudienceSegment.Builder> implements AudienceSegmentOrBuilder

The AudienceSegment resource.

Protobuf type google.ads.admanager.v1.AudienceSegment

Static Methods

getDescriptor()

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

Methods

addAllCategoryIds(Iterable<? extends Long> values)

public AudienceSegment.Builder addAllCategoryIds(Iterable<? extends Long> values)

Optional. Unordered list. IDs of the categories that this audience segment belongs to. See segment_categories for additional information about the categories.

repeated int64 category_ids = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
values Iterable<? extends java.lang.Long>

The categoryIds to add.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

addCategoryIds(long value)

public AudienceSegment.Builder addCategoryIds(long value)

Optional. Unordered list. IDs of the categories that this audience segment belongs to. See segment_categories for additional information about the categories.

repeated int64 category_ids = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
value long

The categoryIds to add.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

build()

public AudienceSegment build()
Returns
Type Description
AudienceSegment

buildPartial()

public AudienceSegment buildPartial()
Returns
Type Description
AudienceSegment

clear()

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

clearAdIdSize()

public AudienceSegment.Builder clearAdIdSize()

Output only. Number of unique AdID identifiers in the AudienceSegment.

optional int64 ad_id_size = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

clearCategoryIds()

public AudienceSegment.Builder clearCategoryIds()

Optional. Unordered list. IDs of the categories that this audience segment belongs to. See segment_categories for additional information about the categories.

repeated int64 category_ids = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST];

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

clearDataProviderDisplayName()

public AudienceSegment.Builder clearDataProviderDisplayName()

Output only. Display name of the owner data provider. For a first-party audience segment, this is the display name of the publisher network. Otherwise, this is the display name of the entity providing the audience segment.

optional string data_provider_display_name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

clearDescription()

public AudienceSegment.Builder clearDescription()

Optional. Description of the AudienceSegment. This has a maximum length of 8192 characters.

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

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

clearDisplayName()

public AudienceSegment.Builder clearDisplayName()

Required. Display name of the AudienceSegment. The attribute has a maximum length of 255 characters.

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

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

clearIdfaSize()

public AudienceSegment.Builder clearIdfaSize()

Output only. Number of unique Identifier for Advertisers (IDFA) identifiers in the AudienceSegment.

optional int64 idfa_size = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

clearMobileWebSize()

public AudienceSegment.Builder clearMobileWebSize()

Output only. Number of unique mobile web identifiers in the AudienceSegment.

optional int64 mobile_web_size = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

clearName()

public AudienceSegment.Builder clearName()

Identifier. The resource name of the AudienceSegment. Format: networks/{network_code}/audienceSegments/{audience_segment_id} The audience_segment_id is not always numerical and may have one of the following suffixes:

  • ~direct for directly licensed third-party segments
  • ~global for globally licensed third-party segments

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

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

clearNonRuleBasedFirstPartyAudienceSegment()

public AudienceSegment.Builder clearNonRuleBasedFirstPartyAudienceSegment()

Optional. An AudienceSegment owned by the publisher network that does not contain a rule. Cookies are usually added to these segments through cookie upload.

.google.ads.admanager.v1.AudienceSegment.NonRuleBasedFirstPartyAudienceSegment non_rule_based_first_party_audience_segment = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AudienceSegment.Builder

clearPpidSize()

public AudienceSegment.Builder clearPpidSize()

Output only. Number of unique publisher-provided (PPID) identifiers in the AudienceSegment.

optional int64 ppid_size = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

clearRuleBasedFirstPartyAudienceSegment()

public AudienceSegment.Builder clearRuleBasedFirstPartyAudienceSegment()

Optional. An AudienceSegment owned by the publisher network that contains a rule.

.google.ads.admanager.v1.AudienceSegment.RuleBasedFirstPartyAudienceSegment rule_based_first_party_audience_segment = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AudienceSegment.Builder

clearSegmentType()

public AudienceSegment.Builder clearSegmentType()

Output only. Non-empty default. Type of the AudienceSegment. Every AudienceSegment is either FIRST_PARTY or THIRD_PARTY.

optional .google.ads.admanager.v1.AudienceSegmentTypeEnum.AudienceSegmentType segment_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

clearSharedId()

public AudienceSegment.Builder clearSharedId()

Output only. The ID of the AudienceSegment. Up to two resources may share this ID.

int64 shared_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

clearSize()

public AudienceSegment.Builder clearSize()

Output only. Number of unique identifiers in the AudienceSegment.

optional int64 size = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

clearStatus()

public AudienceSegment.Builder clearStatus()

Output only. Non-empty default. Status of the AudienceSegment used to determine whether the segment is available for targeting. Defaults to ACTIVE if not set.

optional .google.ads.admanager.v1.AudienceSegmentStatusEnum.AudienceSegmentStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

clearSubType()

public AudienceSegment.Builder clearSubType()
Returns
Type Description
AudienceSegment.Builder

clearThirdPartyAudienceSegment()

public AudienceSegment.Builder clearThirdPartyAudienceSegment()

Output only. An AudienceSegment owned by a data provider and licensed to the Ad Manager publisher network.

.google.ads.admanager.v1.AudienceSegment.ThirdPartyAudienceSegment third_party_audience_segment = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AudienceSegment.Builder

getAdIdSize()

public long getAdIdSize()

Output only. Number of unique AdID identifiers in the AudienceSegment.

optional int64 ad_id_size = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The adIdSize.

getCategoryIds(int index)

public long getCategoryIds(int index)

Optional. Unordered list. IDs of the categories that this audience segment belongs to. See segment_categories for additional information about the categories.

repeated int64 category_ids = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
long

The categoryIds at the given index.

getCategoryIdsCount()

public int getCategoryIdsCount()

Optional. Unordered list. IDs of the categories that this audience segment belongs to. See segment_categories for additional information about the categories.

repeated int64 category_ids = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST];

Returns
Type Description
int

The count of categoryIds.

getCategoryIdsList()

public List<Long> getCategoryIdsList()

Optional. Unordered list. IDs of the categories that this audience segment belongs to. See segment_categories for additional information about the categories.

repeated int64 category_ids = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST];

Returns
Type Description
List<Long>

A list containing the categoryIds.

getDataProviderDisplayName()

public String getDataProviderDisplayName()

Output only. Display name of the owner data provider. For a first-party audience segment, this is the display name of the publisher network. Otherwise, this is the display name of the entity providing the audience segment.

optional string data_provider_display_name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The dataProviderDisplayName.

getDataProviderDisplayNameBytes()

public ByteString getDataProviderDisplayNameBytes()

Output only. Display name of the owner data provider. For a first-party audience segment, this is the display name of the publisher network. Otherwise, this is the display name of the entity providing the audience segment.

optional string data_provider_display_name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for dataProviderDisplayName.

getDefaultInstanceForType()

public AudienceSegment getDefaultInstanceForType()
Returns
Type Description
AudienceSegment

getDescription()

public String getDescription()

Optional. Description of the AudienceSegment. This has a maximum length of 8192 characters.

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

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Description of the AudienceSegment. This has a maximum length of 8192 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 AudienceSegment. The attribute has a maximum length of 255 characters.

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

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. Display name of the AudienceSegment. The attribute has a maximum length of 255 characters.

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

Returns
Type Description
ByteString

The bytes for displayName.

getIdfaSize()

public long getIdfaSize()

Output only. Number of unique Identifier for Advertisers (IDFA) identifiers in the AudienceSegment.

optional int64 idfa_size = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The idfaSize.

getMobileWebSize()

public long getMobileWebSize()

Output only. Number of unique mobile web identifiers in the AudienceSegment.

optional int64 mobile_web_size = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The mobileWebSize.

getName()

public String getName()

Identifier. The resource name of the AudienceSegment. Format: networks/{network_code}/audienceSegments/{audience_segment_id} The audience_segment_id is not always numerical and may have one of the following suffixes:

  • ~direct for directly licensed third-party segments
  • ~global for globally licensed third-party segments

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The resource name of the AudienceSegment. Format: networks/{network_code}/audienceSegments/{audience_segment_id} The audience_segment_id is not always numerical and may have one of the following suffixes:

  • ~direct for directly licensed third-party segments
  • ~global for globally licensed third-party segments

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

Returns
Type Description
ByteString

The bytes for name.

getNonRuleBasedFirstPartyAudienceSegment()

public AudienceSegment.NonRuleBasedFirstPartyAudienceSegment getNonRuleBasedFirstPartyAudienceSegment()

Optional. An AudienceSegment owned by the publisher network that does not contain a rule. Cookies are usually added to these segments through cookie upload.

.google.ads.admanager.v1.AudienceSegment.NonRuleBasedFirstPartyAudienceSegment non_rule_based_first_party_audience_segment = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AudienceSegment.NonRuleBasedFirstPartyAudienceSegment

The nonRuleBasedFirstPartyAudienceSegment.

getNonRuleBasedFirstPartyAudienceSegmentBuilder()

public AudienceSegment.NonRuleBasedFirstPartyAudienceSegment.Builder getNonRuleBasedFirstPartyAudienceSegmentBuilder()

Optional. An AudienceSegment owned by the publisher network that does not contain a rule. Cookies are usually added to these segments through cookie upload.

.google.ads.admanager.v1.AudienceSegment.NonRuleBasedFirstPartyAudienceSegment non_rule_based_first_party_audience_segment = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AudienceSegment.NonRuleBasedFirstPartyAudienceSegment.Builder

getNonRuleBasedFirstPartyAudienceSegmentOrBuilder()

public AudienceSegment.NonRuleBasedFirstPartyAudienceSegmentOrBuilder getNonRuleBasedFirstPartyAudienceSegmentOrBuilder()

Optional. An AudienceSegment owned by the publisher network that does not contain a rule. Cookies are usually added to these segments through cookie upload.

.google.ads.admanager.v1.AudienceSegment.NonRuleBasedFirstPartyAudienceSegment non_rule_based_first_party_audience_segment = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AudienceSegment.NonRuleBasedFirstPartyAudienceSegmentOrBuilder

getPpidSize()

public long getPpidSize()

Output only. Number of unique publisher-provided (PPID) identifiers in the AudienceSegment.

optional int64 ppid_size = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The ppidSize.

getRuleBasedFirstPartyAudienceSegment()

public AudienceSegment.RuleBasedFirstPartyAudienceSegment getRuleBasedFirstPartyAudienceSegment()

Optional. An AudienceSegment owned by the publisher network that contains a rule.

.google.ads.admanager.v1.AudienceSegment.RuleBasedFirstPartyAudienceSegment rule_based_first_party_audience_segment = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AudienceSegment.RuleBasedFirstPartyAudienceSegment

The ruleBasedFirstPartyAudienceSegment.

getRuleBasedFirstPartyAudienceSegmentBuilder()

public AudienceSegment.RuleBasedFirstPartyAudienceSegment.Builder getRuleBasedFirstPartyAudienceSegmentBuilder()

Optional. An AudienceSegment owned by the publisher network that contains a rule.

.google.ads.admanager.v1.AudienceSegment.RuleBasedFirstPartyAudienceSegment rule_based_first_party_audience_segment = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AudienceSegment.RuleBasedFirstPartyAudienceSegment.Builder

getRuleBasedFirstPartyAudienceSegmentOrBuilder()

public AudienceSegment.RuleBasedFirstPartyAudienceSegmentOrBuilder getRuleBasedFirstPartyAudienceSegmentOrBuilder()

Optional. An AudienceSegment owned by the publisher network that contains a rule.

.google.ads.admanager.v1.AudienceSegment.RuleBasedFirstPartyAudienceSegment rule_based_first_party_audience_segment = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AudienceSegment.RuleBasedFirstPartyAudienceSegmentOrBuilder

getSegmentType()

public AudienceSegmentTypeEnum.AudienceSegmentType getSegmentType()

Output only. Non-empty default. Type of the AudienceSegment. Every AudienceSegment is either FIRST_PARTY or THIRD_PARTY.

optional .google.ads.admanager.v1.AudienceSegmentTypeEnum.AudienceSegmentType segment_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
AudienceSegmentTypeEnum.AudienceSegmentType

The segmentType.

getSegmentTypeValue()

public int getSegmentTypeValue()

Output only. Non-empty default. Type of the AudienceSegment. Every AudienceSegment is either FIRST_PARTY or THIRD_PARTY.

optional .google.ads.admanager.v1.AudienceSegmentTypeEnum.AudienceSegmentType segment_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
int

The enum numeric value on the wire for segmentType.

getSharedId()

public long getSharedId()

Output only. The ID of the AudienceSegment. Up to two resources may share this ID.

int64 shared_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The sharedId.

getSize()

public long getSize()

Output only. Number of unique identifiers in the AudienceSegment.

optional int64 size = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The size.

getStatus()

public AudienceSegmentStatusEnum.AudienceSegmentStatus getStatus()

Output only. Non-empty default. Status of the AudienceSegment used to determine whether the segment is available for targeting. Defaults to ACTIVE if not set.

optional .google.ads.admanager.v1.AudienceSegmentStatusEnum.AudienceSegmentStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
AudienceSegmentStatusEnum.AudienceSegmentStatus

The status.

getStatusValue()

public int getStatusValue()

Output only. Non-empty default. Status of the AudienceSegment used to determine whether the segment is available for targeting. Defaults to ACTIVE if not set.

optional .google.ads.admanager.v1.AudienceSegmentStatusEnum.AudienceSegmentStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
int

The enum numeric value on the wire for status.

getSubTypeCase()

public AudienceSegment.SubTypeCase getSubTypeCase()
Returns
Type Description
AudienceSegment.SubTypeCase

getThirdPartyAudienceSegment()

public AudienceSegment.ThirdPartyAudienceSegment getThirdPartyAudienceSegment()

Output only. An AudienceSegment owned by a data provider and licensed to the Ad Manager publisher network.

.google.ads.admanager.v1.AudienceSegment.ThirdPartyAudienceSegment third_party_audience_segment = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AudienceSegment.ThirdPartyAudienceSegment

The thirdPartyAudienceSegment.

getThirdPartyAudienceSegmentBuilder()

public AudienceSegment.ThirdPartyAudienceSegment.Builder getThirdPartyAudienceSegmentBuilder()

Output only. An AudienceSegment owned by a data provider and licensed to the Ad Manager publisher network.

.google.ads.admanager.v1.AudienceSegment.ThirdPartyAudienceSegment third_party_audience_segment = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AudienceSegment.ThirdPartyAudienceSegment.Builder

getThirdPartyAudienceSegmentOrBuilder()

public AudienceSegment.ThirdPartyAudienceSegmentOrBuilder getThirdPartyAudienceSegmentOrBuilder()

Output only. An AudienceSegment owned by a data provider and licensed to the Ad Manager publisher network.

.google.ads.admanager.v1.AudienceSegment.ThirdPartyAudienceSegment third_party_audience_segment = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
AudienceSegment.ThirdPartyAudienceSegmentOrBuilder

hasAdIdSize()

public boolean hasAdIdSize()

Output only. Number of unique AdID identifiers in the AudienceSegment.

optional int64 ad_id_size = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the adIdSize field is set.

hasDataProviderDisplayName()

public boolean hasDataProviderDisplayName()

Output only. Display name of the owner data provider. For a first-party audience segment, this is the display name of the publisher network. Otherwise, this is the display name of the entity providing the audience segment.

optional string data_provider_display_name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the dataProviderDisplayName field is set.

hasDescription()

public boolean hasDescription()

Optional. Description of the AudienceSegment. This has a maximum length of 8192 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 AudienceSegment. The attribute has a maximum length of 255 characters.

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

Returns
Type Description
boolean

Whether the displayName field is set.

hasIdfaSize()

public boolean hasIdfaSize()

Output only. Number of unique Identifier for Advertisers (IDFA) identifiers in the AudienceSegment.

optional int64 idfa_size = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the idfaSize field is set.

hasMobileWebSize()

public boolean hasMobileWebSize()

Output only. Number of unique mobile web identifiers in the AudienceSegment.

optional int64 mobile_web_size = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the mobileWebSize field is set.

hasNonRuleBasedFirstPartyAudienceSegment()

public boolean hasNonRuleBasedFirstPartyAudienceSegment()

Optional. An AudienceSegment owned by the publisher network that does not contain a rule. Cookies are usually added to these segments through cookie upload.

.google.ads.admanager.v1.AudienceSegment.NonRuleBasedFirstPartyAudienceSegment non_rule_based_first_party_audience_segment = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the nonRuleBasedFirstPartyAudienceSegment field is set.

hasPpidSize()

public boolean hasPpidSize()

Output only. Number of unique publisher-provided (PPID) identifiers in the AudienceSegment.

optional int64 ppid_size = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the ppidSize field is set.

hasRuleBasedFirstPartyAudienceSegment()

public boolean hasRuleBasedFirstPartyAudienceSegment()

Optional. An AudienceSegment owned by the publisher network that contains a rule.

.google.ads.admanager.v1.AudienceSegment.RuleBasedFirstPartyAudienceSegment rule_based_first_party_audience_segment = 14 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the ruleBasedFirstPartyAudienceSegment field is set.

hasSegmentType()

public boolean hasSegmentType()

Output only. Non-empty default. Type of the AudienceSegment. Every AudienceSegment is either FIRST_PARTY or THIRD_PARTY.

optional .google.ads.admanager.v1.AudienceSegmentTypeEnum.AudienceSegmentType segment_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
boolean

Whether the segmentType field is set.

hasSize()

public boolean hasSize()

Output only. Number of unique identifiers in the AudienceSegment.

optional int64 size = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the size field is set.

hasStatus()

public boolean hasStatus()

Output only. Non-empty default. Status of the AudienceSegment used to determine whether the segment is available for targeting. Defaults to ACTIVE if not set.

optional .google.ads.admanager.v1.AudienceSegmentStatusEnum.AudienceSegmentStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
boolean

Whether the status field is set.

hasThirdPartyAudienceSegment()

public boolean hasThirdPartyAudienceSegment()

Output only. An AudienceSegment owned by a data provider and licensed to the Ad Manager publisher network.

.google.ads.admanager.v1.AudienceSegment.ThirdPartyAudienceSegment third_party_audience_segment = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the thirdPartyAudienceSegment field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AudienceSegment other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeNonRuleBasedFirstPartyAudienceSegment(AudienceSegment.NonRuleBasedFirstPartyAudienceSegment value)

public AudienceSegment.Builder mergeNonRuleBasedFirstPartyAudienceSegment(AudienceSegment.NonRuleBasedFirstPartyAudienceSegment value)

Optional. An AudienceSegment owned by the publisher network that does not contain a rule. Cookies are usually added to these segments through cookie upload.

.google.ads.admanager.v1.AudienceSegment.NonRuleBasedFirstPartyAudienceSegment non_rule_based_first_party_audience_segment = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value AudienceSegment.NonRuleBasedFirstPartyAudienceSegment
Returns
Type Description
AudienceSegment.Builder

mergeRuleBasedFirstPartyAudienceSegment(AudienceSegment.RuleBasedFirstPartyAudienceSegment value)

public AudienceSegment.Builder mergeRuleBasedFirstPartyAudienceSegment(AudienceSegment.RuleBasedFirstPartyAudienceSegment value)

Optional. An AudienceSegment owned by the publisher network that contains a rule.

.google.ads.admanager.v1.AudienceSegment.RuleBasedFirstPartyAudienceSegment rule_based_first_party_audience_segment = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value AudienceSegment.RuleBasedFirstPartyAudienceSegment
Returns
Type Description
AudienceSegment.Builder

mergeThirdPartyAudienceSegment(AudienceSegment.ThirdPartyAudienceSegment value)

public AudienceSegment.Builder mergeThirdPartyAudienceSegment(AudienceSegment.ThirdPartyAudienceSegment value)

Output only. An AudienceSegment owned by a data provider and licensed to the Ad Manager publisher network.

.google.ads.admanager.v1.AudienceSegment.ThirdPartyAudienceSegment third_party_audience_segment = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value AudienceSegment.ThirdPartyAudienceSegment
Returns
Type Description
AudienceSegment.Builder

setAdIdSize(long value)

public AudienceSegment.Builder setAdIdSize(long value)

Output only. Number of unique AdID identifiers in the AudienceSegment.

optional int64 ad_id_size = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The adIdSize to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setCategoryIds(int index, long value)

public AudienceSegment.Builder setCategoryIds(int index, long value)

Optional. Unordered list. IDs of the categories that this audience segment belongs to. See segment_categories for additional information about the categories.

repeated int64 category_ids = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = UNORDERED_LIST];

Parameters
Name Description
index int

The index to set the value at.

value long

The categoryIds to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setDataProviderDisplayName(String value)

public AudienceSegment.Builder setDataProviderDisplayName(String value)

Output only. Display name of the owner data provider. For a first-party audience segment, this is the display name of the publisher network. Otherwise, this is the display name of the entity providing the audience segment.

optional string data_provider_display_name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The dataProviderDisplayName to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setDataProviderDisplayNameBytes(ByteString value)

public AudienceSegment.Builder setDataProviderDisplayNameBytes(ByteString value)

Output only. Display name of the owner data provider. For a first-party audience segment, this is the display name of the publisher network. Otherwise, this is the display name of the entity providing the audience segment.

optional string data_provider_display_name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for dataProviderDisplayName to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setDescription(String value)

public AudienceSegment.Builder setDescription(String value)

Optional. Description of the AudienceSegment. This has a maximum length of 8192 characters.

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

Parameter
Name Description
value String

The description to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public AudienceSegment.Builder setDescriptionBytes(ByteString value)

Optional. Description of the AudienceSegment. This has a maximum length of 8192 characters.

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

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setDisplayName(String value)

public AudienceSegment.Builder setDisplayName(String value)

Required. Display name of the AudienceSegment. The attribute has a maximum length of 255 characters.

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

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public AudienceSegment.Builder setDisplayNameBytes(ByteString value)

Required. Display name of the AudienceSegment. The attribute has a maximum length of 255 characters.

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

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setIdfaSize(long value)

public AudienceSegment.Builder setIdfaSize(long value)

Output only. Number of unique Identifier for Advertisers (IDFA) identifiers in the AudienceSegment.

optional int64 idfa_size = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The idfaSize to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setMobileWebSize(long value)

public AudienceSegment.Builder setMobileWebSize(long value)

Output only. Number of unique mobile web identifiers in the AudienceSegment.

optional int64 mobile_web_size = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The mobileWebSize to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setName(String value)

public AudienceSegment.Builder setName(String value)

Identifier. The resource name of the AudienceSegment. Format: networks/{network_code}/audienceSegments/{audience_segment_id} The audience_segment_id is not always numerical and may have one of the following suffixes:

  • ~direct for directly licensed third-party segments
  • ~global for globally licensed third-party segments

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setNameBytes(ByteString value)

public AudienceSegment.Builder setNameBytes(ByteString value)

Identifier. The resource name of the AudienceSegment. Format: networks/{network_code}/audienceSegments/{audience_segment_id} The audience_segment_id is not always numerical and may have one of the following suffixes:

  • ~direct for directly licensed third-party segments
  • ~global for globally licensed third-party segments

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setNonRuleBasedFirstPartyAudienceSegment(AudienceSegment.NonRuleBasedFirstPartyAudienceSegment value)

public AudienceSegment.Builder setNonRuleBasedFirstPartyAudienceSegment(AudienceSegment.NonRuleBasedFirstPartyAudienceSegment value)

Optional. An AudienceSegment owned by the publisher network that does not contain a rule. Cookies are usually added to these segments through cookie upload.

.google.ads.admanager.v1.AudienceSegment.NonRuleBasedFirstPartyAudienceSegment non_rule_based_first_party_audience_segment = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value AudienceSegment.NonRuleBasedFirstPartyAudienceSegment
Returns
Type Description
AudienceSegment.Builder

setNonRuleBasedFirstPartyAudienceSegment(AudienceSegment.NonRuleBasedFirstPartyAudienceSegment.Builder builderForValue)

public AudienceSegment.Builder setNonRuleBasedFirstPartyAudienceSegment(AudienceSegment.NonRuleBasedFirstPartyAudienceSegment.Builder builderForValue)

Optional. An AudienceSegment owned by the publisher network that does not contain a rule. Cookies are usually added to these segments through cookie upload.

.google.ads.admanager.v1.AudienceSegment.NonRuleBasedFirstPartyAudienceSegment non_rule_based_first_party_audience_segment = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue AudienceSegment.NonRuleBasedFirstPartyAudienceSegment.Builder
Returns
Type Description
AudienceSegment.Builder

setPpidSize(long value)

public AudienceSegment.Builder setPpidSize(long value)

Output only. Number of unique publisher-provided (PPID) identifiers in the AudienceSegment.

optional int64 ppid_size = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The ppidSize to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setRuleBasedFirstPartyAudienceSegment(AudienceSegment.RuleBasedFirstPartyAudienceSegment value)

public AudienceSegment.Builder setRuleBasedFirstPartyAudienceSegment(AudienceSegment.RuleBasedFirstPartyAudienceSegment value)

Optional. An AudienceSegment owned by the publisher network that contains a rule.

.google.ads.admanager.v1.AudienceSegment.RuleBasedFirstPartyAudienceSegment rule_based_first_party_audience_segment = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value AudienceSegment.RuleBasedFirstPartyAudienceSegment
Returns
Type Description
AudienceSegment.Builder

setRuleBasedFirstPartyAudienceSegment(AudienceSegment.RuleBasedFirstPartyAudienceSegment.Builder builderForValue)

public AudienceSegment.Builder setRuleBasedFirstPartyAudienceSegment(AudienceSegment.RuleBasedFirstPartyAudienceSegment.Builder builderForValue)

Optional. An AudienceSegment owned by the publisher network that contains a rule.

.google.ads.admanager.v1.AudienceSegment.RuleBasedFirstPartyAudienceSegment rule_based_first_party_audience_segment = 14 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue AudienceSegment.RuleBasedFirstPartyAudienceSegment.Builder
Returns
Type Description
AudienceSegment.Builder

setSegmentType(AudienceSegmentTypeEnum.AudienceSegmentType value)

public AudienceSegment.Builder setSegmentType(AudienceSegmentTypeEnum.AudienceSegmentType value)

Output only. Non-empty default. Type of the AudienceSegment. Every AudienceSegment is either FIRST_PARTY or THIRD_PARTY.

optional .google.ads.admanager.v1.AudienceSegmentTypeEnum.AudienceSegmentType segment_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Parameter
Name Description
value AudienceSegmentTypeEnum.AudienceSegmentType

The segmentType to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setSegmentTypeValue(int value)

public AudienceSegment.Builder setSegmentTypeValue(int value)

Output only. Non-empty default. Type of the AudienceSegment. Every AudienceSegment is either FIRST_PARTY or THIRD_PARTY.

optional .google.ads.admanager.v1.AudienceSegmentTypeEnum.AudienceSegmentType segment_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Parameter
Name Description
value int

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

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setSharedId(long value)

public AudienceSegment.Builder setSharedId(long value)

Output only. The ID of the AudienceSegment. Up to two resources may share this ID.

int64 shared_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The sharedId to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setSize(long value)

public AudienceSegment.Builder setSize(long value)

Output only. Number of unique identifiers in the AudienceSegment.

optional int64 size = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The size to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setStatus(AudienceSegmentStatusEnum.AudienceSegmentStatus value)

public AudienceSegment.Builder setStatus(AudienceSegmentStatusEnum.AudienceSegmentStatus value)

Output only. Non-empty default. Status of the AudienceSegment used to determine whether the segment is available for targeting. Defaults to ACTIVE if not set.

optional .google.ads.admanager.v1.AudienceSegmentStatusEnum.AudienceSegmentStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Parameter
Name Description
value AudienceSegmentStatusEnum.AudienceSegmentStatus

The status to set.

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setStatusValue(int value)

public AudienceSegment.Builder setStatusValue(int value)

Output only. Non-empty default. Status of the AudienceSegment used to determine whether the segment is available for targeting. Defaults to ACTIVE if not set.

optional .google.ads.admanager.v1.AudienceSegmentStatusEnum.AudienceSegmentStatus status = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Parameter
Name Description
value int

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

Returns
Type Description
AudienceSegment.Builder

This builder for chaining.

setThirdPartyAudienceSegment(AudienceSegment.ThirdPartyAudienceSegment value)

public AudienceSegment.Builder setThirdPartyAudienceSegment(AudienceSegment.ThirdPartyAudienceSegment value)

Output only. An AudienceSegment owned by a data provider and licensed to the Ad Manager publisher network.

.google.ads.admanager.v1.AudienceSegment.ThirdPartyAudienceSegment third_party_audience_segment = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value AudienceSegment.ThirdPartyAudienceSegment
Returns
Type Description
AudienceSegment.Builder

setThirdPartyAudienceSegment(AudienceSegment.ThirdPartyAudienceSegment.Builder builderForValue)

public AudienceSegment.Builder setThirdPartyAudienceSegment(AudienceSegment.ThirdPartyAudienceSegment.Builder builderForValue)

Output only. An AudienceSegment owned by a data provider and licensed to the Ad Manager publisher network.

.google.ads.admanager.v1.AudienceSegment.ThirdPartyAudienceSegment third_party_audience_segment = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue AudienceSegment.ThirdPartyAudienceSegment.Builder
Returns
Type Description
AudienceSegment.Builder