Class LineItem.Builder (0.44.0)

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

A LineItem contains information about how specific ad creatives are intended to serve to your website or app along with pricing and other delivery details.

Protobuf type google.ads.admanager.v1.LineItem

Implements

LineItemOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllCustomFieldValues(Iterable<? extends CustomFieldValue> values)

public LineItem.Builder addAllCustomFieldValues(Iterable<? extends CustomFieldValue> values)

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

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

addCustomFieldValues(CustomFieldValue value)

public LineItem.Builder addCustomFieldValues(CustomFieldValue value)

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value CustomFieldValue
Returns
Type Description
LineItem.Builder

addCustomFieldValues(CustomFieldValue.Builder builderForValue)

public LineItem.Builder addCustomFieldValues(CustomFieldValue.Builder builderForValue)

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

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

addCustomFieldValues(int index, CustomFieldValue value)

public LineItem.Builder addCustomFieldValues(int index, CustomFieldValue value)

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

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

addCustomFieldValues(int index, CustomFieldValue.Builder builderForValue)

public LineItem.Builder addCustomFieldValues(int index, CustomFieldValue.Builder builderForValue)

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

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

addCustomFieldValuesBuilder()

public CustomFieldValue.Builder addCustomFieldValuesBuilder()

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomFieldValue.Builder

addCustomFieldValuesBuilder(int index)

public CustomFieldValue.Builder addCustomFieldValuesBuilder(int index)

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
CustomFieldValue.Builder

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

clearBudget()

public LineItem.Builder clearBudget()

Output only. The amount of money allocated to the LineItem. This attribute is readonly and is populated by Google. The currency code is readonly.

optional .google.type.Money budget = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
LineItem.Builder

clearCustomFieldValues()

public LineItem.Builder clearCustomFieldValues()

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LineItem.Builder

clearDisplayName()

public LineItem.Builder clearDisplayName()

Required. The name of the line item. This attribute is required and has a maximum length of 255 characters.

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

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearEndTime()

public LineItem.Builder clearEndTime()

Output only. The timestamp when the LineItem will stop serving. This attribute is read-only and includes auto extension days.

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

Returns
Type Description
LineItem.Builder

clearGoal()

public LineItem.Builder clearGoal()

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

optional .google.ads.admanager.v1.Goal goal = 76 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LineItem.Builder

clearLineItemType()

public LineItem.Builder clearLineItemType()

Required. Indicates the line item type of a LineItem. This attribute is required. The line item type determines the default priority of the line item. More information can be found at https://support.google.com/admanager/answer/177279.

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

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}/lineItems/{line_item_id}

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

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearOrder()

public LineItem.Builder clearOrder()

Output only. The ID of the Order to which the LineItem belongs. This attribute is required. Format: networks/{network_code}/orders/{order}

optional string order = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
LineItem.Builder

This builder for chaining.

clearRate()

public LineItem.Builder clearRate()

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

optional .google.type.Money rate = 20 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LineItem.Builder

clearStartTime()

public LineItem.Builder clearStartTime()

Required. The date and time on which the LineItem is enabled to begin serving. This attribute is required and must be in the future.

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

Returns
Type Description
LineItem.Builder

getBudget()

public Money getBudget()

Output only. The amount of money allocated to the LineItem. This attribute is readonly and is populated by Google. The currency code is readonly.

optional .google.type.Money budget = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
com.google.type.Money

The budget.

getBudgetBuilder()

public Money.Builder getBudgetBuilder()

Output only. The amount of money allocated to the LineItem. This attribute is readonly and is populated by Google. The currency code is readonly.

optional .google.type.Money budget = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

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

getBudgetOrBuilder()

public MoneyOrBuilder getBudgetOrBuilder()

Output only. The amount of money allocated to the LineItem. This attribute is readonly and is populated by Google. The currency code is readonly.

optional .google.type.Money budget = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
com.google.type.MoneyOrBuilder

getCustomFieldValues(int index)

public CustomFieldValue getCustomFieldValues(int index)

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
CustomFieldValue

getCustomFieldValuesBuilder(int index)

public CustomFieldValue.Builder getCustomFieldValuesBuilder(int index)

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
CustomFieldValue.Builder

getCustomFieldValuesBuilderList()

public List<CustomFieldValue.Builder> getCustomFieldValuesBuilderList()

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getCustomFieldValuesCount()

public int getCustomFieldValuesCount()

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getCustomFieldValuesList()

public List<CustomFieldValue> getCustomFieldValuesList()

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<CustomFieldValue>

getCustomFieldValuesOrBuilder(int index)

public CustomFieldValueOrBuilder getCustomFieldValuesOrBuilder(int index)

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
CustomFieldValueOrBuilder

getCustomFieldValuesOrBuilderList()

public List<? extends CustomFieldValueOrBuilder> getCustomFieldValuesOrBuilderList()

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

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

getDefaultInstanceForType()

public LineItem getDefaultInstanceForType()
Returns
Type Description
LineItem

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Required. The name of the line item. This attribute is required and has a maximum length of 255 characters.

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

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The name of the line item. This attribute is required and has a maximum length of 255 characters.

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

