Skip to content

Commit 4035ab8

Browse files
feat: [google-analytics-data] add the EmptyFilter type to the Data API v1alpha (googleapis#13309)
- [ ] Regenerate this pull request now. BEGIN_COMMIT_OVERRIDE feat: add the `empty_filter` field to the `Filter` type feat: add `sampling_metadatas` field to the `ResponseMetaData` type feat: add the `EmptyFilter` type to the Data API v1alpha END_COMMIT_OVERRIDE PiperOrigin-RevId: 700547721 Source-Link: googleapis/googleapis@f4d1743 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7fe58852753e4e564a85d7cb9b6d05757555b9d0 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFuYWx5dGljcy1kYXRhLy5Pd2xCb3QueWFtbCIsImgiOiI3ZmU1ODg1Mjc1M2U0ZTU2NGE4NWQ3Y2I5YjZkMDU3NTc1NTViOWQwIn0= --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent fe13507 commit 4035ab8

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

packages/google-analytics-data/google/analytics/data_v1alpha/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
DimensionExpression,
6767
DimensionHeader,
6868
DimensionValue,
69+
EmptyFilter,
6970
EventCriteriaScoping,
7071
EventExclusionDuration,
7172
EventSegment,
@@ -152,6 +153,7 @@
152153
"DimensionExpression",
153154
"DimensionHeader",
154155
"DimensionValue",
156+
"EmptyFilter",
155157
"EventCriteriaScoping",
156158
"EventExclusionDuration",
157159
"EventSegment",

packages/google-analytics-data/google/analytics/data_v1alpha/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
DimensionExpression,
5858
DimensionHeader,
5959
DimensionValue,
60+
EmptyFilter,
6061
EventCriteriaScoping,
6162
EventExclusionDuration,
6263
EventSegment,
@@ -164,6 +165,7 @@
164165
"DimensionExpression",
165166
"DimensionHeader",
166167
"DimensionValue",
168+
"EmptyFilter",
167169
"EventSegment",
168170
"EventSegmentConditionGroup",
169171
"EventSegmentCriteria",

packages/google-analytics-data/google/analytics/data_v1alpha/types/data.py

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"NumericFilter",
4646
"OrderBy",
4747
"BetweenFilter",
48+
"EmptyFilter",
4849
"NumericValue",
4950
"CohortSpec",
5051
"Cohort",
@@ -674,6 +675,11 @@ class Filter(proto.Message):
674675
between_filter (google.analytics.data_v1alpha.types.BetweenFilter):
675676
A filter for between two values.
676677
678+
This field is a member of `oneof`_ ``one_filter``.
679+
empty_filter (google.analytics.data_v1alpha.types.EmptyFilter):
680+
A filter for empty values such as "(not set)"
681+
and "" values.
682+
677683
This field is a member of `oneof`_ ``one_filter``.
678684
"""
679685

@@ -705,6 +711,12 @@ class Filter(proto.Message):
705711
oneof="one_filter",
706712
message="BetweenFilter",
707713
)
714+
empty_filter: "EmptyFilter" = proto.Field(
715+
proto.MESSAGE,
716+
number=6,
717+
oneof="one_filter",
718+
message="EmptyFilter",
719+
)
708720

709721

710722
class StringFilter(proto.Message):
@@ -956,6 +968,10 @@ class BetweenFilter(proto.Message):
956968
)
957969

958970

971+
class EmptyFilter(proto.Message):
972+
r"""Filter for empty values."""
973+
974+
959975
class NumericValue(proto.Message):
960976
r"""To represent a number.
961977
@@ -1272,6 +1288,16 @@ class ResponseMetaData(proto.Message):
12721288
Interests <https://support.google.com/analytics/answer/2799357>`__.
12731289
12741290
This field is a member of `oneof`_ ``_subject_to_thresholding``.
1291+
sampling_metadatas (MutableSequence[google.analytics.data_v1alpha.types.SamplingMetadata]):
1292+
If this report's results are
1293+
`sampled <https://support.google.com/analytics/answer/13331292>`__,
1294+
this describes the percentage of events used in this report.
1295+
One ``samplingMetadatas`` is populated for each date range.
1296+
Each ``samplingMetadatas`` corresponds to a date range in
1297+
the order that date ranges were specified in the request.
1298+
1299+
However if the results are not sampled, this field will not
1300+
be defined.
12751301
"""
12761302

12771303
class SchemaRestrictionResponse(proto.Message):
@@ -1353,6 +1379,11 @@ class ActiveMetricRestriction(proto.Message):
13531379
number=8,
13541380
optional=True,
13551381
)
1382+
sampling_metadatas: MutableSequence["SamplingMetadata"] = proto.RepeatedField(
1383+
proto.MESSAGE,
1384+
number=9,
1385+
message="SamplingMetadata",
1386+
)
13561387

13571388

13581389
class DimensionHeader(proto.Message):
@@ -3145,8 +3176,8 @@ class FunnelResponseMetadata(proto.Message):
31453176
this describes what percentage of events were used in this
31463177
funnel report. One ``samplingMetadatas`` is populated for
31473178
each date range. Each ``samplingMetadatas`` corresponds to a
3148-
date range in order that date ranges were specified in the
3149-
request.
3179+
date range in the order that date ranges were specified in
3180+
the request.
31503181
31513182
However if the results are not sampled, this field will not
31523183
be defined.

packages/google-analytics-data/tests/unit/gapic/data_v1alpha/test_alpha_analytics_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11568,6 +11568,7 @@ def test_create_report_task_rest_call_success(request_type):
1156811568
},
1156911569
},
1157011570
"between_filter": {"from_value": {}, "to_value": {}},
11571+
"empty_filter": {},
1157111572
},
1157211573
},
1157311574
"metric_filter": {},

0 commit comments

Comments
 (0)