class documentation

class ProtocolBufferModel(BaseModel):

Constructor: ProtocolBufferModel(protocol_buffer)

View In Hierarchy

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_param Undocumented
Instance Variable content_type Undocumented
Property no_content_response Undocumented
Instance Variable _protocol_buffer 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_query Builds a query string.
Method _log_request Logs debugging information about the request if requested.
Method _log_response Logs debugging information about the response if requested.
def __init__(self, protocol_buffer):

Constructs a ProtocolBufferModel.

The serialized protocol buffer returned in an HTTP response will be de-serialized using the given protocol buffer class.

Parameters
protocol_bufferThe protocol buffer class used to de-serialize a
response from the API.
def deserialize(self, content):

Perform the actual deserialization from response string to Python object.

Parameters
contentstring, the body of the HTTP response
Returns
The body de-serialized as a Python object.
def serialize(self, body_value):

Perform the actual Python object serialization.

Parameters
body_valueobject, the request body as a Python object.
Returns
string, the body in serialized form.
accept: str =
alt_param: str =
content_type: str =
@property
no_content_response =
_protocol_buffer =

Undocumented