"""
DO NOT EDIT THIS FILE!!
This file is automatically generated by the process_schemas.py program
in the scripts directory. It is not intended to be edited directly. If
you need to update the GA4GH protocol classes, please run the script
on the appropriate schema version.
"""
from protocol import ProtocolElement
from protocol import SearchRequest
from protocol import SearchResponse

import avro.schema

version = '0.5.1'


class BEACONRequest(ProtocolElement):
    """
No documentation
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name": "BEACONRequest",
"fields": [{"default": null, "doc": "", "type": ["null", "string"],
"name": "populationId"}, {"default": null, "doc": "", "type": ["null",
"string"], "name": "referenceVersion"}, {"default": null, "doc": "",
"type": ["null", "string"], "name": "chromosome"}, {"default": null,
"doc": "", "type": ["null", "long"], "name": "coordinate"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"allele"}]}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['allele', 'chromosome', 'coordinate', 'populationId',
                 'referenceVersion']

    def __init__(self):
        self.allele = None
        self.chromosome = None
        self.coordinate = None
        self.populationId = None
        self.referenceVersion = None


class BEACONResponse(ProtocolElement):
    """
No documentation
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name": "BEACONResponse",
"fields": [{"default": null, "doc": "", "type": ["null", "boolean"],
"name": "exists"}, {"default": null, "doc": "", "type": ["null",
"long"], "name": "frequency"}]}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['exists', 'frequency']

    def __init__(self):
        self.exists = None
        self.frequency = None


class GACall(ProtocolElement):
    """
A `GACall` represents the determination of genotype with respect to a
particular variant. It may include associated information such as quality
and phasing. For example, a call might assign a probability of 0.32 to
the occurrence of a SNP named rs1234 in a call set with the name NA12345.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name": "GACall",
"fields": [{"doc": "", "type": ["null", "string"], "name":
"callSetId"}, {"default": null, "doc": "", "type": ["null", "string"],
"name": "callSetName"}, {"default": [], "doc": "", "type": {"items":
"int", "type": "array"}, "name": "genotype"}, {"default": null, "doc":
"", "type": ["null", "string"], "name": "phaseset"}, {"default": [],
"doc": "", "type": {"items": "double", "type": "array"}, "name":
"genotypeLikelihood"}, {"default": {}, "doc": "", "type": {"values":
{"items": "string", "type": "array"}, "type": "map"}, "name":
"info"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set(["callSetId"])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['callSetId', 'callSetName', 'genotype', 'genotypeLikelihood',
                 'info', 'phaseset']

    def __init__(self):
        self.callSetId = None
        self.callSetName = None
        self.genotype = []
        self.genotypeLikelihood = []
        self.info = {}
        self.phaseset = None


class GACallSet(ProtocolElement):
    """
A `GACallSet` is a collection of variant calls for a particular sample.
It belongs to a `GAVariantSet`. This is equivalent to one column in VCF.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name": "GACallSet",
"fields": [{"doc": "", "type": "string", "name": "id"}, {"default":
null, "doc": "", "type": ["null", "string"], "name": "name"}, {"doc":
"", "type": ["null", "string"], "name": "sampleId"}, {"default": [],
"doc": "", "type": {"items": "string", "type": "array"}, "name":
"variantSetIds"}, {"default": null, "doc": "", "type": ["null",
"long"], "name": "created"}, {"default": null, "doc": "", "type":
["null", "long"], "name": "updated"}, {"default": {}, "doc": "",
"type": {"values": {"items": "string", "type": "array"}, "type":
"map"}, "name": "info"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([
        "id",
        "sampleId",
    ])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['created', 'id', 'info', 'name', 'sampleId', 'updated',
                 'variantSetIds']

    def __init__(self):
        self.created = None
        self.id = None
        self.info = {}
        self.name = None
        self.sampleId = None
        self.updated = None
        self.variantSetIds = []


class GACigarOperation(object):
    """
An enum for the different types of CIGAR alignment operations that exist.
Used wherever CIGAR alignments are used. The different enumerated values
have the following usage:

* `ALIGNMENT_MATCH`: An alignment match indicates that a sequence can be
  aligned to the reference without evidence of an INDEL. Unlike the
  `SEQUENCE_MATCH` and `SEQUENCE_MISMATCH` operators, the `ALIGNMENT_MATCH`
  operator does not indicate whether the reference and read sequences are an
  exact match. This operator is equivalent to SAM's `M`.
* `INSERT`: The insert operator indicates that the read contains evidence of
  bases being inserted into the reference. This operator is equivalent to
  SAM's `I`.
* `DELETE`: The delete operator indicates that the read contains evidence of
  bases being deleted from the reference. This operator is equivalent to
  SAM's `D`.
* `SKIP`: The skip operator indicates that this read skips a long segment of
  the reference, but the bases have not been deleted. This operator is
  commonly used when working with RNA-seq data, where reads may skip long
  segments of the reference between exons. This operator is equivalent to
  SAM's 'N'.
* `CLIP_SOFT`: The soft clip operator indicates that bases at the start/end
  of a read have not been considered during alignment. This may occur if the
  majority of a read maps, except for low quality bases at the start/end of
  a read. This operator is equivalent to SAM's 'S'. Bases that are soft clipped
  will still be stored in the read.
* `CLIP_HARD`: The hard clip operator indicates that bases at the start/end of
  a read have been omitted from this alignment. This may occur if this linear
  alignment is part of a chimeric alignment, or if the read has been trimmed
  (e.g., during error correction, or to trim poly-A tails for RNA-seq). This
  operator is equivalent to SAM's 'H'.
* `PAD`: The pad operator indicates that there is padding in an alignment.
  This operator is equivalent to SAM's 'P'.
* `SEQUENCE_MATCH`: This operator indicates that this portion of the aligned
  sequence exactly matches the reference (e.g., all bases are equal to the
  reference bases). This operator is equivalent to SAM's '='.
* `SEQUENCE_MISMATCH`: This operator indicates that this portion of the
  aligned sequence is an alignment match to the reference, but a sequence
  mismatch (e.g., the bases are not equal to the reference). This can
  indicate a SNP or a read error. This operator is equivalent to SAM's 'X'.
    """
    ALIGNMENT_MATCH = "ALIGNMENT_MATCH"
    INSERT = "INSERT"
    DELETE = "DELETE"
    SKIP = "SKIP"
    CLIP_SOFT = "CLIP_SOFT"
    CLIP_HARD = "CLIP_HARD"
    PAD = "PAD"
    SEQUENCE_MATCH = "SEQUENCE_MATCH"
    SEQUENCE_MISMATCH = "SEQUENCE_MISMATCH"


class GACigarUnit(ProtocolElement):
    """
A structure for an instance of a CIGAR operation.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name": "GACigarUnit",
"fields": [{"doc": "", "type": {"symbols": ["ALIGNMENT_MATCH",
"INSERT", "DELETE", "SKIP", "CLIP_SOFT", "CLIP_HARD", "PAD",
"SEQUENCE_MATCH", "SEQUENCE_MISMATCH"], "doc": "", "type": "enum",
"name": "GACigarOperation"}, "name": "operation"}, {"doc": "", "type":
"long", "name": "operationLength"}, {"default": null, "doc": "",
"type": ["null", "string"], "name": "referenceSequence"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([
        "operation",
        "operationLength",
    ])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['operation', 'operationLength', 'referenceSequence']

    def __init__(self):
        self.operation = None
        self.operationLength = None
        self.referenceSequence = None


class GADataset(ProtocolElement):
    """
No documentation
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name": "GADataset",
"fields": [{"doc": "", "type": "string", "name": "id"}, {"default":
null, "doc": "", "type": ["null", "string"], "name": "description"}]}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set(["id"])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['description', 'id']

    def __init__(self):
        self.description = None
        self.id = None


class GAException(ProtocolElement):
    """
A general exception type.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "error", "name": "GAException",
"fields": [{"doc": "", "type": "string", "name": "message"},
{"default": -1, "doc": "", "type": "int", "name": "errorCode"}],
"doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set(["message"])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['errorCode', 'message']

    def __init__(self):
        self.errorCode = -1
        self.message = None


class GAExperiment(ProtocolElement):
    """
No documentation
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name": "GAExperiment",
"fields": [{"default": null, "doc": "", "type": ["null", "string"],
"name": "libraryId"}, {"default": null, "doc": "", "type": ["null",
"string"], "name": "platformUnit"}, {"doc": "", "type": ["null",
"string"], "name": "sequencingCenter"}, {"doc": "", "type": ["null",
"string"], "name": "instrumentModel"}]}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([
        "instrumentModel",
        "sequencingCenter",
    ])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['instrumentModel', 'libraryId', 'platformUnit',
                 'sequencingCenter']

    def __init__(self):
        self.instrumentModel = None
        self.libraryId = None
        self.platformUnit = None
        self.sequencingCenter = None


