-
Notifications
You must be signed in to change notification settings - Fork 461
Expand file tree
/
Copy pathChannelPartnerLinkState.php
More file actions
76 lines (68 loc) · 2.14 KB
/
ChannelPartnerLinkState.php
File metadata and controls
76 lines (68 loc) · 2.14 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
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/channel/v1/channel_partner_links.proto
namespace Google\Cloud\Channel\V1;
use UnexpectedValueException;
/**
* ChannelPartnerLinkState represents state of a channel partner link.
*
* Protobuf type <code>google.cloud.channel.v1.ChannelPartnerLinkState</code>
*/
class ChannelPartnerLinkState
{
/**
* Not used.
*
* Generated from protobuf enum <code>CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED = 0;</code>
*/
const CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED = 0;
/**
* An invitation has been sent to the reseller to create a channel partner
* link.
*
* Generated from protobuf enum <code>INVITED = 1;</code>
*/
const INVITED = 1;
/**
* Status when the reseller is active.
*
* Generated from protobuf enum <code>ACTIVE = 2;</code>
*/
const ACTIVE = 2;
/**
* Status when the reseller has been revoked by the distributor.
*
* Generated from protobuf enum <code>REVOKED = 3;</code>
*/
const REVOKED = 3;
/**
* Status when the reseller is suspended by Google or distributor.
*
* Generated from protobuf enum <code>SUSPENDED = 4;</code>
*/
const SUSPENDED = 4;
private static $valueToName = [
self::CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED => 'CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED',
self::INVITED => 'INVITED',
self::ACTIVE => 'ACTIVE',
self::REVOKED => 'REVOKED',
self::SUSPENDED => 'SUSPENDED',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}