Class LineItem.Builder (0.10.0)

public static final class LineItem.Builder extends GeneratedMessageV3.Builder<LineItem.Builder> implements LineItemOrBuilder

The LineItem resource.

Protobuf type google.ads.admanager.v1.LineItem

Implements

LineItemOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllCreativePlaceholders(Iterable<? extends CreativePlaceholder> values)

public LineItem.Builder addAllCreativePlaceholders(Iterable<? extends CreativePlaceholder> values)

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<? extends com.google.ads.admanager.v1.CreativePlaceholder>
Returns
Type Description
LineItem.Builder

addCreativePlaceholders(CreativePlaceholder value)

public LineItem.Builder addCreativePlaceholders(CreativePlaceholder value)

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value CreativePlaceholder
Returns
Type Description
LineItem.Builder

addCreativePlaceholders(CreativePlaceholder.Builder builderForValue)

public LineItem.Builder addCreativePlaceholders(CreativePlaceholder.Builder builderForValue)

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue CreativePlaceholder.Builder
Returns
Type Description
LineItem.Builder

addCreativePlaceholders(int index, CreativePlaceholder value)

public LineItem.Builder addCreativePlaceholders(int index, CreativePlaceholder value)

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value CreativePlaceholder
Returns
Type Description
LineItem.Builder

addCreativePlaceholders(int index, CreativePlaceholder.Builder builderForValue)

public LineItem.Builder addCreativePlaceholders(int index, CreativePlaceholder.Builder builderForValue)

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue CreativePlaceholder.Builder
Returns
Type Description
LineItem.Builder

addCreativePlaceholdersBuilder()

public CreativePlaceholder.Builder addCreativePlaceholdersBuilder()

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreativePlaceholder.Builder

addCreativePlaceholdersBuilder(int index)

public CreativePlaceholder.Builder addCreativePlaceholdersBuilder(int index)

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
CreativePlaceholder.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public LineItem build()
Returns
Type Description
LineItem

buildPartial()

public LineItem buildPartial()
Returns
Type Description
LineItem

clear()

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

clearArchived()

public LineItem.Builder clearArchived()

Output only. The archival status of the LineItem.

bool archived = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearAutoExtensionDays()

public LineItem.Builder clearAutoExtensionDays()

Optional. Number of days to allow a LineItem to deliver past its end_time. A maximum of 7 days is allowed. This feature is only available for Ad Manager 360 accounts.

int32 auto_extension_days = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearContractedUnitsBought()

public LineItem.Builder clearContractedUnitsBought()

Optional. This attribute is only applicable for certain line item types and acts as an "FYI" or note, which does not impact ad-serving or other backend systems.

For SPONSORSHIP line items, this represents the minimum quantity, which is a lifetime impression volume goal for reporting purposes.

For STANDARD line items, this represents the contracted quantity, which is the number of units specified in the contract that the advertiser has bought for this line item. This attribute is only available if you have this feature enabled on your network.

int64 contracted_units_bought = 18 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearCostPerUnit()

public LineItem.Builder clearCostPerUnit()

Required. The amount of money to spend per impression or click.

.google.type.Money cost_per_unit = 15 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LineItem.Builder

clearCostType()

public LineItem.Builder clearCostType()

Required. The method used for billing this line item.

.google.ads.admanager.v1.LineItemCostTypeEnum.LineItemCostType cost_type = 19 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearCreateTime()

public LineItem.Builder clearCreateTime()

Output only. The instant at which the LineItem was created. This attribute may be null for line items created before this feature was introduced.

.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
LineItem.Builder

clearCreativePlaceholders()

public LineItem.Builder clearCreativePlaceholders()

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LineItem.Builder

clearCreativeRotationType()

public LineItem.Builder clearCreativeRotationType()

Required. The strategy used for displaying multiple creatives that are associated with the line item.

.google.ads.admanager.v1.CreativeRotationTypeEnum.CreativeRotationType creative_rotation_type = 22 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearDeliveryRateType()

public LineItem.Builder clearDeliveryRateType()

Non-empty default. The strategy for delivering ads over the duration of the line item. Defaults to EVENLY or FRONTLOADED depending on the network's configuration.

.google.ads.admanager.v1.DeliveryRateTypeEnum.DeliveryRateType delivery_rate_type = 23 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearDiscount()

public LineItem.Builder clearDiscount()

Optional. The number here is either a percentage or an absolute value depending on the discount_type. If it is PERCENTAGE, then only non-fractional values are supported.

double discount = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearDiscountType()

public LineItem.Builder clearDiscountType()

Non-empty default. The type of discount applied to the line item. Defaults to PERCENTAGE.

.google.ads.admanager.v1.LineItemDiscountTypeEnum.LineItemDiscountType discount_type = 24 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearDisplayName()

public LineItem.Builder clearDisplayName()

Optional. Display name of the LineItem. This attribute has a maximum length of 255 characters.

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

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearEndTime()

public LineItem.Builder clearEndTime()

Optional. Time at which the LineItem will stop serving. This attribute is ignored when unlimited_end_time is true. If specified, it must be after start_time. This end time does not include auto_extension_days.

.google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LineItem.Builder

clearEnvironmentType()

public LineItem.Builder clearEnvironmentType()

Non-empty default. The environment that the line item is targeting. The default value is BROWSER. If this value is VIDEO_PLAYER, then this line item can only target AdUnits that have AdUnitSizes whose environment_type is also VIDEO_PLAYER.

.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 25 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearExternalId()

public LineItem.Builder clearExternalId()

Optional. Identifier for the LineItem that is meaningful to the publisher. This attribute has a maximum length of 255 characters.

string external_id = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearImpressionLimit()

public LineItem.Builder clearImpressionLimit()

