GoogleRpcStatus.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. namespace Google\Service\CloudVideoIntelligence;
  18. class GoogleRpcStatus extends \Google\Collection
  19. {
  20. protected $collection_key = 'details';
  21. /**
  22. * The status code, which should be an enum value of google.rpc.Code.
  23. *
  24. * @var int
  25. */
  26. public $code;
  27. /**
  28. * A list of messages that carry the error details. There is a common set of
  29. * message types for APIs to use.
  30. *
  31. * @var array[]
  32. */
  33. public $details;
  34. /**
  35. * A developer-facing error message, which should be in English. Any user-
  36. * facing error message should be localized and sent in the
  37. * google.rpc.Status.details field, or localized by the client.
  38. *
  39. * @var string
  40. */
  41. public $message;
  42. /**
  43. * The status code, which should be an enum value of google.rpc.Code.
  44. *
  45. * @param int $code
  46. */
  47. public function setCode($code)
  48. {
  49. $this->code = $code;
  50. }
  51. /**
  52. * @return int
  53. */
  54. public function getCode()
  55. {
  56. return $this->code;
  57. }
  58. /**
  59. * A list of messages that carry the error details. There is a common set of
  60. * message types for APIs to use.
  61. *
  62. * @param array[] $details
  63. */
  64. public function setDetails($details)
  65. {
  66. $this->details = $details;
  67. }
  68. /**
  69. * @return array[]
  70. */
  71. public function getDetails()
  72. {
  73. return $this->details;
  74. }
  75. /**
  76. * A developer-facing error message, which should be in English. Any user-
  77. * facing error message should be localized and sent in the
  78. * google.rpc.Status.details field, or localized by the client.
  79. *
  80. * @param string $message
  81. */
  82. public function setMessage($message)
  83. {
  84. $this->message = $message;
  85. }
  86. /**
  87. * @return string
  88. */
  89. public function getMessage()
  90. {
  91. return $this->message;
  92. }
  93. }
  94. // Adding a class alias for backwards compatibility with the previous class name.
  95. class_alias(GoogleRpcStatus::class, 'Google_Service_CloudVideoIntelligence_GoogleRpcStatus');