PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / 3.2.2
ShareThis Dashboard for Google Analytics v3.2.2
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 / LongRunning / Operation.php
googleanalytics / lib / analytics-admin / vendor / google / common-protos / src / LongRunning Last commit date
CancelOperationRequest.php 3 years ago DeleteOperationRequest.php 3 years ago GetOperationRequest.php 3 years ago ListOperationsRequest.php 3 years ago ListOperationsResponse.php 3 years ago Operation.php 3 years ago OperationInfo.php 3 years ago
Operation.php
251 lines
1 <?php
2 # Generated by the protocol buffer compiler. DO NOT EDIT!
3 # source: google/longrunning/operations.proto
4
5 namespace Google\LongRunning;
6
7 use Google\Protobuf\Internal\GPBType;
8 use Google\Protobuf\Internal\RepeatedField;
9 use Google\Protobuf\Internal\GPBUtil;
10
11 /**
12 * This resource represents a long-running operation that is the result of a
13 * network API call.
14 *
15 * Generated from protobuf message <code>google.longrunning.Operation</code>
16 */
17 class Operation extends \Google\Protobuf\Internal\Message
18 {
19 /**
20 * The server-assigned name, which is only unique within the same service that
21 * originally returns it. If you use the default HTTP mapping, the
22 * `name` should have the format of `operations/some/unique/name`.
23 *
24 * Generated from protobuf field <code>string name = 1;</code>
25 */
26 private $name = '';
27 /**
28 * Service-specific metadata associated with the operation. It typically
29 * contains progress information and common metadata such as create time.
30 * Some services might not provide such metadata. Any method that returns a
31 * long-running operation should document the metadata type, if any.
32 *
33 * Generated from protobuf field <code>.google.protobuf.Any metadata = 2;</code>
34 */
35 private $metadata = null;
36 /**
37 * If the value is `false`, it means the operation is still in progress.
38 * If true, the operation is completed, and either `error` or `response` is
39 * available.
40 *
41 * Generated from protobuf field <code>bool done = 3;</code>
42 */
43 private $done = false;
44 protected $result;
45
46 /**
47 * Constructor.
48 *
49 * @param array $data {
50 * Optional. Data for populating the Message object.
51 *
52 * @type string $name
53 * The server-assigned name, which is only unique within the same service that
54 * originally returns it. If you use the default HTTP mapping, the
55 * `name` should have the format of `operations/some/unique/name`.
56 * @type \Google\Protobuf\Any $metadata
57 * Service-specific metadata associated with the operation. It typically
58 * contains progress information and common metadata such as create time.
59 * Some services might not provide such metadata. Any method that returns a
60 * long-running operation should document the metadata type, if any.
61 * @type bool $done
62 * If the value is `false`, it means the operation is still in progress.
63 * If true, the operation is completed, and either `error` or `response` is
64 * available.
65 * @type \Google\Rpc\Status $error
66 * The error result of the operation in case of failure or cancellation.
67 * @type \Google\Protobuf\Any $response
68 * The normal response of the operation in case of success. If the original
69 * method returns no data on success, such as `Delete`, the response is
70 * `google.protobuf.Empty`. If the original method is standard
71 * `Get`/`Create`/`Update`, the response should be the resource. For other
72 * methods, the response should have the type `XxxResponse`, where `Xxx`
73 * is the original method name. For example, if the original method name
74 * is `TakeSnapshot()`, the inferred response type is
75 * `TakeSnapshotResponse`.
76 * }
77 */
78 public function __construct($data = NULL) {
79 \GPBMetadata\Google\Longrunning\Operations::initOnce();
80 parent::__construct($data);
81 }
82
83 /**
84 * The server-assigned name, which is only unique within the same service that
85 * originally returns it. If you use the default HTTP mapping, the
86 * `name` should have the format of `operations/some/unique/name`.
87 *
88 * Generated from protobuf field <code>string name = 1;</code>
89 * @return string
90 */
91 public function getName()
92 {
93 return $this->name;
94 }
95
96 /**
97 * The server-assigned name, which is only unique within the same service that
98 * originally returns it. If you use the default HTTP mapping, the
99 * `name` should have the format of `operations/some/unique/name`.
100 *
101 * Generated from protobuf field <code>string name = 1;</code>
102 * @param string $var
103 * @return $this
104 */
105 public function setName($var)
106 {
107 GPBUtil::checkString($var, True);
108 $this->name = $var;
109
110 return $this;
111 }
112
113 /**
114 * Service-specific metadata associated with the operation. It typically
115 * contains progress information and common metadata such as create time.
116 * Some services might not provide such metadata. Any method that returns a
117 * long-running operation should document the metadata type, if any.
118 *
119 * Generated from protobuf field <code>.google.protobuf.Any metadata = 2;</code>
120 * @return \Google\Protobuf\Any
121 */
122 public function getMetadata()
123 {
124 return $this->metadata;
125 }
126
127 /**
128 * Service-specific metadata associated with the operation. It typically
129 * contains progress information and common metadata such as create time.
130 * Some services might not provide such metadata. Any method that returns a
131 * long-running operation should document the metadata type, if any.
132 *
133 * Generated from protobuf field <code>.google.protobuf.Any metadata = 2;</code>
134 * @param \Google\Protobuf\Any $var
135 * @return $this
136 */
137 public function setMetadata($var)
138 {
139 GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
140 $this->metadata = $var;
141
142 return $this;
143 }
144
145 /**
146 * If the value is `false`, it means the operation is still in progress.
147 * If true, the operation is completed, and either `error` or `response` is
148 * available.
149 *
150 * Generated from protobuf field <code>bool done = 3;</code>
151 * @return bool
152 */
153 public function getDone()
154 {
155 return $this->done;
156 }
157
158 /**
159 * If the value is `false`, it means the operation is still in progress.
160 * If true, the operation is completed, and either `error` or `response` is
161 * available.
162 *
163 * Generated from protobuf field <code>bool done = 3;</code>
164 * @param bool $var
165 * @return $this
166 */
167 public function setDone($var)
168 {
169 GPBUtil::checkBool($var);
170 $this->done = $var;
171
172 return $this;
173 }
174
175 /**
176 * The error result of the operation in case of failure or cancellation.
177 *
178 * Generated from protobuf field <code>.google.rpc.Status error = 4;</code>
179 * @return \Google\Rpc\Status
180 */
181 public function getError()
182 {
183 return $this->readOneof(4);
184 }
185
186 /**
187 * The error result of the operation in case of failure or cancellation.
188 *
189 * Generated from protobuf field <code>.google.rpc.Status error = 4;</code>
190 * @param \Google\Rpc\Status $var
191 * @return $this
192 */
193 public function setError($var)
194 {
195 GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
196 $this->writeOneof(4, $var);
197
198 return $this;
199 }
200
201 /**
202 * The normal response of the operation in case of success. If the original
203 * method returns no data on success, such as `Delete`, the response is
204 * `google.protobuf.Empty`. If the original method is standard
205 * `Get`/`Create`/`Update`, the response should be the resource. For other
206 * methods, the response should have the type `XxxResponse`, where `Xxx`
207 * is the original method name. For example, if the original method name
208 * is `TakeSnapshot()`, the inferred response type is
209 * `TakeSnapshotResponse`.
210 *
211 * Generated from protobuf field <code>.google.protobuf.Any response = 5;</code>
212 * @return \Google\Protobuf\Any
213 */
214 public function getResponse()
215 {
216 return $this->readOneof(5);
217 }
218
219 /**
220 * The normal response of the operation in case of success. If the original
221 * method returns no data on success, such as `Delete`, the response is
222 * `google.protobuf.Empty`. If the original method is standard
223 * `Get`/`Create`/`Update`, the response should be the resource. For other
224 * methods, the response should have the type `XxxResponse`, where `Xxx`
225 * is the original method name. For example, if the original method name
226 * is `TakeSnapshot()`, the inferred response type is
227 * `TakeSnapshotResponse`.
228 *
229 * Generated from protobuf field <code>.google.protobuf.Any response = 5;</code>
230 * @param \Google\Protobuf\Any $var
231 * @return $this
232 */
233 public function setResponse($var)
234 {
235 GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
236 $this->writeOneof(5, $var);
237
238 return $this;
239 }
240
241 /**
242 * @return string
243 */
244 public function getResult()
245 {
246 return $this->whichOneof("result");
247 }
248
249 }
250
251