-
Notifications
You must be signed in to change notification settings - Fork 460
Expand file tree
/
Copy pathEntitlement.php
More file actions
657 lines (597 loc) · 24.4 KB
/
Entitlement.php
File metadata and controls
657 lines (597 loc) · 24.4 KB
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/channel/v1/entitlements.proto
namespace Google\Cloud\Channel\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;
/**
* An entitlement is a representation of a customer's ability to use a service.
*
* Generated from protobuf message <code>google.cloud.channel.v1.Entitlement</code>
*/
class Entitlement extends \Google\Protobuf\Internal\Message
{
/**
* Output only. Resource name of an entitlement in the form:
* accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.
*
* Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $name = '';
/**
* Output only. The time at which the entitlement is created.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $create_time = null;
/**
* Output only. The time at which the entitlement is updated.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $update_time = null;
/**
* Required. The offer resource name for which the entitlement is to be
* created. Takes the form: accounts/{account_id}/offers/{offer_id}.
*
* Generated from protobuf field <code>string offer = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
*/
protected $offer = '';
/**
* Commitment settings for a commitment-based Offer.
* Required for commitment based offers.
*
* Generated from protobuf field <code>.google.cloud.channel.v1.CommitmentSettings commitment_settings = 12;</code>
*/
protected $commitment_settings = null;
/**
* Output only. Current provisioning state of the entitlement.
*
* Generated from protobuf field <code>.google.cloud.channel.v1.Entitlement.ProvisioningState provisioning_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $provisioning_state = 0;
/**
* Output only. Service provisioning details for the entitlement.
*
* Generated from protobuf field <code>.google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $provisioned_service = null;
/**
* Output only. Enumerable of all current suspension reasons for an
* entitlement.
*
* Generated from protobuf field <code>repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
private $suspension_reasons;
/**
* 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. This is only supported for Google
* Workspace entitlements.
*
* Generated from protobuf field <code>string purchase_order_id = 19 [(.google.api.field_behavior) = OPTIONAL];</code>
*/
protected $purchase_order_id = '';
/**
* Output only. Settings for trial offers.
*
* Generated from protobuf field <code>.google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $trial_settings = null;
/**
* Association information to other entitlements.
*
* Generated from protobuf field <code>.google.cloud.channel.v1.AssociationInfo association_info = 23;</code>
*/
protected $association_info = null;
/**
* 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].
* For Google Workspace, the following Parameters may be accepted as input:
* - max_units: The maximum assignable units for a flexible offer
* OR
* - num_units: The total commitment for commitment-based offers
* The response may additionally include the following output-only Parameters:
* - assigned_units: The number of licenses assigned to users.
* For Google Cloud billing subaccounts, the following Parameter may be
* accepted as input:
* - display_name: The display name of the billing subaccount.
*
* Generated from protobuf field <code>repeated .google.cloud.channel.v1.Parameter parameters = 26;</code>
*/
private $parameters;
/**
* Optional. The billing account resource name that is used to pay for this
* entitlement.
*
* Generated from protobuf field <code>string billing_account = 28 [(.google.api.field_behavior) = OPTIONAL];</code>
*/
protected $billing_account = '';
/**
* Optional. Price reference ID for the offer. Only for offers that require
* additional price information. Used to guarantee that the pricing is
* consistent between quoting the offer and placing the order.
*
* Generated from protobuf field <code>string price_reference_id = 29 [(.google.api.field_behavior) = OPTIONAL];</code>
*/
protected $price_reference_id = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* Output only. Resource name of an entitlement in the form:
* accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.
* @type \Google\Protobuf\Timestamp $create_time
* Output only. The time at which the entitlement is created.
* @type \Google\Protobuf\Timestamp $update_time
* Output only. The time at which the entitlement is updated.
* @type string $offer
* Required. The offer resource name for which the entitlement is to be
* created. Takes the form: accounts/{account_id}/offers/{offer_id}.
* @type \Google\Cloud\Channel\V1\CommitmentSettings $commitment_settings
* Commitment settings for a commitment-based Offer.
* Required for commitment based offers.
* @type int $provisioning_state
* Output only. Current provisioning state of the entitlement.
* @type \Google\Cloud\Channel\V1\ProvisionedService $provisioned_service
* Output only. Service provisioning details for the entitlement.
* @type int[] $suspension_reasons
* Output only. Enumerable of all current suspension reasons for an
* entitlement.
* @type string $purchase_order_id
* 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. This is only supported for Google
* Workspace entitlements.
* @type \Google\Cloud\Channel\V1\TrialSettings $trial_settings
* Output only. Settings for trial offers.
* @type \Google\Cloud\Channel\V1\AssociationInfo $association_info
* Association information to other entitlements.
* @type \Google\Cloud\Channel\V1\Parameter[] $parameters
* 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].
* For Google Workspace, the following Parameters may be accepted as input:
* - max_units: The maximum assignable units for a flexible offer
* OR
* - num_units: The total commitment for commitment-based offers
* The response may additionally include the following output-only Parameters:
* - assigned_units: The number of licenses assigned to users.
* For Google Cloud billing subaccounts, the following Parameter may be
* accepted as input:
* - display_name: The display name of the billing subaccount.
* @type string $billing_account
* Optional. The billing account resource name that is used to pay for this
* entitlement.
* @type string $price_reference_id
* Optional. Price reference ID for the offer. Only for offers that require
* additional price information. Used to guarantee that the pricing is
* consistent between quoting the offer and placing the order.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Cloud\Channel\V1\Entitlements::initOnce();
parent::__construct($data);
}
/**
* Output only. Resource name of an entitlement in the form:
* accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.
*
* Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Output only. Resource name of an entitlement in the form:
* accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.
*
* Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Output only. The time at which the entitlement is created.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return \Google\Protobuf\Timestamp|null
*/
public function getCreateTime()
{
return $this->create_time;
}
public function hasCreateTime()
{
return isset($this->create_time);
}
public function clearCreateTime()
{
unset($this->create_time);
}
/**
* Output only. The time at which the entitlement is created.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param \Google\Protobuf\Timestamp $var
* @return $this
*/
public function setCreateTime($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
$this->create_time = $var;
return $this;
}
/**
* Output only. The time at which the entitlement is updated.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return \Google\Protobuf\Timestamp|null
*/
public function getUpdateTime()
{
return $this->update_time;
}
public function hasUpdateTime()
{
return isset($this->update_time);
}
public function clearUpdateTime()
{
unset($this->update_time);
}
/**
* Output only. The time at which the entitlement is updated.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param \Google\Protobuf\Timestamp $var
* @return $this
*/
public function setUpdateTime($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
$this->update_time = $var;
return $this;
}
/**
* Required. The offer resource name for which the entitlement is to be
* created. Takes the form: accounts/{account_id}/offers/{offer_id}.
*
* Generated from protobuf field <code>string offer = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
* @return string
*/
public function getOffer()
{
return $this->offer;
}
/**
* Required. The offer resource name for which the entitlement is to be
* created. Takes the form: accounts/{account_id}/offers/{offer_id}.
*
* Generated from protobuf field <code>string offer = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
* @param string $var
* @return $this
*/
public function setOffer($var)
{
GPBUtil::checkString($var, True);
$this->offer = $var;
return $this;
}
/**
* Commitment settings for a commitment-based Offer.
* Required for commitment based offers.
*
* Generated from protobuf field <code>.google.cloud.channel.v1.CommitmentSettings commitment_settings = 12;</code>
* @return \Google\Cloud\Channel\V1\CommitmentSettings|null
*/
public function getCommitmentSettings()
{
return $this->commitment_settings;
}
public function hasCommitmentSettings()
{
return isset($this->commitment_settings);
}
public function clearCommitmentSettings()
{
unset($this->commitment_settings);
}
/**
* Commitment settings for a commitment-based Offer.
* Required for commitment based offers.
*
* Generated from protobuf field <code>.google.cloud.channel.v1.CommitmentSettings commitment_settings = 12;</code>
* @param \Google\Cloud\Channel\V1\CommitmentSettings $var
* @return $this
*/
public function setCommitmentSettings($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\CommitmentSettings::class);
$this->commitment_settings = $var;
return $this;
}
/**
* Output only. Current provisioning state of the entitlement.
*
* Generated from protobuf field <code>.google.cloud.channel.v1.Entitlement.ProvisioningState provisioning_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return int
*/
public function getProvisioningState()
{
return $this->provisioning_state;
}
/**
* Output only. Current provisioning state of the entitlement.
*
* Generated from protobuf field <code>.google.cloud.channel.v1.Entitlement.ProvisioningState provisioning_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param int $var
* @return $this
*/
public function setProvisioningState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Channel\V1\Entitlement\ProvisioningState::class);
$this->provisioning_state = $var;
return $this;
}
/**
* Output only. Service provisioning details for the entitlement.
*
* Generated from protobuf field <code>.google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return \Google\Cloud\Channel\V1\ProvisionedService|null
*/
public function getProvisionedService()
{
return $this->provisioned_service;
}
public function hasProvisionedService()
{
return isset($this->provisioned_service);
}
public function clearProvisionedService()
{
unset($this->provisioned_service);
}
/**
* Output only. Service provisioning details for the entitlement.
*
* Generated from protobuf field <code>.google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param \Google\Cloud\Channel\V1\ProvisionedService $var
* @return $this
*/
public function setProvisionedService($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\ProvisionedService::class);
$this->provisioned_service = $var;
return $this;
}
/**
* Output only. Enumerable of all current suspension reasons for an
* entitlement.
*
* Generated from protobuf field <code>repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return RepeatedField<int>
*/
public function getSuspensionReasons()
{
return $this->suspension_reasons;
}
/**
* Output only. Enumerable of all current suspension reasons for an
* entitlement.
*
* Generated from protobuf field <code>repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param int[] $var
* @return $this
*/
public function setSuspensionReasons($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Channel\V1\Entitlement\SuspensionReason::class);
$this->suspension_reasons = $arr;
return $this;
}
/**
* 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. This is only supported for Google
* Workspace entitlements.
*
* Generated from protobuf field <code>string purchase_order_id = 19 [(.google.api.field_behavior) = OPTIONAL];</code>
* @return string
*/
public function getPurchaseOrderId()
{
return $this->purchase_order_id;
}
/**
* 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. This is only supported for Google
* Workspace entitlements.
*
* Generated from protobuf field <code>string purchase_order_id = 19 [(.google.api.field_behavior) = OPTIONAL];</code>
* @param string $var
* @return $this
*/
public function setPurchaseOrderId($var)
{
GPBUtil::checkString($var, True);
$this->purchase_order_id = $var;
return $this;
}
/**
* Output only. Settings for trial offers.
*
* Generated from protobuf field <code>.google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @return \Google\Cloud\Channel\V1\TrialSettings|null
*/
public function getTrialSettings()
{
return $this->trial_settings;
}
public function hasTrialSettings()
{
return isset($this->trial_settings);
}
public function clearTrialSettings()
{
unset($this->trial_settings);
}
/**
* Output only. Settings for trial offers.
*
* Generated from protobuf field <code>.google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
* @param \Google\Cloud\Channel\V1\TrialSettings $var
* @return $this
*/
public function setTrialSettings($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\TrialSettings::class);
$this->trial_settings = $var;
return $this;
}
/**
* Association information to other entitlements.
*
* Generated from protobuf field <code>.google.cloud.channel.v1.AssociationInfo association_info = 23;</code>
* @return \Google\Cloud\Channel\V1\AssociationInfo|null
*/
public function getAssociationInfo()
{
return $this->association_info;
}
public function hasAssociationInfo()
{
return isset($this->association_info);
}
public function clearAssociationInfo()
{
unset($this->association_info);
}
/**
* Association information to other entitlements.
*
* Generated from protobuf field <code>.google.cloud.channel.v1.AssociationInfo association_info = 23;</code>
* @param \Google\Cloud\Channel\V1\AssociationInfo $var
* @return $this
*/
public function setAssociationInfo($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\AssociationInfo::class);
$this->association_info = $var;
return $this;
}
/**
* 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].
* For Google Workspace, the following Parameters may be accepted as input:
* - max_units: The maximum assignable units for a flexible offer
* OR
* - num_units: The total commitment for commitment-based offers
* The response may additionally include the following output-only Parameters:
* - assigned_units: The number of licenses assigned to users.
* For Google Cloud billing subaccounts, the following Parameter may be
* accepted as input:
* - display_name: The display name of the billing subaccount.
*
* Generated from protobuf field <code>repeated .google.cloud.channel.v1.Parameter parameters = 26;</code>
* @return RepeatedField<\Google\Cloud\Channel\V1\Parameter>
*/
public function getParameters()
{
return $this->parameters;
}
/**
* 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].
* For Google Workspace, the following Parameters may be accepted as input:
* - max_units: The maximum assignable units for a flexible offer
* OR
* - num_units: The total commitment for commitment-based offers
* The response may additionally include the following output-only Parameters:
* - assigned_units: The number of licenses assigned to users.
* For Google Cloud billing subaccounts, the following Parameter may be
* accepted as input:
* - display_name: The display name of the billing subaccount.
*
* Generated from protobuf field <code>repeated .google.cloud.channel.v1.Parameter parameters = 26;</code>
* @param \Google\Cloud\Channel\V1\Parameter[] $var
* @return $this
*/
public function setParameters($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Channel\V1\Parameter::class);
$this->parameters = $arr;
return $this;
}
/**
* Optional. The billing account resource name that is used to pay for this
* entitlement.
*
* Generated from protobuf field <code>string billing_account = 28 [(.google.api.field_behavior) = OPTIONAL];</code>
* @return string
*/
public function getBillingAccount()
{
return $this->billing_account;
}
/**
* Optional. The billing account resource name that is used to pay for this
* entitlement.
*
* Generated from protobuf field <code>string billing_account = 28 [(.google.api.field_behavior) = OPTIONAL];</code>
* @param string $var
* @return $this
*/
public function setBillingAccount($var)
{
GPBUtil::checkString($var, True);
$this->billing_account = $var;
return $this;
}
/**
* Optional. Price reference ID for the offer. Only for offers that require
* additional price information. Used to guarantee that the pricing is
* consistent between quoting the offer and placing the order.
*
* Generated from protobuf field <code>string price_reference_id = 29 [(.google.api.field_behavior) = OPTIONAL];</code>
* @return string
*/
public function getPriceReferenceId()
{
return $this->price_reference_id;
}
/**
* Optional. Price reference ID for the offer. Only for offers that require
* additional price information. Used to guarantee that the pricing is
* consistent between quoting the offer and placing the order.
*
* Generated from protobuf field <code>string price_reference_id = 29 [(.google.api.field_behavior) = OPTIONAL];</code>
* @param string $var
* @return $this
*/
public function setPriceReferenceId($var)
{
GPBUtil::checkString($var, True);
$this->price_reference_id = $var;
return $this;
}
}