1<?xml version="1.0" encoding="ascii"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 3 "DTD/xhtml1-transitional.dtd"> 4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 5<head> 6 <title>googleapiclient.model.ProtocolBufferModel</title> 7 <link rel="stylesheet" href="epydoc.css" type="text/css" /> 8 <script type="text/javascript" src="epydoc.js"></script> 9</head> 10 11<body bgcolor="white" text="black" link="blue" vlink="#204080" 12 alink="#204080"> 13<!-- ==================== NAVIGATION BAR ==================== --> 14<table class="navbar" border="0" width="100%" cellpadding="0" 15 bgcolor="#a0c0ff" cellspacing="0"> 16 <tr valign="middle"> 17 <!-- Home link --> 18 <th> <a 19 href="googleapiclient-module.html">Home</a> </th> 20 21 <!-- Tree link --> 22 <th> <a 23 href="module-tree.html">Trees</a> </th> 24 25 <!-- Index link --> 26 <th> <a 27 href="identifier-index.html">Indices</a> </th> 28 29 <!-- Help link --> 30 <th> <a 31 href="help.html">Help</a> </th> 32 33 <th class="navbar" width="100%"></th> 34 </tr> 35</table> 36<table width="100%" cellpadding="0" cellspacing="0"> 37 <tr valign="top"> 38 <td width="100%"> 39 <span class="breadcrumbs"> 40 <a href="googleapiclient-module.html">Package googleapiclient</a> :: 41 <a href="googleapiclient.model-module.html">Module model</a> :: 42 Class ProtocolBufferModel 43 </span> 44 </td> 45 <td> 46 <table cellpadding="0" cellspacing="0"> 47 <!-- hide/show private --> 48 <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" 49 onclick="toggle_private();">hide private</a>]</span></td></tr> 50 <tr><td align="right"><span class="options" 51 >[<a href="frames.html" target="_top">frames</a 52 >] | <a href="googleapiclient.model.ProtocolBufferModel-class.html" 53 target="_top">no frames</a>]</span></td></tr> 54 </table> 55 </td> 56 </tr> 57</table> 58<!-- ==================== CLASS DESCRIPTION ==================== --> 59<h1 class="epydoc">Class ProtocolBufferModel</h1><p class="nomargin-top"><span class="codelink"><a href="googleapiclient.model-pysrc.html#ProtocolBufferModel">source code</a></span></p> 60<center> 61<center> <map id="uml_class_diagram_for_googleap_42" name="uml_class_diagram_for_googleap_42"> 62<area shape="rect" id="node1_9" href="googleapiclient.model.ProtocolBufferModel-class.html#accept" title="googleapiclient.model.ProtocolBufferModel.accept" alt="" coords="119,189,293,209"/> 63<area shape="rect" id="node1_10" href="googleapiclient.model.ProtocolBufferModel-class.html#content_type" title="googleapiclient.model.ProtocolBufferModel.content_type" alt="" coords="119,209,293,229"/> 64<area shape="rect" id="node1_11" href="googleapiclient.model.ProtocolBufferModel-class.html#alt_param" title="googleapiclient.model.ProtocolBufferModel.alt_param" alt="" coords="119,229,293,249"/> 65<area shape="rect" id="node1_12" href="googleapiclient.model.ProtocolBufferModel-class.html#__init__" title="Constructs a ProtocolBufferModel." alt="" coords="119,252,293,272"/> 66<area shape="rect" id="node1_13" href="googleapiclient.model.ProtocolBufferModel-class.html#serialize" title="Perform the actual Python object serialization." alt="" coords="119,272,293,292"/> 67<area shape="rect" id="node1_14" href="googleapiclient.model.ProtocolBufferModel-class.html#deserialize" title="Perform the actual deserialization from response string to Python object." alt="" coords="119,292,293,312"/> 68<area shape="rect" id="node1_15" href="googleapiclient.model.ProtocolBufferModel-class.html#no_content_response" title="googleapiclient.model.ProtocolBufferModel.no_content_response" alt="" coords="119,312,293,332"/> 69<area shape="rect" id="node1" href="googleapiclient.model.ProtocolBufferModel-class.html" title="Model class for protocol buffers." alt="" coords="106,165,305,339"/> 70<area shape="rect" id="node2_16" href="googleapiclient.model.BaseModel-class.html#request" title="Updates outgoing requests with a serialized body." alt="" coords="17,101,396,121"/> 71<area shape="rect" id="node2_17" href="googleapiclient.model.BaseModel-class.html#response" title="Convert the response wire format into a Python object." alt="" coords="17,121,396,141"/> 72<area shape="rect" id="node2" href="googleapiclient.model.BaseModel-class.html" title="Base model class." alt="" coords="5,68,408,147"/> 73<area shape="rect" id="node3" href="googleapiclient.model.Model-class.html" title="Model base class." alt="" coords="175,5,235,49"/> 74</map> 75 <img src="uml_class_diagram_for_googleap_42.gif" alt='' usemap="#uml_class_diagram_for_googleap_42" ismap="ismap" class="graph-without-title" /> 76</center> 77</center> 78<hr /> 79<pre class="literalblock"> 80Model class for protocol buffers. 81 82Serializes and de-serializes the binary protocol buffer sent in the HTTP 83request and response bodies. 84 85</pre> 86 87<!-- ==================== INSTANCE METHODS ==================== --> 88<a name="section-InstanceMethods"></a> 89<table class="summary" border="1" cellpadding="3" 90 cellspacing="0" width="100%" bgcolor="white"> 91<tr bgcolor="#70b0f0" class="table-header"> 92 <td colspan="2" class="table-header"> 93 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 94 <tr valign="top"> 95 <td align="left"><span class="table-header">Instance Methods</span></td> 96 <td align="right" valign="top" 97 ><span class="options">[<a href="#section-InstanceMethods" 98 class="privatelink" onclick="toggle_private();" 99 >hide private</a>]</span></td> 100 </tr> 101 </table> 102 </td> 103</tr> 104<tr> 105 <td width="15%" align="right" valign="top" class="summary"> 106 <span class="summary-type"> </span> 107 </td><td class="summary"> 108 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 109 <tr> 110 <td><span class="summary-sig"><a href="googleapiclient.model.ProtocolBufferModel-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, 111 <span class="summary-sig-arg">protocol_buffer</span>)</span><br /> 112 Constructs a ProtocolBufferModel.</td> 113 <td align="right" valign="top"> 114 <span class="codelink"><a href="googleapiclient.model-pysrc.html#ProtocolBufferModel.__init__">source code</a></span> 115 116 </td> 117 </tr> 118 </table> 119 120 </td> 121 </tr> 122<tr> 123 <td width="15%" align="right" valign="top" class="summary"> 124 <span class="summary-type"> </span> 125 </td><td class="summary"> 126 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 127 <tr> 128 <td><span class="summary-sig"><a href="googleapiclient.model.ProtocolBufferModel-class.html#serialize" class="summary-sig-name">serialize</a>(<span class="summary-sig-arg">self</span>, 129 <span class="summary-sig-arg">body_value</span>)</span><br /> 130 Perform the actual Python object serialization.</td> 131 <td align="right" valign="top"> 132 <span class="codelink"><a href="googleapiclient.model-pysrc.html#ProtocolBufferModel.serialize">source code</a></span> 133 134 </td> 135 </tr> 136 </table> 137 138 </td> 139 </tr> 140<tr> 141 <td width="15%" align="right" valign="top" class="summary"> 142 <span class="summary-type"> </span> 143 </td><td class="summary"> 144 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 145 <tr> 146 <td><span class="summary-sig"><a href="googleapiclient.model.ProtocolBufferModel-class.html#deserialize" class="summary-sig-name">deserialize</a>(<span class="summary-sig-arg">self</span>, 147 <span class="summary-sig-arg">content</span>)</span><br /> 148 Perform the actual deserialization from response string to Python 149object.</td> 150 <td align="right" valign="top"> 151 <span class="codelink"><a href="googleapiclient.model-pysrc.html#ProtocolBufferModel.deserialize">source code</a></span> 152 153 </td> 154 </tr> 155 </table> 156 157 </td> 158 </tr> 159<tr> 160 <td width="15%" align="right" valign="top" class="summary"> 161 <span class="summary-type"> </span> 162 </td><td class="summary"> 163 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 164 <tr> 165 <td><span class="summary-sig"><a href="googleapiclient.model.ProtocolBufferModel-class.html#no_content_response" class="summary-sig-name">no_content_response</a>(<span class="summary-sig-arg">self</span>)</span></td> 166 <td align="right" valign="top"> 167 <span class="codelink"><a href="googleapiclient.model-pysrc.html#ProtocolBufferModel.no_content_response">source code</a></span> 168 169 </td> 170 </tr> 171 </table> 172 173 </td> 174 </tr> 175 <tr> 176 <td colspan="2" class="summary"> 177 <p class="indent-wrapped-lines"><b>Inherited from <code><a href="googleapiclient.model.BaseModel-class.html">BaseModel</a></code></b>: 178 <code><a href="googleapiclient.model.BaseModel-class.html#request">request</a></code>, 179 <code><a href="googleapiclient.model.BaseModel-class.html#response">response</a></code> 180 </p> 181 <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="googleapiclient.model.BaseModel-class.html">BaseModel</a></code></b> (private): 182 <code><a href="googleapiclient.model.BaseModel-class.html#_build_query" onclick="show_private();">_build_query</a></code>, 183 <code><a href="googleapiclient.model.BaseModel-class.html#_log_request" onclick="show_private();">_log_request</a></code>, 184 <code><a href="googleapiclient.model.BaseModel-class.html#_log_response" onclick="show_private();">_log_response</a></code> 185 </p></div> 186 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: 187 <code>__delattr__</code>, 188 <code>__format__</code>, 189 <code>__getattribute__</code>, 190 <code>__hash__</code>, 191 <code>__new__</code>, 192 <code>__reduce__</code>, 193 <code>__reduce_ex__</code>, 194 <code>__repr__</code>, 195 <code>__setattr__</code>, 196 <code>__sizeof__</code>, 197 <code>__str__</code>, 198 <code>__subclasshook__</code> 199 </p> 200 </td> 201 </tr> 202</table> 203<!-- ==================== CLASS VARIABLES ==================== --> 204<a name="section-ClassVariables"></a> 205<table class="summary" border="1" cellpadding="3" 206 cellspacing="0" width="100%" bgcolor="white"> 207<tr bgcolor="#70b0f0" class="table-header"> 208 <td colspan="2" class="table-header"> 209 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 210 <tr valign="top"> 211 <td align="left"><span class="table-header">Class Variables</span></td> 212 <td align="right" valign="top" 213 ><span class="options">[<a href="#section-ClassVariables" 214 class="privatelink" onclick="toggle_private();" 215 >hide private</a>]</span></td> 216 </tr> 217 </table> 218 </td> 219</tr> 220<tr> 221 <td width="15%" align="right" valign="top" class="summary"> 222 <span class="summary-type"> </span> 223 </td><td class="summary"> 224 <a name="accept"></a><span class="summary-name">accept</span> = <code title="'application/x-protobuf'">'application/x-protobuf'</code> 225 </td> 226 </tr> 227<tr> 228 <td width="15%" align="right" valign="top" class="summary"> 229 <span class="summary-type"> </span> 230 </td><td class="summary"> 231 <a name="content_type"></a><span class="summary-name">content_type</span> = <code title="'application/x-protobuf'">'application/x-protobuf'</code> 232 </td> 233 </tr> 234<tr> 235 <td width="15%" align="right" valign="top" class="summary"> 236 <span class="summary-type"> </span> 237 </td><td class="summary"> 238 <a name="alt_param"></a><span class="summary-name">alt_param</span> = <code title="'proto'">'proto'</code> 239 </td> 240 </tr> 241</table> 242<!-- ==================== PROPERTIES ==================== --> 243<a name="section-Properties"></a> 244<table class="summary" border="1" cellpadding="3" 245 cellspacing="0" width="100%" bgcolor="white"> 246<tr bgcolor="#70b0f0" class="table-header"> 247 <td colspan="2" class="table-header"> 248 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 249 <tr valign="top"> 250 <td align="left"><span class="table-header">Properties</span></td> 251 <td align="right" valign="top" 252 ><span class="options">[<a href="#section-Properties" 253 class="privatelink" onclick="toggle_private();" 254 >hide private</a>]</span></td> 255 </tr> 256 </table> 257 </td> 258</tr> 259 <tr> 260 <td colspan="2" class="summary"> 261 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: 262 <code>__class__</code> 263 </p> 264 </td> 265 </tr> 266</table> 267<!-- ==================== METHOD DETAILS ==================== --> 268<a name="section-MethodDetails"></a> 269<table class="details" border="1" cellpadding="3" 270 cellspacing="0" width="100%" bgcolor="white"> 271<tr bgcolor="#70b0f0" class="table-header"> 272 <td colspan="2" class="table-header"> 273 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 274 <tr valign="top"> 275 <td align="left"><span class="table-header">Method Details</span></td> 276 <td align="right" valign="top" 277 ><span class="options">[<a href="#section-MethodDetails" 278 class="privatelink" onclick="toggle_private();" 279 >hide private</a>]</span></td> 280 </tr> 281 </table> 282 </td> 283</tr> 284</table> 285<a name="__init__"></a> 286<div> 287<table class="details" border="1" cellpadding="3" 288 cellspacing="0" width="100%" bgcolor="white"> 289<tr><td> 290 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 291 <tr valign="top"><td> 292 <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, 293 <span class="sig-arg">protocol_buffer</span>)</span> 294 <br /><em class="fname">(Constructor)</em> 295 </h3> 296 </td><td align="right" valign="top" 297 ><span class="codelink"><a href="googleapiclient.model-pysrc.html#ProtocolBufferModel.__init__">source code</a></span> 298 </td> 299 </tr></table> 300 301 <pre class="literalblock"> 302Constructs a ProtocolBufferModel. 303 304The serialzed protocol buffer returned in an HTTP response will be 305de-serialized using the given protocol buffer class. 306 307Args: 308 protocol_buffer: The protocol buffer class used to de-serialize a 309 response from the API. 310 311</pre> 312 <dl class="fields"> 313 <dt>Overrides: 314 object.__init__ 315 </dt> 316 </dl> 317</td></tr></table> 318</div> 319<a name="serialize"></a> 320<div> 321<table class="details" border="1" cellpadding="3" 322 cellspacing="0" width="100%" bgcolor="white"> 323<tr><td> 324 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 325 <tr valign="top"><td> 326 <h3 class="epydoc"><span class="sig"><span class="sig-name">serialize</span>(<span class="sig-arg">self</span>, 327 <span class="sig-arg">body_value</span>)</span> 328 </h3> 329 </td><td align="right" valign="top" 330 ><span class="codelink"><a href="googleapiclient.model-pysrc.html#ProtocolBufferModel.serialize">source code</a></span> 331 </td> 332 </tr></table> 333 334 <pre class="literalblock"> 335Perform the actual Python object serialization. 336 337Args: 338 body_value: object, the request body as a Python object. 339 340Returns: 341 string, the body in serialized form. 342 343</pre> 344 <dl class="fields"> 345 <dt>Overrides: 346 <a href="googleapiclient.model.BaseModel-class.html#serialize">BaseModel.serialize</a> 347 <dd><em class="note">(inherited documentation)</em></dd> 348 </dt> 349 </dl> 350</td></tr></table> 351</div> 352<a name="deserialize"></a> 353<div> 354<table class="details" border="1" cellpadding="3" 355 cellspacing="0" width="100%" bgcolor="white"> 356<tr><td> 357 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 358 <tr valign="top"><td> 359 <h3 class="epydoc"><span class="sig"><span class="sig-name">deserialize</span>(<span class="sig-arg">self</span>, 360 <span class="sig-arg">content</span>)</span> 361 </h3> 362 </td><td align="right" valign="top" 363 ><span class="codelink"><a href="googleapiclient.model-pysrc.html#ProtocolBufferModel.deserialize">source code</a></span> 364 </td> 365 </tr></table> 366 367 <pre class="literalblock"> 368Perform the actual deserialization from response string to Python 369object. 370 371Args: 372 content: string, the body of the HTTP response 373 374Returns: 375 The body de-serialized as a Python object. 376 377</pre> 378 <dl class="fields"> 379 <dt>Overrides: 380 <a href="googleapiclient.model.BaseModel-class.html#deserialize">BaseModel.deserialize</a> 381 <dd><em class="note">(inherited documentation)</em></dd> 382 </dt> 383 </dl> 384</td></tr></table> 385</div> 386<a name="no_content_response"></a> 387<div> 388<table class="details" border="1" cellpadding="3" 389 cellspacing="0" width="100%" bgcolor="white"> 390<tr><td> 391 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 392 <tr valign="top"><td> 393 <h3 class="epydoc"><span class="sig"><span class="sig-name">no_content_response</span>(<span class="sig-arg">self</span>)</span> 394 </h3> 395 </td><td align="right" valign="top" 396 ><span class="codelink"><a href="googleapiclient.model-pysrc.html#ProtocolBufferModel.no_content_response">source code</a></span> 397 </td> 398 </tr></table> 399 400 401 <dl class="fields"> 402 <dt>Decorators:</dt> 403 <dd><ul class="nomargin-top"> 404 <li><code>@property</code></li> 405 </ul></dd> 406 <dt>Overrides: 407 <a href="googleapiclient.model.BaseModel-class.html#no_content_response">no_content_response</a> 408 </dt> 409 </dl> 410</td></tr></table> 411</div> 412<br /> 413<!-- ==================== NAVIGATION BAR ==================== --> 414<table class="navbar" border="0" width="100%" cellpadding="0" 415 bgcolor="#a0c0ff" cellspacing="0"> 416 <tr valign="middle"> 417 <!-- Home link --> 418 <th> <a 419 href="googleapiclient-module.html">Home</a> </th> 420 421 <!-- Tree link --> 422 <th> <a 423 href="module-tree.html">Trees</a> </th> 424 425 <!-- Index link --> 426 <th> <a 427 href="identifier-index.html">Indices</a> </th> 428 429 <!-- Help link --> 430 <th> <a 431 href="help.html">Help</a> </th> 432 433 <th class="navbar" width="100%"></th> 434 </tr> 435</table> 436<table border="0" cellpadding="0" cellspacing="0" width="100%%"> 437 <tr> 438 <td align="left" class="footer"> 439 Generated by Epydoc 3.0.1 on Fri Jun 14 15:57:28 2019 440 </td> 441 <td align="right" class="footer"> 442 <a target="mainFrame" href="http://epydoc.sourceforge.net" 443 >http://epydoc.sourceforge.net</a> 444 </td> 445 </tr> 446</table> 447 448<script type="text/javascript"> 449 <!-- 450 // Private objects are initially displayed (because if 451 // javascript is turned off then we want them to be 452 // visible); but by default, we want to hide them. So hide 453 // them unless we have a cookie that says to show them. 454 checkCookie(); 455 // --> 456</script> 457</body> 458</html> 459