Class Placement.Builder (0.3.0)

public static final class Placement.Builder extends GeneratedMessageV3.Builder<Placement.Builder> implements PlacementOrBuilder

The Placement resource.

Protobuf type google.ads.admanager.v1.Placement

Implements

PlacementOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllTargetedAdUnits(Iterable<String> values)

public Placement.Builder addAllTargetedAdUnits(Iterable<String> values)

Optional. The resource names of AdUnits that constitute the Placement. Format: "networks/{network_code}/adUnits/{ad_unit_id}"

repeated string targeted_ad_units = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
values Iterable<String>

The targetedAdUnits to add.

Returns
Type Description
Placement.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addTargetedAdUnits(String value)

public Placement.Builder addTargetedAdUnits(String value)

Optional. The resource names of AdUnits that constitute the Placement. Format: "networks/{network_code}/adUnits/{ad_unit_id}"

repeated string targeted_ad_units = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The targetedAdUnits to add.

Returns
Type Description
Placement.Builder

This builder for chaining.

addTargetedAdUnitsBytes(ByteString value)

public Placement.Builder addTargetedAdUnitsBytes(ByteString value)

Optional. The resource names of AdUnits that constitute the Placement. Format: "networks/{network_code}/adUnits/{ad_unit_id}"

repeated string targeted_ad_units = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes of the targetedAdUnits to add.

Returns
Type Description
Placement.Builder

This builder for chaining.

build()

public Placement build()
Returns
Type Description
Placement

buildPartial()

public Placement buildPartial()
Returns
Type Description
Placement

clear()

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

clearDescription()

public Placement.Builder clearDescription()

Optional. A description of the Placement. This value is optional and its maximum length is 65,535 characters.

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

Returns
Type Description
Placement.Builder

This builder for chaining.

clearDisplayName()

public Placement.Builder clearDisplayName()

Required. The display name of the placement. Its maximum length is 255 characters.

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

Returns
Type Description
Placement.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public Placement.Builder clearName()

Identifier. The resource name of the Placement. Format: networks/{network_code}/placements/{placement_id}

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

Returns
Type Description
Placement.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPlacementCode()

public Placement.Builder clearPlacementCode()

Output only. A string used to uniquely identify the Placement for purposes of serving the ad. This attribute is read-only and is assigned by Google when a placement is created.

string placement_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Placement.Builder

This builder for chaining.

clearPlacementId()

public Placement.Builder clearPlacementId()

Output only. Placement ID.

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

Returns
Type Description
Placement.Builder

This builder for chaining.

clearStatus()

public Placement.Builder clearStatus()

Output only. The status of the Placement. This attribute is read-only.

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

Returns
Type Description
Placement.Builder

This builder for chaining.

clearTargetedAdUnits()

public Placement.Builder clearTargetedAdUnits()

Optional. The resource names of AdUnits that constitute the Placement. Format: "networks/{network_code}/adUnits/{ad_unit_id}"

repeated string targeted_ad_units = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
Placement.Builder

This builder for chaining.

clearUpdateTime()

public Placement.Builder clearUpdateTime()

Output only. The instant this Placement was last modified.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Placement.Builder

clone()

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

getDefaultInstanceForType()

public Placement getDefaultInstanceForType()
Returns
Type Description
Placement

getDescription()

public String getDescription()

Optional. A description of the Placement. This value is optional and its maximum length is 65,535 characters.

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

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. A description of the Placement. This value is optional and its maximum length is 65,535 characters.

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. The display name of the placement. Its maximum length is 255 characters.

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

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The display name of the placement. Its maximum length is 255 characters.

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

Returns
Type Description
ByteString

The bytes for displayName.

getName()

public String getName()

