pub struct AdUnit {Show 25 fields
pub name: String,
pub ad_unit_id: i64,
pub parent_ad_unit: String,
pub parent_path: Vec<AdUnitParent>,
pub display_name: String,
pub ad_unit_code: String,
pub status: i32,
pub target_window: i32,
pub applied_teams: Vec<String>,
pub teams: Vec<String>,
pub description: String,
pub explicitly_targeted: bool,
pub has_children: bool,
pub update_time: Option<Timestamp>,
pub ad_unit_sizes: Vec<AdUnitSize>,
pub external_set_top_box_channel_id: String,
pub refresh_delay: Option<Duration>,
pub ctv_application_id: i64,
pub applied_labels: Vec<AppliedLabel>,
pub effective_applied_labels: Vec<AppliedLabel>,
pub applied_label_frequency_caps: Vec<LabelFrequencyCap>,
pub effective_label_frequency_caps: Vec<LabelFrequencyCap>,
pub smart_size_mode: i32,
pub applied_adsense_enabled: i32,
pub effective_adsense_enabled: bool,
}
Expand description
The AdUnit resource.
Fields§
§name: String
Identifier. The resource name of the AdUnit.
Format: networks/{network_code}/adUnits/{ad_unit_id}
ad_unit_id: i64
Output only. AdUnit ID.
parent_ad_unit: String
Required. Immutable. The AdUnit’s parent. Every ad unit has a parent except for the root ad unit, which is created by Google. Format: “networks/{network_code}/adUnits/{ad_unit_id}”
parent_path: Vec<AdUnitParent>
Output only. The path to this AdUnit in the ad unit hierarchy represented as a list from the root to this ad unit’s parent. For root ad units, this list is empty.
display_name: String
Required. The display name of the ad unit. Its maximum length is 255 characters.
ad_unit_code: String
Immutable. A string used to uniquely identify the ad unit for the purposes of serving the ad. This attribute is optional and can be set during ad unit creation. If it is not provided, it will be assigned by Google based off of the ad unit ID.
status: i32
Output only. The status of this ad unit. It defaults to ACTIVE.
target_window: i32
Non-empty default. The value to use for the HTML link’s target attribute. This value will be interpreted as TOP if left blank.
applied_teams: Vec<String>
Optional. The resource names of Teams directly applied to this AdUnit. Format: “networks/{network_code}/teams/{team_id}”
teams: Vec<String>
Output only. The resource names of all Teams that this AdUnit is on as well as those inherited from parent AdUnits. Format: “networks/{network_code}/teams/{team_id}”
description: String
Optional. A description of the ad unit. The maximum length is 65,535 characters.
explicitly_targeted: bool
Optional. If this field is set to true, then the AdUnit will not be implicitly targeted when its parent is. Traffickers must explicitly target such an AdUnit or else no line items will serve to it. This feature is only available for Ad Manager 360 accounts.
has_children: bool
Output only. This field is set to true if the ad unit has any children.
update_time: Option<Timestamp>
Output only. The instant this AdUnit was last modified.
ad_unit_sizes: Vec<AdUnitSize>
Optional. The sizes that can be served inside this ad unit.
external_set_top_box_channel_id: String
Optional. Determines what set top box video on demand channel this ad unit corresponds to in an external set top box ad campaign system.
refresh_delay: Option<Duration>
Optional. The duration after which an Ad Unit will automatically refresh. This is only valid for ad units in mobile apps. If not set, the ad unit will not refresh.
ctv_application_id: i64
Optional. The ID of the CTV application that this ad unit is within.
applied_labels: Vec<AppliedLabel>
Optional. The set of labels applied directly to this ad unit.
effective_applied_labels: Vec<AppliedLabel>
Output only. Contains the set of labels applied directly to the ad unit as well as those inherited from the parent ad units. If a label has been negated, only the negated label is returned. This field is readonly and is assigned by Google.
applied_label_frequency_caps: Vec<LabelFrequencyCap>
Optional. The set of label frequency caps applied directly to this ad unit. There is a limit of 10 label frequency caps per ad unit.
effective_label_frequency_caps: Vec<LabelFrequencyCap>
Output only. The label frequency caps applied directly to the ad unit as well as those inherited from parent ad units.
smart_size_mode: i32
Optional. The smart size mode for this ad unit. This attribute is optional and defaults to SmartSizeMode.NONE for fixed sizes.
applied_adsense_enabled: i32
Optional. The value of AdSense enabled directly applied to this ad unit. This attribute is optional and if not specified this ad unit will inherit the value of effectiveAdsenseEnabled from its ancestors.
effective_adsense_enabled: bool
Output only. Specifies whether or not the AdUnit is enabled for serving ads from the AdSense content network. This attribute defaults to the ad unit’s parent or ancestor’s setting if one has been set. If no ancestor of the ad unit has set appliedAdsenseEnabled, the attribute is defaulted to true.
Implementations§
source§impl AdUnit
impl AdUnit
sourcepub fn target_window(&self) -> TargetWindow
pub fn target_window(&self) -> TargetWindow
Returns the enum value of target_window
, or the default if the field is set to an invalid enum value.
sourcepub fn set_target_window(&mut self, value: TargetWindow)
pub fn set_target_window(&mut self, value: TargetWindow)
Sets target_window
to the provided enum value.
sourcepub fn status(&self) -> Status
pub fn status(&self) -> Status
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: Status)
pub fn set_status(&mut self, value: Status)
Sets status
to the provided enum value.
sourcepub fn smart_size_mode(&self) -> SmartSizeMode
pub fn smart_size_mode(&self) -> SmartSizeMode
Returns the enum value of smart_size_mode
, or the default if the field is set to an invalid enum value.
sourcepub fn set_smart_size_mode(&mut self, value: SmartSizeMode)
pub fn set_smart_size_mode(&mut self, value: SmartSizeMode)
Sets smart_size_mode
to the provided enum value.
sourcepub fn applied_adsense_enabled(&self) -> AppliedAdsenseEnabled
pub fn applied_adsense_enabled(&self) -> AppliedAdsenseEnabled
Returns the enum value of applied_adsense_enabled
, or the default if the field is set to an invalid enum value.
sourcepub fn set_applied_adsense_enabled(&mut self, value: AppliedAdsenseEnabled)
pub fn set_applied_adsense_enabled(&mut self, value: AppliedAdsenseEnabled)
Sets applied_adsense_enabled
to the provided enum value.
Trait Implementations§
source§impl Message for AdUnit
impl Message for AdUnit
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 AdUnit
impl PartialEq for AdUnit
impl StructuralPartialEq for AdUnit
Auto Trait Implementations§
impl Freeze for AdUnit
impl RefUnwindSafe for AdUnit
impl Send for AdUnit
impl Sync for AdUnit
impl Unpin for AdUnit
impl UnwindSafe for AdUnit
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