Struct google_api_proto::google::ads::admanager::v1::AdUnit

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

source

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.

source

pub fn set_target_window(&mut self, value: TargetWindow)

Sets target_window to the provided enum value.

source

pub fn status(&self) -> Status

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: Status)

Sets status to the provided enum value.

source

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.

source

pub fn set_smart_size_mode(&mut self, value: SmartSizeMode)

Sets smart_size_mode to the provided enum value.

source

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.

source

pub fn set_applied_adsense_enabled(&mut self, value: AppliedAdsenseEnabled)

Sets applied_adsense_enabled to the provided enum value.

Trait Implementations§

source§

impl Clone for AdUnit

source§

fn clone(&self) -> AdUnit

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 AdUnit

source§

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

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

impl Default for AdUnit

source§

fn default() -> Self

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

impl Message for AdUnit

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 AdUnit

source§

fn eq(&self, other: &AdUnit) -> 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 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> 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