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