class GALinearAlignment(ProtocolElement):
    """
A linear alignment can be represented by one CIGAR string.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GALinearAlignment", "fields": [{"doc": "", "type": {"doc": "",
"type": "record", "name": "GAPosition", "fields": [{"doc": "", "type":
"string", "name": "referenceName"}, {"doc": "", "type": "long",
"name": "position"}, {"doc": "", "type": "boolean", "name":
"reverseStrand"}]}, "name": "position"}, {"default": null, "doc": "",
"type": ["null", "int"], "name": "mappingQuality"}, {"default": [],
"doc": "", "type": {"items": {"doc": "", "type": "record", "name":
"GACigarUnit", "fields": [{"doc": "", "type": {"symbols":
["ALIGNMENT_MATCH", "INSERT", "DELETE", "SKIP", "CLIP_SOFT",
"CLIP_HARD", "PAD", "SEQUENCE_MATCH", "SEQUENCE_MISMATCH"], "doc": "",
"type": "enum", "name": "GACigarOperation"}, "name": "operation"},
{"doc": "", "type": "long", "name": "operationLength"}, {"default":
null, "doc": "", "type": ["null", "string"], "name":
"referenceSequence"}]}, "type": "array"}, "name": "cigar"}], "doc":
""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set(["position"])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'cigar': GACigarUnit,
            'position': GAPosition,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'cigar': GACigarUnit,
            'position': GAPosition,
        }
        return embeddedTypes[fieldName]

    __slots__ = ['cigar', 'mappingQuality', 'position']

    def __init__(self):
        self.cigar = []
        self.mappingQuality = None
        self.position = None


class GAListReferenceBasesRequest(ProtocolElement):
    """
The query parameters for a request to `GET /references/{id}/bases`, for
example:

