def from_json(data: Mapping) -> 'Query':
        """Load a query from a JSON dictionary.

        :param data: A JSON dictionary
        :raises: QueryMissingNetworksError
        """
        network_ids = data.get('network_ids')
        if network_ids is None:
            raise QueryMissingNetworksError('query JSON did not have key "network_ids"')

        seeding_data = data.get('seeding')
        seeding = (
            Seeding.from_json(seeding_data)
            if seeding_data is not None else
            None
        )

        pipeline_data = data.get('pipeline')
        pipeline = (
            Pipeline.from_json(pipeline_data)
            if pipeline_data is not None else
            None
        )

        return Query(
            network_ids=network_ids,
            seeding=seeding,
            pipeline=pipeline,
        )
def from_json ( data : Mapping ) -> 'Query' : network_ids = data . get ( 'network_ids' ) if network_ids is None : raise QueryMissingNetworksError ( 'query JSON did not have key "network_ids"' ) seeding_data = data . get ( 'seeding' ) seeding = ( Seeding . from_json ( seeding_data ) if seeding_data is not None else None ) pipeline_data = data . get ( 'pipeline' ) pipeline = ( Pipeline . from_json ( pipeline_data ) if pipeline_data is not None else None ) return Query ( network_ids = network_ids , seeding = seeding , pipeline = pipeline , )
Load a query from a JSON dictionary.

        :param data: A JSON dictionary
        :raises: QueryMissingNetworksError