Skip to content

Commit

Permalink
feat: add subject_to_thresholding field to ResponseMetadata type (#…
Browse files Browse the repository at this point in the history
…265)

* feat: add `subject_to_thresholding` field to `ResponseMetadata` type
feat: add `tokens_per_project_per_hour` field to `PropertyQuota` type

PiperOrigin-RevId: 479394249

Source-Link: googleapis/googleapis@59b73bd

Source-Link: googleapis/googleapis-gen@c2f211b
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzJmMjExYmNiM2NjMGIxMGNiNzE5MDUxODVkZDc0MGJkMjZmYzM3MiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Oct 13, 2022
1 parent 8bac2e2 commit af1ace7
Show file tree
Hide file tree
Showing 10 changed files with 184 additions and 63 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -41,6 +41,10 @@ service BetaAnalyticsData {
// measurements of user activity on your property, such as active users or
// event count. Dimensions break down metrics across some common criteria,
// such as country or event name.
//
// For a guide to constructing requests & understanding responses, see
// [Creating a
// Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics).
rpc RunReport(RunReportRequest) returns (RunReportResponse) {
option (google.api.http) = {
post: "/v1beta/{property=properties/*}:runReport"
Expand Down Expand Up @@ -95,9 +99,15 @@ service BetaAnalyticsData {
option (google.api.method_signature) = "name";
}

// The Google Analytics Realtime API returns a customized report of realtime
// event data for your property. These reports show events and usage from the
// last 30 minutes.
// Returns a customized report of realtime event data for your property.
// Events appear in realtime reports seconds after they have been sent to
// the Google Analytics. Realtime reports show events and usage data for the
// periods of time ranging from the present moment to 30 minutes ago (up to
// 60 minutes for Google Analytics 360 properties).
//
// For a guide to constructing realtime requests & understanding responses,
// see [Creating a Realtime
// Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics).
rpc RunRealtimeReport(RunRealtimeReportRequest) returns (RunRealtimeReportResponse) {
option (google.api.http) = {
post: "/v1beta/{property=properties/*}:runRealtimeReport"
Expand Down Expand Up @@ -219,8 +229,8 @@ message RunReportRequest {
// for examples. Metrics cannot be used in this filter.
FilterExpression dimension_filter = 5;

// The filter clause of metrics. Applied at post aggregation phase, similar to
// SQL having-clause. Dimensions cannot be used in this filter.
// The filter clause of metrics. Applied after aggregating the report's rows,
// similar to SQL having-clause. Dimensions cannot be used in this filter.
FilterExpression metric_filter = 6;

// The row count of the start row. The first row is counted as row 0.
Expand Down Expand Up @@ -542,13 +552,11 @@ message RunRealtimeReportRequest {
// The metrics requested and displayed.
repeated Metric metrics = 3;

// The filter clause of dimensions. Dimensions must be requested to be used in
// this filter. Metrics cannot be used in this filter.
// The filter clause of dimensions. Metrics cannot be used in this filter.
FilterExpression dimension_filter = 4;

// The filter clause of metrics. Applied at post aggregation phase, similar to
// SQL having-clause. Metrics must be requested to be used in this filter.
// Dimensions cannot be used in this filter.
// SQL having-clause. Dimensions cannot be used in this filter.
FilterExpression metric_filter = 5;

// The number of rows to return. If unspecified, 10,000 rows are returned. The
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -52,8 +52,8 @@ message MinuteRange {
//
// If unspecified, `startMinutesAgo` is defaulted to 29. Standard Analytics
// properties can request up to the last 30 minutes of event data
// (`startMinutesAgo <= 29`), and Google Analytics 360 properties can request
// up to the last 60 minutes of event data (`startMinutesAgo <= 59`).
// (`startMinutesAgo <= 29`), and 360 Analytics properties can request up to
// the last 60 minutes of event data (`startMinutesAgo <= 59`).
optional int32 start_minutes_ago = 1;

// The inclusive end minute for the query as a number of minutes before now.
Expand All @@ -63,8 +63,8 @@ message MinuteRange {
//
// If unspecified, `endMinutesAgo` is defaulted to 0. Standard Analytics
// properties can request any minute in the last 30 minutes of event data
// (`endMinutesAgo <= 29`), and Google Analytics 360 properties can request
// any minute in the last 60 minutes of event data (`endMinutesAgo <= 59`).
// (`endMinutesAgo <= 29`), and 360 Analytics properties can request any
// minute in the last 60 minutes of event data (`endMinutesAgo <= 59`).
optional int32 end_minutes_ago = 2;

// Assigns a name to this minute range. The dimension `dateRange` is valued to
Expand All @@ -76,7 +76,7 @@ message MinuteRange {

// Dimensions are attributes of your data. For example, the dimension city
// indicates the city from which an event originates. Dimension values in report
// responses are strings; for example, city could be "Paris" or "New York".
// responses are strings; for example, the city could be "Paris" or "New York".
// Requests are allowed up to 9 dimensions.
message Dimension {
// The name of the dimension. See the [API
Expand Down Expand Up @@ -168,9 +168,8 @@ message Metric {
bool invisible = 3;
}

// To express dimension or metric filters.
// The fields in the same FilterExpression need to be either all dimensions or
// all metrics.
// To express dimension or metric filters. The fields in the same
// FilterExpression need to be either all dimensions or all metrics.
message FilterExpression {
// Specify one type of filter expression for `FilterExpression`.
oneof expr {
Expand All @@ -183,9 +182,8 @@ message FilterExpression {
// The FilterExpression is NOT of not_expression.
FilterExpression not_expression = 3;

// A primitive filter.
// All fields in filter in same FilterExpression needs to be either all
// dimensions or metrics.
// A primitive filter. In the same FilterExpression, all of the filter's
// field names need to be either all dimensions or all metrics.
Filter filter = 4;
}
}
Expand Down Expand Up @@ -217,10 +215,10 @@ message Filter {
// Contains the string value.
CONTAINS = 4;

// Full regular expression match with the string value.
// Full match for the regular expression with the string value.
FULL_REGEXP = 5;

// Partial regular expression match with the string value.
// Partial match for the regular expression with the string value.
PARTIAL_REGEXP = 6;
}

Expand Down Expand Up @@ -283,8 +281,12 @@ message Filter {
NumericValue to_value = 2;
}

// The dimension name or metric name. Must be a name defined in dimensions
// or metrics.
// The dimension name or metric name.
//
// In most methods, dimensions & metrics can be used for the first time in
// this field. However in a RunPivotReportRequest, this field must be
// additionally specified by name in the RunPivotReportRequest's dimensions or
// metrics.
string field_name = 1;

// Specify one type of filter for `Filter`.
Expand All @@ -303,7 +305,9 @@ message Filter {
}
}

// The sort options.
// Order bys define how rows will be sorted in the response. For example,
// ordering rows by descending event count is one ordering, and ordering rows by
// the event name string is a different ordering.
message OrderBy {
// Sorts by metric values.
message MetricOrderBy {
Expand Down Expand Up @@ -604,6 +608,16 @@ message ResponseMetaData {

// If empty reason is specified, the report is empty for this reason.
optional string empty_reason = 7;

// If `subjectToThresholding` is true, this report is subject to thresholding
// and only returns data that meets the minimum aggregation thresholds. It is
// possible for a request to be subject to thresholding thresholding and no
// data is absent from the report, and this happens when all data is above the
// thresholds. To learn more, see [Data
// thresholds](https://support.google.com/analytics/answer/9383630) and [About
// Demographics and
// Interests](https://support.google.com/analytics/answer/2799357).
optional bool subject_to_thresholding = 8;
}

// Describes a dimension column in the report. Dimensions requested in a report
Expand Down Expand Up @@ -732,8 +746,8 @@ message PropertyQuota {

// Standard Analytics Properties can use up to 5,000 tokens per hour;
// Analytics 360 Properties can use 50,000 tokens per hour. An API request
// consumes a single number of tokens, and that number is deducted from both
// the hourly and daily quotas.
// consumes a single number of tokens, and that number is deducted from all of
// the hourly, daily, and per project hourly quotas.
QuotaStatus tokens_per_hour = 2;

// Standard Analytics Properties can send up to 10 concurrent requests;
Expand All @@ -750,6 +764,14 @@ message PropertyQuota {
// is individually counted for this quota if the request contains potentially
// thresholded dimensions.
QuotaStatus potentially_thresholded_requests_per_hour = 5;

// Analytics Properties can use up to 25% of their tokens per project per
// hour. This amounts to standard Analytics Properties can use up to 1,250
// tokens per project per hour, and Analytics 360 Properties can use 12,500
// tokens per project per hour. An API request consumes a single number of
// tokens, and that number is deducted from all of the hourly, daily, and per
// project hourly quotas.
QuotaStatus tokens_per_project_per_hour = 6;
}

// Current state for a particular quota group.
Expand Down
15 changes: 15 additions & 0 deletions packages/google-analytics-data/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit af1ace7

Please sign in to comment.