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