Identifier. The resource name of the Placement. Format: networks/{network_code}/placements/{placement_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 Placement. Format: networks/{network_code}/placements/{placement_id}

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

Returns
Type Description
ByteString

The bytes for name.

getPlacementCode()

public String getPlacementCode()

Output only. A string used to uniquely identify the Placement for purposes of serving the ad. This attribute is read-only and is assigned by Google when a placement is created.

string placement_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The placementCode.

getPlacementCodeBytes()

public ByteString getPlacementCodeBytes()

Output only. A string used to uniquely identify the Placement for purposes of serving the ad. This attribute is read-only and is assigned by Google when a placement is created.

string placement_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for placementCode.

getPlacementId()

public long getPlacementId()

Output only. Placement ID.

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

Returns
Type Description
long

The placementId.

getStatus()

public PlacementStatusEnum.PlacementStatus getStatus()

Output only. The status of the Placement. This attribute is read-only.

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

Returns
Type Description
PlacementStatusEnum.PlacementStatus

The status.

getStatusValue()

public int getStatusValue()

Output only. The status of the Placement. This attribute is read-only.

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

Returns
Type Description
int

The enum numeric value on the wire for status.

getTargetedAdUnits(int index)

public String getTargetedAdUnits(int index)

Optional. The resource names of AdUnits that constitute the Placement. Format: "networks/{network_code}/adUnits/{ad_unit_id}"

repeated string targeted_ad_units = 7 [(.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 targetedAdUnits at the given index.

getTargetedAdUnitsBytes(int index)

public ByteString getTargetedAdUnitsBytes(int index)

Optional. The resource names of AdUnits that constitute the Placement. Format: "networks/{network_code}/adUnits/{ad_unit_id}"

repeated string targeted_ad_units = 7 [(.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 targetedAdUnits at the given index.

getTargetedAdUnitsCount()

public int getTargetedAdUnitsCount()

Optional. The resource names of AdUnits that constitute the Placement. Format: "networks/{network_code}/adUnits/{ad_unit_id}"

repeated string targeted_ad_units = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of targetedAdUnits.

getTargetedAdUnitsList()

public ProtocolStringList getTargetedAdUnitsList()

Optional. The resource names of AdUnits that constitute the Placement. Format: "networks/{network_code}/adUnits/{ad_unit_id}"

repeated string targeted_ad_units = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the targetedAdUnits.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The instant this Placement was last modified.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. The instant this Placement was last modified.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The instant this Placement was last modified.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The instant this Placement was last modified.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Placement other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public Placement.Builder mergeUpdateTime(Timestamp value)

Output only. The instant this Placement was last modified.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Placement.Builder

setDescription(String value)

public Placement.Builder setDescription(String value)

Optional. A description of the Placement. This value is optional and its maximum length is 65,535 characters.

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

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Placement.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Placement.Builder setDescriptionBytes(ByteString value)

Optional. A description of the Placement. This value is optional and its maximum length is 65,535 characters.

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

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Placement.Builder

This builder for chaining.

setDisplayName(String value)

public Placement.Builder setDisplayName(String value)

Required. The display name of the placement. Its maximum length is 255 characters.

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

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Placement.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Placement.Builder setDisplayNameBytes(ByteString value)

Required. The display name of the placement. Its maximum length is 255 characters.

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

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Placement.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Placement.Builder setName(String value)

Identifier. The resource name of the Placement. Format: networks/{network_code}/placements/{placement_id}

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Placement.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Placement.Builder setNameBytes(ByteString value)

Identifier. The resource name of the Placement. Format: networks/{network_code}/placements/{placement_id}

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Placement.Builder

This builder for chaining.

setPlacementCode(String value)

public Placement.Builder setPlacementCode(String value)

Output only. A string used to uniquely identify the Placement for purposes of serving the ad. This attribute is read-only and is assigned by Google when a placement is created.

string placement_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The placementCode to set.

Returns
Type Description
Placement.Builder

This builder for chaining.

setPlacementCodeBytes(ByteString value)

public Placement.Builder setPlacementCodeBytes(ByteString value)

Output only. A string used to uniquely identify the Placement for purposes of serving the ad. This attribute is read-only and is assigned by Google when a placement is created.

string placement_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for placementCode to set.

Returns
Type Description
Placement.Builder

This builder for chaining.

setPlacementId(long value)

public Placement.Builder setPlacementId(long value)

Output only. Placement ID.

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

Parameter
Name Description
value long

The placementId to set.

Returns
Type Description
Placement.Builder

This builder for chaining.

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

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

setStatus(PlacementStatusEnum.PlacementStatus value)

public Placement.Builder setStatus(PlacementStatusEnum.PlacementStatus value)

Output only. The status of the Placement. This attribute is read-only.

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

Parameter
Name Description
value PlacementStatusEnum.PlacementStatus

The status to set.

Returns
Type Description
Placement.Builder

This builder for chaining.

setStatusValue(int value)

public Placement.Builder setStatusValue(int value)

Output only. The status of the Placement. This attribute is read-only.

.google.ads.admanager.v1.PlacementStatusEnum.PlacementStatus 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
Placement.Builder

This builder for chaining.

setTargetedAdUnits(int index, String value)

public Placement.Builder setTargetedAdUnits(int index, String value)

Optional. The resource names of AdUnits that constitute the Placement. Format: "networks/{network_code}/adUnits/{ad_unit_id}"

repeated string targeted_ad_units = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameters
Name Description
index int

The index to set the value at.

value String

The targetedAdUnits to set.

Returns
Type Description
Placement.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public Placement.Builder setUpdateTime(Timestamp value)

Output only. The instant this Placement was last modified.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Placement.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Placement.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. The instant this Placement was last modified.

.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Placement.Builder