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.Model</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 Model 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.Model-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 Model</h1><p class="nomargin-top"><span class="codelink"><a href="googleapiclient.model-pysrc.html#Model">source code</a></span></p> 60<center> 61<center> <map id="uml_class_diagram_for_googleap_41" name="uml_class_diagram_for_googleap_41"> 62<area shape="rect" id="node1_2" href="googleapiclient.model.Model-class.html#request" title="Updates outgoing requests with a serialized body." alt="" coords="17,38,396,58"/> 63<area shape="rect" id="node1_3" href="googleapiclient.model.Model-class.html#response" title="Convert the response wire format into a Python object." alt="" coords="17,58,396,78"/> 64<area shape="rect" id="node1" href="googleapiclient.model.Model-class.html" title="Model base class." alt="" coords="5,5,408,84"/> 65</map> 66 <img src="uml_class_diagram_for_googleap_41.gif" alt='' usemap="#uml_class_diagram_for_googleap_41" ismap="ismap" class="graph-without-title" /> 67</center> 68</center> 69<hr /> 70<pre class="literalblock"> 71Model base class. 72 73All Model classes should implement this interface. 74The Model serializes and de-serializes between a wire 75format such as JSON and a Python object representation. 76 77</pre> 78 79<!-- ==================== INSTANCE METHODS ==================== --> 80<a name="section-InstanceMethods"></a> 81<table class="summary" border="1" cellpadding="3" 82 cellspacing="0" width="100%" bgcolor="white"> 83<tr bgcolor="#70b0f0" class="table-header"> 84 <td colspan="2" class="table-header"> 85 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 86 <tr valign="top"> 87 <td align="left"><span class="table-header">Instance Methods</span></td> 88 <td align="right" valign="top" 89 ><span class="options">[<a href="#section-InstanceMethods" 90 class="privatelink" onclick="toggle_private();" 91 >hide private</a>]</span></td> 92 </tr> 93 </table> 94 </td> 95</tr> 96<tr> 97 <td width="15%" align="right" valign="top" class="summary"> 98 <span class="summary-type"> </span> 99 </td><td class="summary"> 100 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 101 <tr> 102 <td><span class="summary-sig"><a href="googleapiclient.model.Model-class.html#request" class="summary-sig-name">request</a>(<span class="summary-sig-arg">self</span>, 103 <span class="summary-sig-arg">headers</span>, 104 <span class="summary-sig-arg">path_params</span>, 105 <span class="summary-sig-arg">query_params</span>, 106 <span class="summary-sig-arg">body_value</span>)</span><br /> 107 Updates outgoing requests with a serialized body.</td> 108 <td align="right" valign="top"> 109 <span class="codelink"><a href="googleapiclient.model-pysrc.html#Model.request">source code</a></span> 110 111 </td> 112 </tr> 113 </table> 114 115 </td> 116 </tr> 117<tr> 118 <td width="15%" align="right" valign="top" class="summary"> 119 <span class="summary-type"> </span> 120 </td><td class="summary"> 121 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 122 <tr> 123 <td><span class="summary-sig"><a href="googleapiclient.model.Model-class.html#response" class="summary-sig-name">response</a>(<span class="summary-sig-arg">self</span>, 124 <span class="summary-sig-arg">resp</span>, 125 <span class="summary-sig-arg">content</span>)</span><br /> 126 Convert the response wire format into a Python object.</td> 127 <td align="right" valign="top"> 128 <span class="codelink"><a href="googleapiclient.model-pysrc.html#Model.response">source code</a></span> 129 130 </td> 131 </tr> 132 </table> 133 134 </td> 135 </tr> 136 <tr> 137 <td colspan="2" class="summary"> 138 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: 139 <code>__delattr__</code>, 140 <code>__format__</code>, 141 <code>__getattribute__</code>, 142 <code>__hash__</code>, 143 <code>__init__</code>, 144 <code>__new__</code>, 145 <code>__reduce__</code>, 146 <code>__reduce_ex__</code>, 147 <code>__repr__</code>, 148 <code>__setattr__</code>, 149 <code>__sizeof__</code>, 150 <code>__str__</code>, 151 <code>__subclasshook__</code> 152 </p> 153 </td> 154 </tr> 155</table> 156<!-- ==================== PROPERTIES ==================== --> 157<a name="section-Properties"></a> 158<table class="summary" border="1" cellpadding="3" 159 cellspacing="0" width="100%" bgcolor="white"> 160<tr bgcolor="#70b0f0" class="table-header"> 161 <td colspan="2" class="table-header"> 162 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 163 <tr valign="top"> 164 <td align="left"><span class="table-header">Properties</span></td> 165 <td align="right" valign="top" 166 ><span class="options">[<a href="#section-Properties" 167 class="privatelink" onclick="toggle_private();" 168 >hide private</a>]</span></td> 169 </tr> 170 </table> 171 </td> 172</tr> 173 <tr> 174 <td colspan="2" class="summary"> 175 <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: 176 <code>__class__</code> 177 </p> 178 </td> 179 </tr> 180</table> 181<!-- ==================== METHOD DETAILS ==================== --> 182<a name="section-MethodDetails"></a> 183<table class="details" border="1" cellpadding="3" 184 cellspacing="0" width="100%" bgcolor="white"> 185<tr bgcolor="#70b0f0" class="table-header"> 186 <td colspan="2" class="table-header"> 187 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 188 <tr valign="top"> 189 <td align="left"><span class="table-header">Method Details</span></td> 190 <td align="right" valign="top" 191 ><span class="options">[<a href="#section-MethodDetails" 192 class="privatelink" onclick="toggle_private();" 193 >hide private</a>]</span></td> 194 </tr> 195 </table> 196 </td> 197</tr> 198</table> 199<a name="request"></a> 200<div> 201<table class="details" border="1" cellpadding="3" 202 cellspacing="0" width="100%" bgcolor="white"> 203<tr><td> 204 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 205 <tr valign="top"><td> 206 <h3 class="epydoc"><span class="sig"><span class="sig-name">request</span>(<span class="sig-arg">self</span>, 207 <span class="sig-arg">headers</span>, 208 <span class="sig-arg">path_params</span>, 209 <span class="sig-arg">query_params</span>, 210 <span class="sig-arg">body_value</span>)</span> 211 </h3> 212 </td><td align="right" valign="top" 213 ><span class="codelink"><a href="googleapiclient.model-pysrc.html#Model.request">source code</a></span> 214 </td> 215 </tr></table> 216 217 <pre class="literalblock"> 218Updates outgoing requests with a serialized body. 219 220Args: 221 headers: dict, request headers 222 path_params: dict, parameters that appear in the request path 223 query_params: dict, parameters that appear in the query 224 body_value: object, the request body as a Python object, which must be 225 serializable. 226Returns: 227 A tuple of (headers, path_params, query, body) 228 229 headers: dict, request headers 230 path_params: dict, parameters that appear in the request path 231 query: string, query part of the request URI 232 body: string, the body serialized in the desired wire format. 233 234</pre> 235 <dl class="fields"> 236 </dl> 237</td></tr></table> 238</div> 239<a name="response"></a> 240<div> 241<table class="details" border="1" cellpadding="3" 242 cellspacing="0" width="100%" bgcolor="white"> 243<tr><td> 244 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 245 <tr valign="top"><td> 246 <h3 class="epydoc"><span class="sig"><span class="sig-name">response</span>(<span class="sig-arg">self</span>, 247 <span class="sig-arg">resp</span>, 248 <span class="sig-arg">content</span>)</span> 249 </h3> 250 </td><td align="right" valign="top" 251 ><span class="codelink"><a href="googleapiclient.model-pysrc.html#Model.response">source code</a></span> 252 </td> 253 </tr></table> 254 255 <pre class="literalblock"> 256Convert the response wire format into a Python object. 257 258Args: 259 resp: httplib2.Response, the HTTP response headers and status 260 content: string, the body of the HTTP response 261 262Returns: 263 The body de-serialized as a Python object. 264 265Raises: 266 googleapiclient.errors.HttpError if a non 2xx response is received. 267 268</pre> 269 <dl class="fields"> 270 </dl> 271</td></tr></table> 272</div> 273<br /> 274<!-- ==================== NAVIGATION BAR ==================== --> 275<table class="navbar" border="0" width="100%" cellpadding="0" 276 bgcolor="#a0c0ff" cellspacing="0"> 277 <tr valign="middle"> 278 <!-- Home link --> 279 <th> <a 280 href="googleapiclient-module.html">Home</a> </th> 281 282 <!-- Tree link --> 283 <th> <a 284 href="module-tree.html">Trees</a> </th> 285 286 <!-- Index link --> 287 <th> <a 288 href="identifier-index.html">Indices</a> </th> 289 290 <!-- Help link --> 291 <th> <a 292 href="help.html">Help</a> </th> 293 294 <th class="navbar" width="100%"></th> 295 </tr> 296</table> 297<table border="0" cellpadding="0" cellspacing="0" width="100%%"> 298 <tr> 299 <td align="left" class="footer"> 300 Generated by Epydoc 3.0.1 on Fri Jun 14 15:57:28 2019 301 </td> 302 <td align="right" class="footer"> 303 <a target="mainFrame" href="http://epydoc.sourceforge.net" 304 >http://epydoc.sourceforge.net</a> 305 </td> 306 </tr> 307</table> 308 309<script type="text/javascript"> 310 <!-- 311 // Private objects are initially displayed (because if 312 // javascript is turned off then we want them to be 313 // visible); but by default, we want to hide them. So hide 314 // them unless we have a cookie that says to show them. 315 checkCookie(); 316 // --> 317</script> 318</body> 319</html> 320