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
Status.php
153 lines
| 1 | <?php |
| 2 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 | # source: google/rpc/status.proto |
| 4 | |
| 5 | namespace Google\Rpc; |
| 6 | |
| 7 | use Google\Protobuf\Internal\GPBType; |
| 8 | use Google\Protobuf\Internal\RepeatedField; |
| 9 | use Google\Protobuf\Internal\GPBUtil; |
| 10 | |
| 11 | /** |
| 12 | * The `Status` type defines a logical error model that is suitable for |
| 13 | * different programming environments, including REST APIs and RPC APIs. It is |
| 14 | * used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 15 | * three pieces of data: error code, error message, and error details. |
| 16 | * You can find out more about this error model and how to work with it in the |
| 17 | * [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 18 | * |
| 19 | * Generated from protobuf message <code>google.rpc.Status</code> |
| 20 | */ |
| 21 | class Status extends \Google\Protobuf\Internal\Message |
| 22 | { |
| 23 | /** |
| 24 | * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. |
| 25 | * |
| 26 | * Generated from protobuf field <code>int32 code = 1;</code> |
| 27 | */ |
| 28 | protected $code = 0; |
| 29 | /** |
| 30 | * A developer-facing error message, which should be in English. Any |
| 31 | * user-facing error message should be localized and sent in the |
| 32 | * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. |
| 33 | * |
| 34 | * Generated from protobuf field <code>string message = 2;</code> |
| 35 | */ |
| 36 | protected $message = ''; |
| 37 | /** |
| 38 | * A list of messages that carry the error details. There is a common set of |
| 39 | * message types for APIs to use. |
| 40 | * |
| 41 | * Generated from protobuf field <code>repeated .google.protobuf.Any details = 3;</code> |
| 42 | */ |
| 43 | private $details; |
| 44 | |
| 45 | /** |
| 46 | * Constructor. |
| 47 | * |
| 48 | * @param array $data { |
| 49 | * Optional. Data for populating the Message object. |
| 50 | * |
| 51 | * @type int $code |
| 52 | * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. |
| 53 | * @type string $message |
| 54 | * A developer-facing error message, which should be in English. Any |
| 55 | * user-facing error message should be localized and sent in the |
| 56 | * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. |
| 57 | * @type \Google\Protobuf\Any[]|\Google\Protobuf\Internal\RepeatedField $details |
| 58 | * A list of messages that carry the error details. There is a common set of |
| 59 | * message types for APIs to use. |
| 60 | * } |
| 61 | */ |
| 62 | public function __construct($data = NULL) { |
| 63 | \GPBMetadata\Google\Rpc\Status::initOnce(); |
| 64 | parent::__construct($data); |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. |
| 69 | * |
| 70 | * Generated from protobuf field <code>int32 code = 1;</code> |
| 71 | * @return int |
| 72 | */ |
| 73 | public function getCode() |
| 74 | { |
| 75 | return $this->code; |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. |
| 80 | * |
| 81 | * Generated from protobuf field <code>int32 code = 1;</code> |
| 82 | * @param int $var |
| 83 | * @return $this |
| 84 | */ |
| 85 | public function setCode($var) |
| 86 | { |
| 87 | GPBUtil::checkInt32($var); |
| 88 | $this->code = $var; |
| 89 | |
| 90 | return $this; |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * A developer-facing error message, which should be in English. Any |
| 95 | * user-facing error message should be localized and sent in the |
| 96 | * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. |
| 97 | * |
| 98 | * Generated from protobuf field <code>string message = 2;</code> |
| 99 | * @return string |
| 100 | */ |
| 101 | public function getMessage() |
| 102 | { |
| 103 | return $this->message; |
| 104 | } |
| 105 | |
| 106 | /** |
| 107 | * A developer-facing error message, which should be in English. Any |
| 108 | * user-facing error message should be localized and sent in the |
| 109 | * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. |
| 110 | * |
| 111 | * Generated from protobuf field <code>string message = 2;</code> |
| 112 | * @param string $var |
| 113 | * @return $this |
| 114 | */ |
| 115 | public function setMessage($var) |
| 116 | { |
| 117 | GPBUtil::checkString($var, True); |
| 118 | $this->message = $var; |
| 119 | |
| 120 | return $this; |
| 121 | } |
| 122 | |
| 123 | /** |
| 124 | * A list of messages that carry the error details. There is a common set of |
| 125 | * message types for APIs to use. |
| 126 | * |
| 127 | * Generated from protobuf field <code>repeated .google.protobuf.Any details = 3;</code> |
| 128 | * @return \Google\Protobuf\Internal\RepeatedField |
| 129 | */ |
| 130 | public function getDetails() |
| 131 | { |
| 132 | return $this->details; |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * A list of messages that carry the error details. There is a common set of |
| 137 | * message types for APIs to use. |
| 138 | * |
| 139 | * Generated from protobuf field <code>repeated .google.protobuf.Any details = 3;</code> |
| 140 | * @param \Google\Protobuf\Any[]|\Google\Protobuf\Internal\RepeatedField $var |
| 141 | * @return $this |
| 142 | */ |
| 143 | public function setDetails($var) |
| 144 | { |
| 145 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Any::class); |
| 146 | $this->details = $arr; |
| 147 | |
| 148 | return $this; |
| 149 | } |
| 150 | |
| 151 | } |
| 152 | |
| 153 |