diff --git a/google/cloud/channel/v1/entitlements.proto b/google/cloud/channel/v1/entitlements.proto index b4c19944..1cc5b0dc 100644 --- a/google/cloud/channel/v1/entitlements.proto +++ b/google/cloud/channel/v1/entitlements.proto @@ -73,7 +73,6 @@ message Entitlement { } // Output only. Resource name of an entitlement in the form: - // // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/google/cloud/channel/v1/products.proto b/google/cloud/channel/v1/products.proto index 219904ad..afcf1c66 100644 --- a/google/cloud/channel/v1/products.proto +++ b/google/cloud/channel/v1/products.proto @@ -71,7 +71,7 @@ message Sku { Product product = 3; } -// Represents a Product/SKU/Offer’s marketing information. +// Represents a Product/SKU/Offer's marketing information. message MarketingInfo { // Human readable name. string display_name = 1; diff --git a/google/cloud/channel/v1/service.proto b/google/cloud/channel/v1/service.proto index ffb6835b..de8c2c13 100644 --- a/google/cloud/channel/v1/service.proto +++ b/google/cloud/channel/v1/service.proto @@ -804,6 +804,32 @@ service CloudChannelService { }; } + // Lists the SKUs for a product the reseller is authorized to sell. + // + // Possible Error Codes: + // + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + rpc ListSkus(ListSkusRequest) returns (ListSkusResponse) { + option (google.api.http) = { + get: "/v1/{parent=products/*}/skus" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists the Offers the reseller can sell. + // + // Possible Error Codes: + // + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + rpc ListOffers(ListOffersRequest) returns (ListOffersResponse) { + option (google.api.http) = { + get: "/v1/{parent=accounts/*}/offers" + }; + option (google.api.method_signature) = "parent"; + } + // Lists the Purchasable SKUs for following use cases: // (a) SKUs that can be newly purchased for a customer // (b) SKUs that can be upgraded/downgraded to, for an entitlement. @@ -1517,6 +1543,75 @@ message ListProductsResponse { string next_page_token = 2; } +// Request message for ListSkus. +message ListSkusRequest { + // Required. The resource name of the Product for which to list SKUs. + // The parent takes the format: products/{product_id}. + // Supports products/- to retrieve SKUs for all products. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudchannel.googleapis.com/Product" + } + ]; + + // Required. Resource name of the reseller. + // Format: accounts/{account_id}. + string account = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Requested page size. Server might return fewer results than requested. + // If unspecified, at most 100 SKUs will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results, if other than the first one. + // Optional. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The BCP-47 language code, such as "en-US". If specified, the + // response will be localized to the corresponding language code. Default is + // "en-US". + string language_code = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListSkus. +message ListSkusResponse { + // The list of SKUs requested. + repeated Sku skus = 1; + + // A token to retrieve the next page of results. + string next_page_token = 2; +} + +// Request message for ListOffers. +message ListOffersRequest { + // Required. The resource name of the reseller account from which to list Offers. + // The parent takes the format: accounts/{account_id}. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Requested page size. Server might return fewer results than requested. + // If unspecified, at most 500 Offers will be returned. + // 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, if other than the first one. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The BCP-47 language code, such as "en-US". If specified, the + // response will be localized to the corresponding language code. Default is + // "en-US". + string language_code = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListOffers. +message ListOffersResponse { + // The list of Offers requested. + repeated Offer offers = 1; + + // A token to retrieve the next page of results. + string next_page_token = 2; +} + // Request message for ListPurchasableSkus. message ListPurchasableSkusRequest { // List SKUs for CreateEntitlement purchase for the customer. @@ -1544,7 +1639,6 @@ message ListPurchasableSkusRequest { // Required. Resource name of the entitlement. // Format: - // // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} string entitlement = 1 [(google.api.field_behavior) = REQUIRED]; @@ -1614,7 +1708,6 @@ message ListPurchasableOffersRequest { message ChangeOfferPurchase { // Required. Resource name of the entitlement. // Format: - // // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} string entitlement = 1 [(google.api.field_behavior) = REQUIRED];