`GET /references/{id}/bases?start=100&end=200`
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GAListReferenceBasesRequest", "fields": [{"default": 0, "doc": "",
"type": "long", "name": "start"}, {"default": null, "doc": "", "type":
["null", "long"], "name": "end"}, {"default": null, "doc": "", "type":
["null", "string"], "name": "pageToken"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['end', 'pageToken', 'start']

    def __init__(self):
        self.end = None
        self.pageToken = None
        self.start = 0


class GAListReferenceBasesResponse(ProtocolElement):
    """
The response from `GET /references/{id}/bases` expressed as JSON.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GAListReferenceBasesResponse", "fields": [{"default": 0, "doc": "",
"type": "long", "name": "offset"}, {"doc": "", "type": "string",
"name": "sequence"}, {"default": null, "doc": "", "type": ["null",
"string"], "name": "nextPageToken"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set(["sequence"])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['nextPageToken', 'offset', 'sequence']

    def __init__(self):
        self.nextPageToken = None
        self.offset = 0
        self.sequence = None


class GAPosition(ProtocolElement):
    """
An abstraction for referring to a genomic position, in relation to some
already known reference. For now, represents a genomic position as a reference
name, a base number on that reference (0-based), and a flag to say if it's the
forward or reverse strand that we're talking about.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name": "GAPosition",
"fields": [{"doc": "", "type": "string", "name": "referenceName"},
{"doc": "", "type": "long", "name": "position"}, {"doc": "", "type":
"boolean", "name": "reverseStrand"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([
        "position",
        "referenceName",
        "reverseStrand",
    ])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['position', 'referenceName', 'reverseStrand']

    def __init__(self):
        self.position = None
        self.referenceName = None
        self.reverseStrand = None


class GAProgram(ProtocolElement):
    """
No documentation
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name": "GAProgram",
"fields": [{"default": null, "doc": "", "type": ["null", "string"],
"name": "commandLine"}, {"default": null, "doc": "", "type": ["null",
"string"], "name": "id"}, {"default": null, "doc": "", "type":
["null", "string"], "name": "name"}, {"default": null, "doc": "",
"type": ["null", "string"], "name": "prevProgramId"}, {"default":
null, "doc": "", "type": ["null", "string"], "name": "version"}]}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['commandLine', 'id', 'name', 'prevProgramId', 'version']

    def __init__(self):
        self.commandLine = None
        self.id = None
        self.name = None
        self.prevProgramId = None
        self.version = None


class GAReadAlignment(ProtocolElement):
    """
Each read alignment describes a linear alignment with additional information
about the fragment and the read. A read alignment object is equivalent to a
line in a SAM file.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GAReadAlignment", "fields": [{"doc": "", "type": ["null", "string"],
"name": "id"}, {"doc": "", "type": "string", "name": "readGroupId"},
{"doc": "", "type": "string", "name": "fragmentName"}, {"default":
false, "doc": "", "type": ["null", "boolean"], "name":
"properPlacement"}, {"default": false, "doc": "", "type": ["null",
"boolean"], "name": "duplicateFragment"}, {"default": null, "doc": "",
"type": ["null", "int"], "name": "numberReads"}, {"default": null,
"doc": "", "type": ["null", "int"], "name": "fragmentLength"},
{"default": null, "doc": "", "type": ["null", "int"], "name":
"readNumber"}, {"default": false, "doc": "", "type": ["null",
"boolean"], "name": "failedVendorQualityChecks"}, {"default": null,
"doc": "", "type": ["null", {"doc": "", "type": "record", "name":
"GALinearAlignment", "fields": [{"doc": "", "type": {"doc": "",
"type": "record", "name": "GAPosition", "fields": [{"doc": "", "type":
"string", "name": "referenceName"}, {"doc": "", "type": "long",
"name": "position"}, {"doc": "", "type": "boolean", "name":
"reverseStrand"}]}, "name": "position"}, {"default": null, "doc": "",
"type": ["null", "int"], "name": "mappingQuality"}, {"default": [],
"doc": "", "type": {"items": {"doc": "", "type": "record", "name":
"GACigarUnit", "fields": [{"doc": "", "type": {"symbols":
["ALIGNMENT_MATCH", "INSERT", "DELETE", "SKIP", "CLIP_SOFT",
"CLIP_HARD", "PAD", "SEQUENCE_MATCH", "SEQUENCE_MISMATCH"], "doc": "",
"type": "enum", "name": "GACigarOperation"}, "name": "operation"},
{"doc": "", "type": "long", "name": "operationLength"}, {"default":
null, "doc": "", "type": ["null", "string"], "name":
"referenceSequence"}]}, "type": "array"}, "name": "cigar"}]}], "name":
"alignment"}, {"default": false, "doc": "", "type": ["null",
"boolean"], "name": "secondaryAlignment"}, {"default": false, "doc":
"", "type": ["null", "boolean"], "name": "supplementaryAlignment"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"alignedSequence"}, {"default": [], "doc": "", "type": {"items":
"int", "type": "array"}, "name": "alignedQuality"}, {"default": null,
"doc": "", "type": ["null", "GAPosition"], "name":
"nextMatePosition"}, {"default": {}, "doc": "", "type": {"values":
{"items": "string", "type": "array"}, "type": "map"}, "name":
"info"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([
        "fragmentName",
        "id",
        "readGroupId",
    ])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'alignment': GALinearAlignment,
            'nextMatePosition': GAPosition,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'alignment': GALinearAlignment,
            'nextMatePosition': GAPosition,
        }
        return embeddedTypes[fieldName]

    __slots__ = ['alignedQuality', 'alignedSequence', 'alignment',
                 'duplicateFragment',
                 'failedVendorQualityChecks',
                 'fragmentLength', 'fragmentName', 'id',
                 'info', 'nextMatePosition', 'numberReads',
                 'properPlacement', 'readGroupId',
                 'readNumber', 'secondaryAlignment',
                 'supplementaryAlignment']

    def __init__(self):
        self.alignedQuality = []
        self.alignedSequence = None
        self.alignment = None
        self.duplicateFragment = False
        self.failedVendorQualityChecks = False
        self.fragmentLength = None
        self.fragmentName = None
        self.id = None
        self.info = {}
        self.nextMatePosition = None
        self.numberReads = None
        self.properPlacement = False
        self.readGroupId = None
        self.readNumber = None
        self.secondaryAlignment = False
        self.supplementaryAlignment = False


class GAReadGroup(ProtocolElement):
    """
No documentation
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name": "GAReadGroup",
"fields": [{"doc": "", "type": "string", "name": "id"}, {"default":
null, "doc": "", "type": ["null", "string"], "name": "datasetId"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"name"}, {"default": null, "doc": "", "type": ["null", "string"],
"name": "description"}, {"doc": "", "type": ["null", "string"],
"name": "sampleId"}, {"doc": "", "type": ["null", {"fields":
[{"default": null, "doc": "", "type": ["null", "string"], "name":
"libraryId"}, {"default": null, "doc": "", "type": ["null", "string"],
"name": "platformUnit"}, {"doc": "", "type": ["null", "string"],
"name": "sequencingCenter"}, {"doc": "", "type": ["null", "string"],
"name": "instrumentModel"}], "type": "record", "name":
"GAExperiment"}], "name": "experiment"}, {"default": null, "doc": "",
"type": ["null", "int"], "name": "predictedInsertSize"}, {"default":
null, "doc": "", "type": ["null", "long"], "name": "created"},
{"default": null, "doc": "", "type": ["null", "long"], "name":
"updated"}, {"default": [], "doc": "", "type": {"items": {"fields":
[{"default": null, "doc": "", "type": ["null", "string"], "name":
"commandLine"}, {"default": null, "doc": "", "type": ["null",
"string"], "name": "id"}, {"default": null, "doc": "", "type":
["null", "string"], "name": "name"}, {"default": null, "doc": "",
"type": ["null", "string"], "name": "prevProgramId"}, {"default":
null, "doc": "", "type": ["null", "string"], "name": "version"}],
"type": "record", "name": "GAProgram"}, "type": "array"}, "name":
"programs"}, {"default": null, "doc": "", "type": ["null", "string"],
"name": "referenceSetId"}, {"default": {}, "doc": "", "type":
{"values": {"items": "string", "type": "array"}, "type": "map"},
"name": "info"}]}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([
        "experiment",
        "id",
        "sampleId",
    ])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'experiment': GAExperiment,
            'programs': GAProgram,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'experiment': GAExperiment,
            'programs': GAProgram,
        }
        return embeddedTypes[fieldName]

    __slots__ = ['created', 'datasetId', 'description', 'experiment', 'id',
                 'info', 'name', 'predictedInsertSize',
                 'programs', 'referenceSetId', 'sampleId',
                 'updated']

    def __init__(self):
        self.created = None
        self.datasetId = None
        self.description = None
        self.experiment = None
        self.id = None
        self.info = {}
        self.name = None
        self.predictedInsertSize = None
        self.programs = []
        self.referenceSetId = None
        self.sampleId = None
        self.updated = None


class GAReadGroupSet(ProtocolElement):
    """
No documentation
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name": "GAReadGroupSet",
"fields": [{"doc": "", "type": "string", "name": "id"}, {"default":
null, "doc": "", "type": ["null", "string"], "name": "datasetId"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"name"}, {"default": [], "doc": "", "type": {"items": {"fields":
[{"doc": "", "type": "string", "name": "id"}, {"default": null, "doc":
"", "type": ["null", "string"], "name": "datasetId"}, {"default":
null, "doc": "", "type": ["null", "string"], "name": "name"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"description"}, {"doc": "", "type": ["null", "string"], "name":
"sampleId"}, {"doc": "", "type": ["null", {"fields": [{"default":
null, "doc": "", "type": ["null", "string"], "name": "libraryId"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"platformUnit"}, {"doc": "", "type": ["null", "string"], "name":
"sequencingCenter"}, {"doc": "", "type": ["null", "string"], "name":
"instrumentModel"}], "type": "record", "name": "GAExperiment"}],
"name": "experiment"}, {"default": null, "doc": "", "type": ["null",
"int"], "name": "predictedInsertSize"}, {"default": null, "doc": "",
"type": ["null", "long"], "name": "created"}, {"default": null, "doc":
"", "type": ["null", "long"], "name": "updated"}, {"default": [],
"doc": "", "type": {"items": {"fields": [{"default": null, "doc": "",
"type": ["null", "string"], "name": "commandLine"}, {"default": null,
"doc": "", "type": ["null", "string"], "name": "id"}, {"default":
null, "doc": "", "type": ["null", "string"], "name": "name"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"prevProgramId"}, {"default": null, "doc": "", "type": ["null",
"string"], "name": "version"}], "type": "record", "name":
"GAProgram"}, "type": "array"}, "name": "programs"}, {"default": null,
"doc": "", "type": ["null", "string"], "name": "referenceSetId"},
{"default": {}, "doc": "", "type": {"values": {"items": "string",
"type": "array"}, "type": "map"}, "name": "info"}], "type": "record",
"name": "GAReadGroup"}, "type": "array"}, "name": "readGroups"}]}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set(["id"])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'readGroups': GAReadGroup,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'readGroups': GAReadGroup,
        }
        return embeddedTypes[fieldName]

    __slots__ = ['datasetId', 'id', 'name', 'readGroups']

    def __init__(self):
        self.datasetId = None
        self.id = None
        self.name = None
        self.readGroups = []


