pub struct LineItem {Show 29 fields
pub name: String,
pub display_name: String,
pub archived: bool,
pub contracted_units_bought: i64,
pub cost_per_unit: Option<Money>,
pub cost_type: i32,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub creative_rotation_type: i32,
pub delivery_rate_type: i32,
pub discount: f64,
pub discount_type: i32,
pub environment_type: i32,
pub external_id: String,
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub auto_extension_days: i32,
pub unlimited_end_time: bool,
pub last_modified_by_app: String,
pub line_item_type: i32,
pub missing_creatives: bool,
pub notes: String,
pub priority: i64,
pub reservation_status: i32,
pub web_property_code: String,
pub creative_placeholders: Vec<CreativePlaceholder>,
pub status: i32,
pub primary_goal: Option<Goal>,
pub impression_limit: Option<Goal>,
}
Expand description
The LineItem resource.
Fields§
§name: String
Identifier. The resource name of the LineItem.
Format:
networks/{network_code}/orders/{order_id}/lineItems/{line_item_id}
display_name: String
Optional. Display name of the LineItem. This attribute has a maximum length of 255 characters.
archived: bool
Output only. The archival status of the LineItem.
contracted_units_bought: i64
Optional. This attribute is only applicable for certain [line item types][LineItemType] and acts as an “FYI” or note, which does not impact ad-serving or other backend systems.
For [SPONSORSHIP][LineItemType.SPONSORSHIP] line items, this represents the minimum quantity, which is a lifetime impression volume goal for reporting purposes.
For [STANDARD][LineItemType.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.
cost_per_unit: Option<Money>
Required. The amount of money to spend per impression or click.
cost_type: i32
Required. The method used for billing this line item.
create_time: Option<Timestamp>
Output only. The instant at which the LineItem was created. This attribute may be null for line items created before this feature was introduced.
update_time: Option<Timestamp>
Output only. The instant at which the LineItem was last updated
creative_rotation_type: i32
Required. The strategy used for displaying multiple [creatives][google.ads.admanager.v1.Creative] that are associated with the line item.
delivery_rate_type: i32
Non-empty default. The strategy for delivering ads over the duration of the line item. Defaults to [EVENLY][DeliveryRateType.EVENLY] or [FRONTLOADED][DeliveryRatetype.FRONTLOADED] depending on the network’s configuration.
discount: f64
Optional. The number here is either a percentage or an absolute value depending on the [discount_type][google.ads.admanager.v1.LineItem.discount_type]. If it is [PERCENTAGE][LineItemDiscountType.PERCENTAGE], then only non-fractional values are supported.
discount_type: i32
Non-empty default. The type of discount applied to the line item. Defaults to [PERCENTAGE][LineItemDiscountType.PERCENTAGE].
environment_type: i32
Non-empty default. The environment that the line item is targeting. The
default value is [BROWSER][EnvironmentType.BROWSER]. If this value is
[VIDEO_PLAYER][EnvironmentType.VIDEO_PLAYER], then this line item can only
target [AdUnits][google.ads.admanager.v1.AdUnit] that have AdUnitSizes
whose environment_type
is also VIDEO_PLAYER
.
external_id: String
Optional. Identifier for the LineItem that is meaningful to the publisher. This attribute has a maximum length of 255 characters.
start_time: Option<Timestamp>
Required. Time at which the LineItem will begin serving. This attribute must be in the future when creating a LineItem.
end_time: Option<Timestamp>
Optional. Time at which the LineItem will stop serving. This attribute is
ignored when
[unlimited_end_time][google.ads.admanager.v1.LineItem.unlimited_end_time]
is true
. If specified, it must be after
[start_time][google.ads.admanager.v1.LineItem.start_time]. This end time
does not include
[auto_extension_days][google.ads.admanager.v1.LineItem.auto_extension_days].
auto_extension_days: i32
Optional. Number of days to allow a LineItem to deliver past its [end_time][google.ads.admanager.v1.LineItem.end_time]. A maximum of 7 days is allowed. This feature is only available for Ad Manager 360 accounts.
unlimited_end_time: bool
Optional. Whether the LineItem has an
[end_time][google.ads.admanager.v1.LineItem.end_time]. This attribute can
be set to true
for only LineItems with
[line_item_type][google.ads.admanager.v1.LineItem.line_item_type]
[SPONSORSHIP][LineItemType.SPONSORSHIP], [NETWORK][LineItemType.NETWORK],
[PRICE_PRIORITY][LineItemType.PRICE_PRIORITY] and
[HOUSE][LineItemType.HOUSE].
last_modified_by_app: String
Output only. The application that last modified this line item.
line_item_type: i32
Required. Determines the default priority of the LineItem for delivery. More information can be found on the Ad Manager Help Center.
missing_creatives: bool
Output only. Indicates if a line item is missing any [creatives][google.ads.admanager.v1.Creative] for the [creative_placeholders][google.ads.admanager.v1.LineItem.creative_placeholders] specified.
[Creatives][google.ads.admanager.v1.Creative] can be considered missing for several reasons:
- Not enough [creatives][google.ads.admanager.v1.Creative] of a certain size have been uploaded, as determined by [expectedCreativeCount][google.ads.admanager.v1.CreativePlaceholder.expected_creative_count]. 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][Creative.applied_labels] of an associated [Creative][google.ads.admanager.v1.Creative] do not match the [effectiveAppliedLabels][CreativePlaceholder.effective_applied_labels] 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.
notes: String
Optional. Provides any additional notes that may annotate LineItem. This field has a maximum length of 65,535 characters.
priority: i64
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][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)
reservation_status: i32
Output only. Describes whether or not inventory has been reserved for the line item.
web_property_code: String
Optional. The web property code used for dynamic allocation line items. This web property is only required with line item types [AD_EXCHANGE][LineItemType.AD_EXCHANGE] and [ADSENSE][LineItemType.ADSENSE].
creative_placeholders: Vec<CreativePlaceholder>
Required. Details about the creatives that are expected to serve through this LineItem.
status: i32
Output only. The status of the LineItem.
primary_goal: Option<Goal>
Required. The primary goal that this LineItem is associated with, which is used in its pacing and budgeting.
impression_limit: Option<Goal>
Optional. The impression limit for the LineItem. This field is meaningful only if the [LineItem.line_item_type][google.ads.admanager.v1.LineItem.line_item_type] is [LineItemType.SPONSORSHIP][] and [LineItem.cost_type][google.ads.admanager.v1.LineItem.cost_type] is [CostType.CPM][].
Implementations§
source§impl LineItem
impl LineItem
sourcepub fn line_item_type(&self) -> LineItemType
pub fn line_item_type(&self) -> LineItemType
Returns the enum value of line_item_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_line_item_type(&mut self, value: LineItemType)
pub fn set_line_item_type(&mut self, value: LineItemType)
Sets line_item_type
to the provided enum value.
sourcepub fn cost_type(&self) -> LineItemCostType
pub fn cost_type(&self) -> LineItemCostType
Returns the enum value of cost_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_cost_type(&mut self, value: LineItemCostType)
pub fn set_cost_type(&mut self, value: LineItemCostType)
Sets cost_type
to the provided enum value.
sourcepub fn creative_rotation_type(&self) -> CreativeRotationType
pub fn creative_rotation_type(&self) -> CreativeRotationType
Returns the enum value of creative_rotation_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_creative_rotation_type(&mut self, value: CreativeRotationType)
pub fn set_creative_rotation_type(&mut self, value: CreativeRotationType)
Sets creative_rotation_type
to the provided enum value.
sourcepub fn delivery_rate_type(&self) -> DeliveryRateType
pub fn delivery_rate_type(&self) -> DeliveryRateType
Returns the enum value of delivery_rate_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_delivery_rate_type(&mut self, value: DeliveryRateType)
pub fn set_delivery_rate_type(&mut self, value: DeliveryRateType)
Sets delivery_rate_type
to the provided enum value.
sourcepub fn discount_type(&self) -> LineItemDiscountType
pub fn discount_type(&self) -> LineItemDiscountType
Returns the enum value of discount_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_discount_type(&mut self, value: LineItemDiscountType)
pub fn set_discount_type(&mut self, value: LineItemDiscountType)
Sets discount_type
to the provided enum value.
sourcepub fn environment_type(&self) -> EnvironmentType
pub fn environment_type(&self) -> EnvironmentType
Returns the enum value of environment_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_environment_type(&mut self, value: EnvironmentType)
pub fn set_environment_type(&mut self, value: EnvironmentType)
Sets environment_type
to the provided enum value.
sourcepub fn reservation_status(&self) -> ReservationStatus
pub fn reservation_status(&self) -> ReservationStatus
Returns the enum value of reservation_status
, or the default if the field is set to an invalid enum value.
sourcepub fn set_reservation_status(&mut self, value: ReservationStatus)
pub fn set_reservation_status(&mut self, value: ReservationStatus)
Sets reservation_status
to the provided enum value.
sourcepub fn status(&self) -> ComputedStatus
pub fn status(&self) -> ComputedStatus
Returns the enum value of status
, or the default if the field is set to an invalid enum value.
sourcepub fn set_status(&mut self, value: ComputedStatus)
pub fn set_status(&mut self, value: ComputedStatus)
Sets status
to the provided enum value.
Trait Implementations§
source§impl Message for LineItem
impl Message for LineItem
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for LineItem
impl PartialEq for LineItem
impl StructuralPartialEq for LineItem
Auto Trait Implementations§
impl Freeze for LineItem
impl RefUnwindSafe for LineItem
impl Send for LineItem
impl Sync for LineItem
impl Unpin for LineItem
impl UnwindSafe for LineItem
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request