xref: /aosp_15_r20/external/googleapis/google/ads/googleads/v16/resources/ad.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.ads.googleads.v16.resources;
18
19import "google/ads/googleads/v16/common/ad_type_infos.proto";
20import "google/ads/googleads/v16/common/custom_parameter.proto";
21import "google/ads/googleads/v16/common/final_app_url.proto";
22import "google/ads/googleads/v16/common/url_collection.proto";
23import "google/ads/googleads/v16/enums/ad_type.proto";
24import "google/ads/googleads/v16/enums/device.proto";
25import "google/ads/googleads/v16/enums/system_managed_entity_source.proto";
26import "google/api/field_behavior.proto";
27import "google/api/resource.proto";
28
29option csharp_namespace = "Google.Ads.GoogleAds.V16.Resources";
30option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v16/resources;resources";
31option java_multiple_files = true;
32option java_outer_classname = "AdProto";
33option java_package = "com.google.ads.googleads.v16.resources";
34option objc_class_prefix = "GAA";
35option php_namespace = "Google\\Ads\\GoogleAds\\V16\\Resources";
36option ruby_package = "Google::Ads::GoogleAds::V16::Resources";
37
38// Proto file describing the ad type.
39
40// An ad.
41message Ad {
42  option (google.api.resource) = {
43    type: "googleads.googleapis.com/Ad"
44    pattern: "customers/{customer_id}/ads/{ad_id}"
45  };
46
47  // Immutable. The resource name of the ad.
48  // Ad resource names have the form:
49  //
50  // `customers/{customer_id}/ads/{ad_id}`
51  string resource_name = 37 [
52    (google.api.field_behavior) = IMMUTABLE,
53    (google.api.resource_reference) = { type: "googleads.googleapis.com/Ad" }
54  ];
55
56  // Output only. The ID of the ad.
57  optional int64 id = 40 [(google.api.field_behavior) = OUTPUT_ONLY];
58
59  // The list of possible final URLs after all cross-domain redirects for the
60  // ad.
61  repeated string final_urls = 41;
62
63  // A list of final app URLs that will be used on mobile if the user has the
64  // specific app installed.
65  repeated google.ads.googleads.v16.common.FinalAppUrl final_app_urls = 35;
66
67  // The list of possible final mobile URLs after all cross-domain redirects
68  // for the ad.
69  repeated string final_mobile_urls = 42;
70
71  // The URL template for constructing a tracking URL.
72  optional string tracking_url_template = 43;
73
74  // The suffix to use when constructing a final URL.
75  optional string final_url_suffix = 44;
76
77  // The list of mappings that can be used to substitute custom parameter tags
78  // in a `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
79  // For mutates, use url custom parameter operations.
80  repeated google.ads.googleads.v16.common.CustomParameter
81      url_custom_parameters = 10;
82
83  // The URL that appears in the ad description for some ad formats.
84  optional string display_url = 45;
85
86  // Output only. The type of ad.
87  google.ads.googleads.v16.enums.AdTypeEnum.AdType type = 5
88      [(google.api.field_behavior) = OUTPUT_ONLY];
89
90  // Output only. Indicates if this ad was automatically added by Google Ads and
91  // not by a user. For example, this could happen when ads are automatically
92  // created as suggestions for new ads based on knowledge of how existing ads
93  // are performing.
94  optional bool added_by_google_ads = 46
95      [(google.api.field_behavior) = OUTPUT_ONLY];
96
97  // The device preference for the ad. You can only specify a preference for
98  // mobile devices. When this preference is set the ad will be preferred over
99  // other ads when being displayed on a mobile device. The ad can still be
100  // displayed on other device types, for example, if no other ads are
101  // available. If unspecified (no device preference), all devices are targeted.
102  // This is only supported by some ad types.
103  google.ads.googleads.v16.enums.DeviceEnum.Device device_preference = 20;
104
105  // Additional URLs for the ad that are tagged with a unique identifier that
106  // can be referenced from other fields in the ad.
107  repeated google.ads.googleads.v16.common.UrlCollection url_collections = 26;
108
109  // Immutable. The name of the ad. This is only used to be able to identify the
110  // ad. It does not need to be unique and does not affect the served ad. The
111  // name field is currently only supported for DisplayUploadAd, ImageAd,
112  // ShoppingComparisonListingAd and VideoAd.
113  optional string name = 47 [(google.api.field_behavior) = IMMUTABLE];
114
115  // Output only. If this ad is system managed, then this field will indicate
116  // the source. This field is read-only.
117  google.ads.googleads.v16.enums.SystemManagedResourceSourceEnum
118      .SystemManagedResourceSource system_managed_resource_source = 27
119      [(google.api.field_behavior) = OUTPUT_ONLY];
120
121  // Details pertinent to the ad type. Exactly one value must be set.
122  oneof ad_data {
123    // Immutable. Details pertaining to a text ad.
124    google.ads.googleads.v16.common.TextAdInfo text_ad = 6
125        [(google.api.field_behavior) = IMMUTABLE];
126
127    // Details pertaining to an expanded text ad.
128    google.ads.googleads.v16.common.ExpandedTextAdInfo expanded_text_ad = 7;
129
130    // Details pertaining to a call ad.
131    google.ads.googleads.v16.common.CallAdInfo call_ad = 49;
132
133    // Immutable. Details pertaining to an Expanded Dynamic Search Ad.
134    // This type of ad has its headline, final URLs, and display URL
135    // auto-generated at serving time according to domain name specific
136    // information provided by `dynamic_search_ads_setting` linked at the
137    // campaign level.
138    google.ads.googleads.v16.common.ExpandedDynamicSearchAdInfo
139        expanded_dynamic_search_ad = 14
140        [(google.api.field_behavior) = IMMUTABLE];
141
142    // Details pertaining to a hotel ad.
143    google.ads.googleads.v16.common.HotelAdInfo hotel_ad = 15;
144
145    // Details pertaining to a Smart Shopping ad.
146    google.ads.googleads.v16.common.ShoppingSmartAdInfo shopping_smart_ad = 17;
147
148    // Details pertaining to a Shopping product ad.
149    google.ads.googleads.v16.common.ShoppingProductAdInfo shopping_product_ad =
150        18;
151
152    // Immutable. Details pertaining to an Image ad.
153    google.ads.googleads.v16.common.ImageAdInfo image_ad = 22
154        [(google.api.field_behavior) = IMMUTABLE];
155
156    // Details pertaining to a Video ad.
157    google.ads.googleads.v16.common.VideoAdInfo video_ad = 24;
158
159    // Details pertaining to a Video responsive ad.
160    google.ads.googleads.v16.common.VideoResponsiveAdInfo video_responsive_ad =
161        39;
162
163    // Details pertaining to a responsive search ad.
164    google.ads.googleads.v16.common.ResponsiveSearchAdInfo
165        responsive_search_ad = 25;
166
167    // Details pertaining to a legacy responsive display ad.
168    google.ads.googleads.v16.common.LegacyResponsiveDisplayAdInfo
169        legacy_responsive_display_ad = 28;
170
171    // Details pertaining to an app ad.
172    google.ads.googleads.v16.common.AppAdInfo app_ad = 29;
173
174    // Immutable. Details pertaining to a legacy app install ad.
175    google.ads.googleads.v16.common.LegacyAppInstallAdInfo
176        legacy_app_install_ad = 30 [(google.api.field_behavior) = IMMUTABLE];
177
178    // Details pertaining to a responsive display ad.
179    google.ads.googleads.v16.common.ResponsiveDisplayAdInfo
180        responsive_display_ad = 31;
181
182    // Details pertaining to a local ad.
183    google.ads.googleads.v16.common.LocalAdInfo local_ad = 32;
184
185    // Details pertaining to a display upload ad.
186    google.ads.googleads.v16.common.DisplayUploadAdInfo display_upload_ad = 33;
187
188    // Details pertaining to an app engagement ad.
189    google.ads.googleads.v16.common.AppEngagementAdInfo app_engagement_ad = 34;
190
191    // Details pertaining to a Shopping Comparison Listing ad.
192    google.ads.googleads.v16.common.ShoppingComparisonListingAdInfo
193        shopping_comparison_listing_ad = 36;
194
195    // Details pertaining to a Smart campaign ad.
196    google.ads.googleads.v16.common.SmartCampaignAdInfo smart_campaign_ad = 48;
197
198    // Details pertaining to an app pre-registration ad.
199    google.ads.googleads.v16.common.AppPreRegistrationAdInfo
200        app_pre_registration_ad = 50;
201
202    // Details pertaining to a discovery multi asset ad.
203    google.ads.googleads.v16.common.DiscoveryMultiAssetAdInfo
204        discovery_multi_asset_ad = 51;
205
206    // Details pertaining to a discovery carousel ad.
207    google.ads.googleads.v16.common.DiscoveryCarouselAdInfo
208        discovery_carousel_ad = 52;
209
210    // Details pertaining to a discovery video responsive ad.
211    google.ads.googleads.v16.common.DiscoveryVideoResponsiveAdInfo
212        discovery_video_responsive_ad = 60;
213
214    // Details pertaining to a Demand Gen product ad.
215    google.ads.googleads.v16.common.DemandGenProductAdInfo
216        demand_gen_product_ad = 61;
217
218    // Details pertaining to a travel ad.
219    google.ads.googleads.v16.common.TravelAdInfo travel_ad = 54;
220  }
221}
222