class documentation
class ProtocolBufferModel(BaseModel):
Constructor: ProtocolBufferModel(protocol_buffer)
Model class for protocol buffers.
Serializes and de-serializes the binary protocol buffer sent in the HTTP request and response bodies.
| Method | __init__ |
Constructs a ProtocolBufferModel. |
| Method | deserialize |
Perform the actual deserialization from response string to Python object. |
| Method | serialize |
Perform the actual Python object serialization. |
| Instance Variable | accept |
Undocumented |
| Instance Variable | alt |
Undocumented |
| Instance Variable | content |
Undocumented |
| Property | no |
Undocumented |
| Instance Variable | _protocol |
Undocumented |
Inherited from BaseModel:
| Method | request |
Updates outgoing requests with a serialized body. |
| Method | response |
Convert the response wire format into a Python object. |
| Method | _build |
Builds a query string. |
| Method | _log |
Logs debugging information about the request if requested. |
| Method | _log |
Logs debugging information about the response if requested. |
Constructs a ProtocolBufferModel.
The serialized protocol buffer returned in an HTTP response will be de-serialized using the given protocol buffer class.
| Parameters | |
| protocol | The protocol buffer class used to de-serialize a |
| response from the | |
Perform the actual deserialization from response string to Python object.
| Parameters | |
| content | string, the body of the HTTP response |
| Returns | |
| The body de-serialized as a Python object. | |
Perform the actual Python object serialization.
| Parameters | |
| body | object, the request body as a Python object. |
| Returns | |
| string, the body in serialized form. | |