Optional. The impression limit for the LineItem. This field is meaningful only if the LineItem.line_item_type is [LineItemType.SPONSORSHIP][] and LineItem.cost_type is [CostType.CPM][].

.google.ads.admanager.v1.Goal impression_limit = 30 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LineItem.Builder

clearLastModifiedByApp()

public LineItem.Builder clearLastModifiedByApp()

Output only. The application that last modified this line item.

string last_modified_by_app = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearLineItemType()

public LineItem.Builder clearLineItemType()

Required. Determines the default priority of the LineItem for delivery. More information can be found on the Ad Manager Help Center.

.google.ads.admanager.v1.LineItemTypeEnum.LineItemType line_item_type = 10 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearMissingCreatives()

public LineItem.Builder clearMissingCreatives()

Output only. Indicates if a line item is missing any creatives for the creative_placeholders specified.

Creatives can be considered missing for several reasons:

  • Not enough creatives of a certain size have been uploaded, as determined by expectedCreativeCount. For example a line item specifies 750x350, 400x200, but only a 750x350 was uploaded. Or line item specifies 750x350 with an expected count of 2, but only one was uploaded.
  • The appliedLabels of an associated Creative do not match the effectiveAppliedLabels of the line item. For example if a line item specifies 750x350 with a foo applied label, but a 750x350 creative without an applied label was uploaded.

bool missing_creatives = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearName()

public LineItem.Builder clearName()

Identifier. The resource name of the LineItem. Format: networks/{network_code}/orders/{order_id}/lineItems/{line_item_id}

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

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearNotes()

public LineItem.Builder clearNotes()

Optional. Provides any additional notes that may annotate LineItem. This field has a maximum length of 65,535 characters.

string notes = 20 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPrimaryGoal()

public LineItem.Builder clearPrimaryGoal()

Required. The primary goal that this LineItem is associated with, which is used in its pacing and budgeting.

.google.ads.admanager.v1.Goal primary_goal = 29 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LineItem.Builder

clearPriority()

public LineItem.Builder clearPriority()

Optional. Priority of the LineItem for delivery. Valid values range from 1 to 16. This field can only be changed by certain networks, otherwise a PERMISSION_DENIED error will occur.

The following list shows the default, minimum, and maximum priority values for each LineItemType: formatted as LineItemType: default priority (minimum priority, maximum priority):

  • SPONSORSHIP: 4 (2,5)
  • STANDARD: 8 (6,10)
  • NETWORK: 12 (11, 14)
  • BULK: 12 (11, 14)
  • PRICE_PRIORITY: 12 (11, 14)
  • HOUSE: 16 (15, 16)
  • CLICK_TRACKING: 16 (1, 16)
  • AD_EXCHANGE: 12 (1, 16)
  • ADSENSE: 12 (1, 16)
  • BUMPER: 16 (15, 16)

int64 priority = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearReservationStatus()

public LineItem.Builder clearReservationStatus()

Output only. Describes whether or not inventory has been reserved for the line item.

.google.ads.admanager.v1.ReservationStatusEnum.ReservationStatus reservation_status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearStartTime()

public LineItem.Builder clearStartTime()

Required. Time at which the LineItem will begin serving. This attribute must be in the future when creating a LineItem.

.google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LineItem.Builder

clearStatus()

public LineItem.Builder clearStatus()

Output only. The status of the LineItem.

.google.ads.admanager.v1.ComputedStatusEnum.ComputedStatus status = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearUnlimitedEndTime()

public LineItem.Builder clearUnlimitedEndTime()

Optional. Whether the LineItem has an end_time. This attribute can be set to true for only LineItems with line_item_type SPONSORSHIP, NETWORK, PRICE_PRIORITY and HOUSE.

bool unlimited_end_time = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearUpdateTime()

public LineItem.Builder clearUpdateTime()

Output only. The instant at which the LineItem was last updated

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

Returns
Type Description
LineItem.Builder

clearWebPropertyCode()

public LineItem.Builder clearWebPropertyCode()

Optional. The web property code used for dynamic allocation line items. This web property is only required with line item types AD_EXCHANGE and ADSENSE.

string web_property_code = 21 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LineItem.Builder

This builder for chaining.

clone()

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

getArchived()

public boolean getArchived()

Output only. The archival status of the LineItem.

bool archived = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The archived.

getAutoExtensionDays()

public int getAutoExtensionDays()

Optional. Number of days to allow a LineItem to deliver past its end_time. A maximum of 7 days is allowed. This feature is only available for Ad Manager 360 accounts.

int32 auto_extension_days = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The autoExtensionDays.

getContractedUnitsBought()

public long getContractedUnitsBought()

Optional. This attribute is only applicable for certain line item types and acts as an "FYI" or note, which does not impact ad-serving or other backend systems.

For SPONSORSHIP line items, this represents the minimum quantity, which is a lifetime impression volume goal for reporting purposes.

For STANDARD line items, this represents the contracted quantity, which is the number of units specified in the contract that the advertiser has bought for this line item. This attribute is only available if you have this feature enabled on your network.

int64 contracted_units_bought = 18 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The contractedUnitsBought.

getCostPerUnit()

public Money getCostPerUnit()

Required. The amount of money to spend per impression or click.

.google.type.Money cost_per_unit = 15 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.Money

The costPerUnit.

getCostPerUnitBuilder()

public Money.Builder getCostPerUnitBuilder()

Required. The amount of money to spend per impression or click.

.google.type.Money cost_per_unit = 15 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.Money.Builder

getCostPerUnitOrBuilder()

public MoneyOrBuilder getCostPerUnitOrBuilder()

Required. The amount of money to spend per impression or click.

.google.type.Money cost_per_unit = 15 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.MoneyOrBuilder

getCostType()

public LineItemCostTypeEnum.LineItemCostType getCostType()

Required. The method used for billing this line item.

