google-analytics-admin 0.23.6__py3-none-any.whl

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.
Files changed (51) hide show
  1. google/analytics/admin/__init__.py +615 -0
  2. google/analytics/admin/gapic_version.py +16 -0
  3. google/analytics/admin/py.typed +2 -0
  4. google/analytics/admin_v1alpha/__init__.py +613 -0
  5. google/analytics/admin_v1alpha/gapic_metadata.json +2278 -0
  6. google/analytics/admin_v1alpha/gapic_version.py +16 -0
  7. google/analytics/admin_v1alpha/py.typed +2 -0
  8. google/analytics/admin_v1alpha/services/__init__.py +15 -0
  9. google/analytics/admin_v1alpha/services/analytics_admin_service/__init__.py +22 -0
  10. google/analytics/admin_v1alpha/services/analytics_admin_service/async_client.py +14122 -0
  11. google/analytics/admin_v1alpha/services/analytics_admin_service/client.py +14680 -0
  12. google/analytics/admin_v1alpha/services/analytics_admin_service/pagers.py +4337 -0
  13. google/analytics/admin_v1alpha/services/analytics_admin_service/transports/__init__.py +41 -0
  14. google/analytics/admin_v1alpha/services/analytics_admin_service/transports/base.py +2494 -0
  15. google/analytics/admin_v1alpha/services/analytics_admin_service/transports/grpc.py +4797 -0
  16. google/analytics/admin_v1alpha/services/analytics_admin_service/transports/grpc_asyncio.py +5671 -0
  17. google/analytics/admin_v1alpha/services/analytics_admin_service/transports/rest.py +31875 -0
  18. google/analytics/admin_v1alpha/services/analytics_admin_service/transports/rest_base.py +7944 -0
  19. google/analytics/admin_v1alpha/types/__init__.py +602 -0
  20. google/analytics/admin_v1alpha/types/access_report.py +705 -0
  21. google/analytics/admin_v1alpha/types/analytics_admin.py +4997 -0
  22. google/analytics/admin_v1alpha/types/audience.py +781 -0
  23. google/analytics/admin_v1alpha/types/channel_group.py +309 -0
  24. google/analytics/admin_v1alpha/types/event_create_and_edit.py +298 -0
  25. google/analytics/admin_v1alpha/types/expanded_data_set.py +282 -0
  26. google/analytics/admin_v1alpha/types/resources.py +3289 -0
  27. google/analytics/admin_v1alpha/types/subproperty_event_filter.py +292 -0
  28. google/analytics/admin_v1beta/__init__.py +255 -0
  29. google/analytics/admin_v1beta/gapic_metadata.json +838 -0
  30. google/analytics/admin_v1beta/gapic_version.py +16 -0
  31. google/analytics/admin_v1beta/py.typed +2 -0
  32. google/analytics/admin_v1beta/services/__init__.py +15 -0
  33. google/analytics/admin_v1beta/services/analytics_admin_service/__init__.py +22 -0
  34. google/analytics/admin_v1beta/services/analytics_admin_service/async_client.py +6707 -0
  35. google/analytics/admin_v1beta/services/analytics_admin_service/client.py +7164 -0
  36. google/analytics/admin_v1beta/services/analytics_admin_service/pagers.py +1927 -0
  37. google/analytics/admin_v1beta/services/analytics_admin_service/transports/__init__.py +41 -0
  38. google/analytics/admin_v1beta/services/analytics_admin_service/transports/base.py +965 -0
  39. google/analytics/admin_v1beta/services/analytics_admin_service/transports/grpc.py +1917 -0
  40. google/analytics/admin_v1beta/services/analytics_admin_service/transports/grpc_asyncio.py +2251 -0
  41. google/analytics/admin_v1beta/services/analytics_admin_service/transports/rest.py +11423 -0
  42. google/analytics/admin_v1beta/services/analytics_admin_service/transports/rest_base.py +2857 -0
  43. google/analytics/admin_v1beta/types/__init__.py +244 -0
  44. google/analytics/admin_v1beta/types/access_report.py +705 -0
  45. google/analytics/admin_v1beta/types/analytics_admin.py +2006 -0
  46. google/analytics/admin_v1beta/types/resources.py +1677 -0
  47. google_analytics_admin-0.23.6.dist-info/LICENSE +202 -0
  48. google_analytics_admin-0.23.6.dist-info/METADATA +228 -0
  49. google_analytics_admin-0.23.6.dist-info/RECORD +51 -0
  50. google_analytics_admin-0.23.6.dist-info/WHEEL +5 -0
  51. google_analytics_admin-0.23.6.dist-info/top_level.txt +1 -0
@@ -0,0 +1,781 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2024 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ from __future__ import annotations
17
+
18
+ from typing import MutableMapping, MutableSequence
19
+
20
+ from google.protobuf import duration_pb2 # type: ignore
21
+ from google.protobuf import timestamp_pb2 # type: ignore
22
+ import proto # type: ignore
23
+
24
+ __protobuf__ = proto.module(
25
+ package="google.analytics.admin.v1alpha",
26
+ manifest={
27
+ "AudienceFilterScope",
28
+ "AudienceDimensionOrMetricFilter",
29
+ "AudienceEventFilter",
30
+ "AudienceFilterExpression",
31
+ "AudienceFilterExpressionList",
32
+ "AudienceSimpleFilter",
33
+ "AudienceSequenceFilter",
34
+ "AudienceFilterClause",
35
+ "AudienceEventTrigger",
36
+ "Audience",
37
+ },
38
+ )
39
+
40
+
41
+ class AudienceFilterScope(proto.Enum):
42
+ r"""Specifies how to evaluate users for joining an Audience.
43
+
44
+ Values:
45
+ AUDIENCE_FILTER_SCOPE_UNSPECIFIED (0):
46
+ Scope is not specified.
47
+ AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT (1):
48
+ User joins the Audience if the filter
49
+ condition is met within one event.
50
+ AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION (2):
51
+ User joins the Audience if the filter
52
+ condition is met within one session.
53
+ AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS (3):
54
+ User joins the Audience if the filter
55
+ condition is met by any event across any
56
+ session.
57
+ """
58
+ AUDIENCE_FILTER_SCOPE_UNSPECIFIED = 0
59
+ AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT = 1
60
+ AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION = 2
61
+ AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS = 3
62
+
63
+
64
+ class AudienceDimensionOrMetricFilter(proto.Message):
65
+ r"""A specific filter for a single dimension or metric.
66
+
67
+ This message has `oneof`_ fields (mutually exclusive fields).
68
+ For each oneof, at most one member field can be set at the same time.
69
+ Setting any member of the oneof automatically clears all other
70
+ members.
71
+
72
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
73
+
74
+ Attributes:
75
+ string_filter (google.analytics.admin_v1alpha.types.AudienceDimensionOrMetricFilter.StringFilter):
76
+ A filter for a string-type dimension that
77
+ matches a particular pattern.
78
+
79
+ This field is a member of `oneof`_ ``one_filter``.
80
+ in_list_filter (google.analytics.admin_v1alpha.types.AudienceDimensionOrMetricFilter.InListFilter):
81
+ A filter for a string dimension that matches
82
+ a particular list of options.
83
+
84
+ This field is a member of `oneof`_ ``one_filter``.
85
+ numeric_filter (google.analytics.admin_v1alpha.types.AudienceDimensionOrMetricFilter.NumericFilter):
86
+ A filter for numeric or date values on a
87
+ dimension or metric.
88
+
89
+ This field is a member of `oneof`_ ``one_filter``.
90
+ between_filter (google.analytics.admin_v1alpha.types.AudienceDimensionOrMetricFilter.BetweenFilter):
91
+ A filter for numeric or date values between
92
+ certain values on a dimension or metric.
93
+
94
+ This field is a member of `oneof`_ ``one_filter``.
95
+ field_name (str):
96
+ Required. Immutable. The dimension name or metric name to
97
+ filter. If the field name refers to a custom dimension or
98
+ metric, a scope prefix will be added to the front of the
99
+ custom dimensions or metric name. For more on scope prefixes
100
+ or custom dimensions/metrics, reference the [Google
101
+ Analytics Data API documentation]
102
+ (https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#custom_dimensions).
103
+ at_any_point_in_time (bool):
104
+ Optional. Indicates whether this filter needs dynamic
105
+ evaluation or not. If set to true, users join the Audience
106
+ if they ever met the condition (static evaluation). If unset
107
+ or set to false, user evaluation for an Audience is dynamic;
108
+ users are added to an Audience when they meet the conditions
109
+ and then removed when they no longer meet them.
110
+
111
+ This can only be set when Audience scope is
112
+ ACROSS_ALL_SESSIONS.
113
+ in_any_n_day_period (int):
114
+ Optional. If set, specifies the time window for which to
115
+ evaluate data in number of days. If not set, then audience
116
+ data is evaluated against lifetime data (For example,
117
+ infinite time window).
118
+
119
+ For example, if set to 1 day, only the current day's data is
120
+ evaluated. The reference point is the current day when
121
+ at_any_point_in_time is unset or false.
122
+
123
+ It can only be set when Audience scope is
124
+ ACROSS_ALL_SESSIONS and cannot be greater than 60 days.
125
+ """
126
+
127
+ class StringFilter(proto.Message):
128
+ r"""A filter for a string-type dimension that matches a
129
+ particular pattern.
130
+
131
+ Attributes:
132
+ match_type (google.analytics.admin_v1alpha.types.AudienceDimensionOrMetricFilter.StringFilter.MatchType):
133
+ Required. The match type for the string
134
+ filter.
135
+ value (str):
136
+ Required. The string value to be matched
137
+ against.
138
+ case_sensitive (bool):
139
+ Optional. If true, the match is
140
+ case-sensitive. If false, the match is
141
+ case-insensitive.
142
+ """
143
+
144
+ class MatchType(proto.Enum):
145
+ r"""The match type for the string filter.
146
+
147
+ Values:
148
+ MATCH_TYPE_UNSPECIFIED (0):
149
+ Unspecified
150
+ EXACT (1):
151
+ Exact match of the string value.
152
+ BEGINS_WITH (2):
153
+ Begins with the string value.
154
+ ENDS_WITH (3):
155
+ Ends with the string value.
156
+ CONTAINS (4):
157
+ Contains the string value.
158
+ FULL_REGEXP (5):
159
+ Full regular expression matches with the
160
+ string value.
161
+ """
162
+ MATCH_TYPE_UNSPECIFIED = 0
163
+ EXACT = 1
164
+ BEGINS_WITH = 2
165
+ ENDS_WITH = 3
166
+ CONTAINS = 4
167
+ FULL_REGEXP = 5
168
+
169
+ match_type: "AudienceDimensionOrMetricFilter.StringFilter.MatchType" = (
170
+ proto.Field(
171
+ proto.ENUM,
172
+ number=1,
173
+ enum="AudienceDimensionOrMetricFilter.StringFilter.MatchType",
174
+ )
175
+ )
176
+ value: str = proto.Field(
177
+ proto.STRING,
178
+ number=2,
179
+ )
180
+ case_sensitive: bool = proto.Field(
181
+ proto.BOOL,
182
+ number=3,
183
+ )
184
+
185
+ class InListFilter(proto.Message):
186
+ r"""A filter for a string dimension that matches a particular
187
+ list of options.
188
+
189
+ Attributes:
190
+ values (MutableSequence[str]):
191
+ Required. The list of possible string values
192
+ to match against. Must be non-empty.
193
+ case_sensitive (bool):
194
+ Optional. If true, the match is
195
+ case-sensitive. If false, the match is
196
+ case-insensitive.
197
+ """
198
+
199
+ values: MutableSequence[str] = proto.RepeatedField(
200
+ proto.STRING,
201
+ number=1,
202
+ )
203
+ case_sensitive: bool = proto.Field(
204
+ proto.BOOL,
205
+ number=2,
206
+ )
207
+
208
+ class NumericValue(proto.Message):
209
+ r"""To represent a number.
210
+
211
+ This message has `oneof`_ fields (mutually exclusive fields).
212
+ For each oneof, at most one member field can be set at the same time.
213
+ Setting any member of the oneof automatically clears all other
214
+ members.
215
+
216
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
217
+
218
+ Attributes:
219
+ int64_value (int):
220
+ Integer value.
221
+
222
+ This field is a member of `oneof`_ ``one_value``.
223
+ double_value (float):
224
+ Double value.
225
+
226
+ This field is a member of `oneof`_ ``one_value``.
227
+ """
228
+
229
+ int64_value: int = proto.Field(
230
+ proto.INT64,
231
+ number=1,
232
+ oneof="one_value",
233
+ )
234
+ double_value: float = proto.Field(
235
+ proto.DOUBLE,
236
+ number=2,
237
+ oneof="one_value",
238
+ )
239
+
240
+ class NumericFilter(proto.Message):
241
+ r"""A filter for numeric or date values on a dimension or metric.
242
+
243
+ Attributes:
244
+ operation (google.analytics.admin_v1alpha.types.AudienceDimensionOrMetricFilter.NumericFilter.Operation):
245
+ Required. The operation applied to a numeric
246
+ filter.
247
+ value (google.analytics.admin_v1alpha.types.AudienceDimensionOrMetricFilter.NumericValue):
248
+ Required. The numeric or date value to match
249
+ against.
250
+ """
251
+
252
+ class Operation(proto.Enum):
253
+ r"""The operation applied to a numeric filter.
254
+
255
+ Values:
256
+ OPERATION_UNSPECIFIED (0):
257
+ Unspecified.
258
+ EQUAL (1):
259
+ Equal.
260
+ LESS_THAN (2):
261
+ Less than.
262
+ GREATER_THAN (4):
263
+ Greater than.
264
+ """
265
+ OPERATION_UNSPECIFIED = 0
266
+ EQUAL = 1
267
+ LESS_THAN = 2
268
+ GREATER_THAN = 4
269
+
270
+ operation: "AudienceDimensionOrMetricFilter.NumericFilter.Operation" = (
271
+ proto.Field(
272
+ proto.ENUM,
273
+ number=1,
274
+ enum="AudienceDimensionOrMetricFilter.NumericFilter.Operation",
275
+ )
276
+ )
277
+ value: "AudienceDimensionOrMetricFilter.NumericValue" = proto.Field(
278
+ proto.MESSAGE,
279
+ number=2,
280
+ message="AudienceDimensionOrMetricFilter.NumericValue",
281
+ )
282
+
283
+ class BetweenFilter(proto.Message):
284
+ r"""A filter for numeric or date values between certain values on
285
+ a dimension or metric.
286
+
287
+ Attributes:
288
+ from_value (google.analytics.admin_v1alpha.types.AudienceDimensionOrMetricFilter.NumericValue):
289
+ Required. Begins with this number, inclusive.
290
+ to_value (google.analytics.admin_v1alpha.types.AudienceDimensionOrMetricFilter.NumericValue):
291
+ Required. Ends with this number, inclusive.
292
+ """
293
+
294
+ from_value: "AudienceDimensionOrMetricFilter.NumericValue" = proto.Field(
295
+ proto.MESSAGE,
296
+ number=1,
297
+ message="AudienceDimensionOrMetricFilter.NumericValue",
298
+ )
299
+ to_value: "AudienceDimensionOrMetricFilter.NumericValue" = proto.Field(
300
+ proto.MESSAGE,
301
+ number=2,
302
+ message="AudienceDimensionOrMetricFilter.NumericValue",
303
+ )
304
+
305
+ string_filter: StringFilter = proto.Field(
306
+ proto.MESSAGE,
307
+ number=2,
308
+ oneof="one_filter",
309
+ message=StringFilter,
310
+ )
311
+ in_list_filter: InListFilter = proto.Field(
312
+ proto.MESSAGE,
313
+ number=3,
314
+ oneof="one_filter",
315
+ message=InListFilter,
316
+ )
317
+ numeric_filter: NumericFilter = proto.Field(
318
+ proto.MESSAGE,
319
+ number=4,
320
+ oneof="one_filter",
321
+ message=NumericFilter,
322
+ )
323
+ between_filter: BetweenFilter = proto.Field(
324
+ proto.MESSAGE,
325
+ number=5,
326
+ oneof="one_filter",
327
+ message=BetweenFilter,
328
+ )
329
+ field_name: str = proto.Field(
330
+ proto.STRING,
331
+ number=1,
332
+ )
333
+ at_any_point_in_time: bool = proto.Field(
334
+ proto.BOOL,
335
+ number=6,
336
+ )
337
+ in_any_n_day_period: int = proto.Field(
338
+ proto.INT32,
339
+ number=7,
340
+ )
341
+
342
+
343
+ class AudienceEventFilter(proto.Message):
344
+ r"""A filter that matches events of a single event name. If an
345
+ event parameter is specified, only the subset of events that
346
+ match both the single event name and the parameter filter
347
+ expressions match this event filter.
348
+
349
+ Attributes:
350
+ event_name (str):
351
+ Required. Immutable. The name of the event to
352
+ match against.
353
+ event_parameter_filter_expression (google.analytics.admin_v1alpha.types.AudienceFilterExpression):
354
+ Optional. If specified, this filter matches events that
355
+ match both the single event name and the parameter filter
356
+ expressions. AudienceEventFilter inside the parameter filter
357
+ expression cannot be set (For example, nested event filters
358
+ are not supported). This should be a single and_group of
359
+ dimension_or_metric_filter or not_expression; ANDs of ORs
360
+ are not supported. Also, if it includes a filter for
361
+ "eventCount", only that one will be considered; all the
362
+ other filters will be ignored.
363
+ """
364
+
365
+ event_name: str = proto.Field(
366
+ proto.STRING,
367
+ number=1,
368
+ )
369
+ event_parameter_filter_expression: "AudienceFilterExpression" = proto.Field(
370
+ proto.MESSAGE,
371
+ number=2,
372
+ message="AudienceFilterExpression",
373
+ )
374
+
375
+
376
+ class AudienceFilterExpression(proto.Message):
377
+ r"""A logical expression of Audience dimension, metric, or event
378
+ filters.
379
+
380
+ This message has `oneof`_ fields (mutually exclusive fields).
381
+ For each oneof, at most one member field can be set at the same time.
382
+ Setting any member of the oneof automatically clears all other
383
+ members.
384
+
385
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
386
+
387
+ Attributes:
388
+ and_group (google.analytics.admin_v1alpha.types.AudienceFilterExpressionList):
389
+ A list of expressions to be AND’ed together. It can only
390
+ contain AudienceFilterExpressions with or_group. This must
391
+ be set for the top level AudienceFilterExpression.
392
+
393
+ This field is a member of `oneof`_ ``expr``.
394
+ or_group (google.analytics.admin_v1alpha.types.AudienceFilterExpressionList):
395
+ A list of expressions to OR’ed together. It cannot contain
396
+ AudienceFilterExpressions with and_group or or_group.
397
+
398
+ This field is a member of `oneof`_ ``expr``.
399
+ not_expression (google.analytics.admin_v1alpha.types.AudienceFilterExpression):
400
+ A filter expression to be NOT'ed (For example, inverted,
401
+ complemented). It can only include a
402
+ dimension_or_metric_filter. This cannot be set on the top
403
+ level AudienceFilterExpression.
404
+
405
+ This field is a member of `oneof`_ ``expr``.
406
+ dimension_or_metric_filter (google.analytics.admin_v1alpha.types.AudienceDimensionOrMetricFilter):
407
+ A filter on a single dimension or metric.
408
+ This cannot be set on the top level
409
+ AudienceFilterExpression.
410
+
411
+ This field is a member of `oneof`_ ``expr``.
412
+ event_filter (google.analytics.admin_v1alpha.types.AudienceEventFilter):
413
+ Creates a filter that matches a specific
414
+ event. This cannot be set on the top level
415
+ AudienceFilterExpression.
416
+
417
+ This field is a member of `oneof`_ ``expr``.
418
+ """
419
+
420
+ and_group: "AudienceFilterExpressionList" = proto.Field(
421
+ proto.MESSAGE,
422
+ number=1,
423
+ oneof="expr",
424
+ message="AudienceFilterExpressionList",
425
+ )
426
+ or_group: "AudienceFilterExpressionList" = proto.Field(
427
+ proto.MESSAGE,
428
+ number=2,
429
+ oneof="expr",
430
+ message="AudienceFilterExpressionList",
431
+ )
432
+ not_expression: "AudienceFilterExpression" = proto.Field(
433
+ proto.MESSAGE,
434
+ number=3,
435
+ oneof="expr",
436
+ message="AudienceFilterExpression",
437
+ )
438
+ dimension_or_metric_filter: "AudienceDimensionOrMetricFilter" = proto.Field(
439
+ proto.MESSAGE,
440
+ number=4,
441
+ oneof="expr",
442
+ message="AudienceDimensionOrMetricFilter",
443
+ )
444
+ event_filter: "AudienceEventFilter" = proto.Field(
445
+ proto.MESSAGE,
446
+ number=5,
447
+ oneof="expr",
448
+ message="AudienceEventFilter",
449
+ )
450
+
451
+
452
+ class AudienceFilterExpressionList(proto.Message):
453
+ r"""A list of Audience filter expressions.
454
+
455
+ Attributes:
456
+ filter_expressions (MutableSequence[google.analytics.admin_v1alpha.types.AudienceFilterExpression]):
457
+ A list of Audience filter expressions.
458
+ """
459
+
460
+ filter_expressions: MutableSequence[
461
+ "AudienceFilterExpression"
462
+ ] = proto.RepeatedField(
463
+ proto.MESSAGE,
464
+ number=1,
465
+ message="AudienceFilterExpression",
466
+ )
467
+
468
+
469
+ class AudienceSimpleFilter(proto.Message):
470
+ r"""Defines a simple filter that a user must satisfy to be a
471
+ member of the Audience.
472
+
473
+ Attributes:
474
+ scope (google.analytics.admin_v1alpha.types.AudienceFilterScope):
475
+ Required. Immutable. Specifies the scope for
476
+ this filter.
477
+ filter_expression (google.analytics.admin_v1alpha.types.AudienceFilterExpression):
478
+ Required. Immutable. A logical expression of
479
+ Audience dimension, metric, or event filters.
480
+ """
481
+
482
+ scope: "AudienceFilterScope" = proto.Field(
483
+ proto.ENUM,
484
+ number=1,
485
+ enum="AudienceFilterScope",
486
+ )
487
+ filter_expression: "AudienceFilterExpression" = proto.Field(
488
+ proto.MESSAGE,
489
+ number=2,
490
+ message="AudienceFilterExpression",
491
+ )
492
+
493
+
494
+ class AudienceSequenceFilter(proto.Message):
495
+ r"""Defines filters that must occur in a specific order for the
496
+ user to be a member of the Audience.
497
+
498
+ Attributes:
499
+ scope (google.analytics.admin_v1alpha.types.AudienceFilterScope):
500
+ Required. Immutable. Specifies the scope for
501
+ this filter.
502
+ sequence_maximum_duration (google.protobuf.duration_pb2.Duration):
503
+ Optional. Defines the time period in which
504
+ the whole sequence must occur.
505
+ sequence_steps (MutableSequence[google.analytics.admin_v1alpha.types.AudienceSequenceFilter.AudienceSequenceStep]):
506
+ Required. An ordered sequence of steps. A
507
+ user must complete each step in order to join
508
+ the sequence filter.
509
+ """
510
+
511
+ class AudienceSequenceStep(proto.Message):
512
+ r"""A condition that must occur in the specified step order for
513
+ this user to match the sequence.
514
+
515
+ Attributes:
516
+ scope (google.analytics.admin_v1alpha.types.AudienceFilterScope):
517
+ Required. Immutable. Specifies the scope for
518
+ this step.
519
+ immediately_follows (bool):
520
+ Optional. If true, the event satisfying this
521
+ step must be the very next event after the event
522
+ satisfying the last step. If unset or false,
523
+ this step indirectly follows the prior step; for
524
+ example, there may be events between the prior
525
+ step and this step. It is ignored for the first
526
+ step.
527
+ constraint_duration (google.protobuf.duration_pb2.Duration):
528
+ Optional. When set, this step must be satisfied within the
529
+ constraint_duration of the previous step (For example, t[i]
530
+ - t[i-1] <= constraint_duration). If not set, there is no
531
+ duration requirement (the duration is effectively
532
+ unlimited). It is ignored for the first step.
533
+ filter_expression (google.analytics.admin_v1alpha.types.AudienceFilterExpression):
534
+ Required. Immutable. A logical expression of
535
+ Audience dimension, metric, or event filters in
536
+ each step.
537
+ """
538
+
539
+ scope: "AudienceFilterScope" = proto.Field(
540
+ proto.ENUM,
541
+ number=1,
542
+ enum="AudienceFilterScope",
543
+ )
544
+ immediately_follows: bool = proto.Field(
545
+ proto.BOOL,
546
+ number=2,
547
+ )
548
+ constraint_duration: duration_pb2.Duration = proto.Field(
549
+ proto.MESSAGE,
550
+ number=3,
551
+ message=duration_pb2.Duration,
552
+ )
553
+ filter_expression: "AudienceFilterExpression" = proto.Field(
554
+ proto.MESSAGE,
555
+ number=4,
556
+ message="AudienceFilterExpression",
557
+ )
558
+
559
+ scope: "AudienceFilterScope" = proto.Field(
560
+ proto.ENUM,
561
+ number=1,
562
+ enum="AudienceFilterScope",
563
+ )
564
+ sequence_maximum_duration: duration_pb2.Duration = proto.Field(
565
+ proto.MESSAGE,
566
+ number=2,
567
+ message=duration_pb2.Duration,
568
+ )
569
+ sequence_steps: MutableSequence[AudienceSequenceStep] = proto.RepeatedField(
570
+ proto.MESSAGE,
571
+ number=3,
572
+ message=AudienceSequenceStep,
573
+ )
574
+
575
+
576
+ class AudienceFilterClause(proto.Message):
577
+ r"""A clause for defining either a simple or sequence filter. A
578
+ filter can be inclusive (For example, users satisfying the
579
+ filter clause are included in the Audience) or exclusive (For
580
+ example, users satisfying the filter clause are excluded from
581
+ the Audience).
582
+
583
+ This message has `oneof`_ fields (mutually exclusive fields).
584
+ For each oneof, at most one member field can be set at the same time.
585
+ Setting any member of the oneof automatically clears all other
586
+ members.
587
+
588
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
589
+
590
+ Attributes:
591
+ simple_filter (google.analytics.admin_v1alpha.types.AudienceSimpleFilter):
592
+ A simple filter that a user must satisfy to
593
+ be a member of the Audience.
594
+
595
+ This field is a member of `oneof`_ ``filter``.
596
+ sequence_filter (google.analytics.admin_v1alpha.types.AudienceSequenceFilter):
597
+ Filters that must occur in a specific order
598
+ for the user to be a member of the Audience.
599
+
600
+ This field is a member of `oneof`_ ``filter``.
601
+ clause_type (google.analytics.admin_v1alpha.types.AudienceFilterClause.AudienceClauseType):
602
+ Required. Specifies whether this is an
603
+ include or exclude filter clause.
604
+ """
605
+
606
+ class AudienceClauseType(proto.Enum):
607
+ r"""Specifies whether this is an include or exclude filter
608
+ clause.
609
+
610
+ Values:
611
+ AUDIENCE_CLAUSE_TYPE_UNSPECIFIED (0):
612
+ Unspecified clause type.
613
+ INCLUDE (1):
614
+ Users will be included in the Audience if the
615
+ filter clause is met.
616
+ EXCLUDE (2):
617
+ Users will be excluded from the Audience if
618
+ the filter clause is met.
619
+ """
620
+ AUDIENCE_CLAUSE_TYPE_UNSPECIFIED = 0
621
+ INCLUDE = 1
622
+ EXCLUDE = 2
623
+
624
+ simple_filter: "AudienceSimpleFilter" = proto.Field(
625
+ proto.MESSAGE,
626
+ number=2,
627
+ oneof="filter",
628
+ message="AudienceSimpleFilter",
629
+ )
630
+ sequence_filter: "AudienceSequenceFilter" = proto.Field(
631
+ proto.MESSAGE,
632
+ number=3,
633
+ oneof="filter",
634
+ message="AudienceSequenceFilter",
635
+ )
636
+ clause_type: AudienceClauseType = proto.Field(
637
+ proto.ENUM,
638
+ number=1,
639
+ enum=AudienceClauseType,
640
+ )
641
+
642
+
643
+ class AudienceEventTrigger(proto.Message):
644
+ r"""Specifies an event to log when a user joins the Audience.
645
+
646
+ Attributes:
647
+ event_name (str):
648
+ Required. The event name that will be logged.
649
+ log_condition (google.analytics.admin_v1alpha.types.AudienceEventTrigger.LogCondition):
650
+ Required. When to log the event.
651
+ """
652
+
653
+ class LogCondition(proto.Enum):
654
+ r"""Determines when to log the event.
655
+
656
+ Values:
657
+ LOG_CONDITION_UNSPECIFIED (0):
658
+ Log condition is not specified.
659
+ AUDIENCE_JOINED (1):
660
+ The event should be logged only when a user
661
+ is joined.
662
+ AUDIENCE_MEMBERSHIP_RENEWED (2):
663
+ The event should be logged whenever the
664
+ Audience condition is met, even if the user is
665
+ already a member of the Audience.
666
+ """
667
+ LOG_CONDITION_UNSPECIFIED = 0
668
+ AUDIENCE_JOINED = 1
669
+ AUDIENCE_MEMBERSHIP_RENEWED = 2
670
+
671
+ event_name: str = proto.Field(
672
+ proto.STRING,
673
+ number=1,
674
+ )
675
+ log_condition: LogCondition = proto.Field(
676
+ proto.ENUM,
677
+ number=2,
678
+ enum=LogCondition,
679
+ )
680
+
681
+
682
+ class Audience(proto.Message):
683
+ r"""A resource message representing an Audience.
684
+
685
+ Attributes:
686
+ name (str):
687
+ Output only. The resource name for this
688
+ Audience resource. Format:
689
+ properties/{propertyId}/audiences/{audienceId}
690
+ display_name (str):
691
+ Required. The display name of the Audience.
692
+ description (str):
693
+ Required. The description of the Audience.
694
+ membership_duration_days (int):
695
+ Required. Immutable. The duration a user
696
+ should stay in an Audience. It cannot be set to
697
+ more than 540 days.
698
+ ads_personalization_enabled (bool):
699
+ Output only. It is automatically set by GA to
700
+ false if this is an NPA Audience and is excluded
701
+ from ads personalization.
702
+ event_trigger (google.analytics.admin_v1alpha.types.AudienceEventTrigger):
703
+ Optional. Specifies an event to log when a
704
+ user joins the Audience. If not set, no event is
705
+ logged when a user joins the Audience.
706
+ exclusion_duration_mode (google.analytics.admin_v1alpha.types.Audience.AudienceExclusionDurationMode):
707
+ Immutable. Specifies how long an exclusion
708
+ lasts for users that meet the exclusion filter.
709
+ It is applied to all EXCLUDE filter clauses and
710
+ is ignored when there is no EXCLUDE filter
711
+ clause in the Audience.
712
+ filter_clauses (MutableSequence[google.analytics.admin_v1alpha.types.AudienceFilterClause]):
713
+ Required. Immutable. Unordered list. Filter
714
+ clauses that define the Audience. All clauses
715
+ will be AND’ed together.
716
+ create_time (google.protobuf.timestamp_pb2.Timestamp):
717
+ Output only. Time when the Audience was
718
+ created.
719
+ """
720
+
721
+ class AudienceExclusionDurationMode(proto.Enum):
722
+ r"""Specifies how long an exclusion lasts for users that meet the
723
+ exclusion filter.
724
+
725
+ Values:
726
+ AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED (0):
727
+ Not specified.
728
+ EXCLUDE_TEMPORARILY (1):
729
+ Exclude users from the Audience during
730
+ periods when they meet the filter clause.
731
+ EXCLUDE_PERMANENTLY (2):
732
+ Exclude users from the Audience if they've
733
+ ever met the filter clause.
734
+ """
735
+ AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED = 0
736
+ EXCLUDE_TEMPORARILY = 1
737
+ EXCLUDE_PERMANENTLY = 2
738
+
739
+ name: str = proto.Field(
740
+ proto.STRING,
741
+ number=1,
742
+ )
743
+ display_name: str = proto.Field(
744
+ proto.STRING,
745
+ number=2,
746
+ )
747
+ description: str = proto.Field(
748
+ proto.STRING,
749
+ number=3,
750
+ )
751
+ membership_duration_days: int = proto.Field(
752
+ proto.INT32,
753
+ number=4,
754
+ )
755
+ ads_personalization_enabled: bool = proto.Field(
756
+ proto.BOOL,
757
+ number=5,
758
+ )
759
+ event_trigger: "AudienceEventTrigger" = proto.Field(
760
+ proto.MESSAGE,
761
+ number=6,
762
+ message="AudienceEventTrigger",
763
+ )
764
+ exclusion_duration_mode: AudienceExclusionDurationMode = proto.Field(
765
+ proto.ENUM,
766
+ number=7,
767
+ enum=AudienceExclusionDurationMode,
768
+ )
769
+ filter_clauses: MutableSequence["AudienceFilterClause"] = proto.RepeatedField(
770
+ proto.MESSAGE,
771
+ number=8,
772
+ message="AudienceFilterClause",
773
+ )
774
+ create_time: timestamp_pb2.Timestamp = proto.Field(
775
+ proto.MESSAGE,
776
+ number=9,
777
+ message=timestamp_pb2.Timestamp,
778
+ )
779
+
780
+
781
+ __all__ = tuple(sorted(__protobuf__.manifest))