pub struct Asset {Show 13 fields
pub resource_name: String,
pub id: Option<i64>,
pub name: Option<String>,
pub type: i32,
pub final_urls: Vec<String>,
pub final_mobile_urls: Vec<String>,
pub tracking_url_template: Option<String>,
pub url_custom_parameters: Vec<CustomParameter>,
pub final_url_suffix: Option<String>,
pub source: i32,
pub policy_summary: Option<AssetPolicySummary>,
pub field_type_policy_summaries: Vec<AssetFieldTypePolicySummary>,
pub asset_data: Option<AssetData>,
}
Expand description
Asset is a part of an ad which can be shared across multiple ads. It can be an image (ImageAsset), a video (YoutubeVideoAsset), etc. Assets are immutable and cannot be removed. To stop an asset from serving, remove the asset from the entity that is using it.
Fields§
§resource_name: String
Immutable. The resource name of the asset. Asset resource names have the form:
customers/{customer_id}/assets/{asset_id}
id: Option<i64>
Output only. The ID of the asset.
name: Option<String>
Optional name of the asset.
type: i32
Output only. Type of the asset.
final_urls: Vec<String>
A list of possible final URLs after all cross domain redirects.
final_mobile_urls: Vec<String>
A list of possible final mobile URLs after all cross domain redirects.
tracking_url_template: Option<String>
URL template for constructing a tracking URL.
url_custom_parameters: Vec<CustomParameter>
A list of mappings to be used for substituting URL custom parameter tags in the tracking_url_template, final_urls, and/or final_mobile_urls.
final_url_suffix: Option<String>
URL template for appending params to landing page URLs served with parallel tracking.
source: i32
Output only. Source of the asset.
policy_summary: Option<AssetPolicySummary>
Output only. Policy information for the asset.
field_type_policy_summaries: Vec<AssetFieldTypePolicySummary>
Output only. Policy information for the asset for each FieldType.
asset_data: Option<AssetData>
The specific type of the asset.
Implementations§
source§impl Asset
impl Asset
sourcepub fn type(&self) -> AssetType
pub fn type(&self) -> AssetType
Returns the enum value of type
, or the default if the field is set to an invalid enum value.
sourcepub fn tracking_url_template(&self) -> &str
pub fn tracking_url_template(&self) -> &str
Returns the value of tracking_url_template
, or the default value if tracking_url_template
is unset.
sourcepub fn final_url_suffix(&self) -> &str
pub fn final_url_suffix(&self) -> &str
Returns the value of final_url_suffix
, or the default value if final_url_suffix
is unset.
sourcepub fn source(&self) -> AssetSource
pub fn source(&self) -> AssetSource
Returns the enum value of source
, or the default if the field is set to an invalid enum value.
sourcepub fn set_source(&mut self, value: AssetSource)
pub fn set_source(&mut self, value: AssetSource)
Sets source
to the provided enum value.
Trait Implementations§
source§impl Message for Asset
impl Message for Asset
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 Asset
impl PartialEq for Asset
impl StructuralPartialEq for Asset
Auto Trait Implementations§
impl !Freeze for Asset
impl RefUnwindSafe for Asset
impl Send for Asset
impl Sync for Asset
impl Unpin for Asset
impl UnwindSafe for Asset
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