class GAReference(ProtocolElement):
    """
A `GAReference` is a canonical assembled contig, intended to act as a
reference coordinate space for other genomic annotations. A single
`GAReference` might represent the human chromosome 1, for instance.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name": "GAReference",
"fields": [{"doc": "", "type": "string", "name": "id"}, {"doc": "",
"type": "long", "name": "length"}, {"doc": "", "type": "string",
"name": "md5checksum"}, {"doc": "", "type": "string", "name": "name"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"sourceURI"}, {"doc": "", "type": {"items": "string", "type":
"array"}, "name": "sourceAccessions"}, {"default": false, "doc": "",
"type": "boolean", "name": "isDerived"}, {"default": null, "doc": "",
"type": ["null", "float"], "name": "sourceDivergence"}, {"default":
null, "doc": "", "type": ["null", "int"], "name": "ncbiTaxonId"}],
"doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([
        "id",
        "length",
        "md5checksum",
        "name",
        "sourceAccessions",
    ])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['id', 'isDerived', 'length', 'md5checksum', 'name',
                 'ncbiTaxonId', 'sourceAccessions',
                 'sourceDivergence', 'sourceURI']

    def __init__(self):
        self.id = None
        self.isDerived = False
        self.length = None
        self.md5checksum = None
        self.name = None
        self.ncbiTaxonId = None
        self.sourceAccessions = None
        self.sourceDivergence = None
        self.sourceURI = None


class GAReferenceSet(ProtocolElement):
    """
A `GAReferenceSet` is a set of `GAReference`s which typically comprise a
reference assembly, such as `GRCh38`. A `GAReferenceSet` defines a common
coordinate space for comparing reference-aligned experimental data.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name": "GAReferenceSet",
"fields": [{"doc": "", "type": "string", "name": "id"}, {"default":
[], "doc": "", "type": {"items": "string", "type": "array"}, "name":
"referenceIds"}, {"doc": "", "type": "string", "name": "md5checksum"},
{"default": null, "doc": "", "type": ["null", "int"], "name":
"ncbiTaxonId"}, {"default": null, "doc": "", "type": ["null",
"string"], "name": "description"}, {"default": null, "doc": "",
"type": ["null", "string"], "name": "assemblyId"}, {"default": null,
"doc": "", "type": ["null", "string"], "name": "sourceURI"}, {"doc":
"", "type": {"items": "string", "type": "array"}, "name":
"sourceAccessions"}, {"default": false, "doc": "", "type": "boolean",
"name": "isDerived"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([
        "id",
        "md5checksum",
        "sourceAccessions",
    ])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['assemblyId', 'description', 'id', 'isDerived', 'md5checksum',
                 'ncbiTaxonId', 'referenceIds',
                 'sourceAccessions', 'sourceURI']

    def __init__(self):
        self.assemblyId = None
        self.description = None
        self.id = None
        self.isDerived = False
        self.md5checksum = None
        self.ncbiTaxonId = None
        self.referenceIds = []
        self.sourceAccessions = None
        self.sourceURI = None


class GASearchCallSetsRequest(SearchRequest):
    """
This request maps to the body of `POST /callsets/search` as JSON.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GASearchCallSetsRequest", "fields": [{"default": [], "doc": "",
"type": {"items": "string", "type": "array"}, "name":
"variantSetIds"}, {"default": null, "doc": "", "type": ["null",
"string"], "name": "name"}, {"default": null, "doc": "", "type":
["null", "int"], "name": "pageSize"}, {"default": null, "doc": "",
"type": ["null", "string"], "name": "pageToken"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['name', 'pageSize', 'pageToken', 'variantSetIds']

    def __init__(self):
        self.name = None
        self.pageSize = None
        self.pageToken = None
        self.variantSetIds = []


class GASearchCallSetsResponse(SearchResponse):
    """
This is the response from `POST /callsets/search` expressed as JSON.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GASearchCallSetsResponse", "fields": [{"default": [], "doc": "",
"type": {"items": {"doc": "", "type": "record", "name": "GACallSet",
"fields": [{"doc": "", "type": "string", "name": "id"}, {"default":
null, "doc": "", "type": ["null", "string"], "name": "name"}, {"doc":
"", "type": ["null", "string"], "name": "sampleId"}, {"default": [],
"doc": "", "type": {"items": "string", "type": "array"}, "name":
"variantSetIds"}, {"default": null, "doc": "", "type": ["null",
"long"], "name": "created"}, {"default": null, "doc": "", "type":
["null", "long"], "name": "updated"}, {"default": {}, "doc": "",
"type": {"values": {"items": "string", "type": "array"}, "type":
"map"}, "name": "info"}]}, "type": "array"}, "name": "callSets"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"nextPageToken"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])
    _valueListName = "callSets"

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'callSets': GACallSet,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'callSets': GACallSet,
        }
        return embeddedTypes[fieldName]

    __slots__ = ['callSets', 'nextPageToken']

    def __init__(self):
        self.callSets = []
        self.nextPageToken = None


