|  | 
 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | 
 | <html><head><title>Python: module apiclient.model</title> | 
 | </head><body bgcolor="#f0f0f8"> | 
 |  | 
 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> | 
 | <tr bgcolor="#7799ee"> | 
 | <td valign=bottom> <br> | 
 | <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="apiclient.html"><font color="#ffffff">apiclient</font></a>.model</strong></big></big></font></td | 
 | ><td align=right valign=bottom | 
 | ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jcgregorio/projects/clean/apiclient/model.py">/home/jcgregorio/projects/clean/apiclient/model.py</a></font></td></tr></table> | 
 |     <p><tt><a href="#Model">Model</a> objects for requests and responses.<br> | 
 |  <br> | 
 | Each API may support one or more serializations, such<br> | 
 | as JSON, Atom, etc. The model classes are responsible<br> | 
 | for converting between the wire format and the Python<br> | 
 | <a href="__builtin__.html#object">object</a> representation.</tt></p> | 
 | <p> | 
 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | 
 | <tr bgcolor="#aa55cc"> | 
 | <td colspan=3 valign=bottom> <br> | 
 | <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> | 
 |      | 
 | <tr><td bgcolor="#aa55cc"><tt>      </tt></td><td> </td> | 
 | <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="gflags.html">gflags</a><br> | 
 | </td><td width="25%" valign=top><a href="logging.html">logging</a><br> | 
 | </td><td width="25%" valign=top><a href="json.html">json</a><br> | 
 | </td><td width="25%" valign=top><a href="urllib.html">urllib</a><br> | 
 | </td></tr></table></td></tr></table><p> | 
 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | 
 | <tr bgcolor="#ee77aa"> | 
 | <td colspan=3 valign=bottom> <br> | 
 | <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> | 
 |      | 
 | <tr><td bgcolor="#ee77aa"><tt>      </tt></td><td> </td> | 
 | <td width="100%"><dl> | 
 | <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> | 
 | </font></dt><dd> | 
 | <dl> | 
 | <dt><font face="helvetica, arial"><a href="apiclient.model.html#Model">Model</a> | 
 | </font></dt><dd> | 
 | <dl> | 
 | <dt><font face="helvetica, arial"><a href="apiclient.model.html#BaseModel">BaseModel</a> | 
 | </font></dt><dd> | 
 | <dl> | 
 | <dt><font face="helvetica, arial"><a href="apiclient.model.html#JsonModel">JsonModel</a> | 
 | </font></dt><dd> | 
 | <dl> | 
 | <dt><font face="helvetica, arial"><a href="apiclient.model.html#MediaModel">MediaModel</a> | 
 | </font></dt><dt><font face="helvetica, arial"><a href="apiclient.model.html#RawModel">RawModel</a> | 
 | </font></dt></dl> | 
 | </dd> | 
 | <dt><font face="helvetica, arial"><a href="apiclient.model.html#ProtocolBufferModel">ProtocolBufferModel</a> | 
 | </font></dt></dl> | 
 | </dd> | 
 | </dl> | 
 | </dd> | 
 | </dl> | 
 | </dd> | 
 | </dl> | 
 |  <p> | 
 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | 
 | <tr bgcolor="#ffc8d8"> | 
 | <td colspan=3 valign=bottom> <br> | 
 | <font color="#000000" face="helvetica, arial"><a name="BaseModel">class <strong>BaseModel</strong></a>(<a href="apiclient.model.html#Model">Model</a>)</font></td></tr> | 
 |      | 
 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt>   </tt></td> | 
 | <td colspan=2><tt>Base model class.<br> | 
 |  <br> | 
 | Subclasses should provide implementations for the "serialize" and<br> | 
 | "deserialize" methods, as well as values for the following class attributes.<br> | 
 |  <br> | 
 | Attributes:<br> | 
 |   accept: The value to use for the HTTP Accept header.<br> | 
 |   content_type: The value to use for the HTTP Content-type header.<br> | 
 |   no_content_response: The value to return when deserializing a 204 "No<br> | 
 |       Content" response.<br> | 
 |   alt_param: The value to supply as the "alt" query parameter for requests.<br> </tt></td></tr> | 
 | <tr><td> </td> | 
 | <td width="100%"><dl><dt>Method resolution order:</dt> | 
 | <dd><a href="apiclient.model.html#BaseModel">BaseModel</a></dd> | 
 | <dd><a href="apiclient.model.html#Model">Model</a></dd> | 
 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> | 
 | </dl> | 
 | <hr> | 
 | Methods defined here:<br> | 
 | <dl><dt><a name="BaseModel-deserialize"><strong>deserialize</strong></a>(self, content)</dt><dd><tt>Perform the actual deserialization from response string to Python<br> | 
 | <a href="__builtin__.html#object">object</a>.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   content: string, the body of the HTTP response<br> | 
 |  <br> | 
 | Returns:<br> | 
 |   The body de-serialized as a Python <a href="__builtin__.html#object">object</a>.</tt></dd></dl> | 
 |  | 
 | <dl><dt><a name="BaseModel-request"><strong>request</strong></a>(self, headers, path_params, query_params, body_value)</dt><dd><tt>Updates outgoing requests with a serialized body.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   headers: dict, request headers<br> | 
 |   path_params: dict, parameters that appear in the request path<br> | 
 |   query_params: dict, parameters that appear in the query<br> | 
 |   body_value: <a href="__builtin__.html#object">object</a>, the request body as a Python <a href="__builtin__.html#object">object</a>, which must be<br> | 
 |               serializable by simplejson.<br> | 
 | Returns:<br> | 
 |   A tuple of (headers, path_params, query, body)<br> | 
 |  <br> | 
 |   headers: dict, request headers<br> | 
 |   path_params: dict, parameters that appear in the request path<br> | 
 |   query: string, query part of the request URI<br> | 
 |   body: string, the body serialized as JSON</tt></dd></dl> | 
 |  | 
 | <dl><dt><a name="BaseModel-response"><strong>response</strong></a>(self, resp, content)</dt><dd><tt>Convert the response wire format into a Python <a href="__builtin__.html#object">object</a>.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   resp: httplib2.Response, the HTTP response headers and status<br> | 
 |   content: string, the body of the HTTP response<br> | 
 |  <br> | 
 | Returns:<br> | 
 |   The body de-serialized as a Python <a href="__builtin__.html#object">object</a>.<br> | 
 |  <br> | 
 | Raises:<br> | 
 |   apiclient.errors.HttpError if a non 2xx response is received.</tt></dd></dl> | 
 |  | 
 | <dl><dt><a name="BaseModel-serialize"><strong>serialize</strong></a>(self, body_value)</dt><dd><tt>Perform the actual Python <a href="__builtin__.html#object">object</a> serialization.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   body_value: <a href="__builtin__.html#object">object</a>, the request body as a Python <a href="__builtin__.html#object">object</a>.<br> | 
 |  <br> | 
 | Returns:<br> | 
 |   string, the body in serialized form.</tt></dd></dl> | 
 |  | 
 | <hr> | 
 | Data and other attributes defined here:<br> | 
 | <dl><dt><strong>accept</strong> = None</dl> | 
 |  | 
 | <dl><dt><strong>alt_param</strong> = None</dl> | 
 |  | 
 | <dl><dt><strong>content_type</strong> = None</dl> | 
 |  | 
 | <dl><dt><strong>no_content_response</strong> = None</dl> | 
 |  | 
 | <hr> | 
 | Data descriptors inherited from <a href="apiclient.model.html#Model">Model</a>:<br> | 
 | <dl><dt><strong>__dict__</strong></dt> | 
 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> | 
 | </dl> | 
 | <dl><dt><strong>__weakref__</strong></dt> | 
 | <dd><tt>list of weak references to the object (if defined)</tt></dd> | 
 | </dl> | 
 | </td></tr></table> <p> | 
 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | 
 | <tr bgcolor="#ffc8d8"> | 
 | <td colspan=3 valign=bottom> <br> | 
 | <font color="#000000" face="helvetica, arial"><a name="JsonModel">class <strong>JsonModel</strong></a>(<a href="apiclient.model.html#BaseModel">BaseModel</a>)</font></td></tr> | 
 |      | 
 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt>   </tt></td> | 
 | <td colspan=2><tt><a href="#Model">Model</a> class for JSON.<br> | 
 |  <br> | 
 | Serializes and de-serializes between JSON and the Python<br> | 
 | <a href="__builtin__.html#object">object</a> representation of HTTP request and response bodies.<br> </tt></td></tr> | 
 | <tr><td> </td> | 
 | <td width="100%"><dl><dt>Method resolution order:</dt> | 
 | <dd><a href="apiclient.model.html#JsonModel">JsonModel</a></dd> | 
 | <dd><a href="apiclient.model.html#BaseModel">BaseModel</a></dd> | 
 | <dd><a href="apiclient.model.html#Model">Model</a></dd> | 
 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> | 
 | </dl> | 
 | <hr> | 
 | Methods defined here:<br> | 
 | <dl><dt><a name="JsonModel-__init__"><strong>__init__</strong></a>(self, data_wrapper<font color="#909090">=False</font>)</dt><dd><tt>Construct a <a href="#JsonModel">JsonModel</a>.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   data_wrapper: boolean, wrap requests and responses in a data wrapper</tt></dd></dl> | 
 |  | 
 | <dl><dt><a name="JsonModel-deserialize"><strong>deserialize</strong></a>(self, content)</dt></dl> | 
 |  | 
 | <dl><dt><a name="JsonModel-serialize"><strong>serialize</strong></a>(self, body_value)</dt></dl> | 
 |  | 
 | <hr> | 
 | Data descriptors defined here:<br> | 
 | <dl><dt><strong>no_content_response</strong></dt> | 
 | </dl> | 
 | <hr> | 
 | Data and other attributes defined here:<br> | 
 | <dl><dt><strong>accept</strong> = 'application/json'</dl> | 
 |  | 
 | <dl><dt><strong>alt_param</strong> = 'json'</dl> | 
 |  | 
 | <dl><dt><strong>content_type</strong> = 'application/json'</dl> | 
 |  | 
 | <hr> | 
 | Methods inherited from <a href="apiclient.model.html#BaseModel">BaseModel</a>:<br> | 
 | <dl><dt><a name="JsonModel-request"><strong>request</strong></a>(self, headers, path_params, query_params, body_value)</dt><dd><tt>Updates outgoing requests with a serialized body.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   headers: dict, request headers<br> | 
 |   path_params: dict, parameters that appear in the request path<br> | 
 |   query_params: dict, parameters that appear in the query<br> | 
 |   body_value: <a href="__builtin__.html#object">object</a>, the request body as a Python <a href="__builtin__.html#object">object</a>, which must be<br> | 
 |               serializable by simplejson.<br> | 
 | Returns:<br> | 
 |   A tuple of (headers, path_params, query, body)<br> | 
 |  <br> | 
 |   headers: dict, request headers<br> | 
 |   path_params: dict, parameters that appear in the request path<br> | 
 |   query: string, query part of the request URI<br> | 
 |   body: string, the body serialized as JSON</tt></dd></dl> | 
 |  | 
 | <dl><dt><a name="JsonModel-response"><strong>response</strong></a>(self, resp, content)</dt><dd><tt>Convert the response wire format into a Python <a href="__builtin__.html#object">object</a>.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   resp: httplib2.Response, the HTTP response headers and status<br> | 
 |   content: string, the body of the HTTP response<br> | 
 |  <br> | 
 | Returns:<br> | 
 |   The body de-serialized as a Python <a href="__builtin__.html#object">object</a>.<br> | 
 |  <br> | 
 | Raises:<br> | 
 |   apiclient.errors.HttpError if a non 2xx response is received.</tt></dd></dl> | 
 |  | 
 | <hr> | 
 | Data descriptors inherited from <a href="apiclient.model.html#Model">Model</a>:<br> | 
 | <dl><dt><strong>__dict__</strong></dt> | 
 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> | 
 | </dl> | 
 | <dl><dt><strong>__weakref__</strong></dt> | 
 | <dd><tt>list of weak references to the object (if defined)</tt></dd> | 
 | </dl> | 
 | </td></tr></table> <p> | 
 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | 
 | <tr bgcolor="#ffc8d8"> | 
 | <td colspan=3 valign=bottom> <br> | 
 | <font color="#000000" face="helvetica, arial"><a name="MediaModel">class <strong>MediaModel</strong></a>(<a href="apiclient.model.html#JsonModel">JsonModel</a>)</font></td></tr> | 
 |      | 
 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt>   </tt></td> | 
 | <td colspan=2><tt><a href="#Model">Model</a> class for requests that return Media.<br> | 
 |  <br> | 
 | Serializes and de-serializes between JSON and the Python<br> | 
 | <a href="__builtin__.html#object">object</a> representation of HTTP request, and returns the raw bytes<br> | 
 | of the response body.<br> </tt></td></tr> | 
 | <tr><td> </td> | 
 | <td width="100%"><dl><dt>Method resolution order:</dt> | 
 | <dd><a href="apiclient.model.html#MediaModel">MediaModel</a></dd> | 
 | <dd><a href="apiclient.model.html#JsonModel">JsonModel</a></dd> | 
 | <dd><a href="apiclient.model.html#BaseModel">BaseModel</a></dd> | 
 | <dd><a href="apiclient.model.html#Model">Model</a></dd> | 
 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> | 
 | </dl> | 
 | <hr> | 
 | Methods defined here:<br> | 
 | <dl><dt><a name="MediaModel-deserialize"><strong>deserialize</strong></a>(self, content)</dt></dl> | 
 |  | 
 | <hr> | 
 | Data descriptors defined here:<br> | 
 | <dl><dt><strong>no_content_response</strong></dt> | 
 | </dl> | 
 | <hr> | 
 | Data and other attributes defined here:<br> | 
 | <dl><dt><strong>accept</strong> = '*/*'</dl> | 
 |  | 
 | <dl><dt><strong>alt_param</strong> = 'media'</dl> | 
 |  | 
 | <dl><dt><strong>content_type</strong> = 'application/json'</dl> | 
 |  | 
 | <hr> | 
 | Methods inherited from <a href="apiclient.model.html#JsonModel">JsonModel</a>:<br> | 
 | <dl><dt><a name="MediaModel-__init__"><strong>__init__</strong></a>(self, data_wrapper<font color="#909090">=False</font>)</dt><dd><tt>Construct a <a href="#JsonModel">JsonModel</a>.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   data_wrapper: boolean, wrap requests and responses in a data wrapper</tt></dd></dl> | 
 |  | 
 | <dl><dt><a name="MediaModel-serialize"><strong>serialize</strong></a>(self, body_value)</dt></dl> | 
 |  | 
 | <hr> | 
 | Methods inherited from <a href="apiclient.model.html#BaseModel">BaseModel</a>:<br> | 
 | <dl><dt><a name="MediaModel-request"><strong>request</strong></a>(self, headers, path_params, query_params, body_value)</dt><dd><tt>Updates outgoing requests with a serialized body.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   headers: dict, request headers<br> | 
 |   path_params: dict, parameters that appear in the request path<br> | 
 |   query_params: dict, parameters that appear in the query<br> | 
 |   body_value: <a href="__builtin__.html#object">object</a>, the request body as a Python <a href="__builtin__.html#object">object</a>, which must be<br> | 
 |               serializable by simplejson.<br> | 
 | Returns:<br> | 
 |   A tuple of (headers, path_params, query, body)<br> | 
 |  <br> | 
 |   headers: dict, request headers<br> | 
 |   path_params: dict, parameters that appear in the request path<br> | 
 |   query: string, query part of the request URI<br> | 
 |   body: string, the body serialized as JSON</tt></dd></dl> | 
 |  | 
 | <dl><dt><a name="MediaModel-response"><strong>response</strong></a>(self, resp, content)</dt><dd><tt>Convert the response wire format into a Python <a href="__builtin__.html#object">object</a>.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   resp: httplib2.Response, the HTTP response headers and status<br> | 
 |   content: string, the body of the HTTP response<br> | 
 |  <br> | 
 | Returns:<br> | 
 |   The body de-serialized as a Python <a href="__builtin__.html#object">object</a>.<br> | 
 |  <br> | 
 | Raises:<br> | 
 |   apiclient.errors.HttpError if a non 2xx response is received.</tt></dd></dl> | 
 |  | 
 | <hr> | 
 | Data descriptors inherited from <a href="apiclient.model.html#Model">Model</a>:<br> | 
 | <dl><dt><strong>__dict__</strong></dt> | 
 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> | 
 | </dl> | 
 | <dl><dt><strong>__weakref__</strong></dt> | 
 | <dd><tt>list of weak references to the object (if defined)</tt></dd> | 
 | </dl> | 
 | </td></tr></table> <p> | 
 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | 
 | <tr bgcolor="#ffc8d8"> | 
 | <td colspan=3 valign=bottom> <br> | 
 | <font color="#000000" face="helvetica, arial"><a name="Model">class <strong>Model</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> | 
 |      | 
 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt>   </tt></td> | 
 | <td colspan=2><tt><a href="#Model">Model</a> base class.<br> | 
 |  <br> | 
 | All <a href="#Model">Model</a> classes should implement this interface.<br> | 
 | The <a href="#Model">Model</a> serializes and de-serializes between a wire<br> | 
 | format such as JSON and a Python <a href="__builtin__.html#object">object</a> representation.<br> </tt></td></tr> | 
 | <tr><td> </td> | 
 | <td width="100%">Methods defined here:<br> | 
 | <dl><dt><a name="Model-request"><strong>request</strong></a>(self, headers, path_params, query_params, body_value)</dt><dd><tt>Updates outgoing requests with a serialized body.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   headers: dict, request headers<br> | 
 |   path_params: dict, parameters that appear in the request path<br> | 
 |   query_params: dict, parameters that appear in the query<br> | 
 |   body_value: <a href="__builtin__.html#object">object</a>, the request body as a Python <a href="__builtin__.html#object">object</a>, which must be<br> | 
 |               serializable.<br> | 
 | Returns:<br> | 
 |   A tuple of (headers, path_params, query, body)<br> | 
 |  <br> | 
 |   headers: dict, request headers<br> | 
 |   path_params: dict, parameters that appear in the request path<br> | 
 |   query: string, query part of the request URI<br> | 
 |   body: string, the body serialized in the desired wire format.</tt></dd></dl> | 
 |  | 
 | <dl><dt><a name="Model-response"><strong>response</strong></a>(self, resp, content)</dt><dd><tt>Convert the response wire format into a Python <a href="__builtin__.html#object">object</a>.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   resp: httplib2.Response, the HTTP response headers and status<br> | 
 |   content: string, the body of the HTTP response<br> | 
 |  <br> | 
 | Returns:<br> | 
 |   The body de-serialized as a Python <a href="__builtin__.html#object">object</a>.<br> | 
 |  <br> | 
 | Raises:<br> | 
 |   apiclient.errors.HttpError if a non 2xx response is received.</tt></dd></dl> | 
 |  | 
 | <hr> | 
 | Data descriptors defined here:<br> | 
 | <dl><dt><strong>__dict__</strong></dt> | 
 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> | 
 | </dl> | 
 | <dl><dt><strong>__weakref__</strong></dt> | 
 | <dd><tt>list of weak references to the object (if defined)</tt></dd> | 
 | </dl> | 
 | </td></tr></table> <p> | 
 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | 
 | <tr bgcolor="#ffc8d8"> | 
 | <td colspan=3 valign=bottom> <br> | 
 | <font color="#000000" face="helvetica, arial"><a name="ProtocolBufferModel">class <strong>ProtocolBufferModel</strong></a>(<a href="apiclient.model.html#BaseModel">BaseModel</a>)</font></td></tr> | 
 |      | 
 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt>   </tt></td> | 
 | <td colspan=2><tt><a href="#Model">Model</a> class for protocol buffers.<br> | 
 |  <br> | 
 | Serializes and de-serializes the binary protocol buffer sent in the HTTP<br> | 
 | request and response bodies.<br> </tt></td></tr> | 
 | <tr><td> </td> | 
 | <td width="100%"><dl><dt>Method resolution order:</dt> | 
 | <dd><a href="apiclient.model.html#ProtocolBufferModel">ProtocolBufferModel</a></dd> | 
 | <dd><a href="apiclient.model.html#BaseModel">BaseModel</a></dd> | 
 | <dd><a href="apiclient.model.html#Model">Model</a></dd> | 
 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> | 
 | </dl> | 
 | <hr> | 
 | Methods defined here:<br> | 
 | <dl><dt><a name="ProtocolBufferModel-__init__"><strong>__init__</strong></a>(self, protocol_buffer)</dt><dd><tt>Constructs a <a href="#ProtocolBufferModel">ProtocolBufferModel</a>.<br> | 
 |  <br> | 
 | The serialzed protocol buffer returned in an HTTP response will be<br> | 
 | de-serialized using the given protocol buffer class.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   protocol_buffer: The protocol buffer class used to de-serialize a<br> | 
 |   response from the API.</tt></dd></dl> | 
 |  | 
 | <dl><dt><a name="ProtocolBufferModel-deserialize"><strong>deserialize</strong></a>(self, content)</dt></dl> | 
 |  | 
 | <dl><dt><a name="ProtocolBufferModel-serialize"><strong>serialize</strong></a>(self, body_value)</dt></dl> | 
 |  | 
 | <hr> | 
 | Data descriptors defined here:<br> | 
 | <dl><dt><strong>no_content_response</strong></dt> | 
 | </dl> | 
 | <hr> | 
 | Data and other attributes defined here:<br> | 
 | <dl><dt><strong>accept</strong> = 'application/x-protobuf'</dl> | 
 |  | 
 | <dl><dt><strong>alt_param</strong> = 'proto'</dl> | 
 |  | 
 | <dl><dt><strong>content_type</strong> = 'application/x-protobuf'</dl> | 
 |  | 
 | <hr> | 
 | Methods inherited from <a href="apiclient.model.html#BaseModel">BaseModel</a>:<br> | 
 | <dl><dt><a name="ProtocolBufferModel-request"><strong>request</strong></a>(self, headers, path_params, query_params, body_value)</dt><dd><tt>Updates outgoing requests with a serialized body.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   headers: dict, request headers<br> | 
 |   path_params: dict, parameters that appear in the request path<br> | 
 |   query_params: dict, parameters that appear in the query<br> | 
 |   body_value: <a href="__builtin__.html#object">object</a>, the request body as a Python <a href="__builtin__.html#object">object</a>, which must be<br> | 
 |               serializable by simplejson.<br> | 
 | Returns:<br> | 
 |   A tuple of (headers, path_params, query, body)<br> | 
 |  <br> | 
 |   headers: dict, request headers<br> | 
 |   path_params: dict, parameters that appear in the request path<br> | 
 |   query: string, query part of the request URI<br> | 
 |   body: string, the body serialized as JSON</tt></dd></dl> | 
 |  | 
 | <dl><dt><a name="ProtocolBufferModel-response"><strong>response</strong></a>(self, resp, content)</dt><dd><tt>Convert the response wire format into a Python <a href="__builtin__.html#object">object</a>.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   resp: httplib2.Response, the HTTP response headers and status<br> | 
 |   content: string, the body of the HTTP response<br> | 
 |  <br> | 
 | Returns:<br> | 
 |   The body de-serialized as a Python <a href="__builtin__.html#object">object</a>.<br> | 
 |  <br> | 
 | Raises:<br> | 
 |   apiclient.errors.HttpError if a non 2xx response is received.</tt></dd></dl> | 
 |  | 
 | <hr> | 
 | Data descriptors inherited from <a href="apiclient.model.html#Model">Model</a>:<br> | 
 | <dl><dt><strong>__dict__</strong></dt> | 
 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> | 
 | </dl> | 
 | <dl><dt><strong>__weakref__</strong></dt> | 
 | <dd><tt>list of weak references to the object (if defined)</tt></dd> | 
 | </dl> | 
 | </td></tr></table> <p> | 
 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | 
 | <tr bgcolor="#ffc8d8"> | 
 | <td colspan=3 valign=bottom> <br> | 
 | <font color="#000000" face="helvetica, arial"><a name="RawModel">class <strong>RawModel</strong></a>(<a href="apiclient.model.html#JsonModel">JsonModel</a>)</font></td></tr> | 
 |      | 
 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt>   </tt></td> | 
 | <td colspan=2><tt><a href="#Model">Model</a> class for requests that don't return JSON.<br> | 
 |  <br> | 
 | Serializes and de-serializes between JSON and the Python<br> | 
 | <a href="__builtin__.html#object">object</a> representation of HTTP request, and returns the raw bytes<br> | 
 | of the response body.<br> </tt></td></tr> | 
 | <tr><td> </td> | 
 | <td width="100%"><dl><dt>Method resolution order:</dt> | 
 | <dd><a href="apiclient.model.html#RawModel">RawModel</a></dd> | 
 | <dd><a href="apiclient.model.html#JsonModel">JsonModel</a></dd> | 
 | <dd><a href="apiclient.model.html#BaseModel">BaseModel</a></dd> | 
 | <dd><a href="apiclient.model.html#Model">Model</a></dd> | 
 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> | 
 | </dl> | 
 | <hr> | 
 | Methods defined here:<br> | 
 | <dl><dt><a name="RawModel-deserialize"><strong>deserialize</strong></a>(self, content)</dt></dl> | 
 |  | 
 | <hr> | 
 | Data descriptors defined here:<br> | 
 | <dl><dt><strong>no_content_response</strong></dt> | 
 | </dl> | 
 | <hr> | 
 | Data and other attributes defined here:<br> | 
 | <dl><dt><strong>accept</strong> = '*/*'</dl> | 
 |  | 
 | <dl><dt><strong>alt_param</strong> = None</dl> | 
 |  | 
 | <dl><dt><strong>content_type</strong> = 'application/json'</dl> | 
 |  | 
 | <hr> | 
 | Methods inherited from <a href="apiclient.model.html#JsonModel">JsonModel</a>:<br> | 
 | <dl><dt><a name="RawModel-__init__"><strong>__init__</strong></a>(self, data_wrapper<font color="#909090">=False</font>)</dt><dd><tt>Construct a <a href="#JsonModel">JsonModel</a>.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   data_wrapper: boolean, wrap requests and responses in a data wrapper</tt></dd></dl> | 
 |  | 
 | <dl><dt><a name="RawModel-serialize"><strong>serialize</strong></a>(self, body_value)</dt></dl> | 
 |  | 
 | <hr> | 
 | Methods inherited from <a href="apiclient.model.html#BaseModel">BaseModel</a>:<br> | 
 | <dl><dt><a name="RawModel-request"><strong>request</strong></a>(self, headers, path_params, query_params, body_value)</dt><dd><tt>Updates outgoing requests with a serialized body.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   headers: dict, request headers<br> | 
 |   path_params: dict, parameters that appear in the request path<br> | 
 |   query_params: dict, parameters that appear in the query<br> | 
 |   body_value: <a href="__builtin__.html#object">object</a>, the request body as a Python <a href="__builtin__.html#object">object</a>, which must be<br> | 
 |               serializable by simplejson.<br> | 
 | Returns:<br> | 
 |   A tuple of (headers, path_params, query, body)<br> | 
 |  <br> | 
 |   headers: dict, request headers<br> | 
 |   path_params: dict, parameters that appear in the request path<br> | 
 |   query: string, query part of the request URI<br> | 
 |   body: string, the body serialized as JSON</tt></dd></dl> | 
 |  | 
 | <dl><dt><a name="RawModel-response"><strong>response</strong></a>(self, resp, content)</dt><dd><tt>Convert the response wire format into a Python <a href="__builtin__.html#object">object</a>.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   resp: httplib2.Response, the HTTP response headers and status<br> | 
 |   content: string, the body of the HTTP response<br> | 
 |  <br> | 
 | Returns:<br> | 
 |   The body de-serialized as a Python <a href="__builtin__.html#object">object</a>.<br> | 
 |  <br> | 
 | Raises:<br> | 
 |   apiclient.errors.HttpError if a non 2xx response is received.</tt></dd></dl> | 
 |  | 
 | <hr> | 
 | Data descriptors inherited from <a href="apiclient.model.html#Model">Model</a>:<br> | 
 | <dl><dt><strong>__dict__</strong></dt> | 
 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> | 
 | </dl> | 
 | <dl><dt><strong>__weakref__</strong></dt> | 
 | <dd><tt>list of weak references to the object (if defined)</tt></dd> | 
 | </dl> | 
 | </td></tr></table></td></tr></table><p> | 
 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | 
 | <tr bgcolor="#eeaa77"> | 
 | <td colspan=3 valign=bottom> <br> | 
 | <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> | 
 |      | 
 | <tr><td bgcolor="#eeaa77"><tt>      </tt></td><td> </td> | 
 | <td width="100%"><dl><dt><a name="-makepatch"><strong>makepatch</strong></a>(original, modified)</dt><dd><tt>Create a patch <a href="__builtin__.html#object">object</a>.<br> | 
 |  <br> | 
 | Some methods support PATCH, an efficient way to send updates to a resource.<br> | 
 | This method allows the easy construction of patch bodies by looking at the<br> | 
 | differences between a resource before and after it was modified.<br> | 
 |  <br> | 
 | Args:<br> | 
 |   original: <a href="__builtin__.html#object">object</a>, the original deserialized resource<br> | 
 |   modified: <a href="__builtin__.html#object">object</a>, the modified deserialized resource<br> | 
 | Returns:<br> | 
 |   An <a href="__builtin__.html#object">object</a> that contains only the changes from original to modified, in a<br> | 
 |   form suitable to pass to a PATCH method.<br> | 
 |  <br> | 
 | Example usage:<br> | 
 |   item = service.activities().get(postid=postid, userid=userid).execute()<br> | 
 |   original = copy.deepcopy(item)<br> | 
 |   item['<a href="__builtin__.html#object">object</a>']['content'] = 'This is updated.'<br> | 
 |   service.activities.patch(postid=postid, userid=userid,<br> | 
 |     body=<a href="#-makepatch">makepatch</a>(original, item)).execute()</tt></dd></dl> | 
 | </td></tr></table><p> | 
 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | 
 | <tr bgcolor="#55aa55"> | 
 | <td colspan=3 valign=bottom> <br> | 
 | <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> | 
 |      | 
 | <tr><td bgcolor="#55aa55"><tt>      </tt></td><td> </td> | 
 | <td width="100%"><strong>FLAGS</strong> = <gflags.FlagValues instance><br> | 
 | <strong>__author__</strong> = 'jcgregorio@google.com (Joe Gregorio)'</td></tr></table><p> | 
 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | 
 | <tr bgcolor="#7799ee"> | 
 | <td colspan=3 valign=bottom> <br> | 
 | <font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr> | 
 |      | 
 | <tr><td bgcolor="#7799ee"><tt>      </tt></td><td> </td> | 
 | <td width="100%">jcgregorio@google.com (Joe Gregorio)</td></tr></table> | 
 | </body></html> |