pub struct Goal {
pub goal_type: i32,
pub unit_type: i32,
pub units: i64,
}
Expand description
Defines the criteria a [LineItem][google.ads.admanager.v1.LineItem] needs to satisfy to meet its delivery goal.
Fields§
§goal_type: i32
The type of the goal for the LineItem. It defines the period over which the goal should be reached.
unit_type: i32
The type of the goal unit for the LineItem.
units: i64
If this is a primary goal, it represents the number or percentage of impressions or clicks that will be reserved. If the line item is of type [LineItemTypeEnum.LineItemType.SPONSORSHIP][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.SPONSORSHIP], it represents the percentage of available impressions reserved. If the line item is of type [LineItemTypeEnum.LineItemType.BULK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.BULK] or [LineItemTypeEnum.LineItemType.PRICE_PRIORITY][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.PRICE_PRIORITY], it represents the number of remaining impressions reserved. If the line item is of type [LineItemTypeEnum.LineItemType.NETWORK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.NETWORK] or [LineItemTypeEnum.LineItemType.HOUSE][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.HOUSE], it represents the percentage of remaining impressions reserved.
If this is an impression cap goal, it represents the number of impressions or conversions that the line item will stop serving at if reached. For valid line item types, see [LineItem.impressions_cap][].
Implementations§
source§impl Goal
impl Goal
sourcepub fn goal_type(&self) -> GoalType
pub fn goal_type(&self) -> GoalType
Returns the enum value of goal_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_goal_type(&mut self, value: GoalType)
pub fn set_goal_type(&mut self, value: GoalType)
Sets goal_type
to the provided enum value.
sourcepub fn unit_type(&self) -> UnitType
pub fn unit_type(&self) -> UnitType
Returns the enum value of unit_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_unit_type(&mut self, value: UnitType)
pub fn set_unit_type(&mut self, value: UnitType)
Sets unit_type
to the provided enum value.
Trait Implementations§
source§impl Message for Goal
impl Message for Goal
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 Goal
impl PartialEq for Goal
impl Copy for Goal
impl StructuralPartialEq for Goal
Auto Trait Implementations§
impl Freeze for Goal
impl RefUnwindSafe for Goal
impl Send for Goal
impl Sync for Goal
impl Unpin for Goal
impl UnwindSafe for Goal
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