.google.ads.admanager.v1.LineItemCostTypeEnum.LineItemCostType cost_type = 19 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LineItemCostTypeEnum.LineItemCostType

The costType.

getCostTypeValue()

public int getCostTypeValue()

Required. The method used for billing this line item.

.google.ads.admanager.v1.LineItemCostTypeEnum.LineItemCostType cost_type = 19 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for costType.

getCreateTime()

public Timestamp getCreateTime()

Output only. The instant at which the LineItem was created. This attribute may be null for line items created before this feature was introduced.

.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The instant at which the LineItem was created. This attribute may be null for line items created before this feature was introduced.

.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The instant at which the LineItem was created. This attribute may be null for line items created before this feature was introduced.

.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getCreativePlaceholders(int index)

public CreativePlaceholder getCreativePlaceholders(int index)

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
CreativePlaceholder

getCreativePlaceholdersBuilder(int index)

public CreativePlaceholder.Builder getCreativePlaceholdersBuilder(int index)

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
CreativePlaceholder.Builder

getCreativePlaceholdersBuilderList()

public List<CreativePlaceholder.Builder> getCreativePlaceholdersBuilderList()

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Builder>

getCreativePlaceholdersCount()

public int getCreativePlaceholdersCount()

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getCreativePlaceholdersList()

public List<CreativePlaceholder> getCreativePlaceholdersList()

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<CreativePlaceholder>

getCreativePlaceholdersOrBuilder(int index)

public CreativePlaceholderOrBuilder getCreativePlaceholdersOrBuilder(int index)

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
CreativePlaceholderOrBuilder

getCreativePlaceholdersOrBuilderList()

public List<? extends CreativePlaceholderOrBuilder> getCreativePlaceholdersOrBuilderList()

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<? extends com.google.ads.admanager.v1.CreativePlaceholderOrBuilder>

getCreativeRotationType()

public CreativeRotationTypeEnum.CreativeRotationType getCreativeRotationType()

Required. The strategy used for displaying multiple creatives that are associated with the line item.

.google.ads.admanager.v1.CreativeRotationTypeEnum.CreativeRotationType creative_rotation_type = 22 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreativeRotationTypeEnum.CreativeRotationType

The creativeRotationType.

getCreativeRotationTypeValue()

public int getCreativeRotationTypeValue()

Required. The strategy used for displaying multiple creatives that are associated with the line item.

.google.ads.admanager.v1.CreativeRotationTypeEnum.CreativeRotationType creative_rotation_type = 22 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for creativeRotationType.

getDefaultInstanceForType()

public LineItem getDefaultInstanceForType()
Returns
Type Description
LineItem

getDeliveryRateType()

public DeliveryRateTypeEnum.DeliveryRateType getDeliveryRateType()

Non-empty default. The strategy for delivering ads over the duration of the line item. Defaults to EVENLY or FRONTLOADED depending on the network's configuration.

.google.ads.admanager.v1.DeliveryRateTypeEnum.DeliveryRateType delivery_rate_type = 23 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
DeliveryRateTypeEnum.DeliveryRateType

The deliveryRateType.

getDeliveryRateTypeValue()

public int getDeliveryRateTypeValue()

Non-empty default. The strategy for delivering ads over the duration of the line item. Defaults to EVENLY or FRONTLOADED depending on the network's configuration.

.google.ads.admanager.v1.DeliveryRateTypeEnum.DeliveryRateType delivery_rate_type = 23 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
int

The enum numeric value on the wire for deliveryRateType.

getDescriptorForType()

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

getDiscount()

public double getDiscount()

Optional. The number here is either a percentage or an absolute value depending on the discount_type. If it is PERCENTAGE, then only non-fractional values are supported.

double discount = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
double

The discount.

getDiscountType()

public LineItemDiscountTypeEnum.LineItemDiscountType getDiscountType()

Non-empty default. The type of discount applied to the line item. Defaults to PERCENTAGE.

.google.ads.admanager.v1.LineItemDiscountTypeEnum.LineItemDiscountType discount_type = 24 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
LineItemDiscountTypeEnum.LineItemDiscountType

The discountType.

getDiscountTypeValue()

public int getDiscountTypeValue()

Non-empty default. The type of discount applied to the line item. Defaults to PERCENTAGE.

.google.ads.admanager.v1.LineItemDiscountTypeEnum.LineItemDiscountType discount_type = 24 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
int

The enum numeric value on the wire for discountType.

getDisplayName()

public String getDisplayName()

Optional. Display name of the LineItem. This attribute has a maximum length of 255 characters.

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

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Optional. Display name of the LineItem. This attribute has a maximum length of 255 characters.

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

Returns
Type Description
ByteString

The bytes for displayName.

getEndTime()

public Timestamp getEndTime()

Optional. Time at which the LineItem will stop serving. This attribute is ignored when unlimited_end_time is true. If specified, it must be after start_time. This end time does not include auto_extension_days.

.google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Timestamp

The endTime.

getEndTimeBuilder()

public Timestamp.Builder getEndTimeBuilder()

Optional. Time at which the LineItem will stop serving. This attribute is ignored when unlimited_end_time is true. If specified, it must be after start_time. This end time does not include auto_extension_days.

.google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Builder

getEndTimeOrBuilder()

public TimestampOrBuilder getEndTimeOrBuilder()

Optional. Time at which the LineItem will stop serving. This attribute is ignored when unlimited_end_time is true. If specified, it must be after start_time. This end time does not include auto_extension_days.

.google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TimestampOrBuilder

getEnvironmentType()

public EnvironmentTypeEnum.EnvironmentType getEnvironmentType()

Non-empty default. The environment that the line item is targeting. The default value is BROWSER. If this value is VIDEO_PLAYER, then this line item can only target AdUnits that have AdUnitSizes whose environment_type is also VIDEO_PLAYER.

