PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / trunk
ShareThis Dashboard for Google Analytics vtrunk
3.3.2 trunk 1.0.7 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.5 2.3.5 2.3.6 2.3.7 2.3.8 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3.0 3.3.1
googleanalytics / lib / analytics-admin / vendor / google / common-protos / src / Rpc / Code.php
googleanalytics / lib / analytics-admin / vendor / google / common-protos / src / Rpc Last commit date
BadRequest 3 years ago Help 3 years ago PreconditionFailure 3 years ago QuotaFailure 3 years ago BadRequest.php 3 years ago BadRequest_FieldViolation.php 3 years ago Code.php 3 years ago DebugInfo.php 3 years ago ErrorInfo.php 3 years ago Help.php 3 years ago Help_Link.php 3 years ago LocalizedMessage.php 3 years ago PreconditionFailure.php 3 years ago PreconditionFailure_Violation.php 3 years ago QuotaFailure.php 3 years ago QuotaFailure_Violation.php 3 years ago RequestInfo.php 3 years ago ResourceInfo.php 3 years ago RetryInfo.php 3 years ago Status.php 3 years ago
Code.php
244 lines
1 <?php
2 # Generated by the protocol buffer compiler. DO NOT EDIT!
3 # source: google/rpc/code.proto
4
5 namespace Google\Rpc;
6
7 use UnexpectedValueException;
8
9 /**
10 * The canonical error codes for gRPC APIs.
11 * Sometimes multiple error codes may apply. Services should return
12 * the most specific error code that applies. For example, prefer
13 * `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
14 * Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
15 *
16 * Protobuf type <code>google.rpc.Code</code>
17 */
18 class Code
19 {
20 /**
21 * Not an error; returned on success
22 * HTTP Mapping: 200 OK
23 *
24 * Generated from protobuf enum <code>OK = 0;</code>
25 */
26 const OK = 0;
27 /**
28 * The operation was cancelled, typically by the caller.
29 * HTTP Mapping: 499 Client Closed Request
30 *
31 * Generated from protobuf enum <code>CANCELLED = 1;</code>
32 */
33 const CANCELLED = 1;
34 /**
35 * Unknown error. For example, this error may be returned when
36 * a `Status` value received from another address space belongs to
37 * an error space that is not known in this address space. Also
38 * errors raised by APIs that do not return enough error information
39 * may be converted to this error.
40 * HTTP Mapping: 500 Internal Server Error
41 *
42 * Generated from protobuf enum <code>UNKNOWN = 2;</code>
43 */
44 const UNKNOWN = 2;
45 /**
46 * The client specified an invalid argument. Note that this differs
47 * from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments
48 * that are problematic regardless of the state of the system
49 * (e.g., a malformed file name).
50 * HTTP Mapping: 400 Bad Request
51 *
52 * Generated from protobuf enum <code>INVALID_ARGUMENT = 3;</code>
53 */
54 const INVALID_ARGUMENT = 3;
55 /**
56 * The deadline expired before the operation could complete. For operations
57 * that change the state of the system, this error may be returned
58 * even if the operation has completed successfully. For example, a
59 * successful response from a server could have been delayed long
60 * enough for the deadline to expire.
61 * HTTP Mapping: 504 Gateway Timeout
62 *
63 * Generated from protobuf enum <code>DEADLINE_EXCEEDED = 4;</code>
64 */
65 const DEADLINE_EXCEEDED = 4;
66 /**
67 * Some requested entity (e.g., file or directory) was not found.
68 * Note to server developers: if a request is denied for an entire class
69 * of users, such as gradual feature rollout or undocumented whitelist,
70 * `NOT_FOUND` may be used. If a request is denied for some users within
71 * a class of users, such as user-based access control, `PERMISSION_DENIED`
72 * must be used.
73 * HTTP Mapping: 404 Not Found
74 *
75 * Generated from protobuf enum <code>NOT_FOUND = 5;</code>
76 */
77 const NOT_FOUND = 5;
78 /**
79 * The entity that a client attempted to create (e.g., file or directory)
80 * already exists.
81 * HTTP Mapping: 409 Conflict
82 *
83 * Generated from protobuf enum <code>ALREADY_EXISTS = 6;</code>
84 */
85 const ALREADY_EXISTS = 6;
86 /**
87 * The caller does not have permission to execute the specified
88 * operation. `PERMISSION_DENIED` must not be used for rejections
89 * caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
90 * instead for those errors). `PERMISSION_DENIED` must not be
91 * used if the caller can not be identified (use `UNAUTHENTICATED`
92 * instead for those errors). This error code does not imply the
93 * request is valid or the requested entity exists or satisfies
94 * other pre-conditions.
95 * HTTP Mapping: 403 Forbidden
96 *
97 * Generated from protobuf enum <code>PERMISSION_DENIED = 7;</code>
98 */
99 const PERMISSION_DENIED = 7;
100 /**
101 * The request does not have valid authentication credentials for the
102 * operation.
103 * HTTP Mapping: 401 Unauthorized
104 *
105 * Generated from protobuf enum <code>UNAUTHENTICATED = 16;</code>
106 */
107 const UNAUTHENTICATED = 16;
108 /**
109 * Some resource has been exhausted, perhaps a per-user quota, or
110 * perhaps the entire file system is out of space.
111 * HTTP Mapping: 429 Too Many Requests
112 *
113 * Generated from protobuf enum <code>RESOURCE_EXHAUSTED = 8;</code>
114 */
115 const RESOURCE_EXHAUSTED = 8;
116 /**
117 * The operation was rejected because the system is not in a state
118 * required for the operation's execution. For example, the directory
119 * to be deleted is non-empty, an rmdir operation is applied to
120 * a non-directory, etc.
121 * Service implementors can use the following guidelines to decide
122 * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
123 * (a) Use `UNAVAILABLE` if the client can retry just the failing call.
124 * (b) Use `ABORTED` if the client should retry at a higher level
125 * (e.g., when a client-specified test-and-set fails, indicating the
126 * client should restart a read-modify-write sequence).
127 * (c) Use `FAILED_PRECONDITION` if the client should not retry until
128 * the system state has been explicitly fixed. E.g., if an "rmdir"
129 * fails because the directory is non-empty, `FAILED_PRECONDITION`
130 * should be returned since the client should not retry unless
131 * the files are deleted from the directory.
132 * HTTP Mapping: 400 Bad Request
133 *
134 * Generated from protobuf enum <code>FAILED_PRECONDITION = 9;</code>
135 */
136 const FAILED_PRECONDITION = 9;
137 /**
138 * The operation was aborted, typically due to a concurrency issue such as
139 * a sequencer check failure or transaction abort.
140 * See the guidelines above for deciding between `FAILED_PRECONDITION`,
141 * `ABORTED`, and `UNAVAILABLE`.
142 * HTTP Mapping: 409 Conflict
143 *
144 * Generated from protobuf enum <code>ABORTED = 10;</code>
145 */
146 const ABORTED = 10;
147 /**
148 * The operation was attempted past the valid range. E.g., seeking or
149 * reading past end-of-file.
150 * Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
151 * be fixed if the system state changes. For example, a 32-bit file
152 * system will generate `INVALID_ARGUMENT` if asked to read at an
153 * offset that is not in the range [0,2^32-1], but it will generate
154 * `OUT_OF_RANGE` if asked to read from an offset past the current
155 * file size.
156 * There is a fair bit of overlap between `FAILED_PRECONDITION` and
157 * `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific
158 * error) when it applies so that callers who are iterating through
159 * a space can easily look for an `OUT_OF_RANGE` error to detect when
160 * they are done.
161 * HTTP Mapping: 400 Bad Request
162 *
163 * Generated from protobuf enum <code>OUT_OF_RANGE = 11;</code>
164 */
165 const OUT_OF_RANGE = 11;
166 /**
167 * The operation is not implemented or is not supported/enabled in this
168 * service.
169 * HTTP Mapping: 501 Not Implemented
170 *
171 * Generated from protobuf enum <code>UNIMPLEMENTED = 12;</code>
172 */
173 const UNIMPLEMENTED = 12;
174 /**
175 * Internal errors. This means that some invariants expected by the
176 * underlying system have been broken. This error code is reserved
177 * for serious errors.
178 * HTTP Mapping: 500 Internal Server Error
179 *
180 * Generated from protobuf enum <code>INTERNAL = 13;</code>
181 */
182 const INTERNAL = 13;
183 /**
184 * The service is currently unavailable. This is most likely a
185 * transient condition, which can be corrected by retrying with
186 * a backoff. Note that it is not always safe to retry
187 * non-idempotent operations.
188 * See the guidelines above for deciding between `FAILED_PRECONDITION`,
189 * `ABORTED`, and `UNAVAILABLE`.
190 * HTTP Mapping: 503 Service Unavailable
191 *
192 * Generated from protobuf enum <code>UNAVAILABLE = 14;</code>
193 */
194 const UNAVAILABLE = 14;
195 /**
196 * Unrecoverable data loss or corruption.
197 * HTTP Mapping: 500 Internal Server Error
198 *
199 * Generated from protobuf enum <code>DATA_LOSS = 15;</code>
200 */
201 const DATA_LOSS = 15;
202
203 private static $valueToName = [
204 self::OK => 'OK',
205 self::CANCELLED => 'CANCELLED',
206 self::UNKNOWN => 'UNKNOWN',
207 self::INVALID_ARGUMENT => 'INVALID_ARGUMENT',
208 self::DEADLINE_EXCEEDED => 'DEADLINE_EXCEEDED',
209 self::NOT_FOUND => 'NOT_FOUND',
210 self::ALREADY_EXISTS => 'ALREADY_EXISTS',
211 self::PERMISSION_DENIED => 'PERMISSION_DENIED',
212 self::UNAUTHENTICATED => 'UNAUTHENTICATED',
213 self::RESOURCE_EXHAUSTED => 'RESOURCE_EXHAUSTED',
214 self::FAILED_PRECONDITION => 'FAILED_PRECONDITION',
215 self::ABORTED => 'ABORTED',
216 self::OUT_OF_RANGE => 'OUT_OF_RANGE',
217 self::UNIMPLEMENTED => 'UNIMPLEMENTED',
218 self::INTERNAL => 'INTERNAL',
219 self::UNAVAILABLE => 'UNAVAILABLE',
220 self::DATA_LOSS => 'DATA_LOSS',
221 ];
222
223 public static function name($value)
224 {
225 if (!isset(self::$valueToName[$value])) {
226 throw new UnexpectedValueException(sprintf(
227 'Enum %s has no name defined for value %s', __CLASS__, $value));
228 }
229 return self::$valueToName[$value];
230 }
231
232
233 public static function value($name)
234 {
235 $const = __CLASS__ . '::' . strtoupper($name);
236 if (!defined($const)) {
237 throw new UnexpectedValueException(sprintf(
238 'Enum %s has no value defined for name %s', __CLASS__, $name));
239 }
240 return constant($const);
241 }
242 }
243
244