googleanalytics
/
lib
/
analytics-admin
/
vendor
/
google
/
common-protos
/
src
/
Rpc
/
PreconditionFailure
/
Violation.php
googleanalytics
/
lib
/
analytics-admin
/
vendor
/
google
/
common-protos
/
src
/
Rpc
/
PreconditionFailure
Last commit date
Violation.php
3 years ago
Violation.php
163 lines
| 1 | <?php |
| 2 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 | # source: google/rpc/error_details.proto |
| 4 | |
| 5 | namespace Google\Rpc\PreconditionFailure; |
| 6 | |
| 7 | use Google\Protobuf\Internal\GPBType; |
| 8 | use Google\Protobuf\Internal\RepeatedField; |
| 9 | use Google\Protobuf\Internal\GPBUtil; |
| 10 | |
| 11 | /** |
| 12 | * A message type used to describe a single precondition failure. |
| 13 | * |
| 14 | * Generated from protobuf message <code>google.rpc.PreconditionFailure.Violation</code> |
| 15 | */ |
| 16 | class Violation extends \Google\Protobuf\Internal\Message |
| 17 | { |
| 18 | /** |
| 19 | * The type of PreconditionFailure. We recommend using a service-specific |
| 20 | * enum type to define the supported precondition violation subjects. For |
| 21 | * example, "TOS" for "Terms of Service violation". |
| 22 | * |
| 23 | * Generated from protobuf field <code>string type = 1;</code> |
| 24 | */ |
| 25 | protected $type = ''; |
| 26 | /** |
| 27 | * The subject, relative to the type, that failed. |
| 28 | * For example, "google.com/cloud" relative to the "TOS" type would indicate |
| 29 | * which terms of service is being referenced. |
| 30 | * |
| 31 | * Generated from protobuf field <code>string subject = 2;</code> |
| 32 | */ |
| 33 | protected $subject = ''; |
| 34 | /** |
| 35 | * A description of how the precondition failed. Developers can use this |
| 36 | * description to understand how to fix the failure. |
| 37 | * For example: "Terms of service not accepted". |
| 38 | * |
| 39 | * Generated from protobuf field <code>string description = 3;</code> |
| 40 | */ |
| 41 | protected $description = ''; |
| 42 | |
| 43 | /** |
| 44 | * Constructor. |
| 45 | * |
| 46 | * @param array $data { |
| 47 | * Optional. Data for populating the Message object. |
| 48 | * |
| 49 | * @type string $type |
| 50 | * The type of PreconditionFailure. We recommend using a service-specific |
| 51 | * enum type to define the supported precondition violation subjects. For |
| 52 | * example, "TOS" for "Terms of Service violation". |
| 53 | * @type string $subject |
| 54 | * The subject, relative to the type, that failed. |
| 55 | * For example, "google.com/cloud" relative to the "TOS" type would indicate |
| 56 | * which terms of service is being referenced. |
| 57 | * @type string $description |
| 58 | * A description of how the precondition failed. Developers can use this |
| 59 | * description to understand how to fix the failure. |
| 60 | * For example: "Terms of service not accepted". |
| 61 | * } |
| 62 | */ |
| 63 | public function __construct($data = NULL) { |
| 64 | \GPBMetadata\Google\Rpc\ErrorDetails::initOnce(); |
| 65 | parent::__construct($data); |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * The type of PreconditionFailure. We recommend using a service-specific |
| 70 | * enum type to define the supported precondition violation subjects. For |
| 71 | * example, "TOS" for "Terms of Service violation". |
| 72 | * |
| 73 | * Generated from protobuf field <code>string type = 1;</code> |
| 74 | * @return string |
| 75 | */ |
| 76 | public function getType() |
| 77 | { |
| 78 | return $this->type; |
| 79 | } |
| 80 | |
| 81 | /** |
| 82 | * The type of PreconditionFailure. We recommend using a service-specific |
| 83 | * enum type to define the supported precondition violation subjects. For |
| 84 | * example, "TOS" for "Terms of Service violation". |
| 85 | * |
| 86 | * Generated from protobuf field <code>string type = 1;</code> |
| 87 | * @param string $var |
| 88 | * @return $this |
| 89 | */ |
| 90 | public function setType($var) |
| 91 | { |
| 92 | GPBUtil::checkString($var, True); |
| 93 | $this->type = $var; |
| 94 | |
| 95 | return $this; |
| 96 | } |
| 97 | |
| 98 | /** |
| 99 | * The subject, relative to the type, that failed. |
| 100 | * For example, "google.com/cloud" relative to the "TOS" type would indicate |
| 101 | * which terms of service is being referenced. |
| 102 | * |
| 103 | * Generated from protobuf field <code>string subject = 2;</code> |
| 104 | * @return string |
| 105 | */ |
| 106 | public function getSubject() |
| 107 | { |
| 108 | return $this->subject; |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * The subject, relative to the type, that failed. |
| 113 | * For example, "google.com/cloud" relative to the "TOS" type would indicate |
| 114 | * which terms of service is being referenced. |
| 115 | * |
| 116 | * Generated from protobuf field <code>string subject = 2;</code> |
| 117 | * @param string $var |
| 118 | * @return $this |
| 119 | */ |
| 120 | public function setSubject($var) |
| 121 | { |
| 122 | GPBUtil::checkString($var, True); |
| 123 | $this->subject = $var; |
| 124 | |
| 125 | return $this; |
| 126 | } |
| 127 | |
| 128 | /** |
| 129 | * A description of how the precondition failed. Developers can use this |
| 130 | * description to understand how to fix the failure. |
| 131 | * For example: "Terms of service not accepted". |
| 132 | * |
| 133 | * Generated from protobuf field <code>string description = 3;</code> |
| 134 | * @return string |
| 135 | */ |
| 136 | public function getDescription() |
| 137 | { |
| 138 | return $this->description; |
| 139 | } |
| 140 | |
| 141 | /** |
| 142 | * A description of how the precondition failed. Developers can use this |
| 143 | * description to understand how to fix the failure. |
| 144 | * For example: "Terms of service not accepted". |
| 145 | * |
| 146 | * Generated from protobuf field <code>string description = 3;</code> |
| 147 | * @param string $var |
| 148 | * @return $this |
| 149 | */ |
| 150 | public function setDescription($var) |
| 151 | { |
| 152 | GPBUtil::checkString($var, True); |
| 153 | $this->description = $var; |
| 154 | |
| 155 | return $this; |
| 156 | } |
| 157 | |
| 158 | } |
| 159 | |
| 160 | // Adding a class alias for backwards compatibility with the previous class name. |
| 161 | class_alias(Violation::class, \Google\Rpc\PreconditionFailure_Violation::class); |
| 162 | |
| 163 |