3 """ Cloud Message base class implementation. Inherit to implement
4 service specific cloud message objects
9 for key, value
in kwargs.iteritems():
10 if hasattr(self.req, key):
11 setattr(self.req, key, value)
13 raise AttributeError(
''.join(self.__class__.__name__ +
14 ' object does not have a property named ' + str(key)))
25 """ Cloud request base class implementation. Inheric to implement
26 Cloud Message specific Request objects.
29 for key, value
in kwargs.iteritems():
30 if hasattr(self, key):
31 setattr(self, key, value)
33 raise AttributeError(
''.join(self.__class__.__name__ +
34 ' object does not have a property named ' + str(key)))
38 """! Equality method """
39 return self.
serialize() == other.serialize()
42 def set(self, key, val):
43 if hasattr(self, key):
44 setattr(self, key, val)
48 """! Abstract method. Return Payload Object.
50 @returns Payload - The Payload object
52 raise NotImplementedError()
56 """! Abstract methor. Return Array of File Objects.
58 @returns Array - Array of File Objects.
60 raise NotImplementedError()
64 """! Serialize CloudRequest object to dictionary.
66 @returns Dictionary - Serialized CloudRequest object.
68 return { k:v
for k,v
in vars(self).items()
if not k.startswith(
'_')
or callable(v) }
74 """ Cloud Response base class implementation. Inherit to implement
75 Cloud Object specific Response objects.
78 for key, val
in kwargs.iteritems():
79 if hasattr(self, key):
80 setattr(self, key, val)
82 raise AttributeError()
86 """! Equality method """
87 return self.
serialize() == other.serialize()
90 def set(self, key, val):
91 if hasattr(self, key):
92 setattr(self, key, val)
96 """! Serialize CloudResponse object to dictionary.
98 @returns Dictionary - Serialized CloudResponse object.
100 return { k:v
for k,v
in vars(self).items()
if not k.startswith(
'_')
or callable(v) }
def make_payload
Abstract method.
def __eq__
Equality method.
def serialize
Serialize CloudRequest object to dictionary.
def serialize
Serialize CloudResponse object to dictionary.
def make_files
Abstract methor.
def __eq__
Equality method.