Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 3e304f1

Browse files
feat: added partition_keys field to filter results from FetchReportResults (#235)
* feat: added partition_keys field to filter results from FetchReportResults docs: Change references from GCP to Google Cloud PiperOrigin-RevId: 532265140 Source-Link: googleapis/googleapis@31893ad Source-Link: https://github.com/googleapis/googleapis-gen/commit/5015d29229762a1d03bb246fa5bdd05fbf7b9741 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTAxNWQyOTIyOTc2MmExZDAzYmIyNDZmYTViZGQwNWZiZjdiOTc0MSJ9 * 🦉 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>
1 parent f3a411b commit 3e304f1

File tree

8 files changed

+49
-35
lines changed

8 files changed

+49
-35
lines changed

google/cloud/channel_v1/services/cloud_channel_reports_service/async_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
class CloudChannelReportsServiceAsyncClient:
5858
"""CloudChannelReportsService lets Google Cloud resellers and
5959
distributors retrieve and combine a variety of data in Cloud
60-
Channel for multiple products (Google Cloud Platform (GCP),
61-
Google Voice, and Google Workspace.)
60+
Channel for multiple products (Google Cloud, Google Voice, and
61+
Google Workspace.)
6262
"""
6363

6464
_client: CloudChannelReportsServiceClient

google/cloud/channel_v1/services/cloud_channel_reports_service/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ def get_transport_class(
9797
class CloudChannelReportsServiceClient(metaclass=CloudChannelReportsServiceClientMeta):
9898
"""CloudChannelReportsService lets Google Cloud resellers and
9999
distributors retrieve and combine a variety of data in Cloud
100-
Channel for multiple products (Google Cloud Platform (GCP),
101-
Google Voice, and Google Workspace.)
100+
Channel for multiple products (Google Cloud, Google Voice, and
101+
Google Workspace.)
102102
"""
103103

104104
@staticmethod

google/cloud/channel_v1/services/cloud_channel_reports_service/transports/grpc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class CloudChannelReportsServiceGrpcTransport(CloudChannelReportsServiceTranspor
3333
3434
CloudChannelReportsService lets Google Cloud resellers and
3535
distributors retrieve and combine a variety of data in Cloud
36-
Channel for multiple products (Google Cloud Platform (GCP),
37-
Google Voice, and Google Workspace.)
36+
Channel for multiple products (Google Cloud, Google Voice, and
37+
Google Workspace.)
3838
3939
This class defines the same methods as the primary client, so the
4040
primary client can load the underlying transport implementation

google/cloud/channel_v1/services/cloud_channel_reports_service/transports/grpc_asyncio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class CloudChannelReportsServiceGrpcAsyncIOTransport(
3636
3737
CloudChannelReportsService lets Google Cloud resellers and
3838
distributors retrieve and combine a variety of data in Cloud
39-
Channel for multiple products (Google Cloud Platform (GCP),
40-
Google Voice, and Google Workspace.)
39+
Channel for multiple products (Google Cloud, Google Voice, and
40+
Google Workspace.)
4141
4242
This class defines the same methods as the primary client, so the
4343
primary client can load the underlying transport implementation

google/cloud/channel_v1/types/entitlements.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ class Entitlement(proto.Message):
104104
105105
- assigned_units: The number of licenses assigned to users.
106106
107-
For GCP billing subaccounts, the following Parameter may be
108-
accepted as input:
107+
For Google Cloud billing subaccounts, the following
108+
Parameter may be accepted as input:
109109
110110
- display_name: The display name of the billing subaccount.
111111
billing_account (str):
@@ -273,9 +273,9 @@ class ProvisionedService(proto.Message):
273273
provisioning_id (str):
274274
Output only. Provisioning ID of the
275275
entitlement. For Google Workspace, this is the
276-
underlying Subscription ID. For Google Cloud
277-
Platform, this is the Billing Account ID of the
278-
billing subaccount.".
276+
underlying Subscription ID. For Google Cloud,
277+
this is the Billing Account ID of the billing
278+
subaccount.".
279279
product_id (str):
280280
Output only. The product pertaining to the
281281
provisioning resource as specified in the Offer.

google/cloud/channel_v1/types/offers.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,16 @@ class ResourceType(proto.Enum):
130130
MINUTES (5):
131131
Voice usage.
132132
IAAS_USAGE (6):
133-
For IaaS SKUs like Google Cloud Platform,
134-
monetization is based on usage accrued on your
135-
billing account irrespective of the type of
136-
monetizable resource. This enum represents an
137-
aggregated resource/container for all usage SKUs
138-
on a billing account. Currently, only applicable
139-
to Google Cloud Platform.
133+
For IaaS SKUs like Google Cloud, monetization
134+
is based on usage accrued on your billing
135+
account irrespective of the type of monetizable
136+
resource. This enum represents an aggregated
137+
resource/container for all usage SKUs on a
138+
billing account. Currently, only applicable to
139+
Google Cloud.
140140
SUBSCRIPTION (7):
141-
For Google Cloud Platform subscriptions like
142-
Anthos or SAP.
141+
For Google Cloud subscriptions like Anthos or
142+
SAP.
143143
"""
144144
RESOURCE_TYPE_UNSPECIFIED = 0
145145
SEAT = 1
@@ -404,7 +404,7 @@ class Plan(proto.Message):
404404
billing_account (str):
405405
Reseller Billing account to charge after an
406406
offer transaction. Only present for Google Cloud
407-
Platform offers.
407+
offers.
408408
"""
409409

410410
payment_plan: "PaymentPlan" = proto.Field(

google/cloud/channel_v1/types/reports_service.py

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ class FetchReportResultsRequest(proto.Message):
149149
of the previous
150150
[CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults]
151151
call.
152+
partition_keys (MutableSequence[str]):
153+
Optional. List of keys specifying which
154+
report partitions to return. If empty, returns
155+
all partitions.
152156
"""
153157

154158
report_job: str = proto.Field(
@@ -163,6 +167,10 @@ class FetchReportResultsRequest(proto.Message):
163167
proto.STRING,
164168
number=3,
165169
)
170+
partition_keys: MutableSequence[str] = proto.RepeatedField(
171+
proto.STRING,
172+
number=4,
173+
)
166174

167175

168176
class FetchReportResultsResponse(proto.Message):
@@ -429,16 +437,14 @@ class DateRange(proto.Message):
429437
``usage_start_date_time`` in Pacific time.
430438
invoice_start_date (google.type.date_pb2.Date):
431439
The earliest invoice date (inclusive).
432-
If your product uses monthly invoices, and this
433-
value is not the beginning of a month, this will
434-
adjust the date to the first day of the given
435-
month.
440+
If this value is not the first day of a month,
441+
this will move it back to the first day of the
442+
given month.
436443
invoice_end_date (google.type.date_pb2.Date):
437-
The latest invoice date (exclusive).
438-
If your product uses monthly invoices, and this
439-
value is not the beginning of a month, this will
440-
adjust the date to the first day of the
441-
following month.
444+
The latest invoice date (inclusive).
445+
If this value is not the last day of a month,
446+
this will move it forward to the last day of the
447+
given month.
442448
"""
443449

444450
usage_start_date_time: datetime_pb2.DateTime = proto.Field(
@@ -469,13 +475,21 @@ class Row(proto.Message):
469475
Attributes:
470476
values (MutableSequence[google.cloud.channel_v1.types.ReportValue]):
471477
The list of values in the row.
478+
partition_key (str):
479+
The key for the partition this row belongs
480+
to. This field is empty if the report is not
481+
partitioned.
472482
"""
473483

474484
values: MutableSequence["ReportValue"] = proto.RepeatedField(
475485
proto.MESSAGE,
476486
number=1,
477487
message="ReportValue",
478488
)
489+
partition_key: str = proto.Field(
490+
proto.STRING,
491+
number=2,
492+
)
479493

480494

481495
class ReportValue(proto.Message):
@@ -608,8 +622,8 @@ class State(proto.Enum):
608622

609623
class Report(proto.Message):
610624
r"""The ID and description of a report that was used to generate
611-
report data. For example, "GCP Daily Spend", "Google Workspace
612-
License Activity", etc.
625+
report data. For example, "Google Cloud Daily Spend", "Google
626+
Workspace License Activity", etc.
613627
614628
Attributes:
615629
name (str):

scripts/fixup_channel_v1_keywords.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class channelCallTransformer(cst.CSTTransformer):
5353
'delete_channel_partner_repricing_config': ('name', ),
5454
'delete_customer': ('name', ),
5555
'delete_customer_repricing_config': ('name', ),
56-
'fetch_report_results': ('report_job', 'page_size', 'page_token', ),
56+
'fetch_report_results': ('report_job', 'page_size', 'page_token', 'partition_keys', ),
5757
'get_channel_partner_link': ('name', 'view', ),
5858
'get_channel_partner_repricing_config': ('name', ),
5959
'get_customer': ('name', ),

0 commit comments

Comments
 (0)