class GASearchReadGroupSetsRequest(SearchRequest):
    """
This request maps to the body of `POST /readgroupsets/search` as JSON.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GASearchReadGroupSetsRequest", "fields": [{"default": [], "doc": "",
"type": {"items": "string", "type": "array"}, "name": "datasetIds"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"name"}, {"default": null, "doc": "", "type": ["null", "int"], "name":
"pageSize"}, {"default": null, "doc": "", "type": ["null", "string"],
"name": "pageToken"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['datasetIds', 'name', 'pageSize', 'pageToken']

    def __init__(self):
        self.datasetIds = []
        self.name = None
        self.pageSize = None
        self.pageToken = None


class GASearchReadGroupSetsResponse(SearchResponse):
    """
This is the response from `POST /readgroupsets/search` expressed as JSON.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GASearchReadGroupSetsResponse", "fields": [{"default": [], "doc": "",
"type": {"items": {"fields": [{"doc": "", "type": "string", "name":
"id"}, {"default": null, "doc": "", "type": ["null", "string"],
"name": "datasetId"}, {"default": null, "doc": "", "type": ["null",
"string"], "name": "name"}, {"default": [], "doc": "", "type":
{"items": {"fields": [{"doc": "", "type": "string", "name": "id"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"datasetId"}, {"default": null, "doc": "", "type": ["null", "string"],
"name": "name"}, {"default": null, "doc": "", "type": ["null",
"string"], "name": "description"}, {"doc": "", "type": ["null",
"string"], "name": "sampleId"}, {"doc": "", "type": ["null",
{"fields": [{"default": null, "doc": "", "type": ["null", "string"],
"name": "libraryId"}, {"default": null, "doc": "", "type": ["null",
"string"], "name": "platformUnit"}, {"doc": "", "type": ["null",
"string"], "name": "sequencingCenter"}, {"doc": "", "type": ["null",
"string"], "name": "instrumentModel"}], "type": "record", "name":
"GAExperiment"}], "name": "experiment"}, {"default": null, "doc": "",
"type": ["null", "int"], "name": "predictedInsertSize"}, {"default":
null, "doc": "", "type": ["null", "long"], "name": "created"},
{"default": null, "doc": "", "type": ["null", "long"], "name":
"updated"}, {"default": [], "doc": "", "type": {"items": {"fields":
[{"default": null, "doc": "", "type": ["null", "string"], "name":
"commandLine"}, {"default": null, "doc": "", "type": ["null",
"string"], "name": "id"}, {"default": null, "doc": "", "type":
["null", "string"], "name": "name"}, {"default": null, "doc": "",
"type": ["null", "string"], "name": "prevProgramId"}, {"default":
null, "doc": "", "type": ["null", "string"], "name": "version"}],
"type": "record", "name": "GAProgram"}, "type": "array"}, "name":
"programs"}, {"default": null, "doc": "", "type": ["null", "string"],
"name": "referenceSetId"}, {"default": {}, "doc": "", "type":
{"values": {"items": "string", "type": "array"}, "type": "map"},
"name": "info"}], "type": "record", "name": "GAReadGroup"}, "type":
"array"}, "name": "readGroups"}], "type": "record", "name":
"GAReadGroupSet"}, "type": "array"}, "name": "readGroupSets"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"nextPageToken"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])
    _valueListName = "readGroupSets"

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'readGroupSets': GAReadGroupSet,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'readGroupSets': GAReadGroupSet,
        }
        return embeddedTypes[fieldName]

    __slots__ = ['nextPageToken', 'readGroupSets']

    def __init__(self):
        self.nextPageToken = None
        self.readGroupSets = []


class GASearchReadsRequest(SearchRequest):
    """
This request maps to the body of `POST /reads/search` as JSON.

If a reference is specified, all queried `GAReadGroup`s must be aligned
to `GAReferenceSet`s containing that same `GAReference`. If no reference is
specified, all `GAReadGroup`s must be aligned to the same `GAReferenceSet`.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GASearchReadsRequest", "fields": [{"default": [], "doc": "", "type":
{"items": "string", "type": "array"}, "name": "readGroupIds"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"referenceName"}, {"default": null, "doc": "", "type": ["null",
"string"], "name": "referenceId"}, {"default": 0, "doc": "", "type":
["null", "long"], "name": "start"}, {"default": null, "doc": "",
"type": ["null", "long"], "name": "end"}, {"default": null, "doc": "",
"type": ["null", "int"], "name": "pageSize"}, {"default": null, "doc":
"", "type": ["null", "string"], "name": "pageToken"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['end', 'pageSize', 'pageToken', 'readGroupIds', 'referenceId',
                 'referenceName', 'start']

    def __init__(self):
        self.end = None
        self.pageSize = None
        self.pageToken = None
        self.readGroupIds = []
        self.referenceId = None
        self.referenceName = None
        self.start = 0


class GASearchReadsResponse(SearchResponse):
    """
