def parse_structure(data): data = parse_dictionary(data, ["ip_address", "port"]) ip_address = data.get("ip_address") ip_address = parse_structure_Text(ip_address) port = data.get("port") port = parse_structure_UnsignedIntegerType_32(port) return IPAddress(ip_address, port)
def parse_structure(data): data = parse_dictionary(data, ["file_server_ip", "legal_entity_id"]) file_server_ip = data.get("file_server_ip") file_server_ip = parse_structure_RecordType_protocol_IPAddress( file_server_ip) legal_entity_id = data.get("legal_entity_id") legal_entity_id = parse_structure_UnsignedIntegerType_32( legal_entity_id) return FileServer(file_server_ip, legal_entity_id)
def parse_structure(data): data = parse_dictionary(data, [ "company_id", "short_url", "company_server_ip", "is_group", "file_server_info" ]) company_id = data.get("company_id") company_id = parse_structure_UnsignedIntegerType_32(company_id) short_url = data.get("short_url") short_url = parse_structure_Text(short_url) company_server_ip = data.get("company_server_ip") company_server_ip = parse_structure_RecordType_protocol_IPAddress( company_server_ip) file_server_info = data.get("file_server_info") file_server_info = parse_structure_VectorType_RecordType_protocol_FileServer( file_server_info) is_group = data.get("is_group") is_group = parse_structure_Bool(is_group) return Server(company_id, short_url, company_server_ip, file_server_info, is_group)
def parse_structure(data): data = parse_dictionary(data, [ "company_id", "short_url", "db_username", "db_password", "db_name", "db_ip", "company_server_ip", "is_group" ]) company_id = data.get("company_id") company_id = parse_structure_UnsignedIntegerType_32(company_id) short_url = data.get("short_url") short_url = parse_structure_Text(short_url) db_username = data.get("db_username") db_username = parse_structure_Text(db_username) db_password = data.get("db_password") db_password = parse_structure_Text(db_password) db_name = data.get("db_name") db_name = parse_structure_Text(db_name) db_ip = data.get("db_ip") db_ip = parse_structure_RecordType_protocol_IPAddress(db_ip) company_server_ip = data.get("company_server_ip") company_server_ip = parse_structure_RecordType_protocol_IPAddress( company_server_ip) is_group = data.get("is_group") is_group = parse_structure_Bool(is_group) return Company(company_id, short_url, db_username, db_password, db_name, db_ip, company_server_ip, is_group)