def from_obj(rsa_public_key_obj): if not rsa_public_key_obj: return None rsa_public_key_ = RSAPublicKey() rsa_public_key_.modulus = String.from_obj(rsa_public_key_obj.get_Modulus()) rsa_public_key_.exponent = Integer.from_obj(rsa_public_key_obj.get_Exponent()) return rsa_public_key_
def from_obj(dns_record_obj): if not dns_record_obj: return None dns_record_ = DNSRecord() dns_record_.description = StructuredText.from_obj(dns_record_obj.get_Description()) dns_record_.domain_name = URI.from_obj(dns_record_obj.get_Domain_Name()) dns_record_.ip_address = Address.from_obj(dns_record_obj.get_IP_Address()) dns_record_.address_class = String.from_obj(dns_record_obj.get_Address_Class()) dns_record_.entry_type = String.from_obj(dns_record_obj.get_Entry_Type()) dns_record_.record_name = String.from_obj(dns_record_obj.get_Record_Name()) dns_record_.record_type = String.from_obj(dns_record_obj.get_Record_Type()) dns_record_.ttl = Integer.from_obj(dns_record_obj.get_TTL()) dns_record_.flags = HexBinary.from_obj(dns_record_obj.get_Flags()) dns_record_.data_length = Integer.from_obj(dns_record_obj.get_Length()) dns_record_.record_data = dns_record_obj.get_Record_Data() return dns_record_
def from_obj(addr_object): if not addr_object: return None addr = Address() ObjectProperties.from_obj(addr_object, addr) addr.address_value = String.from_obj(addr_object.get_Address_Value()) addr.category = addr_object.get_category() addr.is_destination = addr_object.get_is_destination() addr.is_source = addr_object.get_is_source() addr.vlan_name = String.from_obj(addr_object.get_VLAN_Name()) addr.vlan_num = Integer.from_obj(addr_object.get_VLAN_Num()) return addr