change_event.proto 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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.v10.resources;
  16. import "google/ads/googleads/v10/enums/change_client_type.proto";
  17. import "google/ads/googleads/v10/enums/change_event_resource_type.proto";
  18. import "google/ads/googleads/v10/enums/resource_change_operation.proto";
  19. import "google/ads/googleads/v10/resources/ad.proto";
  20. import "google/ads/googleads/v10/resources/ad_group.proto";
  21. import "google/ads/googleads/v10/resources/ad_group_ad.proto";
  22. import "google/ads/googleads/v10/resources/ad_group_asset.proto";
  23. import "google/ads/googleads/v10/resources/ad_group_bid_modifier.proto";
  24. import "google/ads/googleads/v10/resources/ad_group_criterion.proto";
  25. import "google/ads/googleads/v10/resources/ad_group_feed.proto";
  26. import "google/ads/googleads/v10/resources/asset.proto";
  27. import "google/ads/googleads/v10/resources/asset_set.proto";
  28. import "google/ads/googleads/v10/resources/asset_set_asset.proto";
  29. import "google/ads/googleads/v10/resources/campaign.proto";
  30. import "google/ads/googleads/v10/resources/campaign_asset.proto";
  31. import "google/ads/googleads/v10/resources/campaign_asset_set.proto";
  32. import "google/ads/googleads/v10/resources/campaign_budget.proto";
  33. import "google/ads/googleads/v10/resources/campaign_criterion.proto";
  34. import "google/ads/googleads/v10/resources/campaign_feed.proto";
  35. import "google/ads/googleads/v10/resources/customer_asset.proto";
  36. import "google/ads/googleads/v10/resources/feed.proto";
  37. import "google/ads/googleads/v10/resources/feed_item.proto";
  38. import "google/api/field_behavior.proto";
  39. import "google/api/resource.proto";
  40. import "google/protobuf/field_mask.proto";
  41. option csharp_namespace = "Google.Ads.GoogleAds.V10.Resources";
  42. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/resources;resources";
  43. option java_multiple_files = true;
  44. option java_outer_classname = "ChangeEventProto";
  45. option java_package = "com.google.ads.googleads.v10.resources";
  46. option objc_class_prefix = "GAA";
  47. option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Resources";
  48. option ruby_package = "Google::Ads::GoogleAds::V10::Resources";
  49. // Proto file describing the Change Event resource.
  50. // Describes the granular change of returned resource of certain resource types.
  51. // Changes made through UI, API and new versions of Editor
  52. // by external users (including external users, and internal users that can be
  53. // shown externally) in the past 30 days will be shown. The change shows the old
  54. // values of the changed fields before the change and the new values right after
  55. // the change. ChangeEvent could have up to 3 minutes delay to reflect a new
  56. // change.
  57. message ChangeEvent {
  58. option (google.api.resource) = {
  59. type: "googleads.googleapis.com/ChangeEvent"
  60. pattern: "customers/{customer_id}/changeEvents/{timestamp_micros}~{command_index}~{mutate_index}"
  61. };
  62. // A wrapper proto presenting all supported resources.
  63. // Only the resource of the change_resource_type will be set.
  64. message ChangedResource {
  65. // Output only. Set if change_resource_type == AD.
  66. Ad ad = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  67. // Output only. Set if change_resource_type == AD_GROUP.
  68. AdGroup ad_group = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  69. // Output only. Set if change_resource_type == AD_GROUP_CRITERION.
  70. AdGroupCriterion ad_group_criterion = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  71. // Output only. Set if change_resource_type == CAMPAIGN.
  72. Campaign campaign = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  73. // Output only. Set if change_resource_type == CAMPAIGN_BUDGET.
  74. CampaignBudget campaign_budget = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  75. // Output only. Set if change_resource_type == AD_GROUP_BID_MODIFIER.
  76. AdGroupBidModifier ad_group_bid_modifier = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  77. // Output only. Set if change_resource_type == CAMPAIGN_CRITERION.
  78. CampaignCriterion campaign_criterion = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  79. // Output only. Set if change_resource_type == FEED.
  80. Feed feed = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  81. // Output only. Set if change_resource_type == FEED_ITEM.
  82. FeedItem feed_item = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  83. // Output only. Set if change_resource_type == CAMPAIGN_FEED.
  84. CampaignFeed campaign_feed = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  85. // Output only. Set if change_resource_type == AD_GROUP_FEED.
  86. AdGroupFeed ad_group_feed = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  87. // Output only. Set if change_resource_type == AD_GROUP_AD.
  88. AdGroupAd ad_group_ad = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  89. // Output only. Set if change_resource_type == ASSET.
  90. Asset asset = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  91. // Output only. Set if change_resource_type == CUSTOMER_ASSET.
  92. CustomerAsset customer_asset = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
  93. // Output only. Set if change_resource_type == CAMPAIGN_ASSET.
  94. CampaignAsset campaign_asset = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
  95. // Output only. Set if change_resource_type == AD_GROUP_ASSET.
  96. AdGroupAsset ad_group_asset = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
  97. // Output only. Set if change_resource_type == ASSET_SET.
  98. AssetSet asset_set = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
  99. // Output only. Set if change_resource_type == ASSET_SET_ASSET.
  100. AssetSetAsset asset_set_asset = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
  101. // Output only. Set if change_resource_type == CAMPAIGN_ASSET_SET.
  102. CampaignAssetSet campaign_asset_set = 19 [(google.api.field_behavior) = OUTPUT_ONLY];
  103. }
  104. // Output only. The resource name of the change event.
  105. // Change event resource names have the form:
  106. //
  107. // `customers/{customer_id}/changeEvents/{timestamp_micros}~{command_index}~{mutate_index}`
  108. string resource_name = 1 [
  109. (google.api.field_behavior) = OUTPUT_ONLY,
  110. (google.api.resource_reference) = {
  111. type: "googleads.googleapis.com/ChangeEvent"
  112. }
  113. ];
  114. // Output only. Time at which the change was committed on this resource.
  115. string change_date_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  116. // Output only. The type of the changed resource. This dictates what resource
  117. // will be set in old_resource and new_resource.
  118. google.ads.googleads.v10.enums.ChangeEventResourceTypeEnum.ChangeEventResourceType change_resource_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  119. // Output only. The Simply resource this change occurred on.
  120. string change_resource_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  121. // Output only. Where the change was made through.
  122. google.ads.googleads.v10.enums.ChangeClientTypeEnum.ChangeClientType client_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  123. // Output only. The email of the user who made this change.
  124. string user_email = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  125. // Output only. The old resource before the change. Only changed fields will be populated.
  126. ChangedResource old_resource = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  127. // Output only. The new resource after the change. Only changed fields will be populated.
  128. ChangedResource new_resource = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  129. // Output only. The operation on the changed resource.
  130. google.ads.googleads.v10.enums.ResourceChangeOperationEnum.ResourceChangeOperation resource_change_operation = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  131. // Output only. A list of fields that are changed in the returned resource.
  132. google.protobuf.FieldMask changed_fields = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  133. // Output only. The Campaign affected by this change.
  134. string campaign = 11 [
  135. (google.api.field_behavior) = OUTPUT_ONLY,
  136. (google.api.resource_reference) = {
  137. type: "googleads.googleapis.com/Campaign"
  138. }
  139. ];
  140. // Output only. The AdGroup affected by this change.
  141. string ad_group = 12 [
  142. (google.api.field_behavior) = OUTPUT_ONLY,
  143. (google.api.resource_reference) = {
  144. type: "googleads.googleapis.com/AdGroup"
  145. }
  146. ];
  147. // Output only. The Feed affected by this change.
  148. string feed = 13 [
  149. (google.api.field_behavior) = OUTPUT_ONLY,
  150. (google.api.resource_reference) = {
  151. type: "googleads.googleapis.com/Feed"
  152. }
  153. ];
  154. // Output only. The FeedItem affected by this change.
  155. string feed_item = 14 [
  156. (google.api.field_behavior) = OUTPUT_ONLY,
  157. (google.api.resource_reference) = {
  158. type: "googleads.googleapis.com/FeedItem"
  159. }
  160. ];
  161. // Output only. The Asset affected by this change.
  162. string asset = 20 [
  163. (google.api.field_behavior) = OUTPUT_ONLY,
  164. (google.api.resource_reference) = {
  165. type: "googleads.googleapis.com/Asset"
  166. }
  167. ];
  168. }