Struct google_api_proto::google::ads::admanager::v1::LineItem

source ·
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

source

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.

source

pub fn set_line_item_type(&mut self, value: LineItemType)

Sets line_item_type to the provided enum value.

source

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.

source

pub fn set_cost_type(&mut self, value: LineItemCostType)

Sets cost_type to the provided enum value.

source

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.

source

pub fn set_creative_rotation_type(&mut self, value: CreativeRotationType)

Sets creative_rotation_type to the provided enum value.

source

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.

source

pub fn set_delivery_rate_type(&mut self, value: DeliveryRateType)

Sets delivery_rate_type to the provided enum value.

source

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.

source

pub fn set_discount_type(&mut self, value: LineItemDiscountType)

Sets discount_type to the provided enum value.

source

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.

source

pub fn set_environment_type(&mut self, value: EnvironmentType)

Sets environment_type to the provided enum value.

source

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.

source

pub fn set_reservation_status(&mut self, value: ReservationStatus)

Sets reservation_status to the provided enum value.

source

pub fn status(&self) -> ComputedStatus

Returns the enum value of status, or the default if the field is set to an invalid enum value.

source

pub fn set_status(&mut self, value: ComputedStatus)

Sets status to the provided enum value.

Trait Implementations§

source§

impl Clone for LineItem

source§

fn clone(&self) -> LineItem

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LineItem

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for LineItem

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Message for LineItem

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for LineItem

source§

fn eq(&self, other: &LineItem) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for LineItem

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more