change_event.proto 7.9 KB

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