media-cloud-sync
/
includes
/
sdk
/
google
/
google
/
common-protos
/
src
/
Api
/
RoutingParameter.php
RoutingParameter.php in Media Cloud Sync 1.2.6, at includes/sdk/google/google/common-protos/src/Api/RoutingParameter.php
| 1 | <?php |
| 2 | |
| 3 | # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 4 | # source: google/api/routing.proto |
| 5 | namespace Dudlewebs\WPMCS\Google\Api; |
| 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 | * A projection from an input message to the GRPC or REST header. |
| 12 | * |
| 13 | * Generated from protobuf message <code>google.api.RoutingParameter</code> |
| 14 | */ |
| 15 | class RoutingParameter extends \Dudlewebs\WPMCS\Google\Protobuf\Internal\Message |
| 16 | { |
| 17 | /** |
| 18 | * A request field to extract the header key-value pair from. |
| 19 | * |
| 20 | * Generated from protobuf field <code>string field = 1;</code> |
| 21 | */ |
| 22 | protected $field = ''; |
| 23 | /** |
| 24 | * A pattern matching the key-value field. Optional. |
| 25 | * If not specified, the whole field specified in the `field` field will be |
| 26 | * taken as value, and its name used as key. If specified, it MUST contain |
| 27 | * exactly one named segment (along with any number of unnamed segments) The |
| 28 | * pattern will be matched over the field specified in the `field` field, then |
| 29 | * if the match is successful: |
| 30 | * - the name of the single named segment will be used as a header name, |
| 31 | * - the match value of the segment will be used as a header value; |
| 32 | * if the match is NOT successful, nothing will be sent. |
| 33 | * Example: |
| 34 | * -- This is a field in the request message |
| 35 | * | that the header value will be extracted from. |
| 36 | * | |
| 37 | * | -- This is the key name in the |
| 38 | * | | routing header. |
| 39 | * V | |
| 40 | * field: "table_name" v |
| 41 | * path_template: "projects/*/{table_location=instances/*}/tables/*" |
| 42 | * ^ ^ |
| 43 | * | | |
| 44 | * In the {} brackets is the pattern that -- | |
| 45 | * specifies what to extract from the | |
| 46 | * field as a value to be sent. | |
| 47 | * | |
| 48 | * The string in the field must match the whole pattern -- |
| 49 | * before brackets, inside brackets, after brackets. |
| 50 | * When looking at this specific example, we can see that: |
| 51 | * - A key-value pair with the key `table_location` |
| 52 | * and the value matching `instances/*` should be added |
| 53 | * to the x-goog-request-params routing header. |
| 54 | * - The value is extracted from the request message's `table_name` field |
| 55 | * if it matches the full pattern specified: |
| 56 | * `projects/*/instances/*/tables/*`. |
| 57 | * **NB:** If the `path_template` field is not provided, the key name is |
| 58 | * equal to the field name, and the whole field should be sent as a value. |
| 59 | * This makes the pattern for the field and the value functionally equivalent |
| 60 | * to `**`, and the configuration |
| 61 | * { |
| 62 | * field: "table_name" |
| 63 | * } |
| 64 | * is a functionally equivalent shorthand to: |
| 65 | * { |
| 66 | * field: "table_name" |
| 67 | * path_template: "{table_name=**}" |
| 68 | * } |
| 69 | * See Example 1 for more details. |
| 70 | * |
| 71 | * Generated from protobuf field <code>string path_template = 2;</code> |
| 72 | */ |
| 73 | protected $path_template = ''; |
| 74 | /** |
| 75 | * Constructor. |
| 76 | * |
| 77 | * @param array $data { |
| 78 | * Optional. Data for populating the Message object. |
| 79 | * |
| 80 | * @type string $field |
| 81 | * A request field to extract the header key-value pair from. |
| 82 | * @type string $path_template |
| 83 | * A pattern matching the key-value field. Optional. |
| 84 | * If not specified, the whole field specified in the `field` field will be |
| 85 | * taken as value, and its name used as key. If specified, it MUST contain |
| 86 | * exactly one named segment (along with any number of unnamed segments) The |
| 87 | * pattern will be matched over the field specified in the `field` field, then |
| 88 | * if the match is successful: |
| 89 | * - the name of the single named segment will be used as a header name, |
| 90 | * - the match value of the segment will be used as a header value; |
| 91 | * if the match is NOT successful, nothing will be sent. |
| 92 | * Example: |
| 93 | * -- This is a field in the request message |
| 94 | * | that the header value will be extracted from. |
| 95 | * | |
| 96 | * | -- This is the key name in the |
| 97 | * | | routing header. |
| 98 | * V | |
| 99 | * field: "table_name" v |
| 100 | * path_template: "projects/*/{table_location=instances/*}/tables/*" |
| 101 | * ^ ^ |
| 102 | * | | |
| 103 | * In the {} brackets is the pattern that -- | |
| 104 | * specifies what to extract from the | |
| 105 | * field as a value to be sent. | |
| 106 | * | |
| 107 | * The string in the field must match the whole pattern -- |
| 108 | * before brackets, inside brackets, after brackets. |
| 109 | * When looking at this specific example, we can see that: |
| 110 | * - A key-value pair with the key `table_location` |
| 111 | * and the value matching `instances/*` should be added |
| 112 | * to the x-goog-request-params routing header. |
| 113 | * - The value is extracted from the request message's `table_name` field |
| 114 | * if it matches the full pattern specified: |
| 115 | * `projects/*/instances/*/tables/*`. |
| 116 | * **NB:** If the `path_template` field is not provided, the key name is |
| 117 | * equal to the field name, and the whole field should be sent as a value. |
| 118 | * This makes the pattern for the field and the value functionally equivalent |
| 119 | * to `**`, and the configuration |
| 120 | * { |
| 121 | * field: "table_name" |
| 122 | * } |
| 123 | * is a functionally equivalent shorthand to: |
| 124 | * { |
| 125 | * field: "table_name" |
| 126 | * path_template: "{table_name=**}" |
| 127 | * } |
| 128 | * See Example 1 for more details. |
| 129 | * } |
| 130 | */ |
| 131 | public function __construct($data = NULL) |
| 132 | { |
| 133 | \Dudlewebs\WPMCS\GPBMetadata\Google\Api\Routing::initOnce(); |
| 134 | parent::__construct($data); |
| 135 | } |
| 136 | /** |
| 137 | * A request field to extract the header key-value pair from. |
| 138 | * |
| 139 | * Generated from protobuf field <code>string field = 1;</code> |
| 140 | * @return string |
| 141 | */ |
| 142 | public function getField() |
| 143 | { |
| 144 | return $this->field; |
| 145 | } |
| 146 | /** |
| 147 | * A request field to extract the header key-value pair from. |
| 148 | * |
| 149 | * Generated from protobuf field <code>string field = 1;</code> |
| 150 | * @param string $var |
| 151 | * @return $this |
| 152 | */ |
| 153 | public function setField($var) |
| 154 | { |
| 155 | GPBUtil::checkString($var, True); |
| 156 | $this->field = $var; |
| 157 | return $this; |
| 158 | } |
| 159 | /** |
| 160 | * A pattern matching the key-value field. Optional. |
| 161 | * If not specified, the whole field specified in the `field` field will be |
| 162 | * taken as value, and its name used as key. If specified, it MUST contain |
| 163 | * exactly one named segment (along with any number of unnamed segments) The |
| 164 | * pattern will be matched over the field specified in the `field` field, then |
| 165 | * if the match is successful: |
| 166 | * - the name of the single named segment will be used as a header name, |
| 167 | * - the match value of the segment will be used as a header value; |
| 168 | * if the match is NOT successful, nothing will be sent. |
| 169 | * Example: |
| 170 | * -- This is a field in the request message |
| 171 | * | that the header value will be extracted from. |
| 172 | * | |
| 173 | * | -- This is the key name in the |
| 174 | * | | routing header. |
| 175 | * V | |
| 176 | * field: "table_name" v |
| 177 | * path_template: "projects/*/{table_location=instances/*}/tables/*" |
| 178 | * ^ ^ |
| 179 | * | | |
| 180 | * In the {} brackets is the pattern that -- | |
| 181 | * specifies what to extract from the | |
| 182 | * field as a value to be sent. | |
| 183 | * | |
| 184 | * The string in the field must match the whole pattern -- |
| 185 | * before brackets, inside brackets, after brackets. |
| 186 | * When looking at this specific example, we can see that: |
| 187 | * - A key-value pair with the key `table_location` |
| 188 | * and the value matching `instances/*` should be added |
| 189 | * to the x-goog-request-params routing header. |
| 190 | * - The value is extracted from the request message's `table_name` field |
| 191 | * if it matches the full pattern specified: |
| 192 | * `projects/*/instances/*/tables/*`. |
| 193 | * **NB:** If the `path_template` field is not provided, the key name is |
| 194 | * equal to the field name, and the whole field should be sent as a value. |
| 195 | * This makes the pattern for the field and the value functionally equivalent |
| 196 | * to `**`, and the configuration |
| 197 | * { |
| 198 | * field: "table_name" |
| 199 | * } |
| 200 | * is a functionally equivalent shorthand to: |
| 201 | * { |
| 202 | * field: "table_name" |
| 203 | * path_template: "{table_name=**}" |
| 204 | * } |
| 205 | * See Example 1 for more details. |
| 206 | * |
| 207 | * Generated from protobuf field <code>string path_template = 2;</code> |
| 208 | * @return string |
| 209 | */ |
| 210 | public function getPathTemplate() |
| 211 | { |
| 212 | return $this->path_template; |
| 213 | } |
| 214 | /** |
| 215 | * A pattern matching the key-value field. Optional. |
| 216 | * If not specified, the whole field specified in the `field` field will be |
| 217 | * taken as value, and its name used as key. If specified, it MUST contain |
| 218 | * exactly one named segment (along with any number of unnamed segments) The |
| 219 | * pattern will be matched over the field specified in the `field` field, then |
| 220 | * if the match is successful: |
| 221 | * - the name of the single named segment will be used as a header name, |
| 222 | * - the match value of the segment will be used as a header value; |
| 223 | * if the match is NOT successful, nothing will be sent. |
| 224 | * Example: |
| 225 | * -- This is a field in the request message |
| 226 | * | that the header value will be extracted from. |
| 227 | * | |
| 228 | * | -- This is the key name in the |
| 229 | * | | routing header. |
| 230 | * V | |
| 231 | * field: "table_name" v |
| 232 | * path_template: "projects/*/{table_location=instances/*}/tables/*" |
| 233 | * ^ ^ |
| 234 | * | | |
| 235 | * In the {} brackets is the pattern that -- | |
| 236 | * specifies what to extract from the | |
| 237 | * field as a value to be sent. | |
| 238 | * | |
| 239 | * The string in the field must match the whole pattern -- |
| 240 | * before brackets, inside brackets, after brackets. |
| 241 | * When looking at this specific example, we can see that: |
| 242 | * - A key-value pair with the key `table_location` |
| 243 | * and the value matching `instances/*` should be added |
| 244 | * to the x-goog-request-params routing header. |
| 245 | * - The value is extracted from the request message's `table_name` field |
| 246 | * if it matches the full pattern specified: |
| 247 | * `projects/*/instances/*/tables/*`. |
| 248 | * **NB:** If the `path_template` field is not provided, the key name is |
| 249 | * equal to the field name, and the whole field should be sent as a value. |
| 250 | * This makes the pattern for the field and the value functionally equivalent |
| 251 | * to `**`, and the configuration |
| 252 | * { |
| 253 | * field: "table_name" |
| 254 | * } |
| 255 | * is a functionally equivalent shorthand to: |
| 256 | * { |
| 257 | * field: "table_name" |
| 258 | * path_template: "{table_name=**}" |
| 259 | * } |
| 260 | * See Example 1 for more details. |
| 261 | * |
| 262 | * Generated from protobuf field <code>string path_template = 2;</code> |
| 263 | * @param string $var |
| 264 | * @return $this |
| 265 | */ |
| 266 | public function setPathTemplate($var) |
| 267 | { |
| 268 | GPBUtil::checkString($var, True); |
| 269 | $this->path_template = $var; |
| 270 | return $this; |
| 271 | } |
| 272 | } |
| 273 |