PluginProbe
Media Cloud Sync / 1.2.0
Media Cloud Sync v1.2.0
1.4.2 1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 All 36 releases
media-cloud-sync / includes / sdk / google / google / common-protos / src / Api / HttpBody.php

HttpBody.php in Media Cloud Sync 1.2.0, at includes/sdk/google/google/common-protos/src/Api/HttpBody.php

157 lines 5.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 # Generated by the protocol buffer compiler. DO NOT EDIT!
4 # source: google/api/httpbody.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 * Message that represents an arbitrary HTTP body. It should only be used for
12 * payload formats that can't be represented as JSON, such as raw binary or
13 * an HTML page.
14 * This message can be used both in streaming and non-streaming API methods in
15 * the request as well as the response.
16 * It can be used as a top-level request field, which is convenient if one
17 * wants to extract parameters from either the URL or HTTP template into the
18 * request fields and also want access to the raw HTTP body.
19 * Example:
20 * message GetResourceRequest {
21 * // A unique request id.
22 * string request_id = 1;
23 * // The raw HTTP body is bound to this field.
24 * google.api.HttpBody http_body = 2;
25 * }
26 * service ResourceService {
27 * rpc GetResource(GetResourceRequest)
28 * returns (google.api.HttpBody);
29 * rpc UpdateResource(google.api.HttpBody)
30 * returns (google.protobuf.Empty);
31 * }
32 * Example with streaming methods:
33 * service CaldavService {
34 * rpc GetCalendar(stream google.api.HttpBody)
35 * returns (stream google.api.HttpBody);
36 * rpc UpdateCalendar(stream google.api.HttpBody)
37 * returns (stream google.api.HttpBody);
38 * }
39 * Use of this type only changes how the request and response bodies are
40 * handled, all other features will continue to work unchanged.
41 *
42 * Generated from protobuf message <code>google.api.HttpBody</code>
43 */
44 class HttpBody extends \Dudlewebs\WPMCS\Google\Protobuf\Internal\Message
45 {
46 /**
47 * The HTTP Content-Type header value specifying the content type of the body.
48 *
49 * Generated from protobuf field <code>string content_type = 1;</code>
50 */
51 protected $content_type = '';
52 /**
53 * The HTTP request/response body as raw binary.
54 *
55 * Generated from protobuf field <code>bytes data = 2;</code>
56 */
57 protected $data = '';
58 /**
59 * Application specific response metadata. Must be set in the first response
60 * for streaming APIs.
61 *
62 * Generated from protobuf field <code>repeated .google.protobuf.Any extensions = 3;</code>
63 */
64 private $extensions;
65 /**
66 * Constructor.
67 *
68 * @param array $data {
69 * Optional. Data for populating the Message object.
70 *
71 * @type string $content_type
72 * The HTTP Content-Type header value specifying the content type of the body.
73 * @type string $data
74 * The HTTP request/response body as raw binary.
75 * @type array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $extensions
76 * Application specific response metadata. Must be set in the first response
77 * for streaming APIs.
78 * }
79 */
80 public function __construct($data = NULL)
81 {
82 \Dudlewebs\WPMCS\GPBMetadata\Google\Api\Httpbody::initOnce();
83 parent::__construct($data);
84 }
85 /**
86 * The HTTP Content-Type header value specifying the content type of the body.
87 *
88 * Generated from protobuf field <code>string content_type = 1;</code>
89 * @return string
90 */
91 public function getContentType()
92 {
93 return $this->content_type;
94 }
95 /**
96 * The HTTP Content-Type header value specifying the content type of the body.
97 *
98 * Generated from protobuf field <code>string content_type = 1;</code>
99 * @param string $var
100 * @return $this
101 */
102 public function setContentType($var)
103 {
104 GPBUtil::checkString($var, True);
105 $this->content_type = $var;
106 return $this;
107 }
108 /**
109 * The HTTP request/response body as raw binary.
110 *
111 * Generated from protobuf field <code>bytes data = 2;</code>
112 * @return string
113 */
114 public function getData()
115 {
116 return $this->data;
117 }
118 /**
119 * The HTTP request/response body as raw binary.
120 *
121 * Generated from protobuf field <code>bytes data = 2;</code>
122 * @param string $var
123 * @return $this
124 */
125 public function setData($var)
126 {
127 GPBUtil::checkString($var, False);
128 $this->data = $var;
129 return $this;
130 }
131 /**
132 * Application specific response metadata. Must be set in the first response
133 * for streaming APIs.
134 *
135 * Generated from protobuf field <code>repeated .google.protobuf.Any extensions = 3;</code>
136 * @return \Google\Protobuf\Internal\RepeatedField
137 */
138 public function getExtensions()
139 {
140 return $this->extensions;
141 }
142 /**
143 * Application specific response metadata. Must be set in the first response
144 * for streaming APIs.
145 *
146 * Generated from protobuf field <code>repeated .google.protobuf.Any extensions = 3;</code>
147 * @param array<\Google\Protobuf\Any>|\Google\Protobuf\Internal\RepeatedField $var
148 * @return $this
149 */
150 public function setExtensions($var)
151 {
152 $arr = GPBUtil::checkRepeatedField($var, \Dudlewebs\WPMCS\Google\Protobuf\Internal\GPBType::MESSAGE, \Dudlewebs\WPMCS\Google\Protobuf\Any::class);
153 $this->extensions = $arr;
154 return $this;
155 }
156 }
157