|
| 1 | +<?php |
| 2 | +/* |
| 3 | + * Copyright 2014 Google Inc. |
| 4 | + * |
| 5 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 6 | + * use this file except in compliance with the License. You may obtain a copy of |
| 7 | + * the License at |
| 8 | + * |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 13 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 14 | + * License for the specific language governing permissions and limitations under |
| 15 | + * the License. |
| 16 | + */ |
| 17 | + |
| 18 | +namespace Google\Service\DataManager; |
| 19 | + |
| 20 | +class Status extends \Google\Collection |
| 21 | +{ |
| 22 | + protected $collection_key = 'details'; |
| 23 | + /** |
| 24 | + * The status code, which should be an enum value of google.rpc.Code. |
| 25 | + * |
| 26 | + * @var int |
| 27 | + */ |
| 28 | + public $code; |
| 29 | + /** |
| 30 | + * A list of messages that carry the error details. There is a common set of |
| 31 | + * message types for APIs to use. |
| 32 | + * |
| 33 | + * @var array[] |
| 34 | + */ |
| 35 | + public $details; |
| 36 | + /** |
| 37 | + * A developer-facing error message, which should be in English. Any user- |
| 38 | + * facing error message should be localized and sent in the |
| 39 | + * google.rpc.Status.details field, or localized by the client. |
| 40 | + * |
| 41 | + * @var string |
| 42 | + */ |
| 43 | + public $message; |
| 44 | + |
| 45 | + /** |
| 46 | + * The status code, which should be an enum value of google.rpc.Code. |
| 47 | + * |
| 48 | + * @param int $code |
| 49 | + */ |
| 50 | + public function setCode($code) |
| 51 | + { |
| 52 | + $this->code = $code; |
| 53 | + } |
| 54 | + /** |
| 55 | + * @return int |
| 56 | + */ |
| 57 | + public function getCode() |
| 58 | + { |
| 59 | + return $this->code; |
| 60 | + } |
| 61 | + /** |
| 62 | + * A list of messages that carry the error details. There is a common set of |
| 63 | + * message types for APIs to use. |
| 64 | + * |
| 65 | + * @param array[] $details |
| 66 | + */ |
| 67 | + public function setDetails($details) |
| 68 | + { |
| 69 | + $this->details = $details; |
| 70 | + } |
| 71 | + /** |
| 72 | + * @return array[] |
| 73 | + */ |
| 74 | + public function getDetails() |
| 75 | + { |
| 76 | + return $this->details; |
| 77 | + } |
| 78 | + /** |
| 79 | + * A developer-facing error message, which should be in English. Any user- |
| 80 | + * facing error message should be localized and sent in the |
| 81 | + * google.rpc.Status.details field, or localized by the client. |
| 82 | + * |
| 83 | + * @param string $message |
| 84 | + */ |
| 85 | + public function setMessage($message) |
| 86 | + { |
| 87 | + $this->message = $message; |
| 88 | + } |
| 89 | + /** |
| 90 | + * @return string |
| 91 | + */ |
| 92 | + public function getMessage() |
| 93 | + { |
| 94 | + return $this->message; |
| 95 | + } |
| 96 | +} |
| 97 | + |
| 98 | +// Adding a class alias for backwards compatibility with the previous class name. |
| 99 | +class_alias(Status::class, 'Google_Service_DataManager_Status'); |
0 commit comments