-
Notifications
You must be signed in to change notification settings - Fork 462
Expand file tree
/
Copy pathSystemProvider.php
More file actions
115 lines (107 loc) · 3.18 KB
/
SystemProvider.php
File metadata and controls
115 lines (107 loc) · 3.18 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
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/developerconnect/v1/developer_connect.proto
namespace Google\Cloud\DeveloperConnect\V1;
use UnexpectedValueException;
/**
* SystemProvider is a list of providers that are owned by Developer Connect.
*
* Protobuf type <code>google.cloud.developerconnect.v1.SystemProvider</code>
*/
class SystemProvider
{
/**
* No system provider specified.
*
* Generated from protobuf enum <code>SYSTEM_PROVIDER_UNSPECIFIED = 0;</code>
*/
const SYSTEM_PROVIDER_UNSPECIFIED = 0;
/**
* GitHub provider.
* Scopes can be found at
* https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes
*
* Generated from protobuf enum <code>GITHUB = 1;</code>
*/
const GITHUB = 1;
/**
* GitLab provider.
* Scopes can be found at
* https://docs.gitlab.com/user/profile/personal_access_tokens/#personal-access-token-scopes
*
* Generated from protobuf enum <code>GITLAB = 2;</code>
*/
const GITLAB = 2;
/**
* Google provider.
* Recommended scopes:
* "https://www.googleapis.com/auth/drive.readonly",
* "https://www.googleapis.com/auth/documents.readonly"
*
* Generated from protobuf enum <code>GOOGLE = 3;</code>
*/
const GOOGLE = 3;
/**
* Sentry provider.
* Scopes can be found at
* https://docs.sentry.io/api/permissions/
*
* Generated from protobuf enum <code>SENTRY = 4;</code>
*/
const SENTRY = 4;
/**
* Rovo provider.
* Must select the "rovo" scope.
*
* Generated from protobuf enum <code>ROVO = 5;</code>
*/
const ROVO = 5;
/**
* New Relic provider.
* No scopes are allowed.
*
* Generated from protobuf enum <code>NEW_RELIC = 6;</code>
*/
const NEW_RELIC = 6;
/**
* Datastax provider.
* No scopes are allowed.
*
* Generated from protobuf enum <code>DATASTAX = 7;</code>
*/
const DATASTAX = 7;
/**
* Dynatrace provider.
*
* Generated from protobuf enum <code>DYNATRACE = 8;</code>
*/
const DYNATRACE = 8;
private static $valueToName = [
self::SYSTEM_PROVIDER_UNSPECIFIED => 'SYSTEM_PROVIDER_UNSPECIFIED',
self::GITHUB => 'GITHUB',
self::GITLAB => 'GITLAB',
self::GOOGLE => 'GOOGLE',
self::SENTRY => 'SENTRY',
self::ROVO => 'ROVO',
self::NEW_RELIC => 'NEW_RELIC',
self::DATASTAX => 'DATASTAX',
self::DYNATRACE => 'DYNATRACE',
];
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);
}
}