google-analytics-data-v1alpha 0.1.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.
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Analytics
22
+ module Data
23
+ module V1alpha
24
+ VERSION = "0.1.0"
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,4 @@
1
+ # Google Analytics Data V1alpha Protocol Buffer Documentation
2
+
3
+ These files are for the YARD documentation of the generated protobuf files.
4
+ They are not intended to be required or loaded at runtime.
@@ -0,0 +1,321 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Analytics
22
+ module Data
23
+ module V1alpha
24
+ # The dimensions and metrics currently accepted in reporting methods.
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # Resource name of this metadata.
28
+ # @!attribute [rw] dimensions
29
+ # @return [::Array<::Google::Analytics::Data::V1alpha::DimensionMetadata>]
30
+ # The dimensions descriptions.
31
+ # @!attribute [rw] metrics
32
+ # @return [::Array<::Google::Analytics::Data::V1alpha::MetricMetadata>]
33
+ # The metric descriptions.
34
+ class Metadata
35
+ include ::Google::Protobuf::MessageExts
36
+ extend ::Google::Protobuf::MessageExts::ClassMethods
37
+ end
38
+
39
+ # The request to generate a report.
40
+ # @!attribute [rw] entity
41
+ # @return [::Google::Analytics::Data::V1alpha::Entity]
42
+ # A property whose events are tracked. Within a batch request, this entity
43
+ # should either be unspecified or consistent with the batch-level entity.
44
+ # @!attribute [rw] dimensions
45
+ # @return [::Array<::Google::Analytics::Data::V1alpha::Dimension>]
46
+ # The dimensions requested and displayed.
47
+ # @!attribute [rw] metrics
48
+ # @return [::Array<::Google::Analytics::Data::V1alpha::Metric>]
49
+ # The metrics requested and displayed.
50
+ # @!attribute [rw] date_ranges
51
+ # @return [::Array<::Google::Analytics::Data::V1alpha::DateRange>]
52
+ # Date ranges of data to read. If multiple date ranges are requested, each
53
+ # response row will contain a zero based date range index. If two date
54
+ # ranges overlap, the event data for the overlapping days is included in the
55
+ # response rows for both date ranges. In a cohort request, this `dateRanges`
56
+ # must be unspecified.
57
+ # @!attribute [rw] offset
58
+ # @return [::Integer]
59
+ # The row count of the start row. The first row is counted as row 0.
60
+ # @!attribute [rw] limit
61
+ # @return [::Integer]
62
+ # The number of rows to return. If unspecified, 10 rows are returned. If
63
+ # -1, all rows are returned.
64
+ # @!attribute [rw] metric_aggregations
65
+ # @return [::Array<::Google::Analytics::Data::V1alpha::MetricAggregation>]
66
+ # Aggregation of metrics. Aggregated metric values will be shown in rows
67
+ # where the dimension_values are set to "RESERVED_(MetricAggregation)".
68
+ # @!attribute [rw] dimension_filter
69
+ # @return [::Google::Analytics::Data::V1alpha::FilterExpression]
70
+ # The filter clause of dimensions. Dimensions must be requested to be used in
71
+ # this filter. Metrics cannot be used in this filter.
72
+ # @!attribute [rw] metric_filter
73
+ # @return [::Google::Analytics::Data::V1alpha::FilterExpression]
74
+ # The filter clause of metrics. Applied at post aggregation phase, similar to
75
+ # SQL having-clause. Metrics must be requested to be used in this filter.
76
+ # Dimensions cannot be used in this filter.
77
+ # @!attribute [rw] order_bys
78
+ # @return [::Array<::Google::Analytics::Data::V1alpha::OrderBy>]
79
+ # Specifies how rows are ordered in the response.
80
+ # @!attribute [rw] currency_code
81
+ # @return [::String]
82
+ # A currency code in ISO4217 format, such as "AED", "USD", "JPY".
83
+ # If the field is empty, the report uses the entity's default currency.
84
+ # @!attribute [rw] cohort_spec
85
+ # @return [::Google::Analytics::Data::V1alpha::CohortSpec]
86
+ # Cohort group associated with this request. If there is a cohort group
87
+ # in the request the 'cohort' dimension must be present.
88
+ # @!attribute [rw] keep_empty_rows
89
+ # @return [::Boolean]
90
+ # If false or unspecified, each row with all metrics equal to 0 will not be
91
+ # returned. If true, these rows will be returned if they are not separately
92
+ # removed by a filter.
93
+ # @!attribute [rw] return_property_quota
94
+ # @return [::Boolean]
95
+ # Toggles whether to return the current state of this Analytics Property's
96
+ # quota. Quota is returned in [PropertyQuota](#PropertyQuota).
97
+ class RunReportRequest
98
+ include ::Google::Protobuf::MessageExts
99
+ extend ::Google::Protobuf::MessageExts::ClassMethods
100
+ end
101
+
102
+ # The response report table corresponding to a request.
103
+ # @!attribute [rw] dimension_headers
104
+ # @return [::Array<::Google::Analytics::Data::V1alpha::DimensionHeader>]
105
+ # Describes dimension columns. The number of DimensionHeaders and ordering of
106
+ # DimensionHeaders matches the dimensions present in rows.
107
+ # @!attribute [rw] metric_headers
108
+ # @return [::Array<::Google::Analytics::Data::V1alpha::MetricHeader>]
109
+ # Describes metric columns. The number of MetricHeaders and ordering of
110
+ # MetricHeaders matches the metrics present in rows.
111
+ # @!attribute [rw] rows
112
+ # @return [::Array<::Google::Analytics::Data::V1alpha::Row>]
113
+ # Rows of dimension value combinations and metric values in the report.
114
+ # @!attribute [rw] totals
115
+ # @return [::Array<::Google::Analytics::Data::V1alpha::Row>]
116
+ # If requested, the totaled values of metrics.
117
+ # @!attribute [rw] maximums
118
+ # @return [::Array<::Google::Analytics::Data::V1alpha::Row>]
119
+ # If requested, the maximum values of metrics.
120
+ # @!attribute [rw] minimums
121
+ # @return [::Array<::Google::Analytics::Data::V1alpha::Row>]
122
+ # If requested, the minimum values of metrics.
123
+ # @!attribute [rw] metadata
124
+ # @return [::Google::Analytics::Data::V1alpha::ResponseMetaData]
125
+ # Metadata for the report.
126
+ # @!attribute [rw] property_quota
127
+ # @return [::Google::Analytics::Data::V1alpha::PropertyQuota]
128
+ # This Analytics Property's quota state including this request.
129
+ class RunReportResponse
130
+ include ::Google::Protobuf::MessageExts
131
+ extend ::Google::Protobuf::MessageExts::ClassMethods
132
+ end
133
+
134
+ # The request to generate a pivot report.
135
+ # @!attribute [rw] entity
136
+ # @return [::Google::Analytics::Data::V1alpha::Entity]
137
+ # A property whose events are tracked. Within a batch request, this entity
138
+ # should either be unspecified or consistent with the batch-level entity.
139
+ # @!attribute [rw] dimensions
140
+ # @return [::Array<::Google::Analytics::Data::V1alpha::Dimension>]
141
+ # The dimensions requested. All defined dimensions must be used by one of the
142
+ # following: dimension_expression, dimension_filter, pivots, order_bys.
143
+ # @!attribute [rw] metrics
144
+ # @return [::Array<::Google::Analytics::Data::V1alpha::Metric>]
145
+ # The metrics requested, at least one metric needs to be specified. All
146
+ # defined metrics must be used by one of the following: metric_expression,
147
+ # metric_filter, order_bys.
148
+ # @!attribute [rw] dimension_filter
149
+ # @return [::Google::Analytics::Data::V1alpha::FilterExpression]
150
+ # The filter clause of dimensions. Dimensions must be requested to be used in
151
+ # this filter. Metrics cannot be used in this filter.
152
+ # @!attribute [rw] metric_filter
153
+ # @return [::Google::Analytics::Data::V1alpha::FilterExpression]
154
+ # The filter clause of metrics. Applied at post aggregation phase, similar to
155
+ # SQL having-clause. Metrics must be requested to be used in this filter.
156
+ # Dimensions cannot be used in this filter.
157
+ # @!attribute [rw] pivots
158
+ # @return [::Array<::Google::Analytics::Data::V1alpha::Pivot>]
159
+ # Describes the visual format of the report's dimensions in columns or rows.
160
+ # The union of the fieldNames (dimension names) in all pivots must be a
161
+ # subset of dimension names defined in Dimensions. No two pivots can share a
162
+ # dimension. A dimension is only visible if it appears in a pivot.
163
+ # @!attribute [rw] date_ranges
164
+ # @return [::Array<::Google::Analytics::Data::V1alpha::DateRange>]
165
+ # The date range to retrieve event data for the report. If multiple date
166
+ # ranges are specified, event data from each date range is used in the
167
+ # report. A special dimension with field name "dateRange" can be included in
168
+ # a Pivot's field names; if included, the report compares between date
169
+ # ranges. In a cohort request, this `dateRanges` must be unspecified.
170
+ # @!attribute [rw] currency_code
171
+ # @return [::String]
172
+ # A currency code in ISO4217 format, such as "AED", "USD", "JPY".
173
+ # If the field is empty, the report uses the entity's default currency.
174
+ # @!attribute [rw] cohort_spec
175
+ # @return [::Google::Analytics::Data::V1alpha::CohortSpec]
176
+ # Cohort group associated with this request. If there is a cohort group
177
+ # in the request the 'cohort' dimension must be present.
178
+ # @!attribute [rw] keep_empty_rows
179
+ # @return [::Boolean]
180
+ # If false or unspecified, each row with all metrics equal to 0 will not be
181
+ # returned. If true, these rows will be returned if they are not separately
182
+ # removed by a filter.
183
+ # @!attribute [rw] return_property_quota
184
+ # @return [::Boolean]
185
+ # Toggles whether to return the current state of this Analytics Property's
186
+ # quota. Quota is returned in [PropertyQuota](#PropertyQuota).
187
+ class RunPivotReportRequest
188
+ include ::Google::Protobuf::MessageExts
189
+ extend ::Google::Protobuf::MessageExts::ClassMethods
190
+ end
191
+
192
+ # The response pivot report table corresponding to a pivot request.
193
+ # @!attribute [rw] pivot_headers
194
+ # @return [::Array<::Google::Analytics::Data::V1alpha::PivotHeader>]
195
+ # Summarizes the columns and rows created by a pivot. Each pivot in the
196
+ # request produces one header in the response. If we have a request like
197
+ # this:
198
+ #
199
+ # "pivots": [{
200
+ # "fieldNames": ["country",
201
+ # "city"]
202
+ # },
203
+ # {
204
+ # "fieldNames": "eventName"
205
+ # }]
206
+ #
207
+ # We will have the following `pivotHeaders` in the response:
208
+ #
209
+ # "pivotHeaders" : [{
210
+ # "dimensionHeaders": [{
211
+ # "dimensionValues": [
212
+ # { "value": "United Kingdom" },
213
+ # { "value": "London" }
214
+ # ]
215
+ # },
216
+ # {
217
+ # "dimensionValues": [
218
+ # { "value": "Japan" },
219
+ # { "value": "Osaka" }
220
+ # ]
221
+ # }]
222
+ # },
223
+ # {
224
+ # "dimensionHeaders": [{
225
+ # "dimensionValues": [{ "value": "session_start" }]
226
+ # },
227
+ # {
228
+ # "dimensionValues": [{ "value": "scroll" }]
229
+ # }]
230
+ # }]
231
+ # @!attribute [rw] dimension_headers
232
+ # @return [::Array<::Google::Analytics::Data::V1alpha::DimensionHeader>]
233
+ # Describes dimension columns. The number of DimensionHeaders and ordering of
234
+ # DimensionHeaders matches the dimensions present in rows.
235
+ # @!attribute [rw] metric_headers
236
+ # @return [::Array<::Google::Analytics::Data::V1alpha::MetricHeader>]
237
+ # Describes metric columns. The number of MetricHeaders and ordering of
238
+ # MetricHeaders matches the metrics present in rows.
239
+ # @!attribute [rw] rows
240
+ # @return [::Array<::Google::Analytics::Data::V1alpha::Row>]
241
+ # Rows of dimension value combinations and metric values in the report.
242
+ # @!attribute [rw] aggregates
243
+ # @return [::Array<::Google::Analytics::Data::V1alpha::Row>]
244
+ # Aggregation of metric values. Can be totals, minimums, or maximums. The
245
+ # returned aggregations are controlled by the metric_aggregations in the
246
+ # pivot. The type of aggregation returned in each row is shown by the
247
+ # dimension_values which are set to "RESERVED_<MetricAggregation>".
248
+ # @!attribute [rw] metadata
249
+ # @return [::Google::Analytics::Data::V1alpha::ResponseMetaData]
250
+ # Metadata for the report.
251
+ # @!attribute [rw] property_quota
252
+ # @return [::Google::Analytics::Data::V1alpha::PropertyQuota]
253
+ # This Analytics Property's quota state including this request.
254
+ class RunPivotReportResponse
255
+ include ::Google::Protobuf::MessageExts
256
+ extend ::Google::Protobuf::MessageExts::ClassMethods
257
+ end
258
+
259
+ # The batch request containing multiple report requests.
260
+ # @!attribute [rw] entity
261
+ # @return [::Google::Analytics::Data::V1alpha::Entity]
262
+ # A property whose events are tracked. This entity must be specified for the
263
+ # batch. The entity within RunReportRequest may either be unspecified or
264
+ # consistent with this entity.
265
+ # @!attribute [rw] requests
266
+ # @return [::Array<::Google::Analytics::Data::V1alpha::RunReportRequest>]
267
+ # Individual requests. Each request has a separate report response. Each
268
+ # batch request is allowed up to 5 requests.
269
+ class BatchRunReportsRequest
270
+ include ::Google::Protobuf::MessageExts
271
+ extend ::Google::Protobuf::MessageExts::ClassMethods
272
+ end
273
+
274
+ # The batch response containing multiple reports.
275
+ # @!attribute [rw] reports
276
+ # @return [::Array<::Google::Analytics::Data::V1alpha::RunReportResponse>]
277
+ # Individual responses. Each response has a separate report request.
278
+ class BatchRunReportsResponse
279
+ include ::Google::Protobuf::MessageExts
280
+ extend ::Google::Protobuf::MessageExts::ClassMethods
281
+ end
282
+
283
+ # The batch request containing multiple pivot report requests.
284
+ # @!attribute [rw] entity
285
+ # @return [::Google::Analytics::Data::V1alpha::Entity]
286
+ # A property whose events are tracked. This entity must be specified for the
287
+ # batch. The entity within RunPivotReportRequest may either be unspecified or
288
+ # consistent with this entity.
289
+ # @!attribute [rw] requests
290
+ # @return [::Array<::Google::Analytics::Data::V1alpha::RunPivotReportRequest>]
291
+ # Individual requests. Each request has a separate pivot report response.
292
+ # Each batch request is allowed up to 5 requests.
293
+ class BatchRunPivotReportsRequest
294
+ include ::Google::Protobuf::MessageExts
295
+ extend ::Google::Protobuf::MessageExts::ClassMethods
296
+ end
297
+
298
+ # The batch response containing multiple pivot reports.
299
+ # @!attribute [rw] pivot_reports
300
+ # @return [::Array<::Google::Analytics::Data::V1alpha::RunPivotReportResponse>]
301
+ # Individual responses. Each response has a separate pivot report request.
302
+ class BatchRunPivotReportsResponse
303
+ include ::Google::Protobuf::MessageExts
304
+ extend ::Google::Protobuf::MessageExts::ClassMethods
305
+ end
306
+
307
+ # Request for dimension and metric metadata.
308
+ # @!attribute [rw] name
309
+ # @return [::String]
310
+ # Required. The name of the metadata to retrieve. Either has the form
311
+ # 'metadata' or 'properties/\\{property}/metadata'. This name field is
312
+ # specified in the URL path and not URL parameters. Property is a numeric
313
+ # Google Analytics App + Web Property Id.
314
+ class GetMetadataRequest
315
+ include ::Google::Protobuf::MessageExts
316
+ extend ::Google::Protobuf::MessageExts::ClassMethods
317
+ end
318
+ end
319
+ end
320
+ end
321
+ end
@@ -0,0 +1,771 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Analytics
22
+ module Data
23
+ module V1alpha
24
+ # A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests
25
+ # are allowed up to 4 date ranges, and the union of the ranges can cover up to
26
+ # 1 year.
27
+ # @!attribute [rw] start_date
28
+ # @return [::String]
29
+ # The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot
30
+ # be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also
31
+ # accepted, and in that case, the date is inferred based on the property's
32
+ # reporting time zone.
33
+ # @!attribute [rw] end_date
34
+ # @return [::String]
35
+ # The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot
36
+ # be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is
37
+ # also accepted, and in that case, the date is inferred based on the
38
+ # property's reporting time zone.
39
+ # @!attribute [rw] name
40
+ # @return [::String]
41
+ # Assigns a name to this date range. The dimension `dateRange` is valued to
42
+ # this name in a report response. If set, cannot begin with `date_range_` or
43
+ # `RESERVED_`. If not set, date ranges are named by their zero based index in
44
+ # the request: `date_range_0`, `date_range_1`, etc.
45
+ class DateRange
46
+ include ::Google::Protobuf::MessageExts
47
+ extend ::Google::Protobuf::MessageExts::ClassMethods
48
+ end
49
+
50
+ # The unique identifier of the property whose events are tracked.
51
+ # @!attribute [rw] property_id
52
+ # @return [::String]
53
+ # A Google Analytics App + Web property id.
54
+ class Entity
55
+ include ::Google::Protobuf::MessageExts
56
+ extend ::Google::Protobuf::MessageExts::ClassMethods
57
+ end
58
+
59
+ # Dimensions are attributes of your data. For example, the dimension City
60
+ # indicates the city, for example, "Paris" or "New York", from which an event
61
+ # originates. Requests are allowed up to 8 dimensions.
62
+ # @!attribute [rw] name
63
+ # @return [::String]
64
+ # The name of the dimension.
65
+ # @!attribute [rw] dimension_expression
66
+ # @return [::Google::Analytics::Data::V1alpha::DimensionExpression]
67
+ # One dimension can be the result of an expression of multiple dimensions.
68
+ # For example, dimension "country, city": concatenate(country, ", ", city).
69
+ class Dimension
70
+ include ::Google::Protobuf::MessageExts
71
+ extend ::Google::Protobuf::MessageExts::ClassMethods
72
+ end
73
+
74
+ # Used to express a dimension which is the result of a formula of multiple
75
+ # dimensions. Example usages:
76
+ # 1) lower_case(dimension)
77
+ # 2) concatenate(dimension1, symbol, dimension2).
78
+ # @!attribute [rw] lower_case
79
+ # @return [::Google::Analytics::Data::V1alpha::DimensionExpression::CaseExpression]
80
+ # Used to convert a dimension value to lower case.
81
+ # @!attribute [rw] upper_case
82
+ # @return [::Google::Analytics::Data::V1alpha::DimensionExpression::CaseExpression]
83
+ # Used to convert a dimension value to upper case.
84
+ # @!attribute [rw] concatenate
85
+ # @return [::Google::Analytics::Data::V1alpha::DimensionExpression::ConcatenateExpression]
86
+ # Used to combine dimension values to a single dimension.
87
+ # For example, dimension "country, city": concatenate(country, ", ", city).
88
+ class DimensionExpression
89
+ include ::Google::Protobuf::MessageExts
90
+ extend ::Google::Protobuf::MessageExts::ClassMethods
91
+
92
+ # Used to convert a dimension value to a single case.
93
+ # @!attribute [rw] dimension_name
94
+ # @return [::String]
95
+ # Name of a dimension. The name must refer back to a name in dimensions
96
+ # field of the request.
97
+ class CaseExpression
98
+ include ::Google::Protobuf::MessageExts
99
+ extend ::Google::Protobuf::MessageExts::ClassMethods
100
+ end
101
+
102
+ # Used to combine dimension values to a single dimension.
103
+ # @!attribute [rw] dimension_names
104
+ # @return [::Array<::String>]
105
+ # Names of dimensions. The names must refer back to names in the dimensions
106
+ # field of the request.
107
+ # @!attribute [rw] delimiter
108
+ # @return [::String]
109
+ # The delimiter placed between dimension names.
110
+ #
111
+ # Delimiters are often single characters such as "|" or "," but can be
112
+ # longer strings. If a dimension value contains the delimiter, both will be
113
+ # present in response with no distinction. For example if dimension 1 value
114
+ # = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the
115
+ # response will contain "US,FR,JP".
116
+ class ConcatenateExpression
117
+ include ::Google::Protobuf::MessageExts
118
+ extend ::Google::Protobuf::MessageExts::ClassMethods
119
+ end
120
+ end
121
+
122
+ # The quantitative measurements of a report. For example, the metric eventCount
123
+ # is the total number of events. Requests are allowed up to 10 metrics.
124
+ # @!attribute [rw] name
125
+ # @return [::String]
126
+ # The name of the metric.
127
+ # @!attribute [rw] expression
128
+ # @return [::String]
129
+ # A mathematical expression for derived metrics. For example, the metric
130
+ # Event count per user is eventCount/totalUsers.
131
+ # @!attribute [rw] invisible
132
+ # @return [::Boolean]
133
+ # Indicates if a metric is invisible.
134
+ # If a metric is invisible, the metric is not in the response, but can be
135
+ # used in filters, order_bys or being referred to in a metric expression.
136
+ class Metric
137
+ include ::Google::Protobuf::MessageExts
138
+ extend ::Google::Protobuf::MessageExts::ClassMethods
139
+ end
140
+
141
+ # To express dimension or metric filters.
142
+ # The fields in the same FilterExpression need to be either all dimensions or
143
+ # all metrics.
144
+ # @!attribute [rw] and_group
145
+ # @return [::Google::Analytics::Data::V1alpha::FilterExpressionList]
146
+ # The FilterExpressions in and_group have an AND relationship.
147
+ # @!attribute [rw] or_group
148
+ # @return [::Google::Analytics::Data::V1alpha::FilterExpressionList]
149
+ # The FilterExpressions in or_group have an OR relationship.
150
+ # @!attribute [rw] not_expression
151
+ # @return [::Google::Analytics::Data::V1alpha::FilterExpression]
152
+ # The FilterExpression is NOT of not_expression.
153
+ # @!attribute [rw] filter
154
+ # @return [::Google::Analytics::Data::V1alpha::Filter]
155
+ # A primitive filter.
156
+ # All fields in filter in same FilterExpression needs to be either all
157
+ # dimensions or metrics.
158
+ class FilterExpression
159
+ include ::Google::Protobuf::MessageExts
160
+ extend ::Google::Protobuf::MessageExts::ClassMethods
161
+ end
162
+
163
+ # A list of filter expressions.
164
+ # @!attribute [rw] expressions
165
+ # @return [::Array<::Google::Analytics::Data::V1alpha::FilterExpression>]
166
+ # A list of filter expressions.
167
+ class FilterExpressionList
168
+ include ::Google::Protobuf::MessageExts
169
+ extend ::Google::Protobuf::MessageExts::ClassMethods
170
+ end
171
+
172
+ # An expression to filter dimension or metric values.
173
+ # @!attribute [rw] field_name
174
+ # @return [::String]
175
+ # The dimension name or metric name. Must be a name defined in dimensions
176
+ # or metrics.
177
+ # @!attribute [rw] null_filter
178
+ # @return [::Boolean]
179
+ # A filter for null values.
180
+ # @!attribute [rw] string_filter
181
+ # @return [::Google::Analytics::Data::V1alpha::Filter::StringFilter]
182
+ # Strings related filter.
183
+ # @!attribute [rw] in_list_filter
184
+ # @return [::Google::Analytics::Data::V1alpha::Filter::InListFilter]
185
+ # A filter for in list values.
186
+ # @!attribute [rw] numeric_filter
187
+ # @return [::Google::Analytics::Data::V1alpha::Filter::NumericFilter]
188
+ # A filter for numeric or date values.
189
+ # @!attribute [rw] between_filter
190
+ # @return [::Google::Analytics::Data::V1alpha::Filter::BetweenFilter]
191
+ # A filter for two values.
192
+ class Filter
193
+ include ::Google::Protobuf::MessageExts
194
+ extend ::Google::Protobuf::MessageExts::ClassMethods
195
+
196
+ # The filter for string
197
+ # @!attribute [rw] match_type
198
+ # @return [::Google::Analytics::Data::V1alpha::Filter::StringFilter::MatchType]
199
+ # The match type for this filter.
200
+ # @!attribute [rw] value
201
+ # @return [::String]
202
+ # The string value used for the matching.
203
+ # @!attribute [rw] case_sensitive
204
+ # @return [::Boolean]
205
+ # If true, the string value is case sensitive.
206
+ class StringFilter
207
+ include ::Google::Protobuf::MessageExts
208
+ extend ::Google::Protobuf::MessageExts::ClassMethods
209
+
210
+ # The match type of a string filter
211
+ module MatchType
212
+ # Unspecified
213
+ MATCH_TYPE_UNSPECIFIED = 0
214
+
215
+ # Exact match of the string value.
216
+ EXACT = 1
217
+
218
+ # Begins with the string value.
219
+ BEGINS_WITH = 2
220
+
221
+ # Ends with the string value.
222
+ ENDS_WITH = 3
223
+
224
+ # Contains the string value.
225
+ CONTAINS = 4
226
+
227
+ # Full regular expression match with the string value.
228
+ FULL_REGEXP = 5
229
+
230
+ # Partial regular expression match with the string value.
231
+ PARTIAL_REGEXP = 6
232
+ end
233
+ end
234
+
235
+ # The result needs to be in a list of string values.
236
+ # @!attribute [rw] values
237
+ # @return [::Array<::String>]
238
+ # The list of string values.
239
+ # Must be non-empty.
240
+ # @!attribute [rw] case_sensitive
241
+ # @return [::Boolean]
242
+ # If true, the string value is case sensitive.
243
+ class InListFilter
244
+ include ::Google::Protobuf::MessageExts
245
+ extend ::Google::Protobuf::MessageExts::ClassMethods
246
+ end
247
+
248
+ # Filters for numeric or date values.
249
+ # @!attribute [rw] operation
250
+ # @return [::Google::Analytics::Data::V1alpha::Filter::NumericFilter::Operation]
251
+ # The operation type for this filter.
252
+ # @!attribute [rw] value
253
+ # @return [::Google::Analytics::Data::V1alpha::NumericValue]
254
+ # A numeric value or a date value.
255
+ class NumericFilter
256
+ include ::Google::Protobuf::MessageExts
257
+ extend ::Google::Protobuf::MessageExts::ClassMethods
258
+
259
+ # The operation applied to a numeric filter
260
+ module Operation
261
+ # Unspecified.
262
+ OPERATION_UNSPECIFIED = 0
263
+
264
+ # Equal
265
+ EQUAL = 1
266
+
267
+ # Less than
268
+ LESS_THAN = 2
269
+
270
+ # Less than or equal
271
+ LESS_THAN_OR_EQUAL = 3
272
+
273
+ # Greater than
274
+ GREATER_THAN = 4
275
+
276
+ # Greater than or equal
277
+ GREATER_THAN_OR_EQUAL = 5
278
+ end
279
+ end
280
+
281
+ # To express that the result needs to be between two numbers (inclusive).
282
+ # @!attribute [rw] from_value
283
+ # @return [::Google::Analytics::Data::V1alpha::NumericValue]
284
+ # Begins with this number.
285
+ # @!attribute [rw] to_value
286
+ # @return [::Google::Analytics::Data::V1alpha::NumericValue]
287
+ # Ends with this number.
288
+ class BetweenFilter
289
+ include ::Google::Protobuf::MessageExts
290
+ extend ::Google::Protobuf::MessageExts::ClassMethods
291
+ end
292
+ end
293
+
294
+ # The sort options.
295
+ # @!attribute [rw] metric
296
+ # @return [::Google::Analytics::Data::V1alpha::OrderBy::MetricOrderBy]
297
+ # Sorts results by a metric's values.
298
+ # @!attribute [rw] dimension
299
+ # @return [::Google::Analytics::Data::V1alpha::OrderBy::DimensionOrderBy]
300
+ # Sorts results by a dimension's values.
301
+ # @!attribute [rw] pivot
302
+ # @return [::Google::Analytics::Data::V1alpha::OrderBy::PivotOrderBy]
303
+ # Sorts results by a metric's values within a pivot column group.
304
+ # @!attribute [rw] desc
305
+ # @return [::Boolean]
306
+ # If true, sorts by descending order.
307
+ class OrderBy
308
+ include ::Google::Protobuf::MessageExts
309
+ extend ::Google::Protobuf::MessageExts::ClassMethods
310
+
311
+ # Sorts by metric values.
312
+ # @!attribute [rw] metric_name
313
+ # @return [::String]
314
+ # A metric name in the request to order by.
315
+ class MetricOrderBy
316
+ include ::Google::Protobuf::MessageExts
317
+ extend ::Google::Protobuf::MessageExts::ClassMethods
318
+ end
319
+
320
+ # Sorts by dimension values.
321
+ # @!attribute [rw] dimension_name
322
+ # @return [::String]
323
+ # A dimension name in the request to order by.
324
+ # @!attribute [rw] order_type
325
+ # @return [::Google::Analytics::Data::V1alpha::OrderBy::DimensionOrderBy::OrderType]
326
+ # Controls the rule for dimension value ordering.
327
+ class DimensionOrderBy
328
+ include ::Google::Protobuf::MessageExts
329
+ extend ::Google::Protobuf::MessageExts::ClassMethods
330
+
331
+ # Rule to order the string dimension values by.
332
+ module OrderType
333
+ # Unspecified.
334
+ ORDER_TYPE_UNSPECIFIED = 0
335
+
336
+ # Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" <
337
+ # "b" < "z".
338
+ ALPHANUMERIC = 1
339
+
340
+ # Case insensitive alphanumeric sort by lower case Unicode code point.
341
+ # For example, "2" < "A" < "b" < "X" < "z".
342
+ CASE_INSENSITIVE_ALPHANUMERIC = 2
343
+
344
+ # Dimension values are converted to numbers before sorting. For example
345
+ # in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" <
346
+ # "25". Non-numeric dimension values all have equal ordering value below
347
+ # all numeric values.
348
+ NUMERIC = 3
349
+ end
350
+ end
351
+
352
+ # Sorts by a pivot column group.
353
+ # @!attribute [rw] metric_name
354
+ # @return [::String]
355
+ # In the response to order by, order rows by this column. Must be a metric
356
+ # name from the request.
357
+ # @!attribute [rw] pivot_selections
358
+ # @return [::Array<::Google::Analytics::Data::V1alpha::OrderBy::PivotOrderBy::PivotSelection>]
359
+ # Used to select a dimension name and value pivot. If multiple pivot
360
+ # selections are given, the sort occurs on rows where all pivot selection
361
+ # dimension name and value pairs match the row's dimension name and value
362
+ # pair.
363
+ class PivotOrderBy
364
+ include ::Google::Protobuf::MessageExts
365
+ extend ::Google::Protobuf::MessageExts::ClassMethods
366
+
367
+ # A pair of dimension names and values. Rows with this dimension pivot pair
368
+ # are ordered by the metric's value.
369
+ #
370
+ # For example if pivots = \\{\\{"browser", "Chrome"}} and
371
+ # metric_name = "Sessions",
372
+ # then the rows will be sorted based on Sessions in Chrome.
373
+ #
374
+ # ---------|----------|----------------|----------|----------------
375
+ # | Chrome | Chrome | Safari | Safari
376
+ # ---------|----------|----------------|----------|----------------
377
+ # Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions
378
+ # ---------|----------|----------------|----------|----------------
379
+ # US | 2 | 2 | 3 | 1
380
+ # ---------|----------|----------------|----------|----------------
381
+ # Canada | 3 | 1 | 4 | 1
382
+ # ---------|----------|----------------|----------|----------------
383
+ # @!attribute [rw] dimension_name
384
+ # @return [::String]
385
+ # Must be a dimension name from the request.
386
+ # @!attribute [rw] dimension_value
387
+ # @return [::String]
388
+ # Order by only when the named dimension is this value.
389
+ class PivotSelection
390
+ include ::Google::Protobuf::MessageExts
391
+ extend ::Google::Protobuf::MessageExts::ClassMethods
392
+ end
393
+ end
394
+ end
395
+
396
+ # Describes the visible dimension columns and rows in the report response.
397
+ # @!attribute [rw] field_names
398
+ # @return [::Array<::String>]
399
+ # Dimension names for visible columns in the report response. Including
400
+ # "dateRange" produces a date range column; for each row in the response,
401
+ # dimension values in the date range column will indicate the corresponding
402
+ # date range from the request.
403
+ # @!attribute [rw] order_bys
404
+ # @return [::Array<::Google::Analytics::Data::V1alpha::OrderBy>]
405
+ # Specifies how dimensions are ordered in the pivot. In the first Pivot, the
406
+ # OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
407
+ # Pivots, the OrderBys determine only PivotDimensionHeader ordering.
408
+ # Dimensions specified in these OrderBys must be a subset of
409
+ # Pivot.field_names.
410
+ # @!attribute [rw] offset
411
+ # @return [::Integer]
412
+ # The row count of the start row. The first row is counted as row 0.
413
+ # @!attribute [rw] limit
414
+ # @return [::Integer]
415
+ # The number of rows to return in this pivot. If unspecified, 10 rows are
416
+ # returned. If -1, all rows are returned.
417
+ # @!attribute [rw] metric_aggregations
418
+ # @return [::Array<::Google::Analytics::Data::V1alpha::MetricAggregation>]
419
+ # Aggregate the metrics by dimensions in this pivot using the specified
420
+ # metric_aggregations.
421
+ class Pivot
422
+ include ::Google::Protobuf::MessageExts
423
+ extend ::Google::Protobuf::MessageExts::ClassMethods
424
+ end
425
+
426
+ # Specification for a cohort report.
427
+ # @!attribute [rw] cohorts
428
+ # @return [::Array<::Google::Analytics::Data::V1alpha::Cohort>]
429
+ # The definition for the cohorts.
430
+ # @!attribute [rw] cohorts_range
431
+ # @return [::Google::Analytics::Data::V1alpha::CohortsRange]
432
+ # The data ranges of cohorts.
433
+ # @!attribute [rw] cohort_report_settings
434
+ # @return [::Google::Analytics::Data::V1alpha::CohortReportSettings]
435
+ # Settings of a cohort report.
436
+ class CohortSpec
437
+ include ::Google::Protobuf::MessageExts
438
+ extend ::Google::Protobuf::MessageExts::ClassMethods
439
+ end
440
+
441
+ # Defines a cohort. A cohort is a group of users who share a common
442
+ # characteristic. For example, all users with the same acquisition date
443
+ # belong to the same cohort.
444
+ # @!attribute [rw] name
445
+ # @return [::String]
446
+ # Assigns a name to this cohort. The dimension `cohort` is valued to this
447
+ # name in a report response. If set, cannot begin with `cohort_` or
448
+ # `RESERVED_`. If not set, cohorts are named by their zero based index
449
+ # `cohort_0`, `cohort_1`, etc.
450
+ # @!attribute [rw] dimension
451
+ # @return [::String]
452
+ # The dimension used by cohort. Only supports `firstTouchDate` for retention
453
+ # report.
454
+ # @!attribute [rw] date_range
455
+ # @return [::Google::Analytics::Data::V1alpha::DateRange]
456
+ # The cohort selects users whose first visit date is between start date
457
+ # and end date defined in the `dateRange`. In a cohort request, this
458
+ # `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
459
+ # `RunPivotReportRequest` must be unspecified.
460
+ #
461
+ # The date range should be aligned with the cohort's granularity. If
462
+ # CohortsRange uses daily granularity, the date range can be aligned to any
463
+ # day. If CohortsRange uses weekly granularity, the date range should be
464
+ # aligned to the week boundary, starting at Sunday and ending Saturday. If
465
+ # CohortsRange uses monthly granularity, the date range should be aligned to
466
+ # the month, starting at the first and ending on the last day of the month.
467
+ class Cohort
468
+ include ::Google::Protobuf::MessageExts
469
+ extend ::Google::Protobuf::MessageExts::ClassMethods
470
+ end
471
+
472
+ # Settings of a cohort report.
473
+ # @!attribute [rw] accumulate
474
+ # @return [::Boolean]
475
+ # If true, accumulates the result from first visit day to the end day. Not
476
+ # supported in `RunReportRequest`.
477
+ class CohortReportSettings
478
+ include ::Google::Protobuf::MessageExts
479
+ extend ::Google::Protobuf::MessageExts::ClassMethods
480
+ end
481
+
482
+ # Describes date range for a cohort report.
483
+ # @!attribute [rw] granularity
484
+ # @return [::Google::Analytics::Data::V1alpha::CohortsRange::Granularity]
485
+ # Reporting date range for each cohort is calculated based on these three
486
+ # fields.
487
+ # @!attribute [rw] start_offset
488
+ # @return [::Integer]
489
+ # For daily cohorts, this will be the start day offset.
490
+ # For weekly cohorts, this will be the week offset.
491
+ # @!attribute [rw] end_offset
492
+ # @return [::Integer]
493
+ # For daily cohorts, this will be the end day offset.
494
+ # For weekly cohorts, this will be the week offset.
495
+ class CohortsRange
496
+ include ::Google::Protobuf::MessageExts
497
+ extend ::Google::Protobuf::MessageExts::ClassMethods
498
+
499
+ # Reporting granularity for the cohorts.
500
+ module Granularity
501
+ # Unspecified.
502
+ GRANULARITY_UNSPECIFIED = 0
503
+
504
+ # Daily
505
+ DAILY = 1
506
+
507
+ # Weekly
508
+ WEEKLY = 2
509
+
510
+ # Monthly
511
+ MONTHLY = 3
512
+ end
513
+ end
514
+
515
+ # Response's metadata carrying additional information about the report content.
516
+ # @!attribute [rw] data_loss_from_other_row
517
+ # @return [::Boolean]
518
+ # If true, indicates some buckets of dimension combinations are rolled into
519
+ # "(other)" row. This can happen for high cardinality reports.
520
+ class ResponseMetaData
521
+ include ::Google::Protobuf::MessageExts
522
+ extend ::Google::Protobuf::MessageExts::ClassMethods
523
+ end
524
+
525
+ # Describes a dimension column in the report. Dimensions requested in a report
526
+ # produce column entries within rows and DimensionHeaders. However, dimensions
527
+ # used exclusively within filters or expressions do not produce columns in a
528
+ # report; correspondingly, those dimensions do not produce headers.
529
+ # @!attribute [rw] name
530
+ # @return [::String]
531
+ # The dimension's name.
532
+ class DimensionHeader
533
+ include ::Google::Protobuf::MessageExts
534
+ extend ::Google::Protobuf::MessageExts::ClassMethods
535
+ end
536
+
537
+ # Describes a metric column in the report. Visible metrics requested in a
538
+ # report produce column entries within rows and MetricHeaders. However,
539
+ # metrics used exclusively within filters or expressions do not produce columns
540
+ # in a report; correspondingly, those metrics do not produce headers.
541
+ # @!attribute [rw] name
542
+ # @return [::String]
543
+ # The metric's name.
544
+ # @!attribute [rw] type
545
+ # @return [::Google::Analytics::Data::V1alpha::MetricType]
546
+ # The metric's data type.
547
+ class MetricHeader
548
+ include ::Google::Protobuf::MessageExts
549
+ extend ::Google::Protobuf::MessageExts::ClassMethods
550
+ end
551
+
552
+ # Dimensions' values in a single pivot.
553
+ # @!attribute [rw] pivot_dimension_headers
554
+ # @return [::Array<::Google::Analytics::Data::V1alpha::PivotDimensionHeader>]
555
+ # The size is the same as the cardinality of the corresponding dimension
556
+ # combinations.
557
+ # @!attribute [rw] row_count
558
+ # @return [::Integer]
559
+ # The cardinality of the pivot as if offset = 0 and limit = -1.
560
+ class PivotHeader
561
+ include ::Google::Protobuf::MessageExts
562
+ extend ::Google::Protobuf::MessageExts::ClassMethods
563
+ end
564
+
565
+ # Summarizes dimension values from a row for this pivot.
566
+ # @!attribute [rw] dimension_values
567
+ # @return [::Array<::Google::Analytics::Data::V1alpha::DimensionValue>]
568
+ # Values of multiple dimensions in a pivot.
569
+ class PivotDimensionHeader
570
+ include ::Google::Protobuf::MessageExts
571
+ extend ::Google::Protobuf::MessageExts::ClassMethods
572
+ end
573
+
574
+ # Report data for each row.
575
+ # For example if RunReportRequest contains:
576
+ #
577
+ # ```none
578
+ # dimensions {
579
+ # name: "eventName"
580
+ # }
581
+ # dimensions {
582
+ # name: "countryId"
583
+ # }
584
+ # metrics {
585
+ # name: "eventCount"
586
+ # }
587
+ # ```
588
+ #
589
+ # One row with 'in_app_purchase' as the eventName, 'us' as the countryId, and
590
+ # 15 as the eventCount, would be:
591
+ #
592
+ # ```none
593
+ # dimension_values {
594
+ # name: 'in_app_purchase'
595
+ # name: 'us'
596
+ # }
597
+ # metric_values {
598
+ # int64_value: 15
599
+ # }
600
+ # ```
601
+ # @!attribute [rw] dimension_values
602
+ # @return [::Array<::Google::Analytics::Data::V1alpha::DimensionValue>]
603
+ # List of requested dimension values. In a PivotReport, dimension_values
604
+ # are only listed for dimensions included in a pivot.
605
+ # @!attribute [rw] metric_values
606
+ # @return [::Array<::Google::Analytics::Data::V1alpha::MetricValue>]
607
+ # List of requested visible metric values.
608
+ class Row
609
+ include ::Google::Protobuf::MessageExts
610
+ extend ::Google::Protobuf::MessageExts::ClassMethods
611
+ end
612
+
613
+ # The value of a dimension.
614
+ # @!attribute [rw] value
615
+ # @return [::String]
616
+ # Value as a string if the dimension type is a string.
617
+ class DimensionValue
618
+ include ::Google::Protobuf::MessageExts
619
+ extend ::Google::Protobuf::MessageExts::ClassMethods
620
+ end
621
+
622
+ # The value of a metric.
623
+ # @!attribute [rw] value
624
+ # @return [::String]
625
+ # Measurement value. See MetricHeader for type.
626
+ class MetricValue
627
+ include ::Google::Protobuf::MessageExts
628
+ extend ::Google::Protobuf::MessageExts::ClassMethods
629
+ end
630
+
631
+ # To represent a number.
632
+ # @!attribute [rw] int64_value
633
+ # @return [::Integer]
634
+ # Integer value
635
+ # @!attribute [rw] double_value
636
+ # @return [::Float]
637
+ # Double value
638
+ class NumericValue
639
+ include ::Google::Protobuf::MessageExts
640
+ extend ::Google::Protobuf::MessageExts::ClassMethods
641
+ end
642
+
643
+ # Current state of all quotas for this Analytics Property. If any quota for a
644
+ # property is exhausted, all requests to that property will return Resource
645
+ # Exhausted errors.
646
+ # @!attribute [rw] tokens_per_day
647
+ # @return [::Google::Analytics::Data::V1alpha::QuotaStatus]
648
+ # Analytics Properties can use up to 25,000 tokens per day. Most requests
649
+ # consume fewer than 10 tokens.
650
+ # @!attribute [rw] tokens_per_hour
651
+ # @return [::Google::Analytics::Data::V1alpha::QuotaStatus]
652
+ # Analytics Properties can use up to 5,000 tokens per day. An API request
653
+ # consumes a single number of tokens, and that number is deducted from both
654
+ # the hourly and daily quotas.
655
+ # @!attribute [rw] concurrent_requests
656
+ # @return [::Google::Analytics::Data::V1alpha::QuotaStatus]
657
+ # Analytics Properties can send up to 10 concurrent requests.
658
+ # @!attribute [rw] server_errors_per_project_per_hour
659
+ # @return [::Google::Analytics::Data::V1alpha::QuotaStatus]
660
+ # Analytics Properties and cloud project pairs can have up to 10
661
+ # server errors per hour.
662
+ class PropertyQuota
663
+ include ::Google::Protobuf::MessageExts
664
+ extend ::Google::Protobuf::MessageExts::ClassMethods
665
+ end
666
+
667
+ # Current state for a particular quota group.
668
+ # @!attribute [rw] consumed
669
+ # @return [::Integer]
670
+ # Quota consumed by this request.
671
+ # @!attribute [rw] remaining
672
+ # @return [::Integer]
673
+ # Quota remaining after this request.
674
+ class QuotaStatus
675
+ include ::Google::Protobuf::MessageExts
676
+ extend ::Google::Protobuf::MessageExts::ClassMethods
677
+ end
678
+
679
+ # Explains a dimension.
680
+ # @!attribute [rw] api_name
681
+ # @return [::String]
682
+ # This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For
683
+ # example, `eventName`.
684
+ # @!attribute [rw] ui_name
685
+ # @return [::String]
686
+ # This dimension's name within the Google Analytics user interface. For
687
+ # example, `Event name`.
688
+ # @!attribute [rw] description
689
+ # @return [::String]
690
+ # Description of how this dimension is used and calculated.
691
+ # @!attribute [rw] deprecated_api_names
692
+ # @return [::Array<::String>]
693
+ # Still usable but deprecated names for this dimension. If populated, this
694
+ # dimension is available by either `apiName` or one of `deprecatedApiNames`
695
+ # for a period of time. After the deprecation period, the dimension will be
696
+ # available only by `apiName`.
697
+ class DimensionMetadata
698
+ include ::Google::Protobuf::MessageExts
699
+ extend ::Google::Protobuf::MessageExts::ClassMethods
700
+ end
701
+
702
+ # Explains a metric.
703
+ # @!attribute [rw] api_name
704
+ # @return [::String]
705
+ # A metric name. Useable in [Metric](#Metric)'s `name`. For example,
706
+ # `eventCount`.
707
+ # @!attribute [rw] ui_name
708
+ # @return [::String]
709
+ # This metric's name within the Google Analytics user interface. For example,
710
+ # `Event count`.
711
+ # @!attribute [rw] description
712
+ # @return [::String]
713
+ # Description of how this metric is used and calculated.
714
+ # @!attribute [rw] deprecated_api_names
715
+ # @return [::Array<::String>]
716
+ # Still usable but deprecated names for this metric. If populated, this
717
+ # metric is available by either `apiName` or one of `deprecatedApiNames`
718
+ # for a period of time. After the deprecation period, the metric will be
719
+ # available only by `apiName`.
720
+ # @!attribute [rw] type
721
+ # @return [::Google::Analytics::Data::V1alpha::MetricType]
722
+ # The type of this metric.
723
+ # @!attribute [rw] expression
724
+ # @return [::String]
725
+ # The mathematical expression for this derived metric. Can be used in
726
+ # [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
727
+ # are not expressions, and for non-expressions, this field is empty.
728
+ class MetricMetadata
729
+ include ::Google::Protobuf::MessageExts
730
+ extend ::Google::Protobuf::MessageExts::ClassMethods
731
+ end
732
+
733
+ # Represents aggregation of metrics.
734
+ module MetricAggregation
735
+ # Unspecified operator.
736
+ METRIC_AGGREGATION_UNSPECIFIED = 0
737
+
738
+ # SUM operator.
739
+ TOTAL = 1
740
+
741
+ # Minimum operator.
742
+ MINIMUM = 5
743
+
744
+ # Maximum operator.
745
+ MAXIMUM = 6
746
+
747
+ # Count operator.
748
+ COUNT = 4
749
+ end
750
+
751
+ # A metric's value type.
752
+ module MetricType
753
+ # Unspecified type.
754
+ METRIC_TYPE_UNSPECIFIED = 0
755
+
756
+ # Integer type.
757
+ TYPE_INTEGER = 1
758
+
759
+ # Floating point type.
760
+ TYPE_FLOAT = 2
761
+
762
+ # A duration of seconds; a special floating point type.
763
+ TYPE_SECONDS = 4
764
+
765
+ # An amount of money; a special floating point type.
766
+ TYPE_CURRENCY = 9
767
+ end
768
+ end
769
+ end
770
+ end
771
+ end