.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 25 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
EnvironmentTypeEnum.EnvironmentType

The environmentType.

getEnvironmentTypeValue()

public int getEnvironmentTypeValue()

Non-empty default. The environment that the line item is targeting. The default value is BROWSER. If this value is VIDEO_PLAYER, then this line item can only target AdUnits that have AdUnitSizes whose environment_type is also VIDEO_PLAYER.

.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 25 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
int

The enum numeric value on the wire for environmentType.

getExternalId()

public String getExternalId()

Optional. Identifier for the LineItem that is meaningful to the publisher. This attribute has a maximum length of 255 characters.

string external_id = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The externalId.

getExternalIdBytes()

public ByteString getExternalIdBytes()

Optional. Identifier for the LineItem that is meaningful to the publisher. This attribute has a maximum length of 255 characters.

string external_id = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for externalId.

getImpressionLimit()

public Goal getImpressionLimit()

Optional. The impression limit for the LineItem. This field is meaningful only if the LineItem.line_item_type is [LineItemType.SPONSORSHIP][] and LineItem.cost_type is [CostType.CPM][].

.google.ads.admanager.v1.Goal impression_limit = 30 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Goal

The impressionLimit.

getImpressionLimitBuilder()

public Goal.Builder getImpressionLimitBuilder()

Optional. The impression limit for the LineItem. This field is meaningful only if the LineItem.line_item_type is [LineItemType.SPONSORSHIP][] and LineItem.cost_type is [CostType.CPM][].

.google.ads.admanager.v1.Goal impression_limit = 30 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Goal.Builder

getImpressionLimitOrBuilder()

public GoalOrBuilder getImpressionLimitOrBuilder()

Optional. The impression limit for the LineItem. This field is meaningful only if the LineItem.line_item_type is [LineItemType.SPONSORSHIP][] and LineItem.cost_type is [CostType.CPM][].

.google.ads.admanager.v1.Goal impression_limit = 30 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GoalOrBuilder

getLastModifiedByApp()

public String getLastModifiedByApp()

Output only. The application that last modified this line item.

string last_modified_by_app = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The lastModifiedByApp.

getLastModifiedByAppBytes()

public ByteString getLastModifiedByAppBytes()

Output only. The application that last modified this line item.

string last_modified_by_app = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for lastModifiedByApp.

getLineItemType()

public LineItemTypeEnum.LineItemType getLineItemType()

Required. Determines the default priority of the LineItem for delivery. More information can be found on the Ad Manager Help Center.

.google.ads.admanager.v1.LineItemTypeEnum.LineItemType line_item_type = 10 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LineItemTypeEnum.LineItemType

The lineItemType.

getLineItemTypeValue()

public int getLineItemTypeValue()

Required. Determines the default priority of the LineItem for delivery. More information can be found on the Ad Manager Help Center.

.google.ads.admanager.v1.LineItemTypeEnum.LineItemType line_item_type = 10 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for lineItemType.

getMissingCreatives()

public boolean getMissingCreatives()

Output only. Indicates if a line item is missing any creatives for the creative_placeholders specified.

Creatives can be considered missing for several reasons:

  • Not enough creatives of a certain size have been uploaded, as determined by expectedCreativeCount. For example a line item specifies 750x350, 400x200, but only a 750x350 was uploaded. Or line item specifies 750x350 with an expected count of 2, but only one was uploaded.
  • The appliedLabels of an associated Creative do not match the effectiveAppliedLabels of the line item. For example if a line item specifies 750x350 with a foo applied label, but a 750x350 creative without an applied label was uploaded.

bool missing_creatives = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The missingCreatives.

getName()

public String getName()

Identifier. The resource name of the LineItem. Format: networks/{network_code}/orders/{order_id}/lineItems/{line_item_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 LineItem. Format: networks/{network_code}/orders/{order_id}/lineItems/{line_item_id}

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

Returns
Type Description
ByteString

The bytes for name.

getNotes()

public String getNotes()

Optional. Provides any additional notes that may annotate LineItem. This field has a maximum length of 65,535 characters.

string notes = 20 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The notes.

getNotesBytes()

public ByteString getNotesBytes()

Optional. Provides any additional notes that may annotate LineItem. This field has a maximum length of 65,535 characters.

string notes = 20 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for notes.

getPrimaryGoal()

public Goal getPrimaryGoal()

Required. The primary goal that this LineItem is associated with, which is used in its pacing and budgeting.

.google.ads.admanager.v1.Goal primary_goal = 29 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Goal

The primaryGoal.

getPrimaryGoalBuilder()

public Goal.Builder getPrimaryGoalBuilder()

Required. The primary goal that this LineItem is associated with, which is used in its pacing and budgeting.

.google.ads.admanager.v1.Goal primary_goal = 29 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Goal.Builder

getPrimaryGoalOrBuilder()

public GoalOrBuilder getPrimaryGoalOrBuilder()

Required. The primary goal that this LineItem is associated with, which is used in its pacing and budgeting.

.google.ads.admanager.v1.Goal primary_goal = 29 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GoalOrBuilder

getPriority()

public long getPriority()

Optional. Priority of the LineItem for delivery. Valid values range from 1 to 16. This field can only be changed by certain networks, otherwise a PERMISSION_DENIED error will occur.

The following list shows the default, minimum, and maximum priority values for each LineItemType: formatted as LineItemType: default priority (minimum priority, maximum priority):

  • SPONSORSHIP: 4 (2,5)
  • STANDARD: 8 (6,10)
  • NETWORK: 12 (11, 14)
  • BULK: 12 (11, 14)
  • PRICE_PRIORITY: 12 (11, 14)
  • HOUSE: 16 (15, 16)
  • CLICK_TRACKING: 16 (1, 16)
  • AD_EXCHANGE: 12 (1, 16)
  • ADSENSE: 12 (1, 16)
  • BUMPER: 16 (15, 16)

int64 priority = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The priority.

getReservationStatus()

public ReservationStatusEnum.ReservationStatus getReservationStatus()

Output only. Describes whether or not inventory has been reserved for the line item.

.google.ads.admanager.v1.ReservationStatusEnum.ReservationStatus reservation_status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ReservationStatusEnum.ReservationStatus

The reservationStatus.

getReservationStatusValue()

public int getReservationStatusValue()

Output only. Describes whether or not inventory has been reserved for the line item.

.google.ads.admanager.v1.ReservationStatusEnum.ReservationStatus reservation_status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for reservationStatus.

getStartTime()

public Timestamp getStartTime()

Required. Time at which the LineItem will begin serving. This attribute must be in the future when creating a LineItem.

.google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Timestamp

The startTime.

getStartTimeBuilder()

public Timestamp.Builder getStartTimeBuilder()

Required. Time at which the LineItem will begin serving. This attribute must be in the future when creating a LineItem.

.google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Builder

getStartTimeOrBuilder()

public TimestampOrBuilder getStartTimeOrBuilder()

Required. Time at which the LineItem will begin serving. This attribute must be in the future when creating a LineItem.

.google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TimestampOrBuilder

getStatus()

public ComputedStatusEnum.ComputedStatus getStatus()

Output only. The status of the LineItem.

.google.ads.admanager.v1.ComputedStatusEnum.ComputedStatus status = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ComputedStatusEnum.ComputedStatus

The status.

getStatusValue()

public int getStatusValue()

Output only. The status of the LineItem.

.google.ads.admanager.v1.ComputedStatusEnum.ComputedStatus status = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for status.

getUnlimitedEndTime()

public boolean getUnlimitedEndTime()

Optional. Whether the LineItem has an end_time. This attribute can be set to true for only LineItems with line_item_type SPONSORSHIP, NETWORK, PRICE_PRIORITY and HOUSE.

bool unlimited_end_time = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The unlimitedEndTime.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The instant at which the LineItem was last updated

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

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. The instant at which the LineItem was last updated

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

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The instant at which the LineItem was last updated

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

Returns
Type Description
TimestampOrBuilder

getWebPropertyCode()

public String getWebPropertyCode()

Optional. The web property code used for dynamic allocation line items. This web property is only required with line item types AD_EXCHANGE and ADSENSE.

string web_property_code = 21 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The webPropertyCode.

getWebPropertyCodeBytes()

public ByteString getWebPropertyCodeBytes()

Optional. The web property code used for dynamic allocation line items. This web property is only required with line item types AD_EXCHANGE and ADSENSE.

string web_property_code = 21 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for webPropertyCode.

hasCostPerUnit()

public boolean hasCostPerUnit()

Required. The amount of money to spend per impression or click.

.google.type.Money cost_per_unit = 15 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the costPerUnit field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. The instant at which the LineItem was created. This attribute may be null for line items created before this feature was introduced.

.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasEndTime()

public boolean hasEndTime()

Optional. Time at which the LineItem will stop serving. This attribute is ignored when unlimited_end_time is true. If specified, it must be after start_time. This end time does not include auto_extension_days.

.google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the endTime field is set.

hasImpressionLimit()

public boolean hasImpressionLimit()

Optional. The impression limit for the LineItem. This field is meaningful only if the LineItem.line_item_type is [LineItemType.SPONSORSHIP][] and LineItem.cost_type is [CostType.CPM][].

.google.ads.admanager.v1.Goal impression_limit = 30 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the impressionLimit field is set.

hasPrimaryGoal()

public boolean hasPrimaryGoal()

Required. The primary goal that this LineItem is associated with, which is used in its pacing and budgeting.

.google.ads.admanager.v1.Goal primary_goal = 29 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the primaryGoal field is set.

hasStartTime()

public boolean hasStartTime()

Required. Time at which the LineItem will begin serving. This attribute must be in the future when creating a LineItem.

.google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the startTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The instant at which the LineItem was last updated

.google.protobuf.Timestamp update_time = 31 [(.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

mergeCostPerUnit(Money value)

public LineItem.Builder mergeCostPerUnit(Money value)

Required. The amount of money to spend per impression or click.

.google.type.Money cost_per_unit = 15 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.type.Money
Returns
Type Description
LineItem.Builder

mergeCreateTime(Timestamp value)

public LineItem.Builder mergeCreateTime(Timestamp value)

Output only. The instant at which the LineItem was created. This attribute may be null for line items created before this feature was introduced.

.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
LineItem.Builder

mergeEndTime(Timestamp value)

public LineItem.Builder mergeEndTime(Timestamp value)

Optional. Time at which the LineItem will stop serving. This attribute is ignored when unlimited_end_time is true. If specified, it must be after start_time. This end time does not include auto_extension_days.

.google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
LineItem.Builder

mergeFrom(LineItem other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeImpressionLimit(Goal value)

public LineItem.Builder mergeImpressionLimit(Goal value)

Optional. The impression limit for the LineItem. This field is meaningful only if the LineItem.line_item_type is [LineItemType.SPONSORSHIP][] and LineItem.cost_type is [CostType.CPM][].

.google.ads.admanager.v1.Goal impression_limit = 30 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Goal
Returns
Type Description
LineItem.Builder

mergePrimaryGoal(Goal value)

public LineItem.Builder mergePrimaryGoal(Goal value)

Required. The primary goal that this LineItem is associated with, which is used in its pacing and budgeting.

.google.ads.admanager.v1.Goal primary_goal = 29 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Goal
Returns
Type Description
LineItem.Builder

mergeStartTime(Timestamp value)

public LineItem.Builder mergeStartTime(Timestamp value)

Required. Time at which the LineItem will begin serving. This attribute must be in the future when creating a LineItem.

.google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Timestamp
Returns
Type Description
LineItem.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public LineItem.Builder mergeUpdateTime(Timestamp value)

Output only. The instant at which the LineItem was last updated

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

Parameter
Name Description
value Timestamp
Returns
Type Description
LineItem.Builder

removeCreativePlaceholders(int index)

public LineItem.Builder removeCreativePlaceholders(int index)

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
LineItem.Builder

setArchived(boolean value)

public LineItem.Builder setArchived(boolean value)

Output only. The archival status of the LineItem.

bool archived = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The archived to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setAutoExtensionDays(int value)

public LineItem.Builder setAutoExtensionDays(int value)

Optional. Number of days to allow a LineItem to deliver past its end_time. A maximum of 7 days is allowed. This feature is only available for Ad Manager 360 accounts.

int32 auto_extension_days = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The autoExtensionDays to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setContractedUnitsBought(long value)

public LineItem.Builder setContractedUnitsBought(long value)

Optional. This attribute is only applicable for certain line item types and acts as an "FYI" or note, which does not impact ad-serving or other backend systems.

For SPONSORSHIP line items, this represents the minimum quantity, which is a lifetime impression volume goal for reporting purposes.

For STANDARD line items, this represents the contracted quantity, which is the number of units specified in the contract that the advertiser has bought for this line item. This attribute is only available if you have this feature enabled on your network.

int64 contracted_units_bought = 18 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value long

The contractedUnitsBought to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setCostPerUnit(Money value)

public LineItem.Builder setCostPerUnit(Money value)

Required. The amount of money to spend per impression or click.

.google.type.Money cost_per_unit = 15 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.type.Money
Returns
Type Description
LineItem.Builder

setCostPerUnit(Money.Builder builderForValue)

public LineItem.Builder setCostPerUnit(Money.Builder builderForValue)

Required. The amount of money to spend per impression or click.

.google.type.Money cost_per_unit = 15 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue com.google.type.Money.Builder
Returns
Type Description
LineItem.Builder

setCostType(LineItemCostTypeEnum.LineItemCostType value)

public LineItem.Builder setCostType(LineItemCostTypeEnum.LineItemCostType value)

Required. The method used for billing this line item.

.google.ads.admanager.v1.LineItemCostTypeEnum.LineItemCostType cost_type = 19 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value LineItemCostTypeEnum.LineItemCostType

The costType to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setCostTypeValue(int value)

public LineItem.Builder setCostTypeValue(int value)

Required. The method used for billing this line item.

.google.ads.admanager.v1.LineItemCostTypeEnum.LineItemCostType cost_type = 19 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
LineItem.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public LineItem.Builder setCreateTime(Timestamp value)

Output only. The instant at which the LineItem was created. This attribute may be null for line items created before this feature was introduced.

.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
LineItem.Builder

setCreateTime(Timestamp.Builder builderForValue)

public LineItem.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The instant at which the LineItem was created. This attribute may be null for line items created before this feature was introduced.

.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
LineItem.Builder

setCreativePlaceholders(int index, CreativePlaceholder value)

public LineItem.Builder setCreativePlaceholders(int index, CreativePlaceholder value)

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value CreativePlaceholder
Returns
Type Description
LineItem.Builder

setCreativePlaceholders(int index, CreativePlaceholder.Builder builderForValue)

public LineItem.Builder setCreativePlaceholders(int index, CreativePlaceholder.Builder builderForValue)

Required. Details about the creatives that are expected to serve through this LineItem.

repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 27 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue CreativePlaceholder.Builder
Returns
Type Description
LineItem.Builder

setCreativeRotationType(CreativeRotationTypeEnum.CreativeRotationType value)

public LineItem.Builder setCreativeRotationType(CreativeRotationTypeEnum.CreativeRotationType value)

Required. The strategy used for displaying multiple creatives that are associated with the line item.

.google.ads.admanager.v1.CreativeRotationTypeEnum.CreativeRotationType creative_rotation_type = 22 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value CreativeRotationTypeEnum.CreativeRotationType

The creativeRotationType to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setCreativeRotationTypeValue(int value)

public LineItem.Builder setCreativeRotationTypeValue(int value)

Required. The strategy used for displaying multiple creatives that are associated with the line item.

.google.ads.admanager.v1.CreativeRotationTypeEnum.CreativeRotationType creative_rotation_type = 22 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
LineItem.Builder

This builder for chaining.

setDeliveryRateType(DeliveryRateTypeEnum.DeliveryRateType value)

public LineItem.Builder setDeliveryRateType(DeliveryRateTypeEnum.DeliveryRateType value)

Non-empty default. The strategy for delivering ads over the duration of the line item. Defaults to EVENLY or FRONTLOADED depending on the network's configuration.

.google.ads.admanager.v1.DeliveryRateTypeEnum.DeliveryRateType delivery_rate_type = 23 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Parameter
Name Description
value DeliveryRateTypeEnum.DeliveryRateType

The deliveryRateType to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setDeliveryRateTypeValue(int value)

public LineItem.Builder setDeliveryRateTypeValue(int value)

Non-empty default. The strategy for delivering ads over the duration of the line item. Defaults to EVENLY or FRONTLOADED depending on the network's configuration.

.google.ads.admanager.v1.DeliveryRateTypeEnum.DeliveryRateType delivery_rate_type = 23 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Parameter
Name Description
value int

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

Returns
Type Description
LineItem.Builder

This builder for chaining.

setDiscount(double value)

public LineItem.Builder setDiscount(double value)

Optional. The number here is either a percentage or an absolute value depending on the discount_type. If it is PERCENTAGE, then only non-fractional values are supported.

double discount = 13 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value double

The discount to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setDiscountType(LineItemDiscountTypeEnum.LineItemDiscountType value)

public LineItem.Builder setDiscountType(LineItemDiscountTypeEnum.LineItemDiscountType value)

Non-empty default. The type of discount applied to the line item. Defaults to PERCENTAGE.

.google.ads.admanager.v1.LineItemDiscountTypeEnum.LineItemDiscountType discount_type = 24 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Parameter
Name Description
value LineItemDiscountTypeEnum.LineItemDiscountType

The discountType to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setDiscountTypeValue(int value)

public LineItem.Builder setDiscountTypeValue(int value)

Non-empty default. The type of discount applied to the line item. Defaults to PERCENTAGE.

.google.ads.admanager.v1.LineItemDiscountTypeEnum.LineItemDiscountType discount_type = 24 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Parameter
Name Description
value int

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

Returns
Type Description
LineItem.Builder

This builder for chaining.

setDisplayName(String value)

public LineItem.Builder setDisplayName(String value)

Optional. Display name of the LineItem. This attribute has a maximum length of 255 characters.

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

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public LineItem.Builder setDisplayNameBytes(ByteString value)

Optional. Display name of the LineItem. This attribute has a maximum length of 255 characters.

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

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setEndTime(Timestamp value)

public LineItem.Builder setEndTime(Timestamp value)

Optional. Time at which the LineItem will stop serving. This attribute is ignored when unlimited_end_time is true. If specified, it must be after start_time. This end time does not include auto_extension_days.

.google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Timestamp
Returns
Type Description
LineItem.Builder

setEndTime(Timestamp.Builder builderForValue)

public LineItem.Builder setEndTime(Timestamp.Builder builderForValue)

Optional. Time at which the LineItem will stop serving. This attribute is ignored when unlimited_end_time is true. If specified, it must be after start_time. This end time does not include auto_extension_days.

.google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
LineItem.Builder

setEnvironmentType(EnvironmentTypeEnum.EnvironmentType value)

public LineItem.Builder setEnvironmentType(EnvironmentTypeEnum.EnvironmentType value)

Non-empty default. The environment that the line item is targeting. The default value is BROWSER. If this value is VIDEO_PLAYER, then this line item can only target AdUnits that have AdUnitSizes whose environment_type is also VIDEO_PLAYER.

.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 25 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Parameter
Name Description
value EnvironmentTypeEnum.EnvironmentType

The environmentType to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setEnvironmentTypeValue(int value)

public LineItem.Builder setEnvironmentTypeValue(int value)

Non-empty default. The environment that the line item is targeting. The default value is BROWSER. If this value is VIDEO_PLAYER, then this line item can only target AdUnits that have AdUnitSizes whose environment_type is also VIDEO_PLAYER.

.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 25 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Parameter
Name Description
value int

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

Returns
Type Description
LineItem.Builder

This builder for chaining.

setExternalId(String value)

public LineItem.Builder setExternalId(String value)

Optional. Identifier for the LineItem that is meaningful to the publisher. This attribute has a maximum length of 255 characters.

string external_id = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The externalId to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setExternalIdBytes(ByteString value)

public LineItem.Builder setExternalIdBytes(ByteString value)

Optional. Identifier for the LineItem that is meaningful to the publisher. This attribute has a maximum length of 255 characters.

string external_id = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for externalId to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setImpressionLimit(Goal value)

public LineItem.Builder setImpressionLimit(Goal value)

Optional. The impression limit for the LineItem. This field is meaningful only if the LineItem.line_item_type is [LineItemType.SPONSORSHIP][] and LineItem.cost_type is [CostType.CPM][].

.google.ads.admanager.v1.Goal impression_limit = 30 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Goal
Returns
Type Description
LineItem.Builder

setImpressionLimit(Goal.Builder builderForValue)

public LineItem.Builder setImpressionLimit(Goal.Builder builderForValue)

Optional. The impression limit for the LineItem. This field is meaningful only if the LineItem.line_item_type is [LineItemType.SPONSORSHIP][] and LineItem.cost_type is [CostType.CPM][].

.google.ads.admanager.v1.Goal impression_limit = 30 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Goal.Builder
Returns
Type Description
LineItem.Builder

setLastModifiedByApp(String value)

public LineItem.Builder setLastModifiedByApp(String value)

Output only. The application that last modified this line item.

string last_modified_by_app = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The lastModifiedByApp to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setLastModifiedByAppBytes(ByteString value)

public LineItem.Builder setLastModifiedByAppBytes(ByteString value)

Output only. The application that last modified this line item.

string last_modified_by_app = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for lastModifiedByApp to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setLineItemType(LineItemTypeEnum.LineItemType value)

public LineItem.Builder setLineItemType(LineItemTypeEnum.LineItemType value)

Required. Determines the default priority of the LineItem for delivery. More information can be found on the Ad Manager Help Center.

.google.ads.admanager.v1.LineItemTypeEnum.LineItemType line_item_type = 10 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value LineItemTypeEnum.LineItemType

The lineItemType to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setLineItemTypeValue(int value)

public LineItem.Builder setLineItemTypeValue(int value)

Required. Determines the default priority of the LineItem for delivery. More information can be found on the Ad Manager Help Center.

.google.ads.admanager.v1.LineItemTypeEnum.LineItemType line_item_type = 10 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
LineItem.Builder

This builder for chaining.

setMissingCreatives(boolean value)

public LineItem.Builder setMissingCreatives(boolean value)

Output only. Indicates if a line item is missing any creatives for the creative_placeholders specified.

Creatives can be considered missing for several reasons:

  • Not enough creatives of a certain size have been uploaded, as determined by expectedCreativeCount. For example a line item specifies 750x350, 400x200, but only a 750x350 was uploaded. Or line item specifies 750x350 with an expected count of 2, but only one was uploaded.
  • The appliedLabels of an associated Creative do not match the effectiveAppliedLabels of the line item. For example if a line item specifies 750x350 with a foo applied label, but a 750x350 creative without an applied label was uploaded.

bool missing_creatives = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The missingCreatives to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setName(String value)

public LineItem.Builder setName(String value)

Identifier. The resource name of the LineItem. Format: networks/{network_code}/orders/{order_id}/lineItems/{line_item_id}

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setNameBytes(ByteString value)

public LineItem.Builder setNameBytes(ByteString value)

Identifier. The resource name of the LineItem. Format: networks/{network_code}/orders/{order_id}/lineItems/{line_item_id}

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setNotes(String value)

public LineItem.Builder setNotes(String value)

Optional. Provides any additional notes that may annotate LineItem. This field has a maximum length of 65,535 characters.

string notes = 20 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The notes to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setNotesBytes(ByteString value)

public LineItem.Builder setNotesBytes(ByteString value)

Optional. Provides any additional notes that may annotate LineItem. This field has a maximum length of 65,535 characters.

string notes = 20 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for notes to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setPrimaryGoal(Goal value)

public LineItem.Builder setPrimaryGoal(Goal value)

Required. The primary goal that this LineItem is associated with, which is used in its pacing and budgeting.

.google.ads.admanager.v1.Goal primary_goal = 29 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Goal
Returns
Type Description
LineItem.Builder

setPrimaryGoal(Goal.Builder builderForValue)

public LineItem.Builder setPrimaryGoal(Goal.Builder builderForValue)

Required. The primary goal that this LineItem is associated with, which is used in its pacing and budgeting.

.google.ads.admanager.v1.Goal primary_goal = 29 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Goal.Builder
Returns
Type Description
LineItem.Builder

setPriority(long value)

public LineItem.Builder setPriority(long value)

Optional. Priority of the LineItem for delivery. Valid values range from 1 to 16. This field can only be changed by certain networks, otherwise a PERMISSION_DENIED error will occur.

The following list shows the default, minimum, and maximum priority values for each LineItemType: formatted as LineItemType: default priority (minimum priority, maximum priority):

  • SPONSORSHIP: 4 (2,5)
  • STANDARD: 8 (6,10)
  • NETWORK: 12 (11, 14)
  • BULK: 12 (11, 14)
  • PRICE_PRIORITY: 12 (11, 14)
  • HOUSE: 16 (15, 16)
  • CLICK_TRACKING: 16 (1, 16)
  • AD_EXCHANGE: 12 (1, 16)
  • ADSENSE: 12 (1, 16)
  • BUMPER: 16 (15, 16)

int64 priority = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value long

The priority to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

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

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

setReservationStatus(ReservationStatusEnum.ReservationStatus value)

public LineItem.Builder setReservationStatus(ReservationStatusEnum.ReservationStatus value)

Output only. Describes whether or not inventory has been reserved for the line item.

.google.ads.admanager.v1.ReservationStatusEnum.ReservationStatus reservation_status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ReservationStatusEnum.ReservationStatus

The reservationStatus to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setReservationStatusValue(int value)

public LineItem.Builder setReservationStatusValue(int value)

Output only. Describes whether or not inventory has been reserved for the line item.

.google.ads.admanager.v1.ReservationStatusEnum.ReservationStatus reservation_status = 26 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

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

Returns
Type Description
LineItem.Builder

This builder for chaining.

setStartTime(Timestamp value)

public LineItem.Builder setStartTime(Timestamp value)

Required. Time at which the LineItem will begin serving. This attribute must be in the future when creating a LineItem.

.google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Timestamp
Returns
Type Description
LineItem.Builder

setStartTime(Timestamp.Builder builderForValue)

public LineItem.Builder setStartTime(Timestamp.Builder builderForValue)

Required. Time at which the LineItem will begin serving. This attribute must be in the future when creating a LineItem.

.google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
LineItem.Builder

setStatus(ComputedStatusEnum.ComputedStatus value)

public LineItem.Builder setStatus(ComputedStatusEnum.ComputedStatus value)

Output only. The status of the LineItem.

.google.ads.admanager.v1.ComputedStatusEnum.ComputedStatus status = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ComputedStatusEnum.ComputedStatus

The status to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setStatusValue(int value)

public LineItem.Builder setStatusValue(int value)

Output only. The status of the LineItem.

.google.ads.admanager.v1.ComputedStatusEnum.ComputedStatus status = 28 [(.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
LineItem.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUnlimitedEndTime(boolean value)

public LineItem.Builder setUnlimitedEndTime(boolean value)

Optional. Whether the LineItem has an end_time. This attribute can be set to true for only LineItems with line_item_type SPONSORSHIP, NETWORK, PRICE_PRIORITY and HOUSE.

bool unlimited_end_time = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The unlimitedEndTime to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setUpdateTime(Timestamp value)

public LineItem.Builder setUpdateTime(Timestamp value)

Output only. The instant at which the LineItem was last updated

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

Parameter
Name Description
value Timestamp
Returns
Type Description
LineItem.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public LineItem.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. The instant at which the LineItem was last updated

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
LineItem.Builder

setWebPropertyCode(String value)

public LineItem.Builder setWebPropertyCode(String value)

Optional. The web property code used for dynamic allocation line items. This web property is only required with line item types AD_EXCHANGE and ADSENSE.

string web_property_code = 21 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The webPropertyCode to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setWebPropertyCodeBytes(ByteString value)

public LineItem.Builder setWebPropertyCodeBytes(ByteString value)

Optional. The web property code used for dynamic allocation line items. This web property is only required with line item types AD_EXCHANGE and ADSENSE.

string web_property_code = 21 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for webPropertyCode to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.