xref: /aosp_15_r20/external/googleapis/google/ads/googleads/v14/resources/feed.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/affiliate_location_feed_relationship_type.proto";
20import "google/ads/googleads/v14/enums/feed_attribute_type.proto";
21import "google/ads/googleads/v14/enums/feed_origin.proto";
22import "google/ads/googleads/v14/enums/feed_status.proto";
23import "google/api/field_behavior.proto";
24import "google/api/resource.proto";
25
26option csharp_namespace = "Google.Ads.GoogleAds.V14.Resources";
27option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v14/resources;resources";
28option java_multiple_files = true;
29option java_outer_classname = "FeedProto";
30option java_package = "com.google.ads.googleads.v14.resources";
31option objc_class_prefix = "GAA";
32option php_namespace = "Google\\Ads\\GoogleAds\\V14\\Resources";
33option ruby_package = "Google::Ads::GoogleAds::V14::Resources";
34
35// Proto file describing the Feed resource.
36
37// A feed.
38message Feed {
39  option (google.api.resource) = {
40    type: "googleads.googleapis.com/Feed"
41    pattern: "customers/{customer_id}/feeds/{feed_id}"
42  };
43
44  // Data used to configure a location feed populated from Business Profile.
45  message PlacesLocationFeedData {
46    // Data used for authorization using OAuth.
47    message OAuthInfo {
48      // The HTTP method used to obtain authorization.
49      optional string http_method = 4;
50
51      // The HTTP request URL used to obtain authorization.
52      optional string http_request_url = 5;
53
54      // The HTTP authorization header used to obtain authorization.
55      optional string http_authorization_header = 6;
56    }
57
58    // Immutable. Required authentication token (from OAuth API) for the email.
59    // This field can only be specified in a create request. All its subfields
60    // are not selectable.
61    OAuthInfo oauth_info = 1 [(google.api.field_behavior) = IMMUTABLE];
62
63    // Email address of a Business Profile or email address of a
64    // manager of the Business Profile. Required.
65    optional string email_address = 7;
66
67    // Plus page ID of the managed business whose locations should be used. If
68    // this field is not set, then all businesses accessible by the user
69    // (specified by email_address) are used.
70    // This field is mutate-only and is not selectable.
71    string business_account_id = 8;
72
73    // Used to filter Business Profile listings by business name. If
74    // business_name_filter is set, only listings with a matching business name
75    // are candidates to be sync'd into FeedItems.
76    optional string business_name_filter = 9;
77
78    // Used to filter Business Profile listings by categories. If entries
79    // exist in category_filters, only listings that belong to any of the
80    // categories are candidates to be sync'd into FeedItems. If no entries
81    // exist in category_filters, then all listings are candidates for syncing.
82    repeated string category_filters = 11;
83
84    // Used to filter Business Profile listings by labels. If entries exist in
85    // label_filters, only listings that has any of the labels set are
86    // candidates to be synchronized into FeedItems. If no entries exist in
87    // label_filters, then all listings are candidates for syncing.
88    repeated string label_filters = 12;
89  }
90
91  // Data used to configure an affiliate location feed populated with the
92  // specified chains.
93  message AffiliateLocationFeedData {
94    // The list of chains that the affiliate location feed will sync the
95    // locations from.
96    repeated int64 chain_ids = 3;
97
98    // The relationship the chains have with the advertiser.
99    google.ads.googleads.v14.enums.AffiliateLocationFeedRelationshipTypeEnum
100        .AffiliateLocationFeedRelationshipType relationship_type = 2;
101  }
102
103  // Immutable. The resource name of the feed.
104  // Feed resource names have the form:
105  //
106  // `customers/{customer_id}/feeds/{feed_id}`
107  string resource_name = 1 [
108    (google.api.field_behavior) = IMMUTABLE,
109    (google.api.resource_reference) = { type: "googleads.googleapis.com/Feed" }
110  ];
111
112  // Output only. The ID of the feed.
113  // This field is read-only.
114  optional int64 id = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
115
116  // Immutable. Name of the feed. Required.
117  optional string name = 12 [(google.api.field_behavior) = IMMUTABLE];
118
119  // The Feed's attributes. Required on CREATE, unless
120  // system_feed_generation_data is provided, in which case Google Ads will
121  // update the feed with the correct attributes.
122  // Disallowed on UPDATE. Use attribute_operations to add new attributes.
123  repeated FeedAttribute attributes = 4;
124
125  // The list of operations changing the feed attributes. Attributes can only
126  // be added, not removed.
127  repeated FeedAttributeOperation attribute_operations = 9;
128
129  // Immutable. Specifies who manages the FeedAttributes for the Feed.
130  google.ads.googleads.v14.enums.FeedOriginEnum.FeedOrigin origin = 5
131      [(google.api.field_behavior) = IMMUTABLE];
132
133  // Output only. Status of the feed.
134  // This field is read-only.
135  google.ads.googleads.v14.enums.FeedStatusEnum.FeedStatus status = 8
136      [(google.api.field_behavior) = OUTPUT_ONLY];
137
138  // The system data for the Feed. This data specifies information for
139  // generating the feed items of the system generated feed.
140  oneof system_feed_generation_data {
141    // Data used to configure a location feed populated from Business Profile.
142    PlacesLocationFeedData places_location_feed_data = 6;
143
144    // Data used to configure an affiliate location feed populated with
145    // the specified chains.
146    AffiliateLocationFeedData affiliate_location_feed_data = 7;
147  }
148}
149
150// FeedAttributes define the types of data expected to be present in a Feed. A
151// single FeedAttribute specifies the expected type of the FeedItemAttributes
152// with the same FeedAttributeId. Optionally, a FeedAttribute can be marked as
153// being part of a FeedItem's unique key.
154message FeedAttribute {
155  // ID of the attribute.
156  optional int64 id = 5;
157
158  // The name of the attribute. Required.
159  optional string name = 6;
160
161  // Data type for feed attribute. Required.
162  google.ads.googleads.v14.enums.FeedAttributeTypeEnum.FeedAttributeType type =
163      3;
164
165  // Indicates that data corresponding to this attribute is part of a
166  // FeedItem's unique key. It defaults to false if it is unspecified. Note
167  // that a unique key is not required in a Feed's schema, in which case the
168  // FeedItems must be referenced by their feed_item_id.
169  optional bool is_part_of_key = 7;
170}
171
172// Operation to be performed on a feed attribute list in a mutate.
173message FeedAttributeOperation {
174  // The operator.
175  enum Operator {
176    // Unspecified.
177    UNSPECIFIED = 0;
178
179    // Used for return value only. Represents value unknown in this version.
180    UNKNOWN = 1;
181
182    // Add the attribute to the existing attributes.
183    ADD = 2;
184  }
185
186  // Output only. Type of list operation to perform.
187  Operator operator = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
188
189  // Output only. The feed attribute being added to the list.
190  FeedAttribute value = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
191}
192