pub struct Targeting {
pub plannable_location_id: Option<String>,
pub plannable_location_ids: Vec<String>,
pub age_range: i32,
pub genders: Vec<GenderInfo>,
pub devices: Vec<DeviceInfo>,
pub network: i32,
pub audience_targeting: Option<AudienceTargeting>,
}
Expand description
The targeting for which traffic metrics will be reported.
Fields§
§plannable_location_id: Option<String>
The ID of the selected location. Plannable location IDs can be obtained from [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.services.ReachPlanService.ListPlannableLocations].
Requests must set either this field or plannable_location_ids
.
This field is deprecated as of V12 and will be removed in a future release.
Use plannable_location_ids
instead.
plannable_location_ids: Vec<String>
The list of plannable location IDs to target with this forecast.
If more than one ID is provided, all IDs must have the same
parent_country_id
. Planning for more than parent_county
is not
supported. Plannable location IDs and their parent_country_id
can be
obtained from
[ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.services.ReachPlanService.ListPlannableLocations].
Requests must set either this field or plannable_location_id
.
age_range: i32
Targeted age range. An unset value is equivalent to targeting all ages.
genders: Vec<GenderInfo>
Targeted genders. An unset value is equivalent to targeting MALE and FEMALE.
devices: Vec<DeviceInfo>
Targeted devices. If not specified, targets all applicable devices. Applicable devices vary by product and region and can be obtained from [ReachPlanService.ListPlannableProducts][google.ads.googleads.v17.services.ReachPlanService.ListPlannableProducts].
network: i32
Targetable network for the ad product. If not specified, targets all applicable networks. Applicable networks vary by product and region and can be obtained from [ReachPlanService.ListPlannableProducts][google.ads.googleads.v17.services.ReachPlanService.ListPlannableProducts].
audience_targeting: Option<AudienceTargeting>
Targeted audiences. If not specified, does not target any specific audience.
Implementations§
source§impl Targeting
impl Targeting
sourcepub fn age_range(&self) -> ReachPlanAgeRange
pub fn age_range(&self) -> ReachPlanAgeRange
Returns the enum value of age_range
, or the default if the field is set to an invalid enum value.
sourcepub fn set_age_range(&mut self, value: ReachPlanAgeRange)
pub fn set_age_range(&mut self, value: ReachPlanAgeRange)
Sets age_range
to the provided enum value.
sourcepub fn network(&self) -> ReachPlanNetwork
pub fn network(&self) -> ReachPlanNetwork
Returns the enum value of network
, or the default if the field is set to an invalid enum value.
sourcepub fn set_network(&mut self, value: ReachPlanNetwork)
pub fn set_network(&mut self, value: ReachPlanNetwork)
Sets network
to the provided enum value.
sourcepub fn plannable_location_id(&self) -> &str
pub fn plannable_location_id(&self) -> &str
Returns the value of plannable_location_id
, or the default value if plannable_location_id
is unset.
Trait Implementations§
source§impl Message for Targeting
impl Message for Targeting
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 Targeting
impl PartialEq for Targeting
impl StructuralPartialEq for Targeting
Auto Trait Implementations§
impl Freeze for Targeting
impl RefUnwindSafe for Targeting
impl Send for Targeting
impl Sync for Targeting
impl Unpin for Targeting
impl UnwindSafe for Targeting
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