ad.proto 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.ads.googleads.v12.resources;
  16. import "google/ads/googleads/v12/common/ad_type_infos.proto";
  17. import "google/ads/googleads/v12/common/custom_parameter.proto";
  18. import "google/ads/googleads/v12/common/final_app_url.proto";
  19. import "google/ads/googleads/v12/common/url_collection.proto";
  20. import "google/ads/googleads/v12/enums/ad_type.proto";
  21. import "google/ads/googleads/v12/enums/device.proto";
  22. import "google/ads/googleads/v12/enums/system_managed_entity_source.proto";
  23. import "google/api/field_behavior.proto";
  24. import "google/api/resource.proto";
  25. option csharp_namespace = "Google.Ads.GoogleAds.V12.Resources";
  26. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v12/resources;resources";
  27. option java_multiple_files = true;
  28. option java_outer_classname = "AdProto";
  29. option java_package = "com.google.ads.googleads.v12.resources";
  30. option objc_class_prefix = "GAA";
  31. option php_namespace = "Google\\Ads\\GoogleAds\\V12\\Resources";
  32. option ruby_package = "Google::Ads::GoogleAds::V12::Resources";
  33. // Proto file describing the ad type.
  34. // An ad.
  35. message Ad {
  36. option (google.api.resource) = {
  37. type: "googleads.googleapis.com/Ad"
  38. pattern: "customers/{customer_id}/ads/{ad_id}"
  39. };
  40. // Immutable. The resource name of the ad.
  41. // Ad resource names have the form:
  42. //
  43. // `customers/{customer_id}/ads/{ad_id}`
  44. string resource_name = 37 [
  45. (google.api.field_behavior) = IMMUTABLE,
  46. (google.api.resource_reference) = {
  47. type: "googleads.googleapis.com/Ad"
  48. }
  49. ];
  50. // Output only. The ID of the ad.
  51. optional int64 id = 40 [(google.api.field_behavior) = OUTPUT_ONLY];
  52. // The list of possible final URLs after all cross-domain redirects for the
  53. // ad.
  54. repeated string final_urls = 41;
  55. // A list of final app URLs that will be used on mobile if the user has the
  56. // specific app installed.
  57. repeated google.ads.googleads.v12.common.FinalAppUrl final_app_urls = 35;
  58. // The list of possible final mobile URLs after all cross-domain redirects
  59. // for the ad.
  60. repeated string final_mobile_urls = 42;
  61. // The URL template for constructing a tracking URL.
  62. optional string tracking_url_template = 43;
  63. // The suffix to use when constructing a final URL.
  64. optional string final_url_suffix = 44;
  65. // The list of mappings that can be used to substitute custom parameter tags
  66. // in a `tracking_url_template`, `final_urls`, or `mobile_final_urls`.
  67. // For mutates, use url custom parameter operations.
  68. repeated google.ads.googleads.v12.common.CustomParameter url_custom_parameters = 10;
  69. // The URL that appears in the ad description for some ad formats.
  70. optional string display_url = 45;
  71. // Output only. The type of ad.
  72. google.ads.googleads.v12.enums.AdTypeEnum.AdType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  73. // Output only. Indicates if this ad was automatically added by Google Ads and not by a
  74. // user. For example, this could happen when ads are automatically created as
  75. // suggestions for new ads based on knowledge of how existing ads are
  76. // performing.
  77. optional bool added_by_google_ads = 46 [(google.api.field_behavior) = OUTPUT_ONLY];
  78. // The device preference for the ad. You can only specify a preference for
  79. // mobile devices. When this preference is set the ad will be preferred over
  80. // other ads when being displayed on a mobile device. The ad can still be
  81. // displayed on other device types, for example, if no other ads are
  82. // available. If unspecified (no device preference), all devices are targeted.
  83. // This is only supported by some ad types.
  84. google.ads.googleads.v12.enums.DeviceEnum.Device device_preference = 20;
  85. // Additional URLs for the ad that are tagged with a unique identifier that
  86. // can be referenced from other fields in the ad.
  87. repeated google.ads.googleads.v12.common.UrlCollection url_collections = 26;
  88. // Immutable. The name of the ad. This is only used to be able to identify the ad. It
  89. // does not need to be unique and does not affect the served ad. The name
  90. // field is currently only supported for DisplayUploadAd, ImageAd,
  91. // ShoppingComparisonListingAd and VideoAd.
  92. optional string name = 47 [(google.api.field_behavior) = IMMUTABLE];
  93. // Output only. If this ad is system managed, then this field will indicate the source.
  94. // This field is read-only.
  95. google.ads.googleads.v12.enums.SystemManagedResourceSourceEnum.SystemManagedResourceSource system_managed_resource_source = 27 [(google.api.field_behavior) = OUTPUT_ONLY];
  96. // Details pertinent to the ad type. Exactly one value must be set.
  97. oneof ad_data {
  98. // Immutable. Details pertaining to a text ad.
  99. google.ads.googleads.v12.common.TextAdInfo text_ad = 6 [(google.api.field_behavior) = IMMUTABLE];
  100. // Details pertaining to an expanded text ad.
  101. google.ads.googleads.v12.common.ExpandedTextAdInfo expanded_text_ad = 7;
  102. // Details pertaining to a call ad.
  103. google.ads.googleads.v12.common.CallAdInfo call_ad = 49;
  104. // Immutable. Details pertaining to an Expanded Dynamic Search Ad.
  105. // This type of ad has its headline, final URLs, and display URL
  106. // auto-generated at serving time according to domain name specific
  107. // information provided by `dynamic_search_ads_setting` linked at the
  108. // campaign level.
  109. google.ads.googleads.v12.common.ExpandedDynamicSearchAdInfo expanded_dynamic_search_ad = 14 [(google.api.field_behavior) = IMMUTABLE];
  110. // Details pertaining to a hotel ad.
  111. google.ads.googleads.v12.common.HotelAdInfo hotel_ad = 15;
  112. // Details pertaining to a Smart Shopping ad.
  113. google.ads.googleads.v12.common.ShoppingSmartAdInfo shopping_smart_ad = 17;
  114. // Details pertaining to a Shopping product ad.
  115. google.ads.googleads.v12.common.ShoppingProductAdInfo shopping_product_ad = 18;
  116. // Immutable. Details pertaining to an Image ad.
  117. google.ads.googleads.v12.common.ImageAdInfo image_ad = 22 [(google.api.field_behavior) = IMMUTABLE];
  118. // Details pertaining to a Video ad.
  119. google.ads.googleads.v12.common.VideoAdInfo video_ad = 24;
  120. // Details pertaining to a Video responsive ad.
  121. google.ads.googleads.v12.common.VideoResponsiveAdInfo video_responsive_ad = 39;
  122. // Details pertaining to a responsive search ad.
  123. google.ads.googleads.v12.common.ResponsiveSearchAdInfo responsive_search_ad = 25;
  124. // Details pertaining to a legacy responsive display ad.
  125. google.ads.googleads.v12.common.LegacyResponsiveDisplayAdInfo legacy_responsive_display_ad = 28;
  126. // Details pertaining to an app ad.
  127. google.ads.googleads.v12.common.AppAdInfo app_ad = 29;
  128. // Immutable. Details pertaining to a legacy app install ad.
  129. google.ads.googleads.v12.common.LegacyAppInstallAdInfo legacy_app_install_ad = 30 [(google.api.field_behavior) = IMMUTABLE];
  130. // Details pertaining to a responsive display ad.
  131. google.ads.googleads.v12.common.ResponsiveDisplayAdInfo responsive_display_ad = 31;
  132. // Details pertaining to a local ad.
  133. google.ads.googleads.v12.common.LocalAdInfo local_ad = 32;
  134. // Details pertaining to a display upload ad.
  135. google.ads.googleads.v12.common.DisplayUploadAdInfo display_upload_ad = 33;
  136. // Details pertaining to an app engagement ad.
  137. google.ads.googleads.v12.common.AppEngagementAdInfo app_engagement_ad = 34;
  138. // Details pertaining to a Shopping Comparison Listing ad.
  139. google.ads.googleads.v12.common.ShoppingComparisonListingAdInfo shopping_comparison_listing_ad = 36;
  140. // Details pertaining to a Smart campaign ad.
  141. google.ads.googleads.v12.common.SmartCampaignAdInfo smart_campaign_ad = 48;
  142. // Details pertaining to an app pre-registration ad.
  143. google.ads.googleads.v12.common.AppPreRegistrationAdInfo app_pre_registration_ad = 50;
  144. // Details pertaining to a discovery multi asset ad.
  145. google.ads.googleads.v12.common.DiscoveryMultiAssetAdInfo discovery_multi_asset_ad = 51;
  146. // Details pertaining to a discovery carousel ad.
  147. google.ads.googleads.v12.common.DiscoveryCarouselAdInfo discovery_carousel_ad = 52;
  148. }
  149. }