Skip to content

Commit 1c1b1ff

Browse files
Google APIscopybara-github
authored andcommitted
fix: Changed field behavior for an existing field entitlement_granularity in message .google.cloud.channel.v1.RepricingConfig
docs: A comment for enum `CustomerAttestationState` is changed docs: A comment for field `customer_attestation_state` in message `.google.cloud.channel.v1.Customer` is changed docs: A comment for field `entitlement_granularity` in message `.google.cloud.channel.v1.RepricingConfig` is changed docs: A comment for method `RegisterSubscriber` in service `CloudChannelService` is changed docs: A comment for method `UnregisterSubscriber` in service `CloudChannelService` is changed docs: A comment for method `ListSubscribers` in service `CloudChannelService` is changed docs: A comment for field `owned` in message `.google.cloud.channel.v1.CloudIdentityCustomerAccount` is changed docs: A comment for field `page_token` in message `.google.cloud.channel.v1.ListSkuGroupsRequest` is changed docs: A comment for field `page_token` in message `.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest` is changed docs: A comment for field `next_page_token` in message `.google.cloud.channel.v1.ListSkuGroupsResponse` is changed docs: A comment for field `next_page_token` in message `.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse` is changed docs: A comment for message `ChangeParametersRequest` is changed docs: A comment for field `offers` in message `.google.cloud.channel.v1.ListOffersResponse` is changed docs: A comment for field `account` in message `.google.cloud.channel.v1.RegisterSubscriberRequest` is changed docs: A comment for field `account` in message `.google.cloud.channel.v1.UnregisterSubscriberRequest` is changed docs: A comment for field `account` in message `.google.cloud.channel.v1.ListSubscribersRequest` is changed docs: A comment for field `event_type` in message `.google.cloud.channel.v1.CustomerEvent` is changed docs: A comment for field `event_type` in message `.google.cloud.channel.v1.EntitlementEvent` is changed PiperOrigin-RevId: 838889186
1 parent 9a665b7 commit 1c1b1ff

File tree

6 files changed

+150
-28
lines changed

6 files changed

+150
-28
lines changed

google/cloud/channel/v1/customers.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ message Customer {
3434
pattern: "accounts/{account}/customers/{customer}"
3535
};
3636

37-
// The enum represents whether a customer belongs to public sector
37+
// The enum represents if a customer belongs to public sector
3838
enum CustomerAttestationState {
3939
// Default value if not set yet
4040
CUSTOMER_ATTESTATION_STATE_UNSPECIFIED = 0;
@@ -107,7 +107,7 @@ message Customer {
107107
// Populated only if a CRM ID exists for this customer.
108108
string correlation_id = 14 [(google.api.field_behavior) = OPTIONAL];
109109

110-
// Optional. Indicate whether a customer is attesting about the correctness of
110+
// Optional. Indicate if a customer is attesting about the correctness of
111111
// provided information. Only required if creating a GCP Entitlement.
112112
CustomerAttestationState customer_attestation_state = 16
113113
[(google.api.field_behavior) = OPTIONAL];

google/cloud/channel/v1/entitlements.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ message Entitlement {
147147
// Optional. The billing account resource name that is used to pay for this
148148
// entitlement.
149149
string billing_account = 28 [(google.api.field_behavior) = OPTIONAL];
150+
151+
// Optional. Price reference ID for the offer. Only for offers that require
152+
// additional price information. Used to guarantee that the pricing is
153+
// consistent between quoting the offer and placing the order.
154+
string price_reference_id = 29 [(google.api.field_behavior) = OPTIONAL];
150155
}
151156

152157
// Definition for extended entitlement parameters.

google/cloud/channel/v1/offers.proto

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,27 @@ enum PeriodType {
123123
YEAR = 3;
124124
}
125125

126+
// Discount Type.
127+
enum DiscountType {
128+
// Not used.
129+
DISCOUNT_TYPE_UNSPECIFIED = 0;
130+
131+
// Regional discount.
132+
REGIONAL_DISCOUNT = 1;
133+
134+
// Promotional discount.
135+
PROMOTIONAL_DISCOUNT = 2;
136+
137+
// Sales-provided discount.
138+
SALES_DISCOUNT = 3;
139+
140+
// Reseller margin.
141+
RESELLER_MARGIN = 4;
142+
143+
// Deal code discount.
144+
DEAL_CODE = 5;
145+
}
146+
126147
// Represents an offer made to resellers for purchase.
127148
// An offer is associated with a [Sku][google.cloud.channel.v1.Sku], has a plan
128149
// for payment, a price, and defines the constraints for buying.
@@ -279,8 +300,17 @@ message Price {
279300
// Effective Price after applying the discounts.
280301
google.type.Money effective_price = 3;
281302

303+
// The time period with respect to which base and effective prices are
304+
// defined.
305+
// Example: 1 month, 6 months, 1 year, etc.
306+
Period price_period = 6;
307+
282308
// Link to external price list, such as link to Google Voice rate card.
283309
string external_price_uri = 4;
310+
311+
// Breakdown of the discount into its components.
312+
// This will be empty if there is no discount present.
313+
repeated DiscountComponent discount_components = 5;
284314
}
285315

286316
// Specifies the price by the duration of months.
@@ -330,3 +360,20 @@ message Period {
330360
// Period Type.
331361
PeriodType period_type = 2;
332362
}
363+
364+
// Represents a single component of the total discount applicable on a Price.
365+
message DiscountComponent {
366+
// Specifies the contribution of this discount component to the total
367+
// discount.
368+
oneof discount_value {
369+
// Discount percentage, represented as decimal.
370+
// For example, a 20% discount will be represented as 0.2.
371+
double discount_percentage = 3;
372+
373+
// Fixed value discount.
374+
google.type.Money discount_absolute = 4;
375+
}
376+
377+
// Type of the discount.
378+
DiscountType discount_type = 2;
379+
}

google/cloud/channel/v1/repricing.proto

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ message RepricingConfig {
115115

116116
// Required. Defines the granularity for repricing.
117117
oneof granularity {
118-
// Applies the repricing configuration at the entitlement level.
118+
// Required. Applies the repricing configuration at the entitlement level.
119119
//
120120
// Note: If a
121121
// [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
@@ -129,7 +129,8 @@ message RepricingConfig {
129129
// [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
130130
// and
131131
// [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig].
132-
EntitlementGranularity entitlement_granularity = 4;
132+
EntitlementGranularity entitlement_granularity = 4
133+
[(google.api.field_behavior) = REQUIRED];
133134

134135
// Applies the repricing configuration at the channel partner level.
135136
// Only

google/cloud/channel/v1/service.proto

Lines changed: 91 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ option go_package = "cloud.google.com/go/channel/apiv1/channelpb;channelpb";
3838
option java_multiple_files = true;
3939
option java_outer_classname = "ServiceProto";
4040
option java_package = "com.google.cloud.channel.v1";
41+
option (google.api.resource_definition) = {
42+
type: "cloudchannel.googleapis.com/Account"
43+
pattern: "accounts/{account}"
44+
};
4145

4246
// CloudChannelService lets Google cloud resellers and distributors manage
4347
// their customers, channel partners, entitlements, and reports.
@@ -1361,8 +1365,8 @@ service CloudChannelService {
13611365
};
13621366
}
13631367

1364-
// Registers a service account with subscriber privileges on the Cloud Pub/Sub
1365-
// topic for this Channel Services account. After you create a
1368+
// Registers a service account with subscriber privileges on the Pub/Sub
1369+
// topic for this Channel Services account or integrator. After you create a
13661370
// subscriber, you get the events through
13671371
// [SubscriberEvent][google.cloud.channel.v1.SubscriberEvent]
13681372
//
@@ -1384,13 +1388,17 @@ service CloudChannelService {
13841388
option (google.api.http) = {
13851389
post: "/v1/{account=accounts/*}:register"
13861390
body: "*"
1391+
additional_bindings {
1392+
post: "/v1/{integrator=integrators/*}:registerSubscriber"
1393+
body: "*"
1394+
}
13871395
};
13881396
}
13891397

1390-
// Unregisters a service account with subscriber privileges on the Cloud
1391-
// Pub/Sub topic created for this Channel Services account. If there are no
1392-
// service accounts left with subscriber privileges, this deletes the topic.
1393-
// You can call ListSubscribers to check for these accounts.
1398+
// Unregisters a service account with subscriber privileges on the Pub/Sub
1399+
// topic created for this Channel Services account or integrator. If there are
1400+
// no service accounts left with subscriber privileges, this deletes the
1401+
// topic. You can call ListSubscribers to check for these accounts.
13941402
//
13951403
// Possible error codes:
13961404
//
@@ -1413,11 +1421,15 @@ service CloudChannelService {
14131421
option (google.api.http) = {
14141422
post: "/v1/{account=accounts/*}:unregister"
14151423
body: "*"
1424+
additional_bindings {
1425+
post: "/v1/{integrator=integrators/*}:unregisterSubscriber"
1426+
body: "*"
1427+
}
14161428
};
14171429
}
14181430

1419-
// Lists service accounts with subscriber privileges on the Cloud Pub/Sub
1420-
// topic created for this Channel Services account.
1431+
// Lists service accounts with subscriber privileges on the Pub/Sub topic
1432+
// created for this Channel Services account or integrator.
14211433
//
14221434
// Possible error codes:
14231435
//
@@ -1437,6 +1449,9 @@ service CloudChannelService {
14371449
returns (ListSubscribersResponse) {
14381450
option (google.api.http) = {
14391451
get: "/v1/{account=accounts/*}:listSubscribers"
1452+
additional_bindings {
1453+
get: "/v1/{integrator=integrators/*}:listSubscribers"
1454+
}
14401455
};
14411456
}
14421457

@@ -1489,7 +1504,8 @@ message CloudIdentityCustomerAccount {
14891504
bool existing = 1;
14901505

14911506
// Returns true if the Cloud Identity account is associated with a customer
1492-
// of the Channel Services partner.
1507+
// of the Channel Services partner (with active subscriptions or purchase
1508+
// consents).
14931509
bool owned = 2;
14941510

14951511
// If owned = true, the name of the customer that owns the Cloud Identity
@@ -1843,6 +1859,11 @@ message ListTransferableOffersResponse {
18431859
message TransferableOffer {
18441860
// Offer with parameter constraints updated to allow the Transfer.
18451861
Offer offer = 1;
1862+
1863+
// Optional. Price reference ID for the offer. Only for offers that require
1864+
// additional price information. Used to guarantee that the pricing is
1865+
// consistent between quoting the offer and placing the order.
1866+
string price_reference_id = 2 [(google.api.field_behavior) = OPTIONAL];
18461867
}
18471868

18481869
// Request message for
@@ -2167,7 +2188,8 @@ message ListSkuGroupsRequest {
21672188

21682189
// Optional. A token identifying a page of results beyond the first page.
21692190
// Obtained through
2170-
// [ListSkuGroups.next_page_token][] of the previous
2191+
// [ListSkuGroupsResponse.next_page_token][google.cloud.channel.v1.ListSkuGroupsResponse.next_page_token]
2192+
// of the previous
21712193
// [CloudChannelService.ListSkuGroups][google.cloud.channel.v1.CloudChannelService.ListSkuGroups]
21722194
// call.
21732195
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
@@ -2191,7 +2213,8 @@ message ListSkuGroupBillableSkusRequest {
21912213

21922214
// Optional. A token identifying a page of results beyond the first page.
21932215
// Obtained through
2194-
// [ListSkuGroupBillableSkus.next_page_token][] of the previous
2216+
// [ListSkuGroupBillableSkusResponse.next_page_token][google.cloud.channel.v1.ListSkuGroupBillableSkusResponse.next_page_token]
2217+
// of the previous
21952218
// [CloudChannelService.ListSkuGroupBillableSkus][google.cloud.channel.v1.CloudChannelService.ListSkuGroupBillableSkus]
21962219
// call.
21972220
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
@@ -2203,8 +2226,9 @@ message ListSkuGroupsResponse {
22032226
repeated SkuGroup sku_groups = 1;
22042227

22052228
// A token to retrieve the next page of results.
2206-
// Pass to [ListSkuGroups.page_token][] to obtain that
2207-
// page.
2229+
// Pass to
2230+
// [ListSkuGroupsRequest.page_token][google.cloud.channel.v1.ListSkuGroupsRequest.page_token]
2231+
// to obtain that page.
22082232
string next_page_token = 2;
22092233
}
22102234

@@ -2214,8 +2238,9 @@ message ListSkuGroupBillableSkusResponse {
22142238
repeated BillableSku billable_skus = 1;
22152239

22162240
// A token to retrieve the next page of results.
2217-
// Pass to [ListSkuGroupBillableSkus.page_token][] to obtain that
2218-
// page.
2241+
// Pass to
2242+
// [ListSkuGroupBillableSkusRequest.page_token][google.cloud.channel.v1.ListSkuGroupBillableSkusRequest.page_token]
2243+
// to obtain that page.
22192244
string next_page_token = 2;
22202245
}
22212246

@@ -2356,7 +2381,8 @@ message TransferEntitlementsToGoogleRequest {
23562381
string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
23572382
}
23582383

2359-
// Request message for [CloudChannelService.ChangeParametersRequest][].
2384+
// Request message for
2385+
// [CloudChannelService.ChangeParameters][google.cloud.channel.v1.CloudChannelService.ChangeParameters].
23602386
message ChangeParametersRequest {
23612387
// Required. The name of the entitlement to update.
23622388
// Name uses the format:
@@ -2461,6 +2487,11 @@ message ChangeOfferRequest {
24612487
// This field is only relevant for multi-currency accounts. It should be
24622488
// left empty for single currency accounts.
24632489
string billing_account = 7 [(google.api.field_behavior) = OPTIONAL];
2490+
2491+
// Optional. Price reference ID for the offer. Only for offers that require
2492+
// additional price information. Used to guarantee that the pricing is
2493+
// consistent between quoting the offer and placing the order.
2494+
string price_reference_id = 8 [(google.api.field_behavior) = OPTIONAL];
24642495
}
24652496

24662497
// Request message for
@@ -2673,6 +2704,9 @@ message ListOffersRequest {
26732704
// Response message for ListOffers.
26742705
message ListOffersResponse {
26752706
// The list of Offers requested.
2707+
//
2708+
// The pricing information for each Offer only includes the base price.
2709+
// Effective prices and discounts aren't populated.
26762710
repeated Offer offers = 1;
26772711

26782712
// A token to retrieve the next page of results.
@@ -2843,6 +2877,11 @@ message ListPurchasableOffersResponse {
28432877
message PurchasableOffer {
28442878
// Offer.
28452879
Offer offer = 1;
2880+
2881+
// Optional. Price reference ID for the offer. Only for offers that require
2882+
// additional price information. Used to guarantee that the pricing is
2883+
// consistent between quoting the offer and placing the order.
2884+
string price_reference_id = 2 [(google.api.field_behavior) = OPTIONAL];
28462885
}
28472886

28482887
// Request message for QueryEligibleBillingAccounts.
@@ -2889,12 +2928,22 @@ message BillingAccountPurchaseInfo {
28892928

28902929
// Request Message for RegisterSubscriber.
28912930
message RegisterSubscriberRequest {
2892-
// Required. Resource name of the account.
2893-
string account = 1 [(google.api.field_behavior) = REQUIRED];
2931+
// Optional. Resource name of the account. Required if integrator is not
2932+
// provided. Otherwise, leave this field empty/unset.
2933+
string account = 1 [
2934+
(google.api.field_behavior) = OPTIONAL,
2935+
(google.api.resource_reference) = {
2936+
type: "cloudchannel.googleapis.com/Account"
2937+
}
2938+
];
28942939

28952940
// Required. Service account that provides subscriber access to the registered
28962941
// topic.
28972942
string service_account = 2 [(google.api.field_behavior) = REQUIRED];
2943+
2944+
// Optional. Resource name of the integrator. Required if account is not
2945+
// provided. Otherwise, leave this field empty/unset.
2946+
optional string integrator = 3 [(google.api.field_behavior) = OPTIONAL];
28982947
}
28992948

29002949
// Response Message for RegisterSubscriber.
@@ -2905,12 +2954,22 @@ message RegisterSubscriberResponse {
29052954

29062955
// Request Message for UnregisterSubscriber.
29072956
message UnregisterSubscriberRequest {
2908-
// Required. Resource name of the account.
2909-
string account = 1 [(google.api.field_behavior) = REQUIRED];
2957+
// Optional. Resource name of the account. Required if integrator is not
2958+
// provided. Otherwise, leave this field empty/unset.
2959+
string account = 1 [
2960+
(google.api.field_behavior) = OPTIONAL,
2961+
(google.api.resource_reference) = {
2962+
type: "cloudchannel.googleapis.com/Account"
2963+
}
2964+
];
29102965

29112966
// Required. Service account to unregister from subscriber access to the
29122967
// topic.
29132968
string service_account = 2 [(google.api.field_behavior) = REQUIRED];
2969+
2970+
// Optional. Resource name of the integrator. Required if account is not
2971+
// provided. Otherwise, leave this field empty/unset.
2972+
optional string integrator = 3 [(google.api.field_behavior) = OPTIONAL];
29142973
}
29152974

29162975
// Response Message for UnregisterSubscriber.
@@ -2921,8 +2980,14 @@ message UnregisterSubscriberResponse {
29212980

29222981
// Request Message for ListSubscribers.
29232982
message ListSubscribersRequest {
2924-
// Required. Resource name of the account.
2925-
string account = 1 [(google.api.field_behavior) = REQUIRED];
2983+
// Optional. Resource name of the account. Required if integrator is not
2984+
// provided. Otherwise, leave this field empty/unset.
2985+
string account = 1 [
2986+
(google.api.field_behavior) = OPTIONAL,
2987+
(google.api.resource_reference) = {
2988+
type: "cloudchannel.googleapis.com/Account"
2989+
}
2990+
];
29262991

29272992
// Optional. The maximum number of service accounts to return. The service may
29282993
// return fewer than this value. If unspecified, returns at most 100 service
@@ -2936,6 +3001,10 @@ message ListSubscribersRequest {
29363001
// When paginating, all other parameters provided to `ListSubscribers` must
29373002
// match the call that provided the page token.
29383003
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
3004+
3005+
// Optional. Resource name of the integrator. Required if account is not
3006+
// provided. Otherwise, leave this field empty/unset.
3007+
optional string integrator = 4 [(google.api.field_behavior) = OPTIONAL];
29393008
}
29403009

29413010
// Response Message for ListSubscribers.

google/cloud/channel/v1/subscriber_event.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ message CustomerEvent {
4343
type: "cloudchannel.googleapis.com/Customer"
4444
}];
4545

46-
// Type of event which happened on the customer.
46+
// Type of event which happened for the customer.
4747
Type event_type = 2;
4848
}
4949

@@ -100,7 +100,7 @@ message EntitlementEvent {
100100
type: "cloudchannel.googleapis.com/Entitlement"
101101
}];
102102

103-
// Type of event which happened on the entitlement.
103+
// Type of event which happened for the entitlement.
104104
Type event_type = 2;
105105
}
106106

0 commit comments

Comments
 (0)