Example #1
0
 def from_obj(hash_obj):
     if not hash_obj:
         return None
     hash_ = Hash()
     hash_.type_ = HashName.from_obj(hash_obj.get_Type())
     hash_.simple_hash_value = SimpleHashValue.from_obj(hash_obj.get_Simple_Hash_Value())
     return hash_
Example #2
0
 def from_dict(hash_dict):
     if not hash_dict:
         return None
     hash_ = Hash()
     hash_.type_ = HashName.from_dict(hash_dict.get('type'))
     hash_.simple_hash_value = SimpleHashValue.from_dict(
                                     hash_dict.get('simple_hash_value'))
     return hash_