This is the response from `POST /reads/search` expressed as JSON.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GASearchReadsResponse", "fields": [{"default": [], "doc": "", "type":
{"items": {"doc": "", "type": "record", "name": "GAReadAlignment",
"fields": [{"doc": "", "type": ["null", "string"], "name": "id"},
{"doc": "", "type": "string", "name": "readGroupId"}, {"doc": "",
"type": "string", "name": "fragmentName"}, {"default": false, "doc":
"", "type": ["null", "boolean"], "name": "properPlacement"},
{"default": false, "doc": "", "type": ["null", "boolean"], "name":
"duplicateFragment"}, {"default": null, "doc": "", "type": ["null",
"int"], "name": "numberReads"}, {"default": null, "doc": "", "type":
["null", "int"], "name": "fragmentLength"}, {"default": null, "doc":
"", "type": ["null", "int"], "name": "readNumber"}, {"default": false,
"doc": "", "type": ["null", "boolean"], "name":
"failedVendorQualityChecks"}, {"default": null, "doc": "", "type":
["null", {"doc": "", "type": "record", "name": "GALinearAlignment",
"fields": [{"doc": "", "type": {"doc": "", "type": "record", "name":
"GAPosition", "fields": [{"doc": "", "type": "string", "name":
"referenceName"}, {"doc": "", "type": "long", "name": "position"},
{"doc": "", "type": "boolean", "name": "reverseStrand"}]}, "name":
"position"}, {"default": null, "doc": "", "type": ["null", "int"],
"name": "mappingQuality"}, {"default": [], "doc": "", "type":
{"items": {"doc": "", "type": "record", "name": "GACigarUnit",
"fields": [{"doc": "", "type": {"symbols": ["ALIGNMENT_MATCH",
"INSERT", "DELETE", "SKIP", "CLIP_SOFT", "CLIP_HARD", "PAD",
"SEQUENCE_MATCH", "SEQUENCE_MISMATCH"], "doc": "", "type": "enum",
"name": "GACigarOperation"}, "name": "operation"}, {"doc": "", "type":
"long", "name": "operationLength"}, {"default": null, "doc": "",
"type": ["null", "string"], "name": "referenceSequence"}]}, "type":
"array"}, "name": "cigar"}]}], "name": "alignment"}, {"default":
false, "doc": "", "type": ["null", "boolean"], "name":
"secondaryAlignment"}, {"default": false, "doc": "", "type": ["null",
"boolean"], "name": "supplementaryAlignment"}, {"default": null,
"doc": "", "type": ["null", "string"], "name": "alignedSequence"},
{"default": [], "doc": "", "type": {"items": "int", "type": "array"},
"name": "alignedQuality"}, {"default": null, "doc": "", "type":
["null", "GAPosition"], "name": "nextMatePosition"}, {"default": {},
"doc": "", "type": {"values": {"items": "string", "type": "array"},
"type": "map"}, "name": "info"}]}, "type": "array"}, "name":
"alignments"}, {"default": null, "doc": "", "type": ["null",
"string"], "name": "nextPageToken"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])
    _valueListName = "alignments"

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'alignments': GAReadAlignment,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'alignments': GAReadAlignment,
        }
        return embeddedTypes[fieldName]

    __slots__ = ['alignments', 'nextPageToken']

    def __init__(self):
        self.alignments = []
        self.nextPageToken = None


class GASearchReferenceSetsRequest(SearchRequest):
    """
This request maps to the body of `POST /referencesets/search`
as JSON.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GASearchReferenceSetsRequest", "fields": [{"default": [], "doc": "",
"type": {"items": "string", "type": "array"}, "name": "md5checksums"},
{"default": [], "doc": "", "type": {"items": "string", "type":
"array"}, "name": "accessions"}, {"default": null, "doc": "", "type":
["null", "string"], "name": "assemblyId"}, {"default": null, "doc":
"", "type": ["null", "int"], "name": "pageSize"}, {"default": null,
"doc": "", "type": ["null", "string"], "name": "pageToken"}], "doc":
""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['accessions', 'assemblyId', 'md5checksums', 'pageSize',
                 'pageToken']

    def __init__(self):
        self.accessions = []
        self.assemblyId = None
        self.md5checksums = []
        self.pageSize = None
        self.pageToken = None


class GASearchReferenceSetsResponse(SearchResponse):
    """
This is the response from `POST /referencesets/search`
expressed as JSON.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GASearchReferenceSetsResponse", "fields": [{"default": [], "doc": "",
"type": {"items": {"doc": "", "type": "record", "name":
"GAReferenceSet", "fields": [{"doc": "", "type": "string", "name":
"id"}, {"default": [], "doc": "", "type": {"items": "string", "type":
"array"}, "name": "referenceIds"}, {"doc": "", "type": "string",
"name": "md5checksum"}, {"default": null, "doc": "", "type": ["null",
"int"], "name": "ncbiTaxonId"}, {"default": null, "doc": "", "type":
["null", "string"], "name": "description"}, {"default": null, "doc":
"", "type": ["null", "string"], "name": "assemblyId"}, {"default":
null, "doc": "", "type": ["null", "string"], "name": "sourceURI"},
{"doc": "", "type": {"items": "string", "type": "array"}, "name":
"sourceAccessions"}, {"default": false, "doc": "", "type": "boolean",
"name": "isDerived"}]}, "type": "array"}, "name": "referenceSets"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"nextPageToken"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])
    _valueListName = "referenceSets"

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'referenceSets': GAReferenceSet,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'referenceSets': GAReferenceSet,
        }
        return embeddedTypes[fieldName]

    __slots__ = ['nextPageToken', 'referenceSets']

    def __init__(self):
        self.nextPageToken = None
        self.referenceSets = []


class GASearchReferencesRequest(SearchRequest):
    """
This request maps to the body of `POST /references/search`
as JSON.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GASearchReferencesRequest", "fields": [{"default": [], "doc": "",
"type": {"items": "string", "type": "array"}, "name": "md5checksums"},
{"default": [], "doc": "", "type": {"items": "string", "type":
"array"}, "name": "accessions"}, {"default": null, "doc": "", "type":
["null", "int"], "name": "pageSize"}, {"default": null, "doc": "",
"type": ["null", "string"], "name": "pageToken"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['accessions', 'md5checksums', 'pageSize', 'pageToken']

    def __init__(self):
        self.accessions = []
        self.md5checksums = []
        self.pageSize = None
        self.pageToken = None


class GASearchReferencesResponse(SearchResponse):
    """
This is the response from `POST /references/search` expressed as JSON.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GASearchReferencesResponse", "fields": [{"default": [], "doc": "",
"type": {"items": {"doc": "", "type": "record", "name": "GAReference",
"fields": [{"doc": "", "type": "string", "name": "id"}, {"doc": "",
"type": "long", "name": "length"}, {"doc": "", "type": "string",
"name": "md5checksum"}, {"doc": "", "type": "string", "name": "name"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"sourceURI"}, {"doc": "", "type": {"items": "string", "type":
"array"}, "name": "sourceAccessions"}, {"default": false, "doc": "",
"type": "boolean", "name": "isDerived"}, {"default": null, "doc": "",
"type": ["null", "float"], "name": "sourceDivergence"}, {"default":
null, "doc": "", "type": ["null", "int"], "name": "ncbiTaxonId"}]},
"type": "array"}, "name": "references"}, {"default": null, "doc": "",
"type": ["null", "string"], "name": "nextPageToken"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])
    _valueListName = "references"

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'references': GAReference,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'references': GAReference,
        }
        return embeddedTypes[fieldName]

    __slots__ = ['nextPageToken', 'references']

    def __init__(self):
        self.nextPageToken = None
        self.references = []


class GASearchVariantSetsRequest(SearchRequest):
    """
This request maps to the body of `POST /variantsets/search` as JSON.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GASearchVariantSetsRequest", "fields": [{"default": [], "doc": "",
"type": {"items": "string", "type": "array"}, "name": "datasetIds"},
{"default": null, "doc": "", "type": ["null", "int"], "name":
"pageSize"}, {"default": null, "doc": "", "type": ["null", "string"],
"name": "pageToken"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['datasetIds', 'pageSize', 'pageToken']

    def __init__(self):
        self.datasetIds = []
        self.pageSize = None
        self.pageToken = None


class GASearchVariantSetsResponse(SearchResponse):
    """
This is the response from `POST /variantsets/search` expressed as JSON.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GASearchVariantSetsResponse", "fields": [{"default": [], "doc": "",
"type": {"items": {"doc": "", "type": "record", "name":
"GAVariantSet", "fields": [{"doc": "", "type": "string", "name":
"id"}, {"doc": "", "type": "string", "name": "datasetId"}, {"default":
[], "doc": "", "type": {"items": {"doc": "", "type": "record", "name":
"GAVariantSetMetadata", "fields": [{"doc": "", "type": "string",
"name": "key"}, {"doc": "", "type": "string", "name": "value"},
{"doc": "", "type": "string", "name": "id"}, {"doc": "", "type":
"string", "name": "type"}, {"doc": "", "type": "string", "name":
"number"}, {"doc": "", "type": "string", "name": "description"},
{"default": {}, "doc": "", "type": {"values": {"items": "string",
"type": "array"}, "type": "map"}, "name": "info"}]}, "type": "array"},
"name": "metadata"}]}, "type": "array"}, "name": "variantSets"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"nextPageToken"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])
    _valueListName = "variantSets"

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'variantSets': GAVariantSet,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'variantSets': GAVariantSet,
        }
        return embeddedTypes[fieldName]

    __slots__ = ['nextPageToken', 'variantSets']

    def __init__(self):
        self.nextPageToken = None
        self.variantSets = []


class GASearchVariantsRequest(SearchRequest):
    """
This request maps to the body of `POST /variants/search` as JSON.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GASearchVariantsRequest", "fields": [{"default": [], "doc": "",
"type": {"items": "string", "type": "array"}, "name":
"variantSetIds"}, {"default": null, "doc": "", "type": ["null",
"string"], "name": "variantName"}, {"default": [], "doc": "", "type":
{"items": "string", "type": "array"}, "name": "callSetIds"}, {"doc":
"", "type": "string", "name": "referenceName"}, {"doc": "", "type":
"long", "name": "start"}, {"doc": "", "type": "long", "name": "end"},
{"default": null, "doc": "", "type": ["null", "int"], "name":
"pageSize"}, {"default": null, "doc": "", "type": ["null", "string"],
"name": "pageToken"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([
        "end",
        "referenceName",
        "start",
    ])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['callSetIds', 'end', 'pageSize', 'pageToken', 'referenceName',
                 'start', 'variantName', 'variantSetIds']

    def __init__(self):
        self.callSetIds = []
        self.end = None
        self.pageSize = None
        self.pageToken = None
        self.referenceName = None
        self.start = None
        self.variantName = None
        self.variantSetIds = []


class GASearchVariantsResponse(SearchResponse):
    """
This is the response from `POST /variants/search` expressed as JSON.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GASearchVariantsResponse", "fields": [{"default": [], "doc": "",
"type": {"items": {"doc": "", "type": "record", "name": "GAVariant",
"fields": [{"doc": "", "type": "string", "name": "id"}, {"doc": "",
"type": "string", "name": "variantSetId"}, {"default": [], "doc": "",
"type": {"items": "string", "type": "array"}, "name": "names"},
{"default": null, "doc": "", "type": ["null", "long"], "name":
"created"}, {"default": null, "doc": "", "type": ["null", "long"],
"name": "updated"}, {"doc": "", "type": "string", "name":
"referenceName"}, {"doc": "", "type": "long", "name": "start"},
{"doc": "", "type": "long", "name": "end"}, {"doc": "", "type":
"string", "name": "referenceBases"}, {"default": [], "doc": "",
"type": {"items": "string", "type": "array"}, "name":
"alternateBases"}, {"default": {}, "doc": "", "type": {"values":
{"items": "string", "type": "array"}, "type": "map"}, "name": "info"},
{"default": [], "doc": "", "type": {"items": {"doc": "", "type":
"record", "name": "GACall", "fields": [{"doc": "", "type": ["null",
"string"], "name": "callSetId"}, {"default": null, "doc": "", "type":
["null", "string"], "name": "callSetName"}, {"default": [], "doc": "",
"type": {"items": "int", "type": "array"}, "name": "genotype"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"phaseset"}, {"default": [], "doc": "", "type": {"items": "double",
"type": "array"}, "name": "genotypeLikelihood"}, {"default": {},
"doc": "", "type": {"values": {"items": "string", "type": "array"},
"type": "map"}, "name": "info"}]}, "type": "array"}, "name":
"calls"}]}, "type": "array"}, "name": "variants"}, {"default": null,
"doc": "", "type": ["null", "string"], "name": "nextPageToken"}],
"doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([])
    _valueListName = "variants"

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'variants': GAVariant,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'variants': GAVariant,
        }
        return embeddedTypes[fieldName]

    __slots__ = ['nextPageToken', 'variants']

    def __init__(self):
        self.nextPageToken = None
        self.variants = []


class GAVariant(ProtocolElement):
    """
A `GAVariant` represents a change in DNA sequence relative to some reference.
For example, a variant could represent a SNP or an insertion.
Variants belong to a `GAVariantSet`.
This is equivalent to a row in VCF.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name": "GAVariant",
"fields": [{"doc": "", "type": "string", "name": "id"}, {"doc": "",
"type": "string", "name": "variantSetId"}, {"default": [], "doc": "",
"type": {"items": "string", "type": "array"}, "name": "names"},
{"default": null, "doc": "", "type": ["null", "long"], "name":
"created"}, {"default": null, "doc": "", "type": ["null", "long"],
"name": "updated"}, {"doc": "", "type": "string", "name":
"referenceName"}, {"doc": "", "type": "long", "name": "start"},
{"doc": "", "type": "long", "name": "end"}, {"doc": "", "type":
"string", "name": "referenceBases"}, {"default": [], "doc": "",
"type": {"items": "string", "type": "array"}, "name":
"alternateBases"}, {"default": {}, "doc": "", "type": {"values":
{"items": "string", "type": "array"}, "type": "map"}, "name": "info"},
{"default": [], "doc": "", "type": {"items": {"doc": "", "type":
"record", "name": "GACall", "fields": [{"doc": "", "type": ["null",
"string"], "name": "callSetId"}, {"default": null, "doc": "", "type":
["null", "string"], "name": "callSetName"}, {"default": [], "doc": "",
"type": {"items": "int", "type": "array"}, "name": "genotype"},
{"default": null, "doc": "", "type": ["null", "string"], "name":
"phaseset"}, {"default": [], "doc": "", "type": {"items": "double",
"type": "array"}, "name": "genotypeLikelihood"}, {"default": {},
"doc": "", "type": {"values": {"items": "string", "type": "array"},
"type": "map"}, "name": "info"}]}, "type": "array"}, "name":
"calls"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([
        "end",
        "id",
        "referenceBases",
        "referenceName",
        "start",
        "variantSetId",
    ])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'calls': GACall,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'calls': GACall,
        }
        return embeddedTypes[fieldName]

    __slots__ = ['alternateBases', 'calls', 'created', 'end', 'id', 'info',
                 'names', 'referenceBases', 'referenceName',
                 'start', 'updated', 'variantSetId']

    def __init__(self):
        self.alternateBases = []
        self.calls = []
        self.created = None
        self.end = None
        self.id = None
        self.info = {}
        self.names = []
        self.referenceBases = None
        self.referenceName = None
        self.start = None
        self.updated = None
        self.variantSetId = None


class GAVariantSet(ProtocolElement):
    """
`GAVariant` and `GACallSet` both belong to a `GAVariantSet`.
`GAVariantSet` belongs to a `GADataset`.
The variant set is equivalent to a VCF file.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name": "GAVariantSet",
"fields": [{"doc": "", "type": "string", "name": "id"}, {"doc": "",
"type": "string", "name": "datasetId"}, {"default": [], "doc": "",
"type": {"items": {"doc": "", "type": "record", "name":
"GAVariantSetMetadata", "fields": [{"doc": "", "type": "string",
"name": "key"}, {"doc": "", "type": "string", "name": "value"},
{"doc": "", "type": "string", "name": "id"}, {"doc": "", "type":
"string", "name": "type"}, {"doc": "", "type": "string", "name":
"number"}, {"doc": "", "type": "string", "name": "description"},
{"default": {}, "doc": "", "type": {"values": {"items": "string",
"type": "array"}, "type": "map"}, "name": "info"}]}, "type": "array"},
"name": "metadata"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([
        "datasetId",
        "id",
    ])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'metadata': GAVariantSetMetadata,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'metadata': GAVariantSetMetadata,
        }
        return embeddedTypes[fieldName]

    __slots__ = ['datasetId', 'id', 'metadata']

    def __init__(self):
        self.datasetId = None
        self.id = None
        self.metadata = []


class GAVariantSetMetadata(ProtocolElement):
    """
This metadata represents VCF header information.
    """
    _schemaSource = """
{"namespace": "org.ga4gh", "type": "record", "name":
"GAVariantSetMetadata", "fields": [{"doc": "", "type": "string",
"name": "key"}, {"doc": "", "type": "string", "name": "value"},
{"doc": "", "type": "string", "name": "id"}, {"doc": "", "type":
"string", "name": "type"}, {"doc": "", "type": "string", "name":
"number"}, {"doc": "", "type": "string", "name": "description"},
{"default": {}, "doc": "", "type": {"values": {"items": "string",
"type": "array"}, "type": "map"}, "name": "info"}], "doc": ""}
"""
    schema = avro.schema.parse(_schemaSource)
    requiredFields = set([
        "description",
        "id",
        "key",
        "number",
        "type",
        "value",
    ])

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return embeddedTypes[fieldName]

    __slots__ = ['description', 'id', 'info', 'key', 'number', 'type', 'value']

    def __init__(self):
        self.description = None
        self.id = None
        self.info = {}
        self.key = None
        self.number = None
        self.type = None
        self.value = None

postMethods = \
    [('/callsets/search',
      GASearchCallSetsRequest,
      GASearchCallSetsResponse),
     ('/readgroupsets/search',
      GASearchReadGroupSetsRequest,
      GASearchReadGroupSetsResponse),
     ('/reads/search',
      GASearchReadsRequest,
      GASearchReadsResponse),
     ('/references/search',
      GASearchReferencesRequest,
      GASearchReferencesResponse),
     ('/referencesets/search',
      GASearchReferenceSetsRequest,
      GASearchReferenceSetsResponse),
     ('/variants/search',
      GASearchVariantsRequest,
      GASearchVariantsResponse),
     ('/variantsets/search',
      GASearchVariantSetsRequest,
      GASearchVariantSetsResponse)]
