Skip to content

Commit

Permalink
feat: [channel] Add support for ListSkuGroups and ListSkuGroupBillabl…
Browse files Browse the repository at this point in the history
…eSkus APIs in Cloud Channel APIs (#4348)

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 540624759

Source-Link: https://togithub.com/googleapis/googleapis/commit/7f2c9d158ac679bbf84fa110c9e6da692b8f9b9d

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/2ed2d95b6255d0a33ecd961af6c9ca8b02cd8e03
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNoYW5uZWwvLk93bEJvdC55YW1sIiwiaCI6IjJlZDJkOTViNjI1NWQwYTMzZWNkOTYxYWY2YzljYThiMDJjZDhlMDMifQ==
  • Loading branch information
gcf-owl-bot[bot] authored Jun 16, 2023
1 parent 4c047d4 commit 926d727
Show file tree
Hide file tree
Showing 15 changed files with 4,187 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/google-cloud-channel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| Cloud_channel_service.list_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_products.js,packages/google-cloud-channel/samples/README.md) |
| Cloud_channel_service.list_purchasable_offers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_purchasable_offers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_purchasable_offers.js,packages/google-cloud-channel/samples/README.md) |
| Cloud_channel_service.list_purchasable_skus | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_purchasable_skus.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_purchasable_skus.js,packages/google-cloud-channel/samples/README.md) |
| Cloud_channel_service.list_sku_group_billable_skus | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_sku_group_billable_skus.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_sku_group_billable_skus.js,packages/google-cloud-channel/samples/README.md) |
| Cloud_channel_service.list_sku_groups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_sku_groups.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_sku_groups.js,packages/google-cloud-channel/samples/README.md) |
| Cloud_channel_service.list_skus | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_skus.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_skus.js,packages/google-cloud-channel/samples/README.md) |
| Cloud_channel_service.list_subscribers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_subscribers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_subscribers.js,packages/google-cloud-channel/samples/README.md) |
| Cloud_channel_service.list_transferable_offers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_transferable_offers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-channel/samples/generated/v1/cloud_channel_service.list_transferable_offers.js,packages/google-cloud-channel/samples/README.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,59 @@ service CloudChannelService {
option (google.api.method_signature) = "name";
}

// Lists the Rebilling supported SKU groups the account is authorized to
// sell.
// Reference: https://cloud.google.com/skus/sku-groups
//
// Possible Error Codes:
//
// * PERMISSION_DENIED: If the account making the request and the account
// being queried are different, or the account doesn't exist.
// * INTERNAL: Any non-user error related to technical issues in the
// backend. In this case, contact Cloud Channel support.
//
// Return Value:
// If successful, the [SkuGroup][google.cloud.channel.v1.SkuGroup] resources.
// The data for each resource is displayed in the alphabetical order of SKU
// group display name.
// The data for each resource is displayed in the ascending order of
// [SkuGroup.display_name][google.cloud.channel.v1.SkuGroup.display_name]
//
// If unsuccessful, returns an error.
rpc ListSkuGroups(ListSkuGroupsRequest) returns (ListSkuGroupsResponse) {
option (google.api.http) = {
get: "/v1/{parent=accounts/*}/skuGroups"
};
option (google.api.method_signature) = "parent";
}

// Lists the Billable SKUs in a given SKU group.
//
// Possible error codes:
// PERMISSION_DENIED: If the account making the request and the account
// being queried for are different, or the account doesn't exist.
// INVALID_ARGUMENT: Missing or invalid required parameters in the
// request.
// INTERNAL: Any non-user error related to technical issue in the
// backend. In this case, contact cloud channel support.
//
// Return Value:
// If successful, the [BillableSku][google.cloud.channel.v1.BillableSku]
// resources. The data for each resource is displayed in the ascending order
// of:
//
// * [BillableSku.service_display_name][google.cloud.channel.v1.BillableSku.service_display_name]
// * [BillableSku.sku_display_name][google.cloud.channel.v1.BillableSku.sku_display_name]
//
// If unsuccessful, returns an error.
rpc ListSkuGroupBillableSkus(ListSkuGroupBillableSkusRequest)
returns (ListSkuGroupBillableSkusResponse) {
option (google.api.http) = {
get: "/v1/{parent=accounts/*/skuGroups/*}/billableSkus"
};
option (google.api.method_signature) = "parent";
}

// Returns the requested [Offer][google.cloud.channel.v1.Offer] resource.
//
// Possible error codes:
Expand Down Expand Up @@ -2035,6 +2088,110 @@ message DeleteChannelPartnerRepricingConfigRequest {
];
}

// Request message for ListSkuGroups.
message ListSkuGroupsRequest {
// Required. The resource name of the account from which to list SKU groups.
// Parent uses the format: accounts/{account}.
string parent = 1 [(google.api.field_behavior) = REQUIRED];

// Optional. The maximum number of SKU groups to return. The service may
// return fewer than this value. If unspecified, returns a maximum of 1000 SKU
// groups. The maximum value is 1000; values above 1000 will be coerced to
// 1000.
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. A token identifying a page of results beyond the first page.
// Obtained through
// [ListSkuGroups.next_page_token][] of the previous
// [CloudChannelService.ListSkuGroups][google.cloud.channel.v1.CloudChannelService.ListSkuGroups]
// call.
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for ListSkuGroupBillableSkus.
message ListSkuGroupBillableSkusRequest {
// Required. Resource name of the SKU group.
// Format: accounts/{account}/skuGroups/{sku_group}.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudchannel.googleapis.com/SkuGroup"
}
];

// Optional. The maximum number of SKUs to return. The service may return
// fewer than this value. If unspecified, returns a maximum of 100000 SKUs.
// The maximum value is 100000; values above 100000 will be coerced to 100000.
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. A token identifying a page of results beyond the first page.
// Obtained through
// [ListSkuGroupBillableSkus.next_page_token][] of the previous
// [CloudChannelService.ListSkuGroupBillableSkus][google.cloud.channel.v1.CloudChannelService.ListSkuGroupBillableSkus]
// call.
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Response message for ListSkuGroups.
message ListSkuGroupsResponse {
// The list of SKU groups requested.
repeated SkuGroup sku_groups = 1;

// A token to retrieve the next page of results.
// Pass to [ListSkuGroups.page_token][] to obtain that
// page.
string next_page_token = 2;
}

// Response message for ListSkuGroupBillableSkus.
message ListSkuGroupBillableSkusResponse {
// The list of billable SKUs in the requested SKU group.
repeated BillableSku billable_skus = 1;

// A token to retrieve the next page of results.
// Pass to [ListSkuGroupBillableSkus.page_token][] to obtain that
// page.
string next_page_token = 2;
}

// Represents the SKU group information.
message SkuGroup {
option (google.api.resource) = {
type: "cloudchannel.googleapis.com/SkuGroup"
pattern: "accounts/{account}/skuGroups/{sku_group}"
};

// Resource name of SKU group. Format:
// accounts/{account}/skuGroups/{sku_group}.
// Example:
// "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041".
string name = 1;

// Unique human readable identifier for the SKU group.
string display_name = 2;
}

// Represents the Billable SKU information.
message BillableSku {
// Resource name of Billable SKU. Format:
// billableSkus/{sku}.
// Example:
// billableSkus/6E1B-6634-470F".
string sku = 1;

// Unique human readable name for the SKU.
string sku_display_name = 2;

// Resource name of Service which contains Repricing SKU. Format:
// services/{service}.
// Example:
// "services/B7D9-FDCB-15D8".
string service = 3;

// Unique human readable name for the Service.
string service_display_name = 4;
}

// Request message for
// [CloudChannelService.CreateEntitlement][google.cloud.channel.v1.CloudChannelService.CreateEntitlement]
message CreateEntitlementRequest {
Expand Down
Loading

0 comments on commit 926d727

Please sign in to comment.