| 1 |
<?php |
| 2 |
|
| 3 |
# Generated by the protocol buffer compiler. DO NOT EDIT! |
| 4 |
# source: google/protobuf/any.proto |
| 5 |
namespace Dudlewebs\WPMCS\Google\Protobuf; |
| 6 |
|
| 7 |
use Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType; |
| 8 |
use Dudlewebs\WPMCS\Google\Protobuf\Internal\RepeatedField; |
| 9 |
use Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBUtil; |
| 10 |
/** |
| 11 |
* `Any` contains an arbitrary serialized protocol buffer message along with a |
| 12 |
* URL that describes the type of the serialized message. |
| 13 |
* Protobuf library provides support to pack/unpack Any values in the form |
| 14 |
* of utility functions or additional generated methods of the Any type. |
| 15 |
* Example 1: Pack and unpack a message in C++. |
| 16 |
* Foo foo = ...; |
| 17 |
* Any any; |
| 18 |
* any.PackFrom(foo); |
| 19 |
* ... |
| 20 |
* if (any.UnpackTo(&foo)) { |
| 21 |
* ... |
| 22 |
* } |
| 23 |
* Example 2: Pack and unpack a message in Java. |
| 24 |
* Foo foo = ...; |
| 25 |
* Any any = Any.pack(foo); |
| 26 |
* ... |
| 27 |
* if (any.is(Foo.class)) { |
| 28 |
* foo = any.unpack(Foo.class); |
| 29 |
* } |
| 30 |
* // or ... |
| 31 |
* if (any.isSameTypeAs(Foo.getDefaultInstance())) { |
| 32 |
* foo = any.unpack(Foo.getDefaultInstance()); |
| 33 |
* } |
| 34 |
* Example 3: Pack and unpack a message in Python. |
| 35 |
* foo = Foo(...) |
| 36 |
* any = Any() |
| 37 |
* any.Pack(foo) |
| 38 |
* ... |
| 39 |
* if any.Is(Foo.DESCRIPTOR): |
| 40 |
* any.Unpack(foo) |
| 41 |
* ... |
| 42 |
* Example 4: Pack and unpack a message in Go |
| 43 |
* foo := &pb.Foo{...} |
| 44 |
* any, err := anypb.New(foo) |
| 45 |
* if err != nil { |
| 46 |
* ... |
| 47 |
* } |
| 48 |
* ... |
| 49 |
* foo := &pb.Foo{} |
| 50 |
* if err := any.UnmarshalTo(foo); err != nil { |
| 51 |
* ... |
| 52 |
* } |
| 53 |
* The pack methods provided by protobuf library will by default use |
| 54 |
* 'type.googleapis.com/full.type.name' as the type URL and the unpack |
| 55 |
* methods only use the fully qualified type name after the last '/' |
| 56 |
* in the type URL, for example "foo.bar.com/x/y.z" will yield type |
| 57 |
* name "y.z". |
| 58 |
* JSON |
| 59 |
* The JSON representation of an `Any` value uses the regular |
| 60 |
* representation of the deserialized, embedded message, with an |
| 61 |
* additional field `@type` which contains the type URL. Example: |
| 62 |
* package google.profile; |
| 63 |
* message Person { |
| 64 |
* string first_name = 1; |
| 65 |
* string last_name = 2; |
| 66 |
* } |
| 67 |
* { |
| 68 |
* "@type": "type.googleapis.com/google.profile.Person", |
| 69 |
* "firstName": <string>, |
| 70 |
* "lastName": <string> |
| 71 |
* } |
| 72 |
* If the embedded message type is well-known and has a custom JSON |
| 73 |
* representation, that representation will be embedded adding a field |
| 74 |
* `value` which holds the custom JSON in addition to the `@type` |
| 75 |
* field. Example (for message [google.protobuf.Duration][]): |
| 76 |
* { |
| 77 |
* "@type": "type.googleapis.com/google.protobuf.Duration", |
| 78 |
* "value": "1.212s" |
| 79 |
* } |
| 80 |
* |
| 81 |
* Generated from protobuf message <code>google.protobuf.Any</code> |
| 82 |
*/ |
| 83 |
class Any extends \Dudlewebs\WPMCS\Google\Protobuf\Internal\AnyBase |
| 84 |
{ |
| 85 |
/** |
| 86 |
* A URL/resource name that uniquely identifies the type of the serialized |
| 87 |
* protocol buffer message. This string must contain at least |
| 88 |
* one "/" character. The last segment of the URL's path must represent |
| 89 |
* the fully qualified name of the type (as in |
| 90 |
* `path/google.protobuf.Duration`). The name should be in a canonical form |
| 91 |
* (e.g., leading "." is not accepted). |
| 92 |
* In practice, teams usually precompile into the binary all types that they |
| 93 |
* expect it to use in the context of Any. However, for URLs which use the |
| 94 |
* scheme `http`, `https`, or no scheme, one can optionally set up a type |
| 95 |
* server that maps type URLs to message definitions as follows: |
| 96 |
* * If no scheme is provided, `https` is assumed. |
| 97 |
* * An HTTP GET on the URL must yield a [google.protobuf.Type][] |
| 98 |
* value in binary format, or produce an error. |
| 99 |
* * Applications are allowed to cache lookup results based on the |
| 100 |
* URL, or have them precompiled into a binary to avoid any |
| 101 |
* lookup. Therefore, binary compatibility needs to be preserved |
| 102 |
* on changes to types. (Use versioned type names to manage |
| 103 |
* breaking changes.) |
| 104 |
* Note: this functionality is not currently available in the official |
| 105 |
* protobuf release, and it is not used for type URLs beginning with |
| 106 |
* type.googleapis.com. |
| 107 |
* Schemes other than `http`, `https` (or the empty scheme) might be |
| 108 |
* used with implementation specific semantics. |
| 109 |
* |
| 110 |
* Generated from protobuf field <code>string type_url = 1;</code> |
| 111 |
*/ |
| 112 |
protected $type_url = ''; |
| 113 |
/** |
| 114 |
* Must be a valid serialized protocol buffer of the above specified type. |
| 115 |
* |
| 116 |
* Generated from protobuf field <code>bytes value = 2;</code> |
| 117 |
*/ |
| 118 |
protected $value = ''; |
| 119 |
/** |
| 120 |
* Constructor. |
| 121 |
* |
| 122 |
* @param array $data { |
| 123 |
* Optional. Data for populating the Message object. |
| 124 |
* |
| 125 |
* @type string $type_url |
| 126 |
* A URL/resource name that uniquely identifies the type of the serialized |
| 127 |
* protocol buffer message. This string must contain at least |
| 128 |
* one "/" character. The last segment of the URL's path must represent |
| 129 |
* the fully qualified name of the type (as in |
| 130 |
* `path/google.protobuf.Duration`). The name should be in a canonical form |
| 131 |
* (e.g., leading "." is not accepted). |
| 132 |
* In practice, teams usually precompile into the binary all types that they |
| 133 |
* expect it to use in the context of Any. However, for URLs which use the |
| 134 |
* scheme `http`, `https`, or no scheme, one can optionally set up a type |
| 135 |
* server that maps type URLs to message definitions as follows: |
| 136 |
* * If no scheme is provided, `https` is assumed. |
| 137 |
* * An HTTP GET on the URL must yield a [google.protobuf.Type][] |
| 138 |
* value in binary format, or produce an error. |
| 139 |
* * Applications are allowed to cache lookup results based on the |
| 140 |
* URL, or have them precompiled into a binary to avoid any |
| 141 |
* lookup. Therefore, binary compatibility needs to be preserved |
| 142 |
* on changes to types. (Use versioned type names to manage |
| 143 |
* breaking changes.) |
| 144 |
* Note: this functionality is not currently available in the official |
| 145 |
* protobuf release, and it is not used for type URLs beginning with |
| 146 |
* type.googleapis.com. |
| 147 |
* Schemes other than `http`, `https` (or the empty scheme) might be |
| 148 |
* used with implementation specific semantics. |
| 149 |
* @type string $value |
| 150 |
* Must be a valid serialized protocol buffer of the above specified type. |
| 151 |
* } |
| 152 |
*/ |
| 153 |
public function __construct($data = NULL) |
| 154 |
{ |
| 155 |
\Dudlewebs\WPMCS\GPBMetadata\Google\Protobuf\Any::initOnce(); |
| 156 |
parent::__construct($data); |
| 157 |
} |
| 158 |
/** |
| 159 |
* A URL/resource name that uniquely identifies the type of the serialized |
| 160 |
* protocol buffer message. This string must contain at least |
| 161 |
* one "/" character. The last segment of the URL's path must represent |
| 162 |
* the fully qualified name of the type (as in |
| 163 |
* `path/google.protobuf.Duration`). The name should be in a canonical form |
| 164 |
* (e.g., leading "." is not accepted). |
| 165 |
* In practice, teams usually precompile into the binary all types that they |
| 166 |
* expect it to use in the context of Any. However, for URLs which use the |
| 167 |
* scheme `http`, `https`, or no scheme, one can optionally set up a type |
| 168 |
* server that maps type URLs to message definitions as follows: |
| 169 |
* * If no scheme is provided, `https` is assumed. |
| 170 |
* * An HTTP GET on the URL must yield a [google.protobuf.Type][] |
| 171 |
* value in binary format, or produce an error. |
| 172 |
* * Applications are allowed to cache lookup results based on the |
| 173 |
* URL, or have them precompiled into a binary to avoid any |
| 174 |
* lookup. Therefore, binary compatibility needs to be preserved |
| 175 |
* on changes to types. (Use versioned type names to manage |
| 176 |
* breaking changes.) |
| 177 |
* Note: this functionality is not currently available in the official |
| 178 |
* protobuf release, and it is not used for type URLs beginning with |
| 179 |
* type.googleapis.com. |
| 180 |
* Schemes other than `http`, `https` (or the empty scheme) might be |
| 181 |
* used with implementation specific semantics. |
| 182 |
* |
| 183 |
* Generated from protobuf field <code>string type_url = 1;</code> |
| 184 |
* @return string |
| 185 |
*/ |
| 186 |
public function getTypeUrl() |
| 187 |
{ |
| 188 |
return $this->type_url; |
| 189 |
} |
| 190 |
/** |
| 191 |
* A URL/resource name that uniquely identifies the type of the serialized |
| 192 |
* protocol buffer message. This string must contain at least |
| 193 |
* one "/" character. The last segment of the URL's path must represent |
| 194 |
* the fully qualified name of the type (as in |
| 195 |
* `path/google.protobuf.Duration`). The name should be in a canonical form |
| 196 |
* (e.g., leading "." is not accepted). |
| 197 |
* In practice, teams usually precompile into the binary all types that they |
| 198 |
* expect it to use in the context of Any. However, for URLs which use the |
| 199 |
* scheme `http`, `https`, or no scheme, one can optionally set up a type |
| 200 |
* server that maps type URLs to message definitions as follows: |
| 201 |
* * If no scheme is provided, `https` is assumed. |
| 202 |
* * An HTTP GET on the URL must yield a [google.protobuf.Type][] |
| 203 |
* value in binary format, or produce an error. |
| 204 |
* * Applications are allowed to cache lookup results based on the |
| 205 |
* URL, or have them precompiled into a binary to avoid any |
| 206 |
* lookup. Therefore, binary compatibility needs to be preserved |
| 207 |
* on changes to types. (Use versioned type names to manage |
| 208 |
* breaking changes.) |
| 209 |
* Note: this functionality is not currently available in the official |
| 210 |
* protobuf release, and it is not used for type URLs beginning with |
| 211 |
* type.googleapis.com. |
| 212 |
* Schemes other than `http`, `https` (or the empty scheme) might be |
| 213 |
* used with implementation specific semantics. |
| 214 |
* |
| 215 |
* Generated from protobuf field <code>string type_url = 1;</code> |
| 216 |
* @param string $var |
| 217 |
* @return $this |
| 218 |
*/ |
| 219 |
public function setTypeUrl($var) |
| 220 |
{ |
| 221 |
GPBUtil::checkString($var, True); |
| 222 |
$this->type_url = $var; |
| 223 |
return $this; |
| 224 |
} |
| 225 |
/** |
| 226 |
* Must be a valid serialized protocol buffer of the above specified type. |
| 227 |
* |
| 228 |
* Generated from protobuf field <code>bytes value = 2;</code> |
| 229 |
* @return string |
| 230 |
*/ |
| 231 |
public function getValue() |
| 232 |
{ |
| 233 |
return $this->value; |
| 234 |
} |
| 235 |
/** |
| 236 |
* Must be a valid serialized protocol buffer of the above specified type. |
| 237 |
* |
| 238 |
* Generated from protobuf field <code>bytes value = 2;</code> |
| 239 |
* @param string $var |
| 240 |
* @return $this |
| 241 |
*/ |
| 242 |
public function setValue($var) |
| 243 |
{ |
| 244 |
GPBUtil::checkString($var, False); |
| 245 |
$this->value = $var; |
| 246 |
return $this; |
| 247 |
} |
| 248 |
} |
| 249 |
|