This repository has been archived by the owner on Sep 16, 2023. It is now read-only.
/
entitlements.proto
250 lines (198 loc) · 9 KB
/
entitlements.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.cloud.channel.v1;
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/channel/v1/common.proto";
import "google/cloud/channel/v1/offers.proto";
import "google/cloud/channel/v1/products.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel";
option java_multiple_files = true;
option java_outer_classname = "EntitlementsProto";
option java_package = "com.google.cloud.channel.v1";
// An entitlement is a representation of a customer's ability to use a service.
message Entitlement {
option (google.api.resource) = {
type: "cloudchannel.googleapis.com/Entitlement"
pattern: "accounts/{account}/customers/{customer}/entitlements/{entitlement}"
};
// Indicates the current provisioning state of the entitlement.
enum ProvisioningState {
// Default value. This state doesn't show unless an error occurs.
PROVISIONING_STATE_UNSPECIFIED = 0;
// The entitlement is currently active.
ACTIVE = 1;
// The entitlement is currently suspended.
SUSPENDED = 5;
}
// Suspension reason for an entitlement if [provisioning_state][google.cloud.channel.v1.Entitlement.provisioning_state] = SUSPENDED.
enum SuspensionReason {
// Default value. This state doesn't show unless an error occurs.
SUSPENSION_REASON_UNSPECIFIED = 0;
// Entitlement was manually suspended by the Reseller.
RESELLER_INITIATED = 1;
// Trial ended.
TRIAL_ENDED = 2;
// Entitlement renewal was canceled.
RENEWAL_WITH_TYPE_CANCEL = 3;
// Entitlement was automatically suspended on creation for pending ToS
// acceptance on customer.
PENDING_TOS_ACCEPTANCE = 4;
// Other reasons (internal reasons, abuse, etc.).
OTHER = 100;
}
// 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];
// Output only. The time at which the entitlement is created.
google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The time at which the entitlement is updated.
google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
// Required. The offer resource name for which the entitlement is to be
// created. Takes the form: accounts/{account_id}/offers/{offer_id}.
string offer = 8 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "cloudchannel.googleapis.com/Offer"
}
];
// Commitment settings for a commitment-based Offer.
// Required for commitment based offers.
CommitmentSettings commitment_settings = 12;
// Output only. Current provisioning state of the entitlement.
ProvisioningState provisioning_state = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Service provisioning details for the entitlement.
ProvisionedService provisioned_service = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Enumerable of all current suspension reasons for an entitlement.
repeated SuspensionReason suspension_reasons = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. This purchase order (PO) information is for resellers to use for their
// company tracking usage. If a purchaseOrderId value is given, it appears in
// the API responses and shows up in the invoice. The property accepts up to
// 80 plain text characters.
string purchase_order_id = 19 [(google.api.field_behavior) = OPTIONAL];
// Output only. Settings for trial offers.
TrialSettings trial_settings = 21 [(google.api.field_behavior) = OUTPUT_ONLY];
// Association information to other entitlements.
AssociationInfo association_info = 23;
// Extended entitlement parameters. When creating an entitlement, valid
// parameter names and values are defined in the
// [Offer.parameter_definitions][google.cloud.channel.v1.Offer.parameter_definitions].
//
// The response may include the following output-only Parameters:
//
// - assigned_units: The number of licenses assigned to users.
//
// - max_units: The maximum assignable units for a flexible offer.
//
// - num_units: The total commitment for commitment-based offers.
repeated Parameter parameters = 26;
}
// Definition for extended entitlement parameters.
message Parameter {
// Name of the parameter.
string name = 1;
// Value of the parameter.
Value value = 2;
// Output only. Specifies whether this parameter is allowed to be changed. For example, for
// a Google Workspace Business Starter entitlement in commitment plan,
// num_units is editable when entitlement is active.
bool editable = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Association links that an entitlement has to other entitlements.
message AssociationInfo {
// The name of the base entitlement, for which this entitlement is an add-on.
string base_entitlement = 1 [(google.api.resource_reference) = {
type: "cloudchannel.googleapis.com/Entitlement"
}];
}
// Service provisioned for an entitlement.
message ProvisionedService {
// Output only. Provisioning ID of the entitlement. For Google Workspace, this would be the
// underlying Subscription ID.
string provisioning_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The product pertaining to the provisioning resource as specified in the
// Offer.
string product_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The SKU pertaining to the provisioning resource as specified in the Offer.
string sku_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Commitment settings for commitment-based offers.
message CommitmentSettings {
// Output only. Commitment start timestamp.
google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Commitment end timestamp.
google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. Renewal settings applicable for a commitment-based Offer.
RenewalSettings renewal_settings = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Renewal settings for renewable Offers.
message RenewalSettings {
// If false, the plan will be completed at the end date.
bool enable_renewal = 1;
// If true and enable_renewal = true, the unit (for example seats or licenses)
// will be set to the number of active units at renewal time.
bool resize_unit_count = 2;
// Describes how a reseller will be billed.
PaymentPlan payment_plan = 5;
// Describes how frequently the reseller will be billed, such as
// once per month.
Period payment_cycle = 6;
}
// Settings for trial offers.
message TrialSettings {
// Determines if the entitlement is in a trial or not:
//
// * `true` - The entitlement is in trial.
// * `false` - The entitlement is not in trial.
bool trial = 1;
// Date when the trial ends. The value is in milliseconds
// using the UNIX Epoch format. See an example [Epoch
// converter](https://www.epochconverter.com).
google.protobuf.Timestamp end_time = 2;
}
// TransferableSku represents information a reseller needs to view existing
// provisioned services for a customer that they do not own.
// Read-only.
message TransferableSku {
// Describes the transfer eligibility of a SKU.
TransferEligibility transfer_eligibility = 9;
// The SKU pertaining to the provisioning resource as specified in the Offer.
Sku sku = 11;
// Optional. The customer to transfer has an entitlement with the populated legacy SKU.
Sku legacy_sku = 12 [(google.api.field_behavior) = OPTIONAL];
}
// Specifies transfer eligibility of a SKU.
message TransferEligibility {
// Reason of ineligibility.
enum Reason {
// Reason is not available.
REASON_UNSPECIFIED = 0;
// Reseller needs to accept TOS before transferring the SKU.
PENDING_TOS_ACCEPTANCE = 1;
// Reseller not eligible to sell the SKU.
SKU_NOT_ELIGIBLE = 2;
// SKU subscription is suspended
SKU_SUSPENDED = 3;
}
// Whether reseller is eligible to transfer the SKU.
bool is_eligible = 1;
// Localized description if reseller is not eligible to transfer the SKU.
string description = 2;
// Specified the reason for ineligibility.
Reason ineligibility_reason = 3;
}