feed.proto 7.5 KB

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