Returns
Type Description
ByteString

The bytes for displayName.

getEndTime()

public Timestamp getEndTime()

Output only. The timestamp when the LineItem will stop serving. This attribute is read-only and includes auto extension days.

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

Returns
Type Description
Timestamp

The endTime.

getEndTimeBuilder()

public Timestamp.Builder getEndTimeBuilder()

Output only. The timestamp when the LineItem will stop serving. This attribute is read-only and includes auto extension days.

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

Returns
Type Description
Builder

getEndTimeOrBuilder()

public TimestampOrBuilder getEndTimeOrBuilder()

Output only. The timestamp when the LineItem will stop serving. This attribute is read-only and includes auto extension days.

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

Returns
Type Description
TimestampOrBuilder

getGoal()

public Goal getGoal()

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

optional .google.ads.admanager.v1.Goal goal = 76 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Goal

The goal.

getGoalBuilder()

public Goal.Builder getGoalBuilder()

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

optional .google.ads.admanager.v1.Goal goal = 76 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Goal.Builder

getGoalOrBuilder()

public GoalOrBuilder getGoalOrBuilder()

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

optional .google.ads.admanager.v1.Goal goal = 76 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GoalOrBuilder

getLineItemType()

public LineItemTypeEnum.LineItemType getLineItemType()

Required. Indicates the line item type of a LineItem. This attribute is required. The line item type determines the default priority of the line item. More information can be found at https://support.google.com/admanager/answer/177279.

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

Returns
Type Description
LineItemTypeEnum.LineItemType

The lineItemType.

getLineItemTypeValue()

public int getLineItemTypeValue()

Required. Indicates the line item type of a LineItem. This attribute is required. The line item type determines the default priority of the line item. More information can be found at https://support.google.com/admanager/answer/177279.

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

Returns
Type Description
int

The enum numeric value on the wire for lineItemType.

getName()

public String getName()

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

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

Returns
Type Description
ByteString

The bytes for name.

getOrder()

public String getOrder()

Output only. The ID of the Order to which the LineItem belongs. This attribute is required. Format: networks/{network_code}/orders/{order}

optional string order = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The order.

getOrderBytes()

public ByteString getOrderBytes()

Output only. The ID of the Order to which the LineItem belongs. This attribute is required. Format: networks/{network_code}/orders/{order}

optional string order = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for order.

getRate()

public Money getRate()

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

optional .google.type.Money rate = 20 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.Money

The rate.

getRateBuilder()

public Money.Builder getRateBuilder()

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

optional .google.type.Money rate = 20 [(.google.api.field_behavior) = REQUIRED];

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

getRateOrBuilder()

public MoneyOrBuilder getRateOrBuilder()

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

optional .google.type.Money rate = 20 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.MoneyOrBuilder

getStartTime()

public Timestamp getStartTime()

Required. The date and time on which the LineItem is enabled to begin serving. This attribute is required and must be in the future.

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

Returns
Type Description
Timestamp

The startTime.

getStartTimeBuilder()

public Timestamp.Builder getStartTimeBuilder()

Required. The date and time on which the LineItem is enabled to begin serving. This attribute is required and must be in the future.

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

Returns
Type Description
Builder

getStartTimeOrBuilder()

public TimestampOrBuilder getStartTimeOrBuilder()

Required. The date and time on which the LineItem is enabled to begin serving. This attribute is required and must be in the future.

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

Returns
Type Description
TimestampOrBuilder

hasBudget()

public boolean hasBudget()

Output only. The amount of money allocated to the LineItem. This attribute is readonly and is populated by Google. The currency code is readonly.

optional .google.type.Money budget = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the budget field is set.

hasDisplayName()

public boolean hasDisplayName()

Required. The name of the line item. This attribute is required and has a maximum length of 255 characters.

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

Returns
Type Description
boolean

Whether the displayName field is set.

hasEndTime()

public boolean hasEndTime()

Output only. The timestamp when the LineItem will stop serving. This attribute is read-only and includes auto extension days.

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

Returns
Type Description
boolean

Whether the endTime field is set.

hasGoal()

public boolean hasGoal()

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

optional .google.ads.admanager.v1.Goal goal = 76 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the goal field is set.

hasLineItemType()

public boolean hasLineItemType()

Required. Indicates the line item type of a LineItem. This attribute is required. The line item type determines the default priority of the line item. More information can be found at https://support.google.com/admanager/answer/177279.

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

Returns
Type Description
boolean

Whether the lineItemType field is set.

hasOrder()

public boolean hasOrder()

Output only. The ID of the Order to which the LineItem belongs. This attribute is required. Format: networks/{network_code}/orders/{order}

optional string order = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the order field is set.

hasRate()

public boolean hasRate()

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

optional .google.type.Money rate = 20 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the rate field is set.

hasStartTime()

public boolean hasStartTime()

Required. The date and time on which the LineItem is enabled to begin serving. This attribute is required and must be in the future.

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

Returns
Type Description
boolean

Whether the startTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeBudget(Money value)

public LineItem.Builder mergeBudget(Money value)

Output only. The amount of money allocated to the LineItem. This attribute is readonly and is populated by Google. The currency code is readonly.

optional .google.type.Money budget = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

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

mergeEndTime(Timestamp value)

public LineItem.Builder mergeEndTime(Timestamp value)

Output only. The timestamp when the LineItem will stop serving. This attribute is read-only and includes auto extension days.

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

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

mergeGoal(Goal value)

public LineItem.Builder mergeGoal(Goal value)

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

optional .google.ads.admanager.v1.Goal goal = 76 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Goal
Returns
Type Description
LineItem.Builder

mergeRate(Money value)

public LineItem.Builder mergeRate(Money value)

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

optional .google.type.Money rate = 20 [(.google.api.field_behavior) = REQUIRED];

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

mergeStartTime(Timestamp value)

public LineItem.Builder mergeStartTime(Timestamp value)

Required. The date and time on which the LineItem is enabled to begin serving. This attribute is required and must be in the future.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
LineItem.Builder

removeCustomFieldValues(int index)

public LineItem.Builder removeCustomFieldValues(int index)

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
LineItem.Builder

setBudget(Money value)

public LineItem.Builder setBudget(Money value)

Output only. The amount of money allocated to the LineItem. This attribute is readonly and is populated by Google. The currency code is readonly.

optional .google.type.Money budget = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

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

setBudget(Money.Builder builderForValue)

public LineItem.Builder setBudget(Money.Builder builderForValue)

Output only. The amount of money allocated to the LineItem. This attribute is readonly and is populated by Google. The currency code is readonly.

optional .google.type.Money budget = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

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

setCustomFieldValues(int index, CustomFieldValue value)

public LineItem.Builder setCustomFieldValues(int index, CustomFieldValue value)

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

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

setCustomFieldValues(int index, CustomFieldValue.Builder builderForValue)

public LineItem.Builder setCustomFieldValues(int index, CustomFieldValue.Builder builderForValue)

Optional. The values of the custom fields associated with this line item.

repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL];

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

setDisplayName(String value)

public LineItem.Builder setDisplayName(String value)

Required. The name of the line item. This attribute is required and has a maximum length of 255 characters.

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

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)

Required. The name of the line item. This attribute is required and has a maximum length of 255 characters.

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

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)

Output only. The timestamp when the LineItem will stop serving. This attribute is read-only and includes auto extension days.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
LineItem.Builder

setEndTime(Timestamp.Builder builderForValue)

public LineItem.Builder setEndTime(Timestamp.Builder builderForValue)

Output only. The timestamp when the LineItem will stop serving. This attribute is read-only and includes auto extension days.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
LineItem.Builder

setGoal(Goal value)

public LineItem.Builder setGoal(Goal value)

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

optional .google.ads.admanager.v1.Goal goal = 76 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Goal
Returns
Type Description
LineItem.Builder

setGoal(Goal.Builder builderForValue)

public LineItem.Builder setGoal(Goal.Builder builderForValue)

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

optional .google.ads.admanager.v1.Goal goal = 76 [(.google.api.field_behavior) = OPTIONAL];

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

setLineItemType(LineItemTypeEnum.LineItemType value)

public LineItem.Builder setLineItemType(LineItemTypeEnum.LineItemType value)

Required. Indicates the line item type of a LineItem. This attribute is required. The line item type determines the default priority of the line item. More information can be found at https://support.google.com/admanager/answer/177279.

optional .google.ads.admanager.v1.LineItemTypeEnum.LineItemType line_item_type = 17 [(.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. Indicates the line item type of a LineItem. This attribute is required. The line item type determines the default priority of the line item. More information can be found at https://support.google.com/admanager/answer/177279.

optional .google.ads.admanager.v1.LineItemTypeEnum.LineItemType line_item_type = 17 [(.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.

setName(String value)

public LineItem.Builder setName(String value)

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

setOrder(String value)

public LineItem.Builder setOrder(String value)

Output only. The ID of the Order to which the LineItem belongs. This attribute is required. Format: networks/{network_code}/orders/{order}

optional string order = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The order to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setOrderBytes(ByteString value)

public LineItem.Builder setOrderBytes(ByteString value)

Output only. The ID of the Order to which the LineItem belongs. This attribute is required. Format: networks/{network_code}/orders/{order}

optional string order = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for order to set.

Returns
Type Description
LineItem.Builder

This builder for chaining.

setRate(Money value)

public LineItem.Builder setRate(Money value)

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

optional .google.type.Money rate = 20 [(.google.api.field_behavior) = REQUIRED];

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

setRate(Money.Builder builderForValue)

public LineItem.Builder setRate(Money.Builder builderForValue)

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

optional .google.type.Money rate = 20 [(.google.api.field_behavior) = REQUIRED];

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

setStartTime(Timestamp value)

public LineItem.Builder setStartTime(Timestamp value)

Required. The date and time on which the LineItem is enabled to begin serving. This attribute is required and must be in the future.

optional .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. The date and time on which the LineItem is enabled to begin serving. This attribute is required and must be in the future.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
LineItem.Builder