def process_raw_data(cls, raw_data):
        """Create a new model using raw API response."""
        properties = raw_data.get("properties", {})

        raw_content = properties.get("ipSecConfiguration", None)
        if raw_content is not None:
            ip_sec = IPSecConfiguration.from_raw_data(raw_content)
            properties["ipSecConfiguration"] = ip_sec

        ip_addresses = []
        for raw_content in properties.get("ipAddresses", []):
            ip_addresses.append(IPAddress.from_raw_data(raw_content))
        properties["ipAddresses"] = ip_addresses

        routes = []
        for raw_content in properties.get("routes", []):
            routes.append(NetworkInterfaceRoute.from_raw_data(raw_content))
        properties["routes"] = routes

        raw_content = properties.get("statistics", None)
        if raw_content is not None:
            statistics = NetworkInterfaceStatistics.from_raw_data(
                raw_content)
            properties["statistics"] = statistics

        raw_content = properties.get("greConfiguration", None)
        if raw_content is not None:
            gre_configuration = GREConfiguration.from_raw_data(raw_content)
            properties["greConfiguration"] = gre_configuration

        raw_content = properties.get("l3Configuration", None)
        if raw_content is not None:
            l3_configuration = L3Configuration.from_raw_data(raw_content)
            properties["l3Configuration"] = l3_configuration

        raw_content = properties.get("gateway", None)
        if raw_content is not None:
            gateway = Resource.from_raw_data(raw_content)
            properties["gateway"] = gateway

        return super(NetworkConnections, cls).process_raw_data(raw_data)
def process_raw_data ( cls , raw_data ) : properties = raw_data . get ( "properties" , { } ) raw_content = properties . get ( "ipSecConfiguration" , None ) if raw_content is not None : ip_sec = IPSecConfiguration . from_raw_data ( raw_content ) properties [ "ipSecConfiguration" ] = ip_sec ip_addresses = [ ] for raw_content in properties . get ( "ipAddresses" , [ ] ) : ip_addresses . append ( IPAddress . from_raw_data ( raw_content ) ) properties [ "ipAddresses" ] = ip_addresses routes = [ ] for raw_content in properties . get ( "routes" , [ ] ) : routes . append ( NetworkInterfaceRoute . from_raw_data ( raw_content ) ) properties [ "routes" ] = routes raw_content = properties . get ( "statistics" , None ) if raw_content is not None : statistics = NetworkInterfaceStatistics . from_raw_data ( raw_content ) properties [ "statistics" ] = statistics raw_content = properties . get ( "greConfiguration" , None ) if raw_content is not None : gre_configuration = GREConfiguration . from_raw_data ( raw_content ) properties [ "greConfiguration" ] = gre_configuration raw_content = properties . get ( "l3Configuration" , None ) if raw_content is not None : l3_configuration = L3Configuration . from_raw_data ( raw_content ) properties [ "l3Configuration" ] = l3_configuration raw_content = properties . get ( "gateway" , None ) if raw_content is not None : gateway = Resource . from_raw_data ( raw_content ) properties [ "gateway" ] = gateway return super ( NetworkConnections , cls ) . process_raw_data ( raw_data )
Create a new model using raw API response.