feed_mapping.proto 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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/enums/ad_customizer_placeholder_field.proto";
  17. import "google/ads/googleads/v8/enums/affiliate_location_placeholder_field.proto";
  18. import "google/ads/googleads/v8/enums/app_placeholder_field.proto";
  19. import "google/ads/googleads/v8/enums/call_placeholder_field.proto";
  20. import "google/ads/googleads/v8/enums/callout_placeholder_field.proto";
  21. import "google/ads/googleads/v8/enums/custom_placeholder_field.proto";
  22. import "google/ads/googleads/v8/enums/dsa_page_feed_criterion_field.proto";
  23. import "google/ads/googleads/v8/enums/education_placeholder_field.proto";
  24. import "google/ads/googleads/v8/enums/feed_mapping_criterion_type.proto";
  25. import "google/ads/googleads/v8/enums/feed_mapping_status.proto";
  26. import "google/ads/googleads/v8/enums/flight_placeholder_field.proto";
  27. import "google/ads/googleads/v8/enums/hotel_placeholder_field.proto";
  28. import "google/ads/googleads/v8/enums/image_placeholder_field.proto";
  29. import "google/ads/googleads/v8/enums/job_placeholder_field.proto";
  30. import "google/ads/googleads/v8/enums/local_placeholder_field.proto";
  31. import "google/ads/googleads/v8/enums/location_extension_targeting_criterion_field.proto";
  32. import "google/ads/googleads/v8/enums/location_placeholder_field.proto";
  33. import "google/ads/googleads/v8/enums/message_placeholder_field.proto";
  34. import "google/ads/googleads/v8/enums/placeholder_type.proto";
  35. import "google/ads/googleads/v8/enums/price_placeholder_field.proto";
  36. import "google/ads/googleads/v8/enums/promotion_placeholder_field.proto";
  37. import "google/ads/googleads/v8/enums/real_estate_placeholder_field.proto";
  38. import "google/ads/googleads/v8/enums/sitelink_placeholder_field.proto";
  39. import "google/ads/googleads/v8/enums/structured_snippet_placeholder_field.proto";
  40. import "google/ads/googleads/v8/enums/travel_placeholder_field.proto";
  41. import "google/api/field_behavior.proto";
  42. import "google/api/resource.proto";
  43. import "google/api/annotations.proto";
  44. option csharp_namespace = "Google.Ads.GoogleAds.V8.Resources";
  45. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v8/resources;resources";
  46. option java_multiple_files = true;
  47. option java_outer_classname = "FeedMappingProto";
  48. option java_package = "com.google.ads.googleads.v8.resources";
  49. option objc_class_prefix = "GAA";
  50. option php_namespace = "Google\\Ads\\GoogleAds\\V8\\Resources";
  51. option ruby_package = "Google::Ads::GoogleAds::V8::Resources";
  52. // Proto file describing the FeedMapping resource.
  53. // A feed mapping.
  54. message FeedMapping {
  55. option (google.api.resource) = {
  56. type: "googleads.googleapis.com/FeedMapping"
  57. pattern: "customers/{customer_id}/feedMappings/{feed_id}~{feed_mapping_id}"
  58. };
  59. // Immutable. The resource name of the feed mapping.
  60. // Feed mapping resource names have the form:
  61. //
  62. // `customers/{customer_id}/feedMappings/{feed_id}~{feed_mapping_id}`
  63. string resource_name = 1 [
  64. (google.api.field_behavior) = IMMUTABLE,
  65. (google.api.resource_reference) = {
  66. type: "googleads.googleapis.com/FeedMapping"
  67. }
  68. ];
  69. // Immutable. The feed of this feed mapping.
  70. optional string feed = 7 [
  71. (google.api.field_behavior) = IMMUTABLE,
  72. (google.api.resource_reference) = {
  73. type: "googleads.googleapis.com/Feed"
  74. }
  75. ];
  76. // Immutable. Feed attributes to field mappings. These mappings are a one-to-many
  77. // relationship meaning that 1 feed attribute can be used to populate
  78. // multiple placeholder fields, but 1 placeholder field can only draw
  79. // data from 1 feed attribute. Ad Customizer is an exception, 1 placeholder
  80. // field can be mapped to multiple feed attributes. Required.
  81. repeated AttributeFieldMapping attribute_field_mappings = 5 [(google.api.field_behavior) = IMMUTABLE];
  82. // Output only. Status of the feed mapping.
  83. // This field is read-only.
  84. google.ads.googleads.v8.enums.FeedMappingStatusEnum.FeedMappingStatus status = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  85. // Feed mapping target. Can be either a placeholder or a criterion. For a
  86. // given feed, the active FeedMappings must have unique targets. Required.
  87. oneof target {
  88. // Immutable. The placeholder type of this mapping (i.e., if the mapping maps feed
  89. // attributes to placeholder fields).
  90. google.ads.googleads.v8.enums.PlaceholderTypeEnum.PlaceholderType placeholder_type = 3 [(google.api.field_behavior) = IMMUTABLE];
  91. // Immutable. The criterion type of this mapping (i.e., if the mapping maps feed
  92. // attributes to criterion fields).
  93. google.ads.googleads.v8.enums.FeedMappingCriterionTypeEnum.FeedMappingCriterionType criterion_type = 4 [(google.api.field_behavior) = IMMUTABLE];
  94. }
  95. }
  96. // Maps from feed attribute id to a placeholder or criterion field id.
  97. message AttributeFieldMapping {
  98. // Immutable. Feed attribute from which to map.
  99. optional int64 feed_attribute_id = 24 [(google.api.field_behavior) = IMMUTABLE];
  100. // Output only. The placeholder field ID. If a placeholder field enum is not published in
  101. // the current API version, then this field will be populated and the field
  102. // oneof will be empty.
  103. // This field is read-only.
  104. optional int64 field_id = 25 [(google.api.field_behavior) = OUTPUT_ONLY];
  105. // Placeholder or criterion field to be populated using data from
  106. // the above feed attribute. Required.
  107. oneof field {
  108. // Immutable. Sitelink Placeholder Fields.
  109. google.ads.googleads.v8.enums.SitelinkPlaceholderFieldEnum.SitelinkPlaceholderField sitelink_field = 3 [(google.api.field_behavior) = IMMUTABLE];
  110. // Immutable. Call Placeholder Fields.
  111. google.ads.googleads.v8.enums.CallPlaceholderFieldEnum.CallPlaceholderField call_field = 4 [(google.api.field_behavior) = IMMUTABLE];
  112. // Immutable. App Placeholder Fields.
  113. google.ads.googleads.v8.enums.AppPlaceholderFieldEnum.AppPlaceholderField app_field = 5 [(google.api.field_behavior) = IMMUTABLE];
  114. // Output only. Location Placeholder Fields. This field is read-only.
  115. google.ads.googleads.v8.enums.LocationPlaceholderFieldEnum.LocationPlaceholderField location_field = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  116. // Output only. Affiliate Location Placeholder Fields. This field is read-only.
  117. google.ads.googleads.v8.enums.AffiliateLocationPlaceholderFieldEnum.AffiliateLocationPlaceholderField affiliate_location_field = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  118. // Immutable. Callout Placeholder Fields.
  119. google.ads.googleads.v8.enums.CalloutPlaceholderFieldEnum.CalloutPlaceholderField callout_field = 8 [(google.api.field_behavior) = IMMUTABLE];
  120. // Immutable. Structured Snippet Placeholder Fields.
  121. google.ads.googleads.v8.enums.StructuredSnippetPlaceholderFieldEnum.StructuredSnippetPlaceholderField structured_snippet_field = 9 [(google.api.field_behavior) = IMMUTABLE];
  122. // Immutable. Message Placeholder Fields.
  123. google.ads.googleads.v8.enums.MessagePlaceholderFieldEnum.MessagePlaceholderField message_field = 10 [(google.api.field_behavior) = IMMUTABLE];
  124. // Immutable. Price Placeholder Fields.
  125. google.ads.googleads.v8.enums.PricePlaceholderFieldEnum.PricePlaceholderField price_field = 11 [(google.api.field_behavior) = IMMUTABLE];
  126. // Immutable. Promotion Placeholder Fields.
  127. google.ads.googleads.v8.enums.PromotionPlaceholderFieldEnum.PromotionPlaceholderField promotion_field = 12 [(google.api.field_behavior) = IMMUTABLE];
  128. // Immutable. Ad Customizer Placeholder Fields
  129. google.ads.googleads.v8.enums.AdCustomizerPlaceholderFieldEnum.AdCustomizerPlaceholderField ad_customizer_field = 13 [(google.api.field_behavior) = IMMUTABLE];
  130. // Immutable. Dynamic Search Ad Page Feed Fields.
  131. google.ads.googleads.v8.enums.DsaPageFeedCriterionFieldEnum.DsaPageFeedCriterionField dsa_page_feed_field = 14 [(google.api.field_behavior) = IMMUTABLE];
  132. // Immutable. Location Target Fields.
  133. google.ads.googleads.v8.enums.LocationExtensionTargetingCriterionFieldEnum.LocationExtensionTargetingCriterionField location_extension_targeting_field = 15 [(google.api.field_behavior) = IMMUTABLE];
  134. // Immutable. Education Placeholder Fields
  135. google.ads.googleads.v8.enums.EducationPlaceholderFieldEnum.EducationPlaceholderField education_field = 16 [(google.api.field_behavior) = IMMUTABLE];
  136. // Immutable. Flight Placeholder Fields
  137. google.ads.googleads.v8.enums.FlightPlaceholderFieldEnum.FlightPlaceholderField flight_field = 17 [(google.api.field_behavior) = IMMUTABLE];
  138. // Immutable. Custom Placeholder Fields
  139. google.ads.googleads.v8.enums.CustomPlaceholderFieldEnum.CustomPlaceholderField custom_field = 18 [(google.api.field_behavior) = IMMUTABLE];
  140. // Immutable. Hotel Placeholder Fields
  141. google.ads.googleads.v8.enums.HotelPlaceholderFieldEnum.HotelPlaceholderField hotel_field = 19 [(google.api.field_behavior) = IMMUTABLE];
  142. // Immutable. Real Estate Placeholder Fields
  143. google.ads.googleads.v8.enums.RealEstatePlaceholderFieldEnum.RealEstatePlaceholderField real_estate_field = 20 [(google.api.field_behavior) = IMMUTABLE];
  144. // Immutable. Travel Placeholder Fields
  145. google.ads.googleads.v8.enums.TravelPlaceholderFieldEnum.TravelPlaceholderField travel_field = 21 [(google.api.field_behavior) = IMMUTABLE];
  146. // Immutable. Local Placeholder Fields
  147. google.ads.googleads.v8.enums.LocalPlaceholderFieldEnum.LocalPlaceholderField local_field = 22 [(google.api.field_behavior) = IMMUTABLE];
  148. // Immutable. Job Placeholder Fields
  149. google.ads.googleads.v8.enums.JobPlaceholderFieldEnum.JobPlaceholderField job_field = 23 [(google.api.field_behavior) = IMMUTABLE];
  150. // Immutable. Image Placeholder Fields
  151. google.ads.googleads.v8.enums.ImagePlaceholderFieldEnum.ImagePlaceholderField image_field = 26 [(google.api.field_behavior) = IMMUTABLE];
  152. }
  153. }