Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
docs: Add documentation for enums (#317)
Browse files Browse the repository at this point in the history
* docs: Add documentation for enums

fix: Add context manager return types

chore: Update gapic-generator-python to v1.8.1
PiperOrigin-RevId: 503210727

Source-Link: googleapis/googleapis@a391fd1

Source-Link: https://github.com/googleapis/googleapis-gen/commit/0080f830dec37c3384157082bce279e37079ea58
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9

* 🦉 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 Jan 20, 2023
1 parent f07d383 commit b43c855
Show file tree
Hide file tree
Showing 8 changed files with 695 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9277,7 +9277,7 @@ def sample_run_access_report():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "AnalyticsAdminServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
58 changes: 55 additions & 3 deletions google/analytics/admin_v1alpha/types/access_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,26 @@ class AccessStringFilter(proto.Message):
"""

class MatchType(proto.Enum):
r"""The match type of a string filter."""
r"""The match type of a string filter.
Values:
MATCH_TYPE_UNSPECIFIED (0):
Unspecified
EXACT (1):
Exact match of the string value.
BEGINS_WITH (2):
Begins with the string value.
ENDS_WITH (3):
Ends with the string value.
CONTAINS (4):
Contains the string value.
FULL_REGEXP (5):
Full match for the regular expression with
the string value.
PARTIAL_REGEXP (6):
Partial match for the regular expression with
the string value.
"""
MATCH_TYPE_UNSPECIFIED = 0
EXACT = 1
BEGINS_WITH = 2
Expand Down Expand Up @@ -318,7 +337,22 @@ class AccessNumericFilter(proto.Message):
"""

class Operation(proto.Enum):
r"""The operation applied to a numeric filter."""
r"""The operation applied to a numeric filter.
Values:
OPERATION_UNSPECIFIED (0):
Unspecified.
EQUAL (1):
Equal
LESS_THAN (2):
Less than
LESS_THAN_OR_EQUAL (3):
Less than or equal
GREATER_THAN (4):
Greater than
GREATER_THAN_OR_EQUAL (5):
Greater than or equal
"""
OPERATION_UNSPECIFIED = 0
EQUAL = 1
LESS_THAN = 2
Expand Down Expand Up @@ -446,7 +480,25 @@ class DimensionOrderBy(proto.Message):
"""

class OrderType(proto.Enum):
r"""Rule to order the string dimension values by."""
r"""Rule to order the string dimension values by.
Values:
ORDER_TYPE_UNSPECIFIED (0):
Unspecified.
ALPHANUMERIC (1):
Alphanumeric sort by Unicode code point. For
example, "2" < "A" < "X" < "b" < "z".
CASE_INSENSITIVE_ALPHANUMERIC (2):
Case insensitive alphanumeric sort by lower
case Unicode code point. For example, "2" < "A"
< "b" < "X" < "z".
NUMERIC (3):
Dimension values are converted to numbers before sorting.
For example in NUMERIC sort, "25" < "100", and in
``ALPHANUMERIC`` sort, "100" < "25". Non-numeric dimension
values all have equal ordering value below all numeric
values.
"""
ORDER_TYPE_UNSPECIFIED = 0
ALPHANUMERIC = 1
CASE_INSENSITIVE_ALPHANUMERIC = 2
Expand Down
89 changes: 85 additions & 4 deletions google/analytics/admin_v1alpha/types/audience.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,22 @@


class AudienceFilterScope(proto.Enum):
r"""Specifies how to evaluate users for joining an Audience."""
r"""Specifies how to evaluate users for joining an Audience.
Values:
AUDIENCE_FILTER_SCOPE_UNSPECIFIED (0):
Scope is not specified.
AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT (1):
User joins the Audience if the filter
condition is met within one event.
AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION (2):
User joins the Audience if the filter
condition is met within one session.
AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS (3):
User joins the Audience if the filter
condition is met by any event across any
session.
"""
AUDIENCE_FILTER_SCOPE_UNSPECIFIED = 0
AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT = 1
AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION = 2
Expand Down Expand Up @@ -119,7 +134,26 @@ class StringFilter(proto.Message):
"""

class MatchType(proto.Enum):
r"""The match type for the string filter."""
r"""The match type for the string filter.
Values:
MATCH_TYPE_UNSPECIFIED (0):
Unspecified
EXACT (1):
Exact match of the string value.
BEGINS_WITH (2):
Begins with the string value.
ENDS_WITH (3):
Ends with the string value.
CONTAINS (4):
Contains the string value.
FULL_REGEXP (5):
Full regular expression matches with the
string value.
PARTIAL_REGEXP (6):
Partial regular expression matches with the
string value.
"""
MATCH_TYPE_UNSPECIFIED = 0
EXACT = 1
BEGINS_WITH = 2
Expand Down Expand Up @@ -212,7 +246,22 @@ class NumericFilter(proto.Message):
"""

class Operation(proto.Enum):
r"""The operation applied to a numeric filter."""
r"""The operation applied to a numeric filter.
Values:
OPERATION_UNSPECIFIED (0):
Unspecified.
EQUAL (1):
Equal.
LESS_THAN (2):
Less than.
LESS_THAN_OR_EQUAL (3):
Less than or equal.
GREATER_THAN (4):
Greater than.
GREATER_THAN_OR_EQUAL (5):
Greater than or equal.
"""
OPERATION_UNSPECIFIED = 0
EQUAL = 1
LESS_THAN = 2
Expand Down Expand Up @@ -558,6 +607,16 @@ class AudienceFilterClause(proto.Message):
class AudienceClauseType(proto.Enum):
r"""Specifies whether this is an include or exclude filter
clause.
Values:
AUDIENCE_CLAUSE_TYPE_UNSPECIFIED (0):
Unspecified clause type.
INCLUDE (1):
Users will be included in the Audience if the
filter clause is met.
EXCLUDE (2):
Users will be excluded from the Audience if
the filter clause is met.
"""
AUDIENCE_CLAUSE_TYPE_UNSPECIFIED = 0
INCLUDE = 1
Expand Down Expand Up @@ -593,7 +652,19 @@ class AudienceEventTrigger(proto.Message):
"""

class LogCondition(proto.Enum):
r"""Determines when to log the event."""
r"""Determines when to log the event.
Values:
LOG_CONDITION_UNSPECIFIED (0):
Log condition is not specified.
AUDIENCE_JOINED (1):
The event should be logged only when a user
is joined.
AUDIENCE_MEMBERSHIP_RENEWED (2):
The event should be logged whenever the
Audience condition is met, even if the user is
already a member of the Audience.
"""
LOG_CONDITION_UNSPECIFIED = 0
AUDIENCE_JOINED = 1
AUDIENCE_MEMBERSHIP_RENEWED = 2
Expand Down Expand Up @@ -648,6 +719,16 @@ class Audience(proto.Message):
class AudienceExclusionDurationMode(proto.Enum):
r"""Specifies how long an exclusion lasts for users that meet the
exclusion filter.
Values:
AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED (0):
Not specified.
EXCLUDE_TEMPORARILY (1):
Exclude users from the Audience during
periods when they meet the filter clause.
EXCLUDE_PERMANENTLY (2):
Exclude users from the Audience if they've
ever met the filter clause.
"""
AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED = 0
EXCLUDE_TEMPORARILY = 1
Expand Down
Loading

0 comments on commit b43c855

Please sign in to comment.