feed.proto 7.6 KB

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