@google-analytics/data 4.2.0 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.4.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.3.0...data-v4.4.0) (2024-02-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * Trusted Private Cloud support, use the universeDomain parameter ([#5022](https://github.com/googleapis/google-cloud-node/issues/5022)) ([b6498d8](https://github.com/googleapis/google-cloud-node/commit/b6498d8580d056817981dedbaa0ea5d82e9dccc2))
9
+
10
+ ## [4.3.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.2.0...data-v4.3.0) (2023-12-11)
11
+
12
+
13
+ ### Features
14
+
15
+ * [analytics-data] add `CreateAudienceExport`, `QueryAudienceExport`, `GetAudienceExport`, `ListAudienceExports` methods to the Data API v1 beta ([#4878](https://github.com/googleapis/google-cloud-node/issues/4878)) ([1f9dc5a](https://github.com/googleapis/google-cloud-node/commit/1f9dc5ae6faf68324ab358b3f4f40328f62e7b64))
16
+
3
17
  ## [4.2.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.1.0...data-v4.2.0) (2023-11-30)
4
18
 
5
19
 
package/README.md CHANGED
@@ -121,7 +121,11 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
121
121
  | Beta_analytics_data.batch_run_pivot_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_pivot_reports.js,packages/google-analytics-data/samples/README.md) |
122
122
  | Beta_analytics_data.batch_run_reports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.batch_run_reports.js,packages/google-analytics-data/samples/README.md) |
123
123
  | Beta_analytics_data.check_compatibility | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.check_compatibility.js,packages/google-analytics-data/samples/README.md) |
124
+ | Beta_analytics_data.create_audience_export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.create_audience_export.js,packages/google-analytics-data/samples/README.md) |
125
+ | Beta_analytics_data.get_audience_export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_audience_export.js,packages/google-analytics-data/samples/README.md) |
124
126
  | Beta_analytics_data.get_metadata | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.get_metadata.js,packages/google-analytics-data/samples/README.md) |
127
+ | Beta_analytics_data.list_audience_exports | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.list_audience_exports.js,packages/google-analytics-data/samples/README.md) |
128
+ | Beta_analytics_data.query_audience_export | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.query_audience_export.js,packages/google-analytics-data/samples/README.md) |
125
129
  | Beta_analytics_data.run_pivot_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_pivot_report.js,packages/google-analytics-data/samples/README.md) |
126
130
  | Beta_analytics_data.run_realtime_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_realtime_report.js,packages/google-analytics-data/samples/README.md) |
127
131
  | Beta_analytics_data.run_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-data/samples/generated/v1beta/beta_analytics_data.run_report.js,packages/google-analytics-data/samples/README.md) |
@@ -87,11 +87,10 @@ service AlphaAnalyticsData {
87
87
  // https://support.google.com/analytics/answer/9267572. Audience lists contain
88
88
  // the users in each audience.
89
89
  //
90
- // This method is introduced at alpha stability with the intention of
91
- // gathering feedback on syntax and capabilities before entering beta. To give
92
- // your feedback on this API, complete the
93
- // [Google Analytics Audience Export API
94
- // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
90
+ // This method is available at beta stability at
91
+ // [audienceExports.create](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create).
92
+ // To give your feedback on this API, complete the [Google Analytics Audience
93
+ // Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
95
94
  rpc CreateAudienceList(CreateAudienceListRequest)
96
95
  returns (google.longrunning.Operation) {
97
96
  option (google.api.http) = {
@@ -119,11 +118,10 @@ service AlphaAnalyticsData {
119
118
  // that are important to your business. To learn more, see
120
119
  // https://support.google.com/analytics/answer/9267572.
121
120
  //
122
- // This method is introduced at alpha stability with the intention of
123
- // gathering feedback on syntax and capabilities before entering beta. To give
124
- // your feedback on this API, complete the
125
- // [Google Analytics Audience Export API
126
- // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
121
+ // This method is available at beta stability at
122
+ // [audienceExports.query](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query).
123
+ // To give your feedback on this API, complete the [Google Analytics Audience
124
+ // Export API Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
127
125
  rpc QueryAudienceList(QueryAudienceListRequest)
128
126
  returns (QueryAudienceListResponse) {
129
127
  option (google.api.http) = {
@@ -168,9 +166,9 @@ service AlphaAnalyticsData {
168
166
  // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
169
167
  // for an introduction to Audience Lists with examples.
170
168
  //
171
- // This method is introduced at alpha stability with the intention of
172
- // gathering feedback on syntax and capabilities before entering beta. To give
173
- // your feedback on this API, complete the
169
+ // This method is available at beta stability at
170
+ // [audienceExports.get](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get).
171
+ // To give your feedback on this API, complete the
174
172
  // [Google Analytics Audience Export API
175
173
  // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
176
174
  rpc GetAudienceList(GetAudienceListRequest) returns (AudienceList) {
@@ -189,9 +187,9 @@ service AlphaAnalyticsData {
189
187
  // List](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
190
188
  // for an introduction to Audience Lists with examples.
191
189
  //
192
- // This method is introduced at alpha stability with the intention of
193
- // gathering feedback on syntax and capabilities before entering beta. To give
194
- // your feedback on this API, complete the
190
+ // This method is available at beta stability at
191
+ // [audienceExports.list](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list).
192
+ // To give your feedback on this API, complete the
195
193
  // [Google Analytics Audience Export API
196
194
  // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
197
195
  rpc ListAudienceLists(ListAudienceListsRequest)
@@ -344,6 +342,75 @@ message RecurringAudienceList {
344
342
  // This list is ordered with the most recently created audience list first.
345
343
  repeated string audience_lists = 6
346
344
  [(google.api.field_behavior) = OUTPUT_ONLY];
345
+
346
+ // Optional. Configures webhook notifications to be sent from the Google
347
+ // Analytics Data API to your webhook server. Use of webhooks is optional. If
348
+ // unused, you'll need to poll this API to determine when a recurring audience
349
+ // list creates new audience lists. Webhooks allow a notification to be sent
350
+ // to your servers & avoid the need for polling.
351
+ //
352
+ // Two POST requests will be sent each time a recurring audience list creates
353
+ // an audience list. This happens once per day until a recurring audience list
354
+ // reaches 0 active days remaining. The first request will be sent showing a
355
+ // newly created audience list in its CREATING state. The second request will
356
+ // be sent after the audience list completes creation (either the ACTIVE or
357
+ // FAILED state).
358
+ optional WebhookNotification webhook_notification = 8
359
+ [(google.api.field_behavior) = OPTIONAL];
360
+ }
361
+
362
+ // Configures a long-running operation resource to send a webhook notification
363
+ // from the Google Analytics Data API to your webhook server when the resource
364
+ // updates.
365
+ //
366
+ // Notification configurations contain private values & are only visible to your
367
+ // GCP project. Different GCP projects may attach different webhook
368
+ // notifications to the same long-running operation resource.
369
+ message WebhookNotification {
370
+ // Optional. The web address that will receive the webhook notification. This
371
+ // address will receive POST requests as the state of the long running
372
+ // operation resource changes. The POST request will contain both a JSON
373
+ // version of the long running operation resource in the body and a
374
+ // `sentTimestamp` field. The sent timestamp will specify the unix
375
+ // microseconds since the epoch that the request was sent; this lets you
376
+ // identify replayed notifications.
377
+ //
378
+ // An example URI is
379
+ // `https://us-central1-example-project-id.cloudfunctions.net/example-function-1`.
380
+ //
381
+ // The URI must use HTTPS and point to a site with a valid SSL certificate on
382
+ // the web server. The URI must have a maximum string length of 128 characters
383
+ // & use only the allowlisted characters from [RFC
384
+ // 1738](https://www.rfc-editor.org/rfc/rfc1738).
385
+ //
386
+ // When your webhook server receives a notification, it is expected to reply
387
+ // with an HTTP response status code of 200 within 5 seconds.
388
+ //
389
+ // A URI is required to use webhook notifications.
390
+ //
391
+ // Requests to this webhook server will contain an ID token authenticating the
392
+ // service account
393
+ // `google-analytics-audience-export@system.gserviceaccount.com`. To learn
394
+ // more about ID tokens, see
395
+ // https://cloud.google.com/docs/authentication/token-types#id. For Google
396
+ // Cloud Functions, this lets you configure your function to require
397
+ // authentication. In Cloud IAM, you will need to grant the service account
398
+ // permissions to the Cloud Run Invoker (`roles/run.invoker`) & Cloud
399
+ // Functions Invoker (`roles/cloudfunctions.invoker`) roles for the webhook
400
+ // post request to pass Google Cloud Functions authentication. This API can
401
+ // send webhook notifications to arbitrary URIs; for webhook servers other
402
+ // than Google Cloud Functions, this ID token in the authorization bearer
403
+ // header should be ignored if it is not needed.
404
+ optional string uri = 1 [(google.api.field_behavior) = OPTIONAL];
405
+
406
+ // Optional. The channel token is an arbitrary string value and must have a
407
+ // maximum string length of 64 characters. Channel tokens allow you to verify
408
+ // the source of a webhook notification. This guards against the message being
409
+ // spoofed. The channel token will be specified in the `X-Goog-Channel-Token`
410
+ // HTTP header of the webhook POST request.
411
+ //
412
+ // A channel token is not required to use webhook notifications.
413
+ optional string channel_token = 2 [(google.api.field_behavior) = OPTIONAL];
347
414
  }
348
415
 
349
416
  // A request to retrieve configuration metadata about a specific recurring
@@ -547,6 +614,24 @@ message AudienceList {
547
614
  // recurring audience list, and this field will be blank.
548
615
  optional string recurring_audience_list = 12
549
616
  [(google.api.field_behavior) = OUTPUT_ONLY];
617
+
618
+ // Optional. Configures webhook notifications to be sent from the Google
619
+ // Analytics Data API to your webhook server. Use of webhooks is optional. If
620
+ // unused, you'll need to poll this API to determine when an audience list is
621
+ // ready to be used. Webhooks allow a notification to be sent to your servers
622
+ // & avoid the need for polling.
623
+ //
624
+ // Either one or two POST requests will be sent to the webhook. The first POST
625
+ // request will be sent immediately showing the newly created audience list in
626
+ // its CREATING state. The second POST request will be sent after the audience
627
+ // list completes creation (either the ACTIVE or FAILED state).
628
+ //
629
+ // If identical audience lists are requested in quick succession, the second &
630
+ // subsequent audience lists can be served from cache. In that case, the
631
+ // audience list create method can return an audience list is already ACTIVE.
632
+ // In this scenario, only one POST request will be sent to the webhook.
633
+ optional WebhookNotification webhook_notification = 13
634
+ [(google.api.field_behavior) = OPTIONAL];
550
635
  }
551
636
 
552
637
  // This metadata is currently blank.
@@ -21,11 +21,17 @@ import "google/api/annotations.proto";
21
21
  import "google/api/client.proto";
22
22
  import "google/api/field_behavior.proto";
23
23
  import "google/api/resource.proto";
24
+ import "google/longrunning/operations.proto";
25
+ import "google/protobuf/timestamp.proto";
24
26
 
25
27
  option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1beta;data";
26
28
  option java_multiple_files = true;
27
29
  option java_outer_classname = "AnalyticsDataApiProto";
28
30
  option java_package = "com.google.analytics.data.v1beta";
31
+ option (google.api.resource_definition) = {
32
+ type: "analyticsadmin.googleapis.com/Property"
33
+ pattern: "properties/{property}"
34
+ };
29
35
 
30
36
  // Google Analytics reporting data service.
31
37
  service BetaAnalyticsData {
@@ -135,6 +141,114 @@ service BetaAnalyticsData {
135
141
  body: "*"
136
142
  };
137
143
  }
144
+
145
+ // Creates an audience export for later retrieval. This method quickly returns
146
+ // the audience export's resource name and initiates a long running
147
+ // asynchronous request to form an audience export. To export the users in an
148
+ // audience export, first create the audience export through this method and
149
+ // then send the audience resource name to the `QueryAudienceExport` method.
150
+ //
151
+ // See [Creating an Audience
152
+ // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
153
+ // for an introduction to Audience Exports with examples.
154
+ //
155
+ // An audience export is a snapshot of the users currently in the audience at
156
+ // the time of audience export creation. Creating audience exports for one
157
+ // audience on different days will return different results as users enter and
158
+ // exit the audience.
159
+ //
160
+ // Audiences in Google Analytics 4 allow you to segment your users in the ways
161
+ // that are important to your business. To learn more, see
162
+ // https://support.google.com/analytics/answer/9267572. Audience exports
163
+ // contain the users in each audience.
164
+ //
165
+ // Audience Export APIs have some methods at alpha and other methods at beta
166
+ // stability. The intention is to advance methods to beta stability after some
167
+ // feedback and adoption. To give your feedback on this API, complete the
168
+ // [Google Analytics Audience Export API
169
+ // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
170
+ rpc CreateAudienceExport(CreateAudienceExportRequest)
171
+ returns (google.longrunning.Operation) {
172
+ option (google.api.http) = {
173
+ post: "/v1beta/{parent=properties/*}/audienceExports"
174
+ body: "audience_export"
175
+ };
176
+ option (google.api.method_signature) = "parent,audience_export";
177
+ option (google.longrunning.operation_info) = {
178
+ response_type: "AudienceExport"
179
+ metadata_type: "AudienceExportMetadata"
180
+ };
181
+ }
182
+
183
+ // Retrieves an audience export of users. After creating an audience, the
184
+ // users are not immediately available for exporting. First, a request to
185
+ // `CreateAudienceExport` is necessary to create an audience export of users,
186
+ // and then second, this method is used to retrieve the users in the audience
187
+ // export.
188
+ //
189
+ // See [Creating an Audience
190
+ // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
191
+ // for an introduction to Audience Exports with examples.
192
+ //
193
+ // Audiences in Google Analytics 4 allow you to segment your users in the ways
194
+ // that are important to your business. To learn more, see
195
+ // https://support.google.com/analytics/answer/9267572.
196
+ //
197
+ // Audience Export APIs have some methods at alpha and other methods at beta
198
+ // stability. The intention is to advance methods to beta stability after some
199
+ // feedback and adoption. To give your feedback on this API, complete the
200
+ // [Google Analytics Audience Export API
201
+ // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
202
+ rpc QueryAudienceExport(QueryAudienceExportRequest)
203
+ returns (QueryAudienceExportResponse) {
204
+ option (google.api.http) = {
205
+ post: "/v1beta/{name=properties/*/audienceExports/*}:query"
206
+ body: "*"
207
+ };
208
+ option (google.api.method_signature) = "name";
209
+ }
210
+
211
+ // Gets configuration metadata about a specific audience export. This method
212
+ // can be used to understand an audience export after it has been created.
213
+ //
214
+ // See [Creating an Audience
215
+ // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
216
+ // for an introduction to Audience Exports with examples.
217
+ //
218
+ // Audience Export APIs have some methods at alpha and other methods at beta
219
+ // stability. The intention is to advance methods to beta stability after some
220
+ // feedback and adoption. To give your feedback on this API, complete the
221
+ // [Google Analytics Audience Export API
222
+ // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
223
+ rpc GetAudienceExport(GetAudienceExportRequest) returns (AudienceExport) {
224
+ option (google.api.http) = {
225
+ get: "/v1beta/{name=properties/*/audienceExports/*}"
226
+ };
227
+ option (google.api.method_signature) = "name";
228
+ }
229
+
230
+ // Lists all audience exports for a property. This method can be used for you
231
+ // to find and reuse existing audience exports rather than creating
232
+ // unnecessary new audience exports. The same audience can have multiple
233
+ // audience exports that represent the export of users that were in an
234
+ // audience on different days.
235
+ //
236
+ // See [Creating an Audience
237
+ // Export](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-basics)
238
+ // for an introduction to Audience Exports with examples.
239
+ //
240
+ // Audience Export APIs have some methods at alpha and other methods at beta
241
+ // stability. The intention is to advance methods to beta stability after some
242
+ // feedback and adoption. To give your feedback on this API, complete the
243
+ // [Google Analytics Audience Export API
244
+ // Feedback](https://forms.gle/EeA5u5LW6PEggtCEA) form.
245
+ rpc ListAudienceExports(ListAudienceExportsRequest)
246
+ returns (ListAudienceExportsResponse) {
247
+ option (google.api.http) = {
248
+ get: "/v1beta/{parent=properties/*}/audienceExports"
249
+ };
250
+ option (google.api.method_signature) = "parent";
251
+ }
138
252
  }
139
253
 
140
254
  // The request for compatibility information for a report's dimensions and
@@ -181,7 +295,8 @@ message CheckCompatibilityResponse {
181
295
  repeated MetricCompatibility metric_compatibilities = 2;
182
296
  }
183
297
 
184
- // The dimensions and metrics currently accepted in reporting methods.
298
+ // The dimensions, metrics and comparisons currently accepted in reporting
299
+ // methods.
185
300
  message Metadata {
186
301
  option (google.api.resource) = {
187
302
  type: "analyticsdata.googleapis.com/Metadata"
@@ -640,3 +755,228 @@ message RunRealtimeReportResponse {
640
755
  // between response types in JSON.
641
756
  string kind = 9;
642
757
  }
758
+
759
+ // A request to retrieve configuration metadata about a specific audience
760
+ // export.
761
+ message GetAudienceExportRequest {
762
+ // Required. The audience export resource name.
763
+ // Format: `properties/{property}/audienceExports/{audience_export}`
764
+ string name = 1 [
765
+ (google.api.field_behavior) = REQUIRED,
766
+ (google.api.resource_reference) = {
767
+ type: "analyticsdata.googleapis.com/AudienceExport"
768
+ }
769
+ ];
770
+ }
771
+
772
+ // A request to list all audience exports for a property.
773
+ message ListAudienceExportsRequest {
774
+ // Required. All audience exports for this property will be listed in the
775
+ // response. Format: `properties/{property}`
776
+ string parent = 1 [
777
+ (google.api.field_behavior) = REQUIRED,
778
+ (google.api.resource_reference) = {
779
+ child_type: "analyticsdata.googleapis.com/AudienceExport"
780
+ }
781
+ ];
782
+
783
+ // Optional. The maximum number of audience exports to return. The service may
784
+ // return fewer than this value. If unspecified, at most 200 audience exports
785
+ // will be returned. The maximum value is 1000 (higher values will be coerced
786
+ // to the maximum).
787
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
788
+
789
+ // Optional. A page token, received from a previous `ListAudienceExports`
790
+ // call. Provide this to retrieve the subsequent page.
791
+ //
792
+ // When paginating, all other parameters provided to `ListAudienceExports`
793
+ // must match the call that provided the page token.
794
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
795
+ }
796
+
797
+ // A list of all audience exports for a property.
798
+ message ListAudienceExportsResponse {
799
+ // Each audience export for a property.
800
+ repeated AudienceExport audience_exports = 1;
801
+
802
+ // A token, which can be sent as `page_token` to retrieve the next page.
803
+ // If this field is omitted, there are no subsequent pages.
804
+ optional string next_page_token = 2;
805
+ }
806
+
807
+ // A request to create a new audience export.
808
+ message CreateAudienceExportRequest {
809
+ // Required. The parent resource where this audience export will be created.
810
+ // Format: `properties/{property}`
811
+ string parent = 1 [
812
+ (google.api.field_behavior) = REQUIRED,
813
+ (google.api.resource_reference) = {
814
+ child_type: "analyticsdata.googleapis.com/AudienceExport"
815
+ }
816
+ ];
817
+
818
+ // Required. The audience export to create.
819
+ AudienceExport audience_export = 2 [(google.api.field_behavior) = REQUIRED];
820
+ }
821
+
822
+ // An audience export is a list of users in an audience at the time of the
823
+ // list's creation. One audience may have multiple audience exports created for
824
+ // different days.
825
+ message AudienceExport {
826
+ option (google.api.resource) = {
827
+ type: "analyticsdata.googleapis.com/AudienceExport"
828
+ pattern: "properties/{property}/audienceExports/{audience_export}"
829
+ plural: "audienceExports"
830
+ singular: "audienceExport"
831
+ };
832
+
833
+ // The AudienceExport currently exists in this state.
834
+ enum State {
835
+ // Unspecified state will never be used.
836
+ STATE_UNSPECIFIED = 0;
837
+
838
+ // The AudienceExport is currently creating and will be available in the
839
+ // future. Creating occurs immediately after the CreateAudienceExport call.
840
+ CREATING = 1;
841
+
842
+ // The AudienceExport is fully created and ready for querying. An
843
+ // AudienceExport is updated to active asynchronously from a request; this
844
+ // occurs some time (for example 15 minutes) after the initial create call.
845
+ ACTIVE = 2;
846
+
847
+ // The AudienceExport failed to be created. It is possible that
848
+ // re-requesting this audience export will succeed.
849
+ FAILED = 3;
850
+ }
851
+
852
+ // Output only. Identifier. The audience export resource name assigned during
853
+ // creation. This resource name identifies this `AudienceExport`.
854
+ //
855
+ // Format: `properties/{property}/audienceExports/{audience_export}`
856
+ string name = 1 [
857
+ (google.api.field_behavior) = IDENTIFIER,
858
+ (google.api.field_behavior) = OUTPUT_ONLY
859
+ ];
860
+
861
+ // Required. The audience resource name. This resource name identifies the
862
+ // audience being listed and is shared between the Analytics Data & Admin
863
+ // APIs.
864
+ //
865
+ // Format: `properties/{property}/audiences/{audience}`
866
+ string audience = 2 [(google.api.field_behavior) = REQUIRED];
867
+
868
+ // Output only. The descriptive display name for this audience. For example,
869
+ // "Purchasers".
870
+ string audience_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
871
+
872
+ // Required. The dimensions requested and displayed in the query response.
873
+ repeated AudienceDimension dimensions = 4
874
+ [(google.api.field_behavior) = REQUIRED];
875
+
876
+ // Output only. The current state for this AudienceExport.
877
+ optional State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
878
+
879
+ // Output only. The time when CreateAudienceExport was called and the
880
+ // AudienceExport began the `CREATING` state.
881
+ optional google.protobuf.Timestamp begin_creating_time = 6
882
+ [(google.api.field_behavior) = OUTPUT_ONLY];
883
+
884
+ // Output only. The total quota tokens charged during creation of the
885
+ // AudienceExport. Because this token count is based on activity from the
886
+ // `CREATING` state, this tokens charged will be fixed once an AudienceExport
887
+ // enters the `ACTIVE` or `FAILED` states.
888
+ int32 creation_quota_tokens_charged = 7
889
+ [(google.api.field_behavior) = OUTPUT_ONLY];
890
+
891
+ // Output only. The total number of rows in the AudienceExport result.
892
+ optional int32 row_count = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
893
+
894
+ // Output only. Error message is populated when an audience export fails
895
+ // during creation. A common reason for such a failure is quota exhaustion.
896
+ optional string error_message = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
897
+
898
+ // Output only. The percentage completed for this audience export ranging
899
+ // between 0 to 100.
900
+ optional double percentage_completed = 10
901
+ [(google.api.field_behavior) = OUTPUT_ONLY];
902
+ }
903
+
904
+ // This metadata is currently blank.
905
+ message AudienceExportMetadata {}
906
+
907
+ // A request to list users in an audience export.
908
+ message QueryAudienceExportRequest {
909
+ // Required. The name of the audience export to retrieve users from.
910
+ // Format: `properties/{property}/audienceExports/{audience_export}`
911
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
912
+
913
+ // Optional. The row count of the start row. The first row is counted as row
914
+ // 0.
915
+ //
916
+ // When paging, the first request does not specify offset; or equivalently,
917
+ // sets offset to 0; the first request returns the first `limit` of rows. The
918
+ // second request sets offset to the `limit` of the first request; the second
919
+ // request returns the second `limit` of rows.
920
+ //
921
+ // To learn more about this pagination parameter, see
922
+ // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
923
+ int64 offset = 2 [(google.api.field_behavior) = OPTIONAL];
924
+
925
+ // Optional. The number of rows to return. If unspecified, 10,000 rows are
926
+ // returned. The API returns a maximum of 250,000 rows per request, no matter
927
+ // how many you ask for. `limit` must be positive.
928
+ //
929
+ // The API can also return fewer rows than the requested `limit`, if there
930
+ // aren't as many dimension values as the `limit`.
931
+ //
932
+ // To learn more about this pagination parameter, see
933
+ // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
934
+ int64 limit = 3 [(google.api.field_behavior) = OPTIONAL];
935
+ }
936
+
937
+ // A list of users in an audience export.
938
+ message QueryAudienceExportResponse {
939
+ // Configuration data about AudienceExport being queried. Returned to help
940
+ // interpret the audience rows in this response. For example, the dimensions
941
+ // in this AudienceExport correspond to the columns in the AudienceRows.
942
+ optional AudienceExport audience_export = 1;
943
+
944
+ // Rows for each user in an audience export. The number of rows in this
945
+ // response will be less than or equal to request's page size.
946
+ repeated AudienceRow audience_rows = 2;
947
+
948
+ // The total number of rows in the AudienceExport result. `rowCount` is
949
+ // independent of the number of rows returned in the response, the `limit`
950
+ // request parameter, and the `offset` request parameter. For example if a
951
+ // query returns 175 rows and includes `limit` of 50 in the API request, the
952
+ // response will contain `rowCount` of 175 but only 50 rows.
953
+ //
954
+ // To learn more about this pagination parameter, see
955
+ // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
956
+ optional int32 row_count = 3;
957
+ }
958
+
959
+ // Dimension value attributes for the audience user row.
960
+ message AudienceRow {
961
+ // Each dimension value attribute for an audience user. One dimension value
962
+ // will be added for each dimension column requested.
963
+ repeated AudienceDimensionValue dimension_values = 1;
964
+ }
965
+
966
+ // An audience dimension is a user attribute. Specific user attributed are
967
+ // requested and then later returned in the `QueryAudienceExportResponse`.
968
+ message AudienceDimension {
969
+ // Optional. The API name of the dimension. See the [API
970
+ // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/audience-list-api-schema#dimensions)
971
+ // for the list of dimension names.
972
+ string dimension_name = 1 [(google.api.field_behavior) = OPTIONAL];
973
+ }
974
+
975
+ // The value of a dimension.
976
+ message AudienceDimensionValue {
977
+ // One kind of dimension value.
978
+ oneof one_value {
979
+ // Value as a string if the dimension type is a string.
980
+ string value = 1;
981
+ }
982
+ }