Struct google_api_proto::google::ads::googleads::v17::resources::Campaign

source ·
pub struct Campaign {
Show 54 fields pub resource_name: String, pub id: Option<i64>, pub name: Option<String>, pub primary_status: i32, pub primary_status_reasons: Vec<i32>, pub status: i32, pub serving_status: i32, pub bidding_strategy_system_status: i32, pub ad_serving_optimization_status: i32, pub advertising_channel_type: i32, pub advertising_channel_sub_type: i32, pub tracking_url_template: Option<String>, pub url_custom_parameters: Vec<CustomParameter>, pub local_services_campaign_settings: Option<LocalServicesCampaignSettings>, pub travel_campaign_settings: Option<TravelCampaignSettings>, pub demand_gen_campaign_settings: Option<DemandGenCampaignSettings>, pub video_campaign_settings: Option<VideoCampaignSettings>, pub real_time_bidding_setting: Option<RealTimeBiddingSetting>, pub network_settings: Option<NetworkSettings>, pub hotel_setting: Option<HotelSettingInfo>, pub dynamic_search_ads_setting: Option<DynamicSearchAdsSetting>, pub shopping_setting: Option<ShoppingSetting>, pub targeting_setting: Option<TargetingSetting>, pub audience_setting: Option<AudienceSetting>, pub geo_target_type_setting: Option<GeoTargetTypeSetting>, pub local_campaign_setting: Option<LocalCampaignSetting>, pub app_campaign_setting: Option<AppCampaignSetting>, pub labels: Vec<String>, pub experiment_type: i32, pub base_campaign: Option<String>, pub campaign_budget: Option<String>, pub bidding_strategy_type: i32, pub accessible_bidding_strategy: String, pub start_date: Option<String>, pub campaign_group: Option<String>, pub end_date: Option<String>, pub final_url_suffix: Option<String>, pub frequency_caps: Vec<FrequencyCapEntry>, pub video_brand_safety_suitability: i32, pub vanity_pharma: Option<VanityPharma>, pub selective_optimization: Option<SelectiveOptimization>, pub optimization_goal_setting: Option<OptimizationGoalSetting>, pub tracking_setting: Option<TrackingSetting>, pub payment_mode: i32, pub optimization_score: Option<f64>, pub excluded_parent_asset_field_types: Vec<i32>, pub excluded_parent_asset_set_types: Vec<i32>, pub url_expansion_opt_out: Option<bool>, pub performance_max_upgrade: Option<PerformanceMaxUpgrade>, pub hotel_property_asset_set: Option<String>, pub listing_type: Option<i32>, pub asset_automation_settings: Vec<AssetAutomationSetting>, pub keyword_match_type: i32, pub campaign_bidding_strategy: Option<CampaignBiddingStrategy>,
}
Expand description

A campaign.

Fields§

§resource_name: String

Immutable. The resource name of the campaign. Campaign resource names have the form:

customers/{customer_id}/campaigns/{campaign_id}

§id: Option<i64>

Output only. The ID of the campaign.

§name: Option<String>

The name of the campaign.

This field is required and should not be empty when creating new campaigns.

It must not contain any null (code point 0x0), NL line feed (code point 0xA) or carriage return (code point 0xD) characters.

§primary_status: i32

Output only. The primary status of the campaign.

Provides insight into why a campaign is not serving or not serving optimally. Modification to the campaign and its related entities might take a while to be reflected in this status.

§primary_status_reasons: Vec<i32>

Output only. The primary status reasons of the campaign.

Provides insight into why a campaign is not serving or not serving optimally. These reasons are aggregated to determine an overall CampaignPrimaryStatus.

§status: i32

The status of the campaign.

When a new campaign is added, the status defaults to ENABLED.

§serving_status: i32

Output only. The ad serving status of the campaign.

§bidding_strategy_system_status: i32

Output only. The system status of the campaign’s bidding strategy.

§ad_serving_optimization_status: i32

The ad serving optimization status of the campaign.

§advertising_channel_type: i32

Immutable. The primary serving target for ads within the campaign. The targeting options can be refined in network_settings.

This field is required and should not be empty when creating new campaigns.

Can be set only when creating campaigns. After the campaign is created, the field can not be changed.

§advertising_channel_sub_type: i32

Immutable. Optional refinement to advertising_channel_type. Must be a valid sub-type of the parent channel type.

Can be set only when creating campaigns. After campaign is created, the field can not be changed.

§tracking_url_template: Option<String>

The URL template for constructing a tracking URL.

§url_custom_parameters: Vec<CustomParameter>

The list of mappings used to substitute custom parameter tags in a tracking_url_template, final_urls, or mobile_final_urls.

§local_services_campaign_settings: Option<LocalServicesCampaignSettings>

The Local Services Campaign related settings.

§travel_campaign_settings: Option<TravelCampaignSettings>

Settings for Travel campaign.

§demand_gen_campaign_settings: Option<DemandGenCampaignSettings>

Settings for Demand Gen campaign.

§video_campaign_settings: Option<VideoCampaignSettings>

Settings for Video campaign.

§real_time_bidding_setting: Option<RealTimeBiddingSetting>

Settings for Real-Time Bidding, a feature only available for campaigns targeting the Ad Exchange network.

§network_settings: Option<NetworkSettings>

The network settings for the campaign.

§hotel_setting: Option<HotelSettingInfo>

Immutable. The hotel setting for the campaign.

§dynamic_search_ads_setting: Option<DynamicSearchAdsSetting>

The setting for controlling Dynamic Search Ads (DSA).

§shopping_setting: Option<ShoppingSetting>

The setting for controlling Shopping campaigns.

§targeting_setting: Option<TargetingSetting>

Setting for targeting related features.

§audience_setting: Option<AudienceSetting>

Immutable. Setting for audience related features.

§geo_target_type_setting: Option<GeoTargetTypeSetting>

The setting for ads geotargeting.

§local_campaign_setting: Option<LocalCampaignSetting>

The setting for local campaign.

§app_campaign_setting: Option<AppCampaignSetting>

The setting related to App Campaign.

§labels: Vec<String>

Output only. The resource names of labels attached to this campaign.

§experiment_type: i32

Output only. The type of campaign: normal, draft, or experiment.

§base_campaign: Option<String>

Output only. The resource name of the base campaign of a draft or experiment campaign. For base campaigns, this is equal to resource_name.

This field is read-only.

§campaign_budget: Option<String>

The budget of the campaign.

§bidding_strategy_type: i32

Output only. The type of bidding strategy.

A bidding strategy can be created by setting either the bidding scheme to create a standard bidding strategy or the bidding_strategy field to create a portfolio bidding strategy.

This field is read-only.

§accessible_bidding_strategy: String

Output only. Resource name of AccessibleBiddingStrategy, a read-only view of the unrestricted attributes of the attached portfolio bidding strategy identified by ‘bidding_strategy’. Empty, if the campaign does not use a portfolio strategy. Unrestricted strategy attributes are available to all customers with whom the strategy is shared and are read from the AccessibleBiddingStrategy resource. In contrast, restricted attributes are only available to the owner customer of the strategy and their managers. Restricted attributes can only be read from the BiddingStrategy resource.

§start_date: Option<String>

The date when campaign started in serving customer’s timezone in YYYY-MM-DD format.

§campaign_group: Option<String>

The campaign group this campaign belongs to.

§end_date: Option<String>

The last day of the campaign in serving customer’s timezone in YYYY-MM-DD format. On create, defaults to 2037-12-30, which means the campaign will run indefinitely. To set an existing campaign to run indefinitely, set this field to 2037-12-30.

§final_url_suffix: Option<String>

Suffix used to append query parameters to landing pages that are served with parallel tracking.

§frequency_caps: Vec<FrequencyCapEntry>

A list that limits how often each user will see this campaign’s ads.

§video_brand_safety_suitability: i32

Brand Safety setting at the individual campaign level. Allows for selecting an inventory type to show your ads on content that is the right fit for your brand. See https://support.google.com/google-ads/answer/7515513.

§vanity_pharma: Option<VanityPharma>

Describes how unbranded pharma ads will be displayed.

§selective_optimization: Option<SelectiveOptimization>

Selective optimization setting for this campaign, which includes a set of conversion actions to optimize this campaign towards. This feature only applies to app campaigns that use MULTI_CHANNEL as AdvertisingChannelType and APP_CAMPAIGN or APP_CAMPAIGN_FOR_ENGAGEMENT as AdvertisingChannelSubType.

§optimization_goal_setting: Option<OptimizationGoalSetting>

Optimization goal setting for this campaign, which includes a set of optimization goal types.

§tracking_setting: Option<TrackingSetting>

Output only. Campaign-level settings for tracking information.

§payment_mode: i32

Payment mode for the campaign.

§optimization_score: Option<f64>

Output only. Optimization score of the campaign.

Optimization score is an estimate of how well a campaign is set to perform. It ranges from 0% (0.0) to 100% (1.0), with 100% indicating that the campaign is performing at full potential. This field is null for unscored campaigns.

See “About optimization score” at https://support.google.com/google-ads/answer/9061546.

This field is read-only.

§excluded_parent_asset_field_types: Vec<i32>

The asset field types that should be excluded from this campaign. Asset links with these field types will not be inherited by this campaign from the upper level.

§excluded_parent_asset_set_types: Vec<i32>

The asset set types that should be excluded from this campaign. Asset set links with these types will not be inherited by this campaign from the upper level. Location group types (GMB_DYNAMIC_LOCATION_GROUP, CHAIN_DYNAMIC_LOCATION_GROUP, and STATIC_LOCATION_GROUP) are child types of LOCATION_SYNC. Therefore, if LOCATION_SYNC is set for this field, all location group asset sets are not allowed to be linked to this campaign, and all Location Extension (LE) and Affiliate Location Extensions (ALE) will not be served under this campaign. Only LOCATION_SYNC is currently supported.

§url_expansion_opt_out: Option<bool>

Represents opting out of URL expansion to more targeted URLs. If opted out (true), only the final URLs in the asset group or URLs specified in the advertiser’s Google Merchant Center or business data feeds are targeted. If opted in (false), the entire domain will be targeted. This field can only be set for Performance Max campaigns, where the default value is false.

§performance_max_upgrade: Option<PerformanceMaxUpgrade>

Output only. Information about campaigns being upgraded to Performance Max.

§hotel_property_asset_set: Option<String>

Immutable. The set of hotel properties for Performance Max for travel goals campaigns.

§listing_type: Option<i32>

Immutable. Listing type of ads served for this campaign. Field is restricted for usage with Performance Max campaigns.

§asset_automation_settings: Vec<AssetAutomationSetting>

Contains the opt-in/out status of each AssetAutomationType. See documentation of each asset automation type enum for default opt in/out behavior.

§keyword_match_type: i32

Keyword match type of Campaign. Set to BROAD to set broad matching for all keywords in a campaign.

§campaign_bidding_strategy: Option<CampaignBiddingStrategy>

The bidding strategy for the campaign.

Must be either portfolio (created through BiddingStrategy service) or standard, that is embedded into the campaign.

Implementations§

source§

impl Campaign

source

pub fn status(&self) -> CampaignStatus

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

Sets status to the provided enum value.

source

pub fn ad_serving_optimization_status(&self) -> AdServingOptimizationStatus

Returns the enum value of ad_serving_optimization_status, or the default if the field is set to an invalid enum value.

source

pub fn set_ad_serving_optimization_status( &mut self, value: AdServingOptimizationStatus, )

Sets ad_serving_optimization_status to the provided enum value.

source

pub fn advertising_channel_type(&self) -> AdvertisingChannelType

Returns the enum value of advertising_channel_type, or the default if the field is set to an invalid enum value.

source

pub fn set_advertising_channel_type(&mut self, value: AdvertisingChannelType)

Sets advertising_channel_type to the provided enum value.

source

pub fn advertising_channel_sub_type(&self) -> AdvertisingChannelSubType

Returns the enum value of advertising_channel_sub_type, or the default if the field is set to an invalid enum value.

source

pub fn set_advertising_channel_sub_type( &mut self, value: AdvertisingChannelSubType, )

Sets advertising_channel_sub_type to the provided enum value.

source

pub fn experiment_type(&self) -> CampaignExperimentType

Returns the enum value of experiment_type, or the default if the field is set to an invalid enum value.

source

pub fn set_experiment_type(&mut self, value: CampaignExperimentType)

Sets experiment_type to the provided enum value.

source

pub fn serving_status(&self) -> CampaignServingStatus

Returns the enum value of serving_status, or the default if the field is set to an invalid enum value.

source

pub fn set_serving_status(&mut self, value: CampaignServingStatus)

Sets serving_status to the provided enum value.

source

pub fn bidding_strategy_type(&self) -> BiddingStrategyType

Returns the enum value of bidding_strategy_type, or the default if the field is set to an invalid enum value.

source

pub fn set_bidding_strategy_type(&mut self, value: BiddingStrategyType)

Sets bidding_strategy_type to the provided enum value.

source

pub fn video_brand_safety_suitability(&self) -> BrandSafetySuitability

Returns the enum value of video_brand_safety_suitability, or the default if the field is set to an invalid enum value.

source

pub fn set_video_brand_safety_suitability( &mut self, value: BrandSafetySuitability, )

Sets video_brand_safety_suitability to the provided enum value.

source

pub fn payment_mode(&self) -> PaymentMode

Returns the enum value of payment_mode, or the default if the field is set to an invalid enum value.

source

pub fn set_payment_mode(&mut self, value: PaymentMode)

Sets payment_mode to the provided enum value.

source

pub fn base_campaign(&self) -> &str

Returns the value of base_campaign, or the default value if base_campaign is unset.

source

pub fn name(&self) -> &str

Returns the value of name, or the default value if name is unset.

source

pub fn id(&self) -> i64

Returns the value of id, or the default value if id is unset.

source

pub fn tracking_url_template(&self) -> &str

Returns the value of tracking_url_template, or the default value if tracking_url_template is unset.

source

pub fn campaign_budget(&self) -> &str

Returns the value of campaign_budget, or the default value if campaign_budget is unset.

source

pub fn start_date(&self) -> &str

Returns the value of start_date, or the default value if start_date is unset.

source

pub fn end_date(&self) -> &str

Returns the value of end_date, or the default value if end_date is unset.

source

pub fn final_url_suffix(&self) -> &str

Returns the value of final_url_suffix, or the default value if final_url_suffix is unset.

source

pub fn optimization_score(&self) -> f64

Returns the value of optimization_score, or the default value if optimization_score is unset.

source

pub fn excluded_parent_asset_field_types( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<AssetFieldType>>

Returns an iterator which yields the valid enum values contained in excluded_parent_asset_field_types.

source

pub fn push_excluded_parent_asset_field_types(&mut self, value: AssetFieldType)

Appends the provided enum value to excluded_parent_asset_field_types.

source

pub fn url_expansion_opt_out(&self) -> bool

Returns the value of url_expansion_opt_out, or the default value if url_expansion_opt_out is unset.

source

pub fn campaign_group(&self) -> &str

Returns the value of campaign_group, or the default value if campaign_group is unset.

source

pub fn bidding_strategy_system_status(&self) -> BiddingStrategySystemStatus

Returns the enum value of bidding_strategy_system_status, or the default if the field is set to an invalid enum value.

source

pub fn set_bidding_strategy_system_status( &mut self, value: BiddingStrategySystemStatus, )

Sets bidding_strategy_system_status to the provided enum value.

source

pub fn excluded_parent_asset_set_types( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<AssetSetType>>

Returns an iterator which yields the valid enum values contained in excluded_parent_asset_set_types.

source

pub fn push_excluded_parent_asset_set_types(&mut self, value: AssetSetType)

Appends the provided enum value to excluded_parent_asset_set_types.

source

pub fn primary_status(&self) -> CampaignPrimaryStatus

Returns the enum value of primary_status, or the default if the field is set to an invalid enum value.

source

pub fn set_primary_status(&mut self, value: CampaignPrimaryStatus)

Sets primary_status to the provided enum value.

source

pub fn primary_status_reasons( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<CampaignPrimaryStatusReason>>

Returns an iterator which yields the valid enum values contained in primary_status_reasons.

source

pub fn push_primary_status_reasons( &mut self, value: CampaignPrimaryStatusReason, )

Appends the provided enum value to primary_status_reasons.

source

pub fn hotel_property_asset_set(&self) -> &str

Returns the value of hotel_property_asset_set, or the default value if hotel_property_asset_set is unset.

source

pub fn listing_type(&self) -> ListingType

Returns the enum value of listing_type, or the default if the field is unset or set to an invalid enum value.

source

pub fn set_listing_type(&mut self, value: ListingType)

Sets listing_type to the provided enum value.

source

pub fn keyword_match_type(&self) -> CampaignKeywordMatchType

Returns the enum value of keyword_match_type, or the default if the field is set to an invalid enum value.

source

pub fn set_keyword_match_type(&mut self, value: CampaignKeywordMatchType)

Sets keyword_match_type to the provided enum value.

Trait Implementations§

source§

impl Clone for Campaign

source§

fn clone(&self) -> Campaign

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 Campaign

source§

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

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

impl Default for Campaign

source§

fn default() -> Self

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

impl Message for Campaign

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 Campaign

source§

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

Auto Trait Implementations§

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