ad.proto 8.2 KB

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