"""
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 GEL protocol classes, please run the script
on the appropriate schema version.
"""
from protocols.protocol import ProtocolElement
from protocols.protocol import SearchRequest
from protocols.protocol import SearchResponse
from protocols.protocol import avro_parse

import avro.schema

version = '4.2.0'


class ACMGClassification(object):
    """
    No documentation
    """
    pathogenic_variant = "pathogenic_variant"
    likely_pathogenic_variant = "likely_pathogenic_variant"
    variant_of_unknown_clinical_significance = "variant_of_unknown_clinical_significance"
    likely_benign_variant = "likely_benign_variant"
    benign_variant = "benign_variant"
    not_assessed = "not_assessed"

    def __hash__(self):
        return str(self).__hash__()


class Action(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "Action", "namespace": "org.gel.models.report.avro", "fields": [{"name":
"actionType", "type": ["null", {"type": "enum", "name": "ActionType", "doc": "", "symbols":
["therapy", "therapeutic", "prognosis", "diagnosis"]}]}, {"name": "evidences", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "drug", "type": ["null", "string"],
"doc": ""}, {"name": "status", "type": ["null", {"type": "enum", "name": "ActionStatus", "doc": "",
"symbols": ["clinical", "pre_clinical"]}], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}, {"name": "comments", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "url", "type": ["null", "string"], "doc": ""}, {"name": "evidenceType", "type":
["null", "string"], "doc": ""}, {"name": "source", "type": "string", "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "actionType",
        "comments",
        "drug",
        "evidenceType",
        "evidences",
        "source",
        "status",
        "url",
        "variantActionable",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'actionType', 'comments', 'drug', 'evidenceType', 'evidences',
        'source', 'status', 'url', 'variantActionable'
    ]

    def __init__(self, **kwargs):
        self.actionType = kwargs.get(
            'actionType', None)
        self.comments = kwargs.get(
            'comments', None)
        self.drug = kwargs.get(
            'drug', None)
        self.evidenceType = kwargs.get(
            'evidenceType', None)
        self.evidences = kwargs.get(
            'evidences', None)
        self.source = kwargs.get(
            'source', None)
        self.status = kwargs.get(
            'status', None)
        self.url = kwargs.get(
            'url', None)
        self.variantActionable = kwargs.get(
            'variantActionable', None)


class ActionStatus(object):
    """
    this is the type of actionability for the reported event
    """
    clinical = "clinical"
    pre_clinical = "pre_clinical"

    def __hash__(self):
        return str(self).__hash__()


class ActionType(object):
    """
    this is the type of actionability for the reported event
    """
    therapy = "therapy"
    therapeutic = "therapeutic"
    prognosis = "prognosis"
    diagnosis = "diagnosis"

    def __hash__(self):
        return str(self).__hash__()


class Actionability(object):
    """
    No documentation
    """
    yes = "yes"
    no = "no"
    not_yet = "not_yet"
    na = "na"

    def __hash__(self):
        return str(self).__hash__()


class AdditionalAnalysisPanel(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "AdditionalAnalysisPanel", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "specificDisease", "type": "string"}, {"name": "panelName", "type": "string"},
{"name": "panelVersion", "type": ["null", "string"]}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "panelName",
        "panelVersion",
        "specificDisease",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'panelName', 'panelVersion', 'specificDisease'
    ]

    def __init__(self, **kwargs):
        self.panelName = kwargs.get(
            'panelName', None)
        self.panelVersion = kwargs.get(
            'panelVersion', None)
        self.specificDisease = kwargs.get(
            'specificDisease', None)


class AdoptedStatus(object):
    """
    adoptedin means adopted into the family     adoptedout means child
    belonged to the family and was adopted out
    """
    notadopted = "notadopted"
    adoptedin = "adoptedin"
    adoptedout = "adoptedout"

    def __hash__(self):
        return str(self).__hash__()


class AffectionStatus(object):
    """
    Affection Status
    """
    UNAFFECTED = "UNAFFECTED"
    AFFECTED = "AFFECTED"
    UNCERTAIN = "UNCERTAIN"

    def __hash__(self):
        return str(self).__hash__()


class AgeOfOnset(object):
    """
    No documentation
    """
    EMBRYONAL_ONSET = "EMBRYONAL_ONSET"
    FETAL_ONSET = "FETAL_ONSET"
    NEONATAL_ONSET = "NEONATAL_ONSET"
    INFANTILE_ONSET = "INFANTILE_ONSET"
    CHILDHOOD_ONSET = "CHILDHOOD_ONSET"
    JUVENILE_ONSET = "JUVENILE_ONSET"
    YOUNG_ADULT_ONSET = "YOUNG_ADULT_ONSET"
    LATE_ONSET = "LATE_ONSET"
    MIDDLE_AGE_ONSET = "MIDDLE_AGE_ONSET"

    def __hash__(self):
        return str(self).__hash__()


class AlleleOrigin(object):
    """
    Variant origin.  * `SO_0001781`: de novo variant.
    http://purl.obolibrary.org/obo/SO_0001781 * `SO_0001778`: germline
    variant. http://purl.obolibrary.org/obo/SO_0001778 * `SO_0001775`:
    maternal variant. http://purl.obolibrary.org/obo/SO_0001775 *
    `SO_0001776`: paternal variant.
    http://purl.obolibrary.org/obo/SO_0001776 * `SO_0001779`: pedigree
    specific variant. http://purl.obolibrary.org/obo/SO_0001779 *
    `SO_0001780`: population specific variant.
    http://purl.obolibrary.org/obo/SO_0001780 * `SO_0001777`: somatic
    variant. http://purl.obolibrary.org/obo/SO_0001777
    """
    de_novo_variant = "de_novo_variant"
    germline_variant = "germline_variant"
    maternal_variant = "maternal_variant"
    paternal_variant = "paternal_variant"
    pedigree_specific_variant = "pedigree_specific_variant"
    population_specific_variant = "population_specific_variant"
    somatic_variant = "somatic_variant"

    def __hash__(self):
        return str(self).__hash__()


class AnalysisPanel(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "AnalysisPanel", "namespace": "org.gel.models.participant.avro",
"fields": [{"name": "specificDisease", "type": "string"}, {"name": "panelName", "type": "string"},
{"name": "panelVersion", "type": ["null", "string"]}, {"name": "reviewOutcome", "type": "string"},
{"name": "multipleGeneticOrigins", "type": "string"}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "multipleGeneticOrigins",
        "panelName",
        "panelVersion",
        "reviewOutcome",
        "specificDisease",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'multipleGeneticOrigins', 'panelName', 'panelVersion',
        'reviewOutcome', 'specificDisease'
    ]

    def __init__(self, **kwargs):
        self.multipleGeneticOrigins = kwargs.get(
            'multipleGeneticOrigins', None)
        self.panelName = kwargs.get(
            'panelName', None)
        self.panelVersion = kwargs.get(
            'panelVersion', None)
        self.reviewOutcome = kwargs.get(
            'reviewOutcome', None)
        self.specificDisease = kwargs.get(
            'specificDisease', None)


class AnalysisType(object):
    """
    No documentation
    """
    rare_disease = "rare_disease"
    cancer = "cancer"

    def __hash__(self):
        return str(self).__hash__()


class Ancestries(ProtocolElement):
    """
    Ancestries, defined as Ethnic category(ies) and Chi-square test
    """
    _schemaSource = """
{"type": "record", "name": "Ancestries", "namespace": "org.gel.models.participant.avro", "doc": "",
"fields": [{"name": "mothersEthnicOrigin", "type": ["null", {"type": "enum", "name":
"EthnicCategory", "doc": "", "symbols": ["D", "E", "F", "G", "A", "B", "C", "L", "M", "N", "H", "J",
"K", "P", "S", "R", "Z"]}], "doc": ""}, {"name": "mothersOtherRelevantAncestry", "type": ["null",
"string"], "doc": ""}, {"name": "fathersEthnicOrigin", "type": ["null", "EthnicCategory"], "doc":
""}, {"name": "fathersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"chiSquare1KGenomesPhase3Pop", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "ChiSquare1KGenomesPhase3Pop", "doc": "", "fields": [{"name": "kgSuperPopCategory", "type":
{"type": "enum", "name": "KgSuperPopCategory", "doc": "", "symbols": ["AFR", "AMR", "EAS", "EUR",
"SAS"]}, "doc": ""}, {"name": "kgPopCategory", "type": ["null", {"type": "enum", "name":
"KgPopCategory", "doc": "", "symbols": ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM",
"ESN", "FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK", "MSL", "MXL", "PEL", "PJL",
"PUR", "STU", "TSI", "YRI"]}], "doc": ""}, {"name": "chiSquare", "type": "double", "doc": ""}]}}],
"doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "chiSquare1KGenomesPhase3Pop",
        "fathersEthnicOrigin",
        "fathersOtherRelevantAncestry",
        "mothersEthnicOrigin",
        "mothersOtherRelevantAncestry",
    }

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

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'chiSquare1KGenomesPhase3Pop': ChiSquare1KGenomesPhase3Pop,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'chiSquare1KGenomesPhase3Pop', 'fathersEthnicOrigin',
        'fathersOtherRelevantAncestry', 'mothersEthnicOrigin',
        'mothersOtherRelevantAncestry'
    ]

    def __init__(self, **kwargs):
        self.chiSquare1KGenomesPhase3Pop = kwargs.get(
            'chiSquare1KGenomesPhase3Pop', None)
        self.fathersEthnicOrigin = kwargs.get(
            'fathersEthnicOrigin', None)
        self.fathersOtherRelevantAncestry = kwargs.get(
            'fathersOtherRelevantAncestry', None)
        self.mothersEthnicOrigin = kwargs.get(
            'mothersEthnicOrigin', None)
        self.mothersOtherRelevantAncestry = kwargs.get(
            'mothersOtherRelevantAncestry', None)


class AuditLog(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "AuditLog", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "interpretationRequestId", "type": "string", "doc": ""}, {"name":
"interpretationRequestVersion", "type": "string", "doc": ""}, {"name": "code", "type": {"type":
"enum", "name": "Code", "doc": "", "symbols": ["C0", "C1", "C2", "C3", "C4", "C5", "C6", "C7"]}},
{"name": "caseShared", "type": ["null", {"type": "record", "name": "CaseShared", "fields": [{"name":
"previousGroups", "type": {"type": "array", "items": "string"}}, {"name": "modifiedGroups", "type":
{"type": "array", "items": "string"}}]}]}, {"name": "supportingEvidences", "type": ["null", {"type":
"record", "name": "SupportingEvidences", "fields": [{"name": "previousSupportingEvidences", "type":
{"type": "array", "items": "string"}}, {"name": "modifiedSupportingEvidences", "type": {"type":
"array", "items": "string"}}]}]}, {"name": "modifiedVariants", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "ModifiedVariant", "fields": [{"name": "previousVariant",
"type": {"type": "record", "name": "ReportedVariant", "fields": [{"name": "chromosome", "type":
"string", "doc": ""}, {"name": "dbSnpId", "type": ["null", "string"], "doc": ""}, {"name":
"position", "type": "int", "doc": ""}, {"name": "reference", "type": "string", "doc": ""}, {"name":
"alternate", "type": "string", "doc": ""}, {"name": "calledGenotypes", "type": {"type": "array",
"items": {"type": "record", "name": "CalledGenotype", "doc": "", "fields": [{"name": "gelId",
"type": "string", "doc": ""}, {"name": "sampleId", "type": "string", "doc": ""}, {"name":
"genotype", "type": {"type": "enum", "name": "Zygosity", "doc": "", "symbols":
["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk"]}, "doc": ""}, {"name": "phaseSet", "type": ["null", "int"], "doc": ""}, {"name":
"depthReference", "type": ["null", "int"], "doc": ""}, {"name": "depthAlternate", "type": ["null",
"int"], "doc": ""}, {"name": "copyNumber", "type": ["null", "int"], "doc": ""}]}}, "doc": ""},
{"name": "reportEvents", "type": {"type": "array", "items": {"type": "record", "name":
"ReportEvent", "fields": [{"name": "reportEventId", "type": "string", "doc": ""}, {"name":
"phenotype", "type": "string", "doc": ""}, {"name": "panelName", "type": ["null", "string"], "doc":
""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name": "modeOfInheritance",
"type": {"type": "enum", "name": "ReportedModeOfInheritance", "doc": "", "symbols": ["monoallelic",
"monoallelic_not_imprinted", "monoallelic_maternally_imprinted", "monoallelic_paternally_imprinted",
"biallelic", "monoallelic_and_biallelic", "monoallelic_and_more_severe_biallelic",
"xlinked_biallelic", "xlinked_monoallelic", "mitochondrial", "unknown"]}, "doc": ""}, {"name":
"genomicFeature", "type": {"type": "record", "name": "GenomicFeature", "fields": [{"name":
"featureType", "type": {"type": "enum", "name": "FeatureTypes", "symbols": ["RegulatoryRegion",
"Gene", "Transcript"]}, "doc": ""}, {"name": "ensemblId", "type": "string", "doc": ""}, {"name":
"hgnc", "type": ["null", "string"], "doc": ""}, {"name": "otherIds", "type": ["null", {"type":
"map", "values": "string"}], "doc": ""}]}, "doc": ""}, {"name": "penetrance", "type": {"type":
"enum", "name": "Penetrance", "namespace": "org.gel.models.participant.avro", "doc": "", "symbols":
["complete", "incomplete"]}, "doc": ""}, {"name": "score", "type": "float", "doc": ""}, {"name":
"vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc": ""}, {"name":
"variantClassification", "type": ["null", {"type": "enum", "name": "VariantClassification", "doc":
"", "symbols": ["pathogenic_variant", "likely_pathogenic_variant",
"variant_of_unknown_clinical_significance", "likely_benign_variant", "benign_variant",
"not_assessed"]}], "doc": ""}, {"name": "fullyExplainsPhenotype", "type": ["null", "boolean"],
"doc": ""}, {"name": "groupOfVariants", "type": ["null", "int"], "doc": ""}, {"name":
"eventJustification", "type": ["null", "string"], "doc": ""}, {"name": "tier", "type": ["null",
{"type": "enum", "name": "Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3"]}], "doc":
""}]}}, "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}, {"name": "evidenceIds", "type": ["null", {"type": "map", "values":
"string"}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}}, {"name": "modifiedVariant", "type": "ReportedVariant"}]}}]},
{"name": "addedVariants", "type": ["null", {"type": "array", "items": "ReportedVariant"}]}, {"name":
"removedVariants", "type": ["null", {"type": "array", "items": "ReportedVariant"}]}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "addedVariants",
        "caseShared",
        "code",
        "interpretationRequestId",
        "interpretationRequestVersion",
        "modifiedVariants",
        "removedVariants",
        "supportingEvidences",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'addedVariants': ReportedVariant,
            'caseShared': CaseShared,
            'modifiedVariants': ModifiedVariant,
            'removedVariants': ReportedVariant,
            'supportingEvidences': SupportingEvidences,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'addedVariants': ReportedVariant,
            'caseShared': CaseShared,
            'modifiedVariants': ModifiedVariant,
            'removedVariants': ReportedVariant,
            'supportingEvidences': SupportingEvidences,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'addedVariants', 'caseShared', 'code',
        'interpretationRequestId', 'interpretationRequestVersion',
        'modifiedVariants', 'removedVariants', 'supportingEvidences'
    ]

    def __init__(self, **kwargs):
        self.addedVariants = kwargs.get(
            'addedVariants', None)
        self.caseShared = kwargs.get(
            'caseShared', None)
        self.code = kwargs.get(
            'code', None)
        self.interpretationRequestId = kwargs.get(
            'interpretationRequestId', None)
        self.interpretationRequestVersion = kwargs.get(
            'interpretationRequestVersion', None)
        self.modifiedVariants = kwargs.get(
            'modifiedVariants', None)
        self.removedVariants = kwargs.get(
            'removedVariants', None)
        self.supportingEvidences = kwargs.get(
            'supportingEvidences', None)


class CalledGenotype(ProtocolElement):
    """
    This is intended to hold the genotypes for the family members
    In principle it is a phased zygosity as in VCF spec and called by
    the analysis provider if further phasing is conducted
    """
    _schemaSource = """
{"type": "record", "name": "CalledGenotype", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "gelId", "type": "string", "doc": ""}, {"name": "sampleId", "type": "string",
"doc": ""}, {"name": "genotype", "type": {"type": "enum", "name": "Zygosity", "doc": "", "symbols":
["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk"]}, "doc": ""}, {"name": "phaseSet", "type": ["null", "int"], "doc": ""}, {"name":
"depthReference", "type": ["null", "int"], "doc": ""}, {"name": "depthAlternate", "type": ["null",
"int"], "doc": ""}, {"name": "copyNumber", "type": ["null", "int"], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "copyNumber",
        "depthAlternate",
        "depthReference",
        "gelId",
        "genotype",
        "phaseSet",
        "sampleId",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'copyNumber', 'depthAlternate', 'depthReference', 'gelId',
        'genotype', 'phaseSet', 'sampleId'
    ]

    def __init__(self, **kwargs):
        self.copyNumber = kwargs.get(
            'copyNumber', None)
        self.depthAlternate = kwargs.get(
            'depthAlternate', None)
        self.depthReference = kwargs.get(
            'depthReference', None)
        self.gelId = kwargs.get(
            'gelId', None)
        self.genotype = kwargs.get(
            'genotype', None)
        self.phaseSet = kwargs.get(
            'phaseSet', None)
        self.sampleId = kwargs.get(
            'sampleId', None)


class CancerActionability(object):
    """
    An enumeration Variant Actionability:         *
    `predicts_therapeutic_response`: Predicts therapeutic response
    * `prognostic`: Prognostic         * `defines_diagnosis_group`:
    Defines diagnosis group         * `eligibility_for_trial`:
    Eligibility for trial         * `other`:  Other (please specify)
    """
    predicts_therapeutic_response = "predicts_therapeutic_response"
    prognostic = "prognostic"
    defines_diagnosis_group = "defines_diagnosis_group"
    eligibility_for_trial = "eligibility_for_trial"
    other = "other"

    def __hash__(self):
        return str(self).__hash__()


class CancerActionableVariants(object):
    """
    * `yes`: yes      * `no`: no
    """
    yes = "yes"
    no = "no"

    def __hash__(self):
        return str(self).__hash__()


class CancerCaseLevelQuestions(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "CancerCaseLevelQuestions", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "total_review_time", "type": "double", "doc": ""}, {"name": "mdt1_time", "type":
"double", "doc": ""}, {"name": "mdt2_time", "type": ["null", "double"], "doc": ""}, {"name":
"validation_assay_time", "type": ["null", "double"], "doc": ""}, {"name": "wet_validation_time",
"type": ["null", "double"], "doc": ""}, {"name": "analytical_validation_time", "type": ["null",
"double"], "doc": ""}, {"name": "primary_reporting_time", "type": "double", "doc": ""}, {"name":
"primary_authorisation_time", "type": "double", "doc": ""}, {"name": "report_distribution_time",
"type": "double", "doc": ""}, {"name": "total_time", "type": "double", "doc": ""}, {"name":
"reviewedInMdtWga", "type": {"type": "enum", "name": "ReviewedParts", "doc": "", "symbols":
["domain_1", "domain_1_and_2", "domain_1_2_and_suplementary"]}, "doc": ""}, {"name":
"actionableVariants", "type": {"type": "enum", "name": "CancerActionableVariants", "doc": "",
"symbols": ["yes", "no"]}, "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "actionableVariants",
        "analytical_validation_time",
        "mdt1_time",
        "mdt2_time",
        "primary_authorisation_time",
        "primary_reporting_time",
        "report_distribution_time",
        "reviewedInMdtWga",
        "total_review_time",
        "total_time",
        "validation_assay_time",
        "wet_validation_time",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'actionableVariants', 'analytical_validation_time',
        'mdt1_time', 'mdt2_time', 'primary_authorisation_time',
        'primary_reporting_time', 'report_distribution_time',
        'reviewedInMdtWga', 'total_review_time', 'total_time',
        'validation_assay_time', 'wet_validation_time'
    ]

    def __init__(self, **kwargs):
        self.actionableVariants = kwargs.get(
            'actionableVariants', None)
        self.analytical_validation_time = kwargs.get(
            'analytical_validation_time', None)
        self.mdt1_time = kwargs.get(
            'mdt1_time', None)
        self.mdt2_time = kwargs.get(
            'mdt2_time', None)
        self.primary_authorisation_time = kwargs.get(
            'primary_authorisation_time', None)
        self.primary_reporting_time = kwargs.get(
            'primary_reporting_time', None)
        self.report_distribution_time = kwargs.get(
            'report_distribution_time', None)
        self.reviewedInMdtWga = kwargs.get(
            'reviewedInMdtWga', None)
        self.total_review_time = kwargs.get(
            'total_review_time', None)
        self.total_time = kwargs.get(
            'total_time', None)
        self.validation_assay_time = kwargs.get(
            'validation_assay_time', None)
        self.wet_validation_time = kwargs.get(
            'wet_validation_time', None)


class CancerExitQuestionnaire(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "CancerExitQuestionnaire", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "eventDate", "type": "string"}, {"name": "reporter", "type": "string"}, {"name":
"caseLevelQuestions", "type": {"type": "record", "name": "CancerCaseLevelQuestions", "fields":
[{"name": "total_review_time", "type": "double", "doc": ""}, {"name": "mdt1_time", "type": "double",
"doc": ""}, {"name": "mdt2_time", "type": ["null", "double"], "doc": ""}, {"name":
"validation_assay_time", "type": ["null", "double"], "doc": ""}, {"name": "wet_validation_time",
"type": ["null", "double"], "doc": ""}, {"name": "analytical_validation_time", "type": ["null",
"double"], "doc": ""}, {"name": "primary_reporting_time", "type": "double", "doc": ""}, {"name":
"primary_authorisation_time", "type": "double", "doc": ""}, {"name": "report_distribution_time",
"type": "double", "doc": ""}, {"name": "total_time", "type": "double", "doc": ""}, {"name":
"reviewedInMdtWga", "type": {"type": "enum", "name": "ReviewedParts", "doc": "", "symbols":
["domain_1", "domain_1_and_2", "domain_1_2_and_suplementary"]}, "doc": ""}, {"name":
"actionableVariants", "type": {"type": "enum", "name": "CancerActionableVariants", "doc": "",
"symbols": ["yes", "no"]}, "doc": ""}]}}, {"name": "somaticVariantLevelQuestions", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "CancerSomaticVariantLevelQuestions",
"fields": [{"name": "variantDetails", "type": "string", "doc": ""}, {"name": "variantActionability",
"type": {"type": "enum", "name": "CancerActionability", "doc": "", "symbols":
["predicts_therapeutic_response", "prognostic", "defines_diagnosis_group", "eligibility_for_trial",
"other"]}, "doc": ""}, {"name": "otherVariantActionability", "type": ["null", "string"]}, {"name":
"variantUsability", "type": {"type": "enum", "name": "CancerUsabilitySomatic", "doc": "", "symbols":
["already_actioned", "actioned_result_of_this_wga", "not_yet_actioned"]}, "doc": ""}, {"name":
"variantTested", "type": {"type": "enum", "name": "CancerTested", "doc": "", "symbols":
["not_indicated_for_patient_care", "no_orthologous_test_available", "test_performed_prior_to_wga",
"technical_validation_following_wga"]}, "doc": ""}, {"name": "validationAssayType", "type":
"string", "doc": ""}]}}], "doc": ""}, {"name": "germlineVariantLevelQuestions", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "CancerGermlineVariantLevelQuestions",
"fields": [{"name": "variantDetails", "type": "string", "doc": ""}, {"name": "variantUsability",
"type": {"type": "enum", "name": "CancerUsabilityGermline", "doc": "", "symbols":
["already_actioned", "actioned_result_of_this_wga"]}, "doc": ""}, {"name": "variantTested", "type":
"CancerTested", "doc": ""}, {"name": "validationAssayType", "type": "string", "doc": ""}]}}], "doc":
""}, {"name": "additionalComments", "type": ["null", "string"], "doc": ""}, {"name":
"otherActionableVariants", "type": ["null", "string"], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "additionalComments",
        "caseLevelQuestions",
        "eventDate",
        "germlineVariantLevelQuestions",
        "otherActionableVariants",
        "reporter",
        "somaticVariantLevelQuestions",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'caseLevelQuestions': CancerCaseLevelQuestions,
            'germlineVariantLevelQuestions': CancerGermlineVariantLevelQuestions,
            'somaticVariantLevelQuestions': CancerSomaticVariantLevelQuestions,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'caseLevelQuestions': CancerCaseLevelQuestions,
            'germlineVariantLevelQuestions': CancerGermlineVariantLevelQuestions,
            'somaticVariantLevelQuestions': CancerSomaticVariantLevelQuestions,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'additionalComments', 'caseLevelQuestions', 'eventDate',
        'germlineVariantLevelQuestions', 'otherActionableVariants',
        'reporter', 'somaticVariantLevelQuestions'
    ]

    def __init__(self, **kwargs):
        self.additionalComments = kwargs.get(
            'additionalComments', None)
        self.caseLevelQuestions = kwargs.get(
            'caseLevelQuestions', CancerCaseLevelQuestions())
        self.eventDate = kwargs.get(
            'eventDate', None)
        self.germlineVariantLevelQuestions = kwargs.get(
            'germlineVariantLevelQuestions', None)
        self.otherActionableVariants = kwargs.get(
            'otherActionableVariants', None)
        self.reporter = kwargs.get(
            'reporter', None)
        self.somaticVariantLevelQuestions = kwargs.get(
            'somaticVariantLevelQuestions', None)


class CancerGermlineVariantLevelQuestions(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "CancerGermlineVariantLevelQuestions", "namespace":
"org.gel.models.report.avro", "fields": [{"name": "variantDetails", "type": "string", "doc": ""},
{"name": "variantUsability", "type": {"type": "enum", "name": "CancerUsabilityGermline", "doc": "",
"symbols": ["already_actioned", "actioned_result_of_this_wga"]}, "doc": ""}, {"name":
"variantTested", "type": {"type": "enum", "name": "CancerTested", "doc": "", "symbols":
["not_indicated_for_patient_care", "no_orthologous_test_available", "test_performed_prior_to_wga",
"technical_validation_following_wga"]}, "doc": ""}, {"name": "validationAssayType", "type":
"string", "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "validationAssayType",
        "variantDetails",
        "variantTested",
        "variantUsability",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'validationAssayType', 'variantDetails', 'variantTested',
        'variantUsability'
    ]

    def __init__(self, **kwargs):
        self.validationAssayType = kwargs.get(
            'validationAssayType', None)
        self.variantDetails = kwargs.get(
            'variantDetails', None)
        self.variantTested = kwargs.get(
            'variantTested', None)
        self.variantUsability = kwargs.get(
            'variantUsability', None)


class CancerInterpretationRequest(ProtocolElement):
    """
    This record represents basic information for this report
    """
    _schemaSource = """
{"type": "record", "name": "CancerInterpretationRequest", "namespace": "org.gel.models.report.avro",
"doc": "", "fields": [{"name": "versionControl", "type": {"type": "record", "name":
"ReportVersionControl", "fields": [{"name": "gitVersionControl", "type": "string", "doc": "",
"default": "4.2.0"}]}, "doc": ""}, {"name": "reportRequestId", "type": "string", "doc": ""},
{"name": "reportVersion", "type": "int", "doc": ""}, {"name": "internalStudyId", "type": "string",
"doc": ""}, {"name": "interpretGenome", "type": "boolean", "doc": "", "default": false}, {"name":
"bams", "type": {"type": "array", "items": {"type": "record", "name": "File", "doc": "", "fields":
[{"name": "sampleId", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"uriFile", "type": "string", "doc": ""}, {"name": "fileType", "type": {"type": "enum", "name":
"FileType", "symbols": ["BAM", "gVCF", "VCF_small", "VCF_somatic_small", "VCF_CNV",
"VCF_somatic_CNV", "VCF_SV", "VCF_somatic_SV", "VCF_SV_CNV", "SVG", "ANN", "BigWig", "MD5Sum",
"ROH", "OTHER", "PARTITION", "VARIANT_FREQUENCIES", "COVERAGE"]}}, {"name": "md5Sum", "type":
["null", "string"]}]}}, "doc": ""}, {"name": "vcfs", "type": {"type": "array", "items": "File"},
"doc": ""}, {"name": "bigWigs", "type": {"type": "array", "items": "File"}, "doc": ""}, {"name":
"annotationFile", "type": ["null", "File"], "doc": ""}, {"name": "cancerParticipant", "type":
{"type": "record", "name": "CancerParticipant", "namespace": "org.gel.models.participant.avro",
"doc": "", "fields": [{"name": "yearOfBirth", "type": ["null", "int"]}, {"name": "morphology",
"type": ["null", {"type": "array", "items": "string"}]}, {"name": "readyForAnalysis", "type":
"boolean"}, {"name": "consentStatus", "type": ["null", {"type": "record", "name": "ConsentStatus",
"doc": "", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "", "default": false},
{"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default": false}, {"name":
"secondaryFindingConsent", "type": "boolean", "doc": "", "default": false}, {"name":
"carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}], "doc": ""}, {"name":
"center", "type": ["null", "string"], "doc": ""}, {"name": "individualId", "type": "string", "doc":
""}, {"name": "primaryDiagnosisDisease", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "primaryDiagnosisSubDisease", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "sex", "type": {"type": "enum", "name": "Sex", "symbols":
["FEMALE", "MALE", "UNKNOWN"]}, "doc": ""}, {"name": "additionalInformation", "type": ["null",
{"type": "map", "values": "string"}], "doc": ""}, {"name": "assignedICD10", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "tumourSamples", "type": {"type":
"array", "items": {"type": "record", "name": "TumourSample", "fields": [{"name": "sampleId", "type":
"string", "doc": ""}, {"name": "labSampleId", "type": "int", "doc": ""}, {"name": "LDPCode", "type":
"string", "doc": ""}, {"name": "tumourId", "type": "string", "doc": ""}, {"name": "programmePhase",
"type": ["null", {"type": "enum", "name": "ProgrammePhase", "symbols": ["CRUK", "OXFORD", "CLL",
"IIP", "MAIN", "EXPT"]}], "doc": ""}, {"name": "diseaseType", "type": ["null", {"type": "enum",
"name": "diseaseType", "symbols": ["ADULT_GLIOMA", "BLADDER", "BREAST",
"CARCINOMA_OF_UNKNOWN_PRIMARY", "CHILDHOOD", "COLORECTAL", "ENDOMETRIAL_CARCINOMA", "HAEMONC",
"HEPATOPANCREATOBILIARY", "LUNG", "MALIGNANT_MELANOMA", "NASOPHARYNGEAL", "ORAL_OROPHARYNGEAL",
"OVARIAN", "PROSTATE", "RENAL", "SARCOMA", "SINONASAL", "TESTICULAR_GERM_CELL_TUMOURS",
"UPPER_GASTROINTESTINAL", "NON_HODGKINS_B_CELL_LYMPHOMA_LOW_MOD_GRADE", "CLASSICAL_HODGKINS",
"NODULAR_LYMPHOCYTE_PREDOMINANT_HODGKINS", "T_CELL_LYMPHOMA"]}], "doc": ""}, {"name":
"diseaseSubType", "type": ["null", "string"], "doc": ""}, {"name": "clinicalSampleDateTime", "type":
["null", "string"], "doc": ""}, {"name": "tumourType", "type": ["null", {"type": "enum", "name":
"TumourType", "symbols": ["PRIMARY", "METASTATIC_RECURRENCE", "RECURRENCE_OF_PRIMARY_TUMOUR",
"METASTASES"]}], "doc": ""}, {"name": "tumourContent", "type": ["null", {"type": "enum", "name":
"TumourContent", "symbols": ["High", "Medium", "Low"]}], "doc": ""}, {"name": "source", "type":
["null", {"type": "enum", "name": "SampleSource", "symbols": ["TUMOUR",
"BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS", "BONE_MARROW_ASPIRATE_TUMOUR_CELLS", "BLOOD", "SALIVA",
"FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "preparationMethod", "type": ["null", {"type":
"enum", "name": "PreparationMethod", "symbols": ["EDTA", "ORAGENE", "FF", "FFPE",
"CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}, {"name": "tissueSource", "type": ["null", {"type":
"enum", "name": "TissueSource", "symbols": ["BMA_TUMOUR_SORTED_CELLS", "CT_GUIDED_BIOPSY",
"ENDOSCOPIC_BIOPSY", "ENDOSCOPIC_ULTRASOUND_GUIDED_BIOPSY", "ENDOSCOPIC_ULTRASOUND_GUIDED_FNA",
"LAPAROSCOPIC_BIOPSY", "LAPAROSCOPIC_EXCISION", "MRI_GUIDED_BIOPSY", "NON_GUIDED_BIOPSY",
"SURGICAL_RESECTION", "STEREOTACTICALLY_GUIDED_BIOPSY", "USS_GUIDED_BIOPSY",
"NON_STANDARD_BIOPSY"]}], "doc": ""}, {"name": "product", "type": ["null", {"type": "enum", "name":
"Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name": "morphologyICD", "type": ["null",
"string"], "doc": ""}, {"name": "morphologySnomedCT", "type": ["null", "string"], "doc": ""},
{"name": "morphologySnomedRT", "type": ["null", "string"], "doc": ""}, {"name": "topographyICD",
"type": ["null", "string"], "doc": ""}, {"name": "topographySnomedCT", "type": ["null", "string"],
"doc": ""}, {"name": "topographySnomedRT", "type": ["null", "string"], "doc": ""}]}}}, {"name":
"germlineSamples", "type": {"type": "array", "items": {"type": "record", "name": "GermlineSample",
"fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int",
"doc": ""}, {"name": "LDPCode", "type": "string", "doc": ""}, {"name": "source", "type": ["null",
"SampleSource"], "doc": ""}, {"name": "product", "type": ["null", "Product"], "doc": ""}, {"name":
"preparationMethod", "type": ["null", "PreparationMethod"], "doc": ""}, {"name": "programmePhase",
"type": ["null", "ProgrammePhase"], "doc": ""}, {"name": "clinicalSampleDateTime", "type": ["null",
"string"], "doc": ""}]}}}, {"name": "matchedSamples", "type": {"type": "array", "items": {"type":
"record", "name": "MatchedSamples", "doc": "", "fields": [{"name": "germlineSampleId", "type":
["null", "string"], "doc": ""}, {"name": "tumourSampleId", "type": ["null", "string"], "doc":
""}]}}}, {"name": "versionControl", "type": ["null", {"type": "record", "name": "VersionControl",
"fields": [{"name": "GitVersionControl", "type": "string", "doc": "", "default": "1.0.3"}]}], "doc":
""}]}}, {"name": "analysisUri", "type": "string", "doc": ""}, {"name": "analysisVersion", "type":
"string", "doc": ""}, {"name": "tieredVariants", "type": {"type": "array", "items": {"type":
"record", "name": "ReportedVariantCancer", "fields": [{"name": "chromosome", "type": "string",
"doc": ""}, {"name": "position", "type": "int", "doc": ""}, {"name": "reference", "type": "string",
"doc": ""}, {"name": "alternate", "type": "string", "doc": ""}, {"name": "cosmicIds", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "clinVarIds", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "dbSnpId", "type": ["null", "string"],
"doc": ""}, {"name": "cdnaChange", "type": ["null", "string"], "doc": ""}, {"name": "proteinChange",
"type": ["null", "string"], "doc": ""}, {"name": "commonAf", "type": ["null", "int"], "doc": ""},
{"name": "ihp", "type": ["null", "int"], "doc": ""}, {"name": "additionalTextualVariantAnnotations",
"type": ["null", {"type": "map", "values": "string"}], "doc": ""}, {"name":
"additionalNumericVariantAnnotations", "type": ["null", {"type": "map", "values": "float"}], "doc":
""}, {"name": "comments", "type": ["null", {"type": "array", "items": "string"}], "doc": ""},
{"name": "reportEvents", "type": {"type": "array", "items": {"type": "record", "name":
"ReportEventCancer", "fields": [{"name": "reportEventId", "type": "string", "doc": ""}, {"name":
"genomicFeatureCancer", "type": {"type": "record", "name": "GenomicFeatureCancer", "fields":
[{"name": "featureType", "type": {"type": "enum", "name": "FeatureTypeCancer", "doc": "", "symbols":
["regulatory_region", "gene", "transcript"]}, "doc": ""}, {"name": "ensemblId", "type": "string",
"doc": ""}, {"name": "refSeqTranscriptId", "type": "string", "doc": ""}, {"name": "refSeqProteinId",
"type": "string", "doc": ""}, {"name": "geneName", "type": "string", "doc": ""}, {"name":
"roleInCancer", "type": ["null", {"type": "enum", "name": "RoleInCancer", "doc": "", "symbols":
["oncogene", "tumor_suppressor_gene", "both"]}], "doc": ""}]}, "doc": ""}, {"name": "soTerms",
"type": {"type": "array", "items": {"type": "record", "name": "SoTerm", "doc": "", "fields":
[{"name": "id", "type": "string", "doc": ""}, {"name": "name", "type": "string", "doc": ""}]}},
"doc": ""}, {"name": "actions", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "Action", "fields": [{"name": "actionType", "type": ["null", {"type": "enum", "name":
"ActionType", "doc": "", "symbols": ["therapy", "therapeutic", "prognosis", "diagnosis"]}]},
{"name": "evidences", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"drug", "type": ["null", "string"], "doc": ""}, {"name": "status", "type": ["null", {"type": "enum",
"name": "ActionStatus", "doc": "", "symbols": ["clinical", "pre_clinical"]}], "doc": ""}, {"name":
"variantActionable", "type": "boolean", "doc": ""}, {"name": "comments", "type": ["null", {"type":
"array", "items": "string"}], "doc": ""}, {"name": "url", "type": ["null", "string"], "doc": ""},
{"name": "evidenceType", "type": ["null", "string"], "doc": ""}, {"name": "source", "type":
"string", "doc": ""}]}}], "doc": ""}, {"name": "groupOfVariants", "type": ["null", "int"], "doc":
""}, {"name": "eventJustification", "type": ["null", "string"], "doc": ""}, {"name": "tier", "type":
["null", {"type": "enum", "name": "Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2",
"TIER3"]}], "doc": ""}]}}, "doc": ""}, {"name": "variantCalls", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "VariantCall", "fields": [{"name": "sampleId", "type": "string",
"doc": ""}, {"name": "depthReference", "type": ["null", "int"], "doc": ""}, {"name":
"depthAlternate", "type": ["null", "int"], "doc": ""}, {"name": "vaf", "type": ["null", "double"],
"doc": ""}]}}], "doc": ""}, {"name": "alleleOrigins", "type": {"type": "array", "items": {"type":
"enum", "name": "AlleleOrigin", "doc": "", "symbols": ["de_novo_variant", "germline_variant",
"maternal_variant", "paternal_variant", "pedigree_specific_variant", "population_specific_variant",
"somatic_variant"]}}, "doc": ""}]}}, "doc": ""}, {"name": "structuralTieredVariants", "type":
{"type": "array", "items": {"type": "record", "name": "ReportedStructuralVariantCancer", "fields":
[{"name": "chromosome", "type": "string", "doc": ""}, {"name": "start", "type": "int", "doc": ""},
{"name": "end", "type": "int", "doc": ""}, {"name": "type", "type": {"type": "record", "name":
"StructuralVariantType", "doc": "", "fields": [{"name": "firstLevelType", "type": {"type": "enum",
"name": "StructuralVariantFirstLevelType", "doc": "", "symbols": ["DEL", "INS", "DUP", "INV", "CNV",
"DUP_TANDEM", "DEL_ME", "INS_ME"]}}, {"name": "subtype", "type": ["null", "string"]}]}, "doc": ""},
{"name": "reference", "type": "string", "doc": ""}, {"name": "alternate", "type": "string", "doc":
""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type": "map", "values":
"string"}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}, {"name": "alleleOrigins", "type": {"type": "array", "items":
"AlleleOrigin"}, "doc": ""}]}}, "doc": ""}, {"name": "tieringVersion", "type": "string", "doc": ""},
{"name": "workspace", "type": {"type": "array", "items": "string"}, "doc": ""}, {"name":
"additionalInfo", "type": ["null", {"type": "map", "values": "string"}], "doc": ""}, {"name":
"otherFiles", "type": ["null", {"type": "map", "values": "File"}], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "additionalInfo",
        "analysisUri",
        "analysisVersion",
        "annotationFile",
        "bams",
        "bigWigs",
        "cancerParticipant",
        "internalStudyId",
        "otherFiles",
        "reportRequestId",
        "reportVersion",
        "structuralTieredVariants",
        "tieredVariants",
        "tieringVersion",
        "vcfs",
        "versionControl",
        "workspace",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'annotationFile': File,
            'bams': File,
            'bigWigs': File,
            'cancerParticipant': CancerParticipant,
            'otherFiles': File,
            'structuralTieredVariants': ReportedStructuralVariantCancer,
            'tieredVariants': ReportedVariantCancer,
            'vcfs': File,
            'versionControl': ReportVersionControl,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'annotationFile': File,
            'bams': File,
            'bigWigs': File,
            'cancerParticipant': CancerParticipant,
            'otherFiles': File,
            'structuralTieredVariants': ReportedStructuralVariantCancer,
            'tieredVariants': ReportedVariantCancer,
            'vcfs': File,
            'versionControl': ReportVersionControl,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'additionalInfo', 'analysisUri', 'analysisVersion',
        'annotationFile', 'bams', 'bigWigs', 'cancerParticipant',
        'internalStudyId', 'interpretGenome', 'otherFiles',
        'reportRequestId', 'reportVersion',
        'structuralTieredVariants', 'tieredVariants',
        'tieringVersion', 'vcfs', 'versionControl', 'workspace'
    ]

    def __init__(self, **kwargs):
        self.additionalInfo = kwargs.get(
            'additionalInfo', None)
        self.analysisUri = kwargs.get(
            'analysisUri', None)
        self.analysisVersion = kwargs.get(
            'analysisVersion', None)
        self.annotationFile = kwargs.get(
            'annotationFile', None)
        self.bams = kwargs.get(
            'bams', None)
        self.bigWigs = kwargs.get(
            'bigWigs', None)
        self.cancerParticipant = kwargs.get(
            'cancerParticipant', CancerParticipant())
        self.internalStudyId = kwargs.get(
            'internalStudyId', None)
        self.interpretGenome = kwargs.get(
            'interpretGenome', False)
        self.otherFiles = kwargs.get(
            'otherFiles', None)
        self.reportRequestId = kwargs.get(
            'reportRequestId', None)
        self.reportVersion = kwargs.get(
            'reportVersion', None)
        self.structuralTieredVariants = kwargs.get(
            'structuralTieredVariants', None)
        self.tieredVariants = kwargs.get(
            'tieredVariants', None)
        self.tieringVersion = kwargs.get(
            'tieringVersion', None)
        self.vcfs = kwargs.get(
            'vcfs', None)
        self.versionControl = kwargs.get(
            'versionControl', ReportVersionControl())
        self.workspace = kwargs.get(
            'workspace', None)


class CancerInterpretedGenome(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "CancerInterpretedGenome", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "versionControl", "type": {"type": "record", "name": "ReportVersionControl",
"fields": [{"name": "gitVersionControl", "type": "string", "doc": "", "default": "4.2.0"}]}, "doc":
""}, {"name": "reportRequestId", "type": "string", "doc": ""}, {"name": "analysisId", "type":
"string", "doc": ""}, {"name": "reportUri", "type": "string", "doc": ""}, {"name":
"referenceDatabasesVersions", "type": {"type": "map", "values": "string"}, "doc": ""}, {"name":
"softwareVersions", "type": {"type": "map", "values": "string"}, "doc": ""}, {"name":
"reportedVariants", "type": {"type": "array", "items": {"type": "record", "name":
"ReportedVariantCancer", "fields": [{"name": "chromosome", "type": "string", "doc": ""}, {"name":
"position", "type": "int", "doc": ""}, {"name": "reference", "type": "string", "doc": ""}, {"name":
"alternate", "type": "string", "doc": ""}, {"name": "cosmicIds", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}, {"name": "clinVarIds", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "dbSnpId", "type": ["null", "string"], "doc": ""}, {"name":
"cdnaChange", "type": ["null", "string"], "doc": ""}, {"name": "proteinChange", "type": ["null",
"string"], "doc": ""}, {"name": "commonAf", "type": ["null", "int"], "doc": ""}, {"name": "ihp",
"type": ["null", "int"], "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type":
["null", {"type": "map", "values": "string"}], "doc": ""}, {"name":
"additionalNumericVariantAnnotations", "type": ["null", {"type": "map", "values": "float"}], "doc":
""}, {"name": "comments", "type": ["null", {"type": "array", "items": "string"}], "doc": ""},
{"name": "reportEvents", "type": {"type": "array", "items": {"type": "record", "name":
"ReportEventCancer", "fields": [{"name": "reportEventId", "type": "string", "doc": ""}, {"name":
"genomicFeatureCancer", "type": {"type": "record", "name": "GenomicFeatureCancer", "fields":
[{"name": "featureType", "type": {"type": "enum", "name": "FeatureTypeCancer", "doc": "", "symbols":
["regulatory_region", "gene", "transcript"]}, "doc": ""}, {"name": "ensemblId", "type": "string",
"doc": ""}, {"name": "refSeqTranscriptId", "type": "string", "doc": ""}, {"name": "refSeqProteinId",
"type": "string", "doc": ""}, {"name": "geneName", "type": "string", "doc": ""}, {"name":
"roleInCancer", "type": ["null", {"type": "enum", "name": "RoleInCancer", "doc": "", "symbols":
["oncogene", "tumor_suppressor_gene", "both"]}], "doc": ""}]}, "doc": ""}, {"name": "soTerms",
"type": {"type": "array", "items": {"type": "record", "name": "SoTerm", "doc": "", "fields":
[{"name": "id", "type": "string", "doc": ""}, {"name": "name", "type": "string", "doc": ""}]}},
"doc": ""}, {"name": "actions", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "Action", "fields": [{"name": "actionType", "type": ["null", {"type": "enum", "name":
"ActionType", "doc": "", "symbols": ["therapy", "therapeutic", "prognosis", "diagnosis"]}]},
{"name": "evidences", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"drug", "type": ["null", "string"], "doc": ""}, {"name": "status", "type": ["null", {"type": "enum",
"name": "ActionStatus", "doc": "", "symbols": ["clinical", "pre_clinical"]}], "doc": ""}, {"name":
"variantActionable", "type": "boolean", "doc": ""}, {"name": "comments", "type": ["null", {"type":
"array", "items": "string"}], "doc": ""}, {"name": "url", "type": ["null", "string"], "doc": ""},
{"name": "evidenceType", "type": ["null", "string"], "doc": ""}, {"name": "source", "type":
"string", "doc": ""}]}}], "doc": ""}, {"name": "groupOfVariants", "type": ["null", "int"], "doc":
""}, {"name": "eventJustification", "type": ["null", "string"], "doc": ""}, {"name": "tier", "type":
["null", {"type": "enum", "name": "Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2",
"TIER3"]}], "doc": ""}]}}, "doc": ""}, {"name": "variantCalls", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "VariantCall", "fields": [{"name": "sampleId", "type": "string",
"doc": ""}, {"name": "depthReference", "type": ["null", "int"], "doc": ""}, {"name":
"depthAlternate", "type": ["null", "int"], "doc": ""}, {"name": "vaf", "type": ["null", "double"],
"doc": ""}]}}], "doc": ""}, {"name": "alleleOrigins", "type": {"type": "array", "items": {"type":
"enum", "name": "AlleleOrigin", "doc": "", "symbols": ["de_novo_variant", "germline_variant",
"maternal_variant", "paternal_variant", "pedigree_specific_variant", "population_specific_variant",
"somatic_variant"]}}, "doc": ""}]}}, "doc": ""}, {"name": "reportedStructuralVariants", "type":
{"type": "array", "items": {"type": "record", "name": "ReportedStructuralVariantCancer", "fields":
[{"name": "chromosome", "type": "string", "doc": ""}, {"name": "start", "type": "int", "doc": ""},
{"name": "end", "type": "int", "doc": ""}, {"name": "type", "type": {"type": "record", "name":
"StructuralVariantType", "doc": "", "fields": [{"name": "firstLevelType", "type": {"type": "enum",
"name": "StructuralVariantFirstLevelType", "doc": "", "symbols": ["DEL", "INS", "DUP", "INV", "CNV",
"DUP_TANDEM", "DEL_ME", "INS_ME"]}}, {"name": "subtype", "type": ["null", "string"]}]}, "doc": ""},
{"name": "reference", "type": "string", "doc": ""}, {"name": "alternate", "type": "string", "doc":
""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type": "map", "values":
"string"}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}, {"name": "alleleOrigins", "type": {"type": "array", "items":
"AlleleOrigin"}, "doc": ""}]}}, "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "analysisId",
        "comments",
        "referenceDatabasesVersions",
        "reportRequestId",
        "reportUri",
        "reportedStructuralVariants",
        "reportedVariants",
        "softwareVersions",
        "versionControl",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'reportedStructuralVariants': ReportedStructuralVariantCancer,
            'reportedVariants': ReportedVariantCancer,
            'versionControl': ReportVersionControl,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'reportedStructuralVariants': ReportedStructuralVariantCancer,
            'reportedVariants': ReportedVariantCancer,
            'versionControl': ReportVersionControl,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'analysisId', 'comments', 'referenceDatabasesVersions',
        'reportRequestId', 'reportUri', 'reportedStructuralVariants',
        'reportedVariants', 'softwareVersions', 'versionControl'
    ]

    def __init__(self, **kwargs):
        self.analysisId = kwargs.get(
            'analysisId', None)
        self.comments = kwargs.get(
            'comments', None)
        self.referenceDatabasesVersions = kwargs.get(
            'referenceDatabasesVersions', None)
        self.reportRequestId = kwargs.get(
            'reportRequestId', None)
        self.reportUri = kwargs.get(
            'reportUri', None)
        self.reportedStructuralVariants = kwargs.get(
            'reportedStructuralVariants', None)
        self.reportedVariants = kwargs.get(
            'reportedVariants', None)
        self.softwareVersions = kwargs.get(
            'softwareVersions', None)
        self.versionControl = kwargs.get(
            'versionControl', ReportVersionControl())


class CancerParticipant(ProtocolElement):
    """
    This defines a Cancer Participant
    """
    _schemaSource = """
{"type": "record", "name": "CancerParticipant", "namespace": "org.gel.models.participant.avro",
"doc": "", "fields": [{"name": "yearOfBirth", "type": ["null", "int"]}, {"name": "morphology",
"type": ["null", {"type": "array", "items": "string"}]}, {"name": "readyForAnalysis", "type":
"boolean"}, {"name": "consentStatus", "type": ["null", {"type": "record", "name": "ConsentStatus",
"doc": "", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "", "default": false},
{"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default": false}, {"name":
"secondaryFindingConsent", "type": "boolean", "doc": "", "default": false}, {"name":
"carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}], "doc": ""}, {"name":
"center", "type": ["null", "string"], "doc": ""}, {"name": "individualId", "type": "string", "doc":
""}, {"name": "primaryDiagnosisDisease", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "primaryDiagnosisSubDisease", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "sex", "type": {"type": "enum", "name": "Sex", "symbols":
["FEMALE", "MALE", "UNKNOWN"]}, "doc": ""}, {"name": "additionalInformation", "type": ["null",
{"type": "map", "values": "string"}], "doc": ""}, {"name": "assignedICD10", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "tumourSamples", "type": {"type":
"array", "items": {"type": "record", "name": "TumourSample", "fields": [{"name": "sampleId", "type":
"string", "doc": ""}, {"name": "labSampleId", "type": "int", "doc": ""}, {"name": "LDPCode", "type":
"string", "doc": ""}, {"name": "tumourId", "type": "string", "doc": ""}, {"name": "programmePhase",
"type": ["null", {"type": "enum", "name": "ProgrammePhase", "symbols": ["CRUK", "OXFORD", "CLL",
"IIP", "MAIN", "EXPT"]}], "doc": ""}, {"name": "diseaseType", "type": ["null", {"type": "enum",
"name": "diseaseType", "symbols": ["ADULT_GLIOMA", "BLADDER", "BREAST",
"CARCINOMA_OF_UNKNOWN_PRIMARY", "CHILDHOOD", "COLORECTAL", "ENDOMETRIAL_CARCINOMA", "HAEMONC",
"HEPATOPANCREATOBILIARY", "LUNG", "MALIGNANT_MELANOMA", "NASOPHARYNGEAL", "ORAL_OROPHARYNGEAL",
"OVARIAN", "PROSTATE", "RENAL", "SARCOMA", "SINONASAL", "TESTICULAR_GERM_CELL_TUMOURS",
"UPPER_GASTROINTESTINAL", "NON_HODGKINS_B_CELL_LYMPHOMA_LOW_MOD_GRADE", "CLASSICAL_HODGKINS",
"NODULAR_LYMPHOCYTE_PREDOMINANT_HODGKINS", "T_CELL_LYMPHOMA"]}], "doc": ""}, {"name":
"diseaseSubType", "type": ["null", "string"], "doc": ""}, {"name": "clinicalSampleDateTime", "type":
["null", "string"], "doc": ""}, {"name": "tumourType", "type": ["null", {"type": "enum", "name":
"TumourType", "symbols": ["PRIMARY", "METASTATIC_RECURRENCE", "RECURRENCE_OF_PRIMARY_TUMOUR",
"METASTASES"]}], "doc": ""}, {"name": "tumourContent", "type": ["null", {"type": "enum", "name":
"TumourContent", "symbols": ["High", "Medium", "Low"]}], "doc": ""}, {"name": "source", "type":
["null", {"type": "enum", "name": "SampleSource", "symbols": ["TUMOUR",
"BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS", "BONE_MARROW_ASPIRATE_TUMOUR_CELLS", "BLOOD", "SALIVA",
"FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "preparationMethod", "type": ["null", {"type":
"enum", "name": "PreparationMethod", "symbols": ["EDTA", "ORAGENE", "FF", "FFPE",
"CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}, {"name": "tissueSource", "type": ["null", {"type":
"enum", "name": "TissueSource", "symbols": ["BMA_TUMOUR_SORTED_CELLS", "CT_GUIDED_BIOPSY",
"ENDOSCOPIC_BIOPSY", "ENDOSCOPIC_ULTRASOUND_GUIDED_BIOPSY", "ENDOSCOPIC_ULTRASOUND_GUIDED_FNA",
"LAPAROSCOPIC_BIOPSY", "LAPAROSCOPIC_EXCISION", "MRI_GUIDED_BIOPSY", "NON_GUIDED_BIOPSY",
"SURGICAL_RESECTION", "STEREOTACTICALLY_GUIDED_BIOPSY", "USS_GUIDED_BIOPSY",
"NON_STANDARD_BIOPSY"]}], "doc": ""}, {"name": "product", "type": ["null", {"type": "enum", "name":
"Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name": "morphologyICD", "type": ["null",
"string"], "doc": ""}, {"name": "morphologySnomedCT", "type": ["null", "string"], "doc": ""},
{"name": "morphologySnomedRT", "type": ["null", "string"], "doc": ""}, {"name": "topographyICD",
"type": ["null", "string"], "doc": ""}, {"name": "topographySnomedCT", "type": ["null", "string"],
"doc": ""}, {"name": "topographySnomedRT", "type": ["null", "string"], "doc": ""}]}}}, {"name":
"germlineSamples", "type": {"type": "array", "items": {"type": "record", "name": "GermlineSample",
"fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int",
"doc": ""}, {"name": "LDPCode", "type": "string", "doc": ""}, {"name": "source", "type": ["null",
"SampleSource"], "doc": ""}, {"name": "product", "type": ["null", "Product"], "doc": ""}, {"name":
"preparationMethod", "type": ["null", "PreparationMethod"], "doc": ""}, {"name": "programmePhase",
"type": ["null", "ProgrammePhase"], "doc": ""}, {"name": "clinicalSampleDateTime", "type": ["null",
"string"], "doc": ""}]}}}, {"name": "matchedSamples", "type": {"type": "array", "items": {"type":
"record", "name": "MatchedSamples", "doc": "", "fields": [{"name": "germlineSampleId", "type":
["null", "string"], "doc": ""}, {"name": "tumourSampleId", "type": ["null", "string"], "doc":
""}]}}}, {"name": "versionControl", "type": ["null", {"type": "record", "name": "VersionControl",
"fields": [{"name": "GitVersionControl", "type": "string", "doc": "", "default": "1.0.3"}]}], "doc":
""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "additionalInformation",
        "assignedICD10",
        "center",
        "consentStatus",
        "germlineSamples",
        "individualId",
        "matchedSamples",
        "morphology",
        "primaryDiagnosisDisease",
        "primaryDiagnosisSubDisease",
        "readyForAnalysis",
        "sex",
        "tumourSamples",
        "versionControl",
        "yearOfBirth",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'consentStatus': ConsentStatus,
            'germlineSamples': GermlineSample,
            'matchedSamples': MatchedSamples,
            'tumourSamples': TumourSample,
            'versionControl': VersionControl,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'consentStatus': ConsentStatus,
            'germlineSamples': GermlineSample,
            'matchedSamples': MatchedSamples,
            'tumourSamples': TumourSample,
            'versionControl': VersionControl,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'additionalInformation', 'assignedICD10', 'center',
        'consentStatus', 'germlineSamples', 'individualId',
        'matchedSamples', 'morphology', 'primaryDiagnosisDisease',
        'primaryDiagnosisSubDisease', 'readyForAnalysis', 'sex',
        'tumourSamples', 'versionControl', 'yearOfBirth'
    ]

    def __init__(self, **kwargs):
        self.additionalInformation = kwargs.get(
            'additionalInformation', None)
        self.assignedICD10 = kwargs.get(
            'assignedICD10', None)
        self.center = kwargs.get(
            'center', None)
        self.consentStatus = kwargs.get(
            'consentStatus', None)
        self.germlineSamples = kwargs.get(
            'germlineSamples', None)
        self.individualId = kwargs.get(
            'individualId', None)
        self.matchedSamples = kwargs.get(
            'matchedSamples', None)
        self.morphology = kwargs.get(
            'morphology', None)
        self.primaryDiagnosisDisease = kwargs.get(
            'primaryDiagnosisDisease', None)
        self.primaryDiagnosisSubDisease = kwargs.get(
            'primaryDiagnosisSubDisease', None)
        self.readyForAnalysis = kwargs.get(
            'readyForAnalysis', None)
        self.sex = kwargs.get(
            'sex', None)
        self.tumourSamples = kwargs.get(
            'tumourSamples', None)
        self.versionControl = kwargs.get(
            'versionControl', None)
        self.yearOfBirth = kwargs.get(
            'yearOfBirth', None)


class CancerSomaticVariantLevelQuestions(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "CancerSomaticVariantLevelQuestions", "namespace":
"org.gel.models.report.avro", "fields": [{"name": "variantDetails", "type": "string", "doc": ""},
{"name": "variantActionability", "type": {"type": "enum", "name": "CancerActionability", "doc": "",
"symbols": ["predicts_therapeutic_response", "prognostic", "defines_diagnosis_group",
"eligibility_for_trial", "other"]}, "doc": ""}, {"name": "otherVariantActionability", "type":
["null", "string"]}, {"name": "variantUsability", "type": {"type": "enum", "name":
"CancerUsabilitySomatic", "doc": "", "symbols": ["already_actioned", "actioned_result_of_this_wga",
"not_yet_actioned"]}, "doc": ""}, {"name": "variantTested", "type": {"type": "enum", "name":
"CancerTested", "doc": "", "symbols": ["not_indicated_for_patient_care",
"no_orthologous_test_available", "test_performed_prior_to_wga",
"technical_validation_following_wga"]}, "doc": ""}, {"name": "validationAssayType", "type":
"string", "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "otherVariantActionability",
        "validationAssayType",
        "variantActionability",
        "variantDetails",
        "variantTested",
        "variantUsability",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'otherVariantActionability', 'validationAssayType',
        'variantActionability', 'variantDetails', 'variantTested',
        'variantUsability'
    ]

    def __init__(self, **kwargs):
        self.otherVariantActionability = kwargs.get(
            'otherVariantActionability', None)
        self.validationAssayType = kwargs.get(
            'validationAssayType', None)
        self.variantActionability = kwargs.get(
            'variantActionability', None)
        self.variantDetails = kwargs.get(
            'variantDetails', None)
        self.variantTested = kwargs.get(
            'variantTested', None)
        self.variantUsability = kwargs.get(
            'variantUsability', None)


class CancerTested(object):
    """
    An enumeration Variant tested:         *
    `not_indicated_for_patient_care`: No: not indicated for patient
    care at this time         * `no_orthologous_test_available`: No:
    no orthologous test available         *
    `test_performed_prior_to_wga`: Yes: test performed prior to
    receiving WGA (eg using standard-of-care assay such as panel
    testing, or sanger sequencing)         *
    `technical_validation_following_WGA`: Yes: technical validation
    performed/planned following receiving this WGA
    """
    not_indicated_for_patient_care = "not_indicated_for_patient_care"
    no_orthologous_test_available = "no_orthologous_test_available"
    test_performed_prior_to_wga = "test_performed_prior_to_wga"
    technical_validation_following_wga = "technical_validation_following_wga"

    def __hash__(self):
        return str(self).__hash__()


class CancerUsabilityGermline(object):
    """
    An enumeration Variant Usability:         * `already_actioned`:
    Already actioned (i.e. prior to receiving this WGA)         *
    `actioned_result_of_this_wga`: actioned as a result of receiving
    this WGA
    """
    already_actioned = "already_actioned"
    actioned_result_of_this_wga = "actioned_result_of_this_wga"

    def __hash__(self):
        return str(self).__hash__()


class CancerUsabilitySomatic(object):
    """
    An enumeration Variant Usability:         * `already_actioned`:
    Already actioned (i.e. prior to receiving this WGA)         *
    `actioned_result_of_this_wga`: actioned as a result of receiving
    this WGA         * `not_yet_actioned`: not yet actioned, but
    potentially actionable in the future
    """
    already_actioned = "already_actioned"
    actioned_result_of_this_wga = "actioned_result_of_this_wga"
    not_yet_actioned = "not_yet_actioned"

    def __hash__(self):
        return str(self).__hash__()


class CaseShared(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "CaseShared", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "previousGroups", "type": {"type": "array", "items": "string"}}, {"name":
"modifiedGroups", "type": {"type": "array", "items": "string"}}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "modifiedGroups",
        "previousGroups",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'modifiedGroups', 'previousGroups'
    ]

    def __init__(self, **kwargs):
        self.modifiedGroups = kwargs.get(
            'modifiedGroups', None)
        self.previousGroups = kwargs.get(
            'previousGroups', None)


class CaseSolvedFamily(object):
    """
    No documentation
    """
    yes = "yes"
    no = "no"
    partially = "partially"
    unknown = "unknown"

    def __hash__(self):
        return str(self).__hash__()


class ChiSquare1KGenomesPhase3Pop(ProtocolElement):
    """
    Chi-square test for goodness of fit of this sample to 1000 Genomes
    Phase 3 populations
    """
    _schemaSource = """
{"type": "record", "name": "ChiSquare1KGenomesPhase3Pop", "namespace":
"org.gel.models.participant.avro", "doc": "", "fields": [{"name": "kgSuperPopCategory", "type":
{"type": "enum", "name": "KgSuperPopCategory", "doc": "", "symbols": ["AFR", "AMR", "EAS", "EUR",
"SAS"]}, "doc": ""}, {"name": "kgPopCategory", "type": ["null", {"type": "enum", "name":
"KgPopCategory", "doc": "", "symbols": ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM",
"ESN", "FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK", "MSL", "MXL", "PEL", "PJL",
"PUR", "STU", "TSI", "YRI"]}], "doc": ""}, {"name": "chiSquare", "type": "double", "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "chiSquare",
        "kgPopCategory",
        "kgSuperPopCategory",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'chiSquare', 'kgPopCategory', 'kgSuperPopCategory'
    ]

    def __init__(self, **kwargs):
        self.chiSquare = kwargs.get(
            'chiSquare', None)
        self.kgPopCategory = kwargs.get(
            'kgPopCategory', None)
        self.kgSuperPopCategory = kwargs.get(
            'kgSuperPopCategory', None)


class ClinicalReportCancer(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "ClinicalReportCancer", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "interpretationRequestId", "type": "string", "doc": ""}, {"name":
"interpretationRequestVersion", "type": "string", "doc": ""}, {"name": "reportingDate", "type":
"string", "doc": ""}, {"name": "user", "type": "string", "doc": ""}, {"name": "candidateVariants",
"type": ["null", {"type": "array", "items": {"type": "record", "name": "ReportedVariantCancer",
"fields": [{"name": "chromosome", "type": "string", "doc": ""}, {"name": "position", "type": "int",
"doc": ""}, {"name": "reference", "type": "string", "doc": ""}, {"name": "alternate", "type":
"string", "doc": ""}, {"name": "cosmicIds", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "clinVarIds", "type": ["null", {"type": "array", "items": "string"}], "doc":
""}, {"name": "dbSnpId", "type": ["null", "string"], "doc": ""}, {"name": "cdnaChange", "type":
["null", "string"], "doc": ""}, {"name": "proteinChange", "type": ["null", "string"], "doc": ""},
{"name": "commonAf", "type": ["null", "int"], "doc": ""}, {"name": "ihp", "type": ["null", "int"],
"doc": ""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null",
{"type": "map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type":
"array", "items": "string"}], "doc": ""}, {"name": "reportEvents", "type": {"type": "array",
"items": {"type": "record", "name": "ReportEventCancer", "fields": [{"name": "reportEventId",
"type": "string", "doc": ""}, {"name": "genomicFeatureCancer", "type": {"type": "record", "name":
"GenomicFeatureCancer", "fields": [{"name": "featureType", "type": {"type": "enum", "name":
"FeatureTypeCancer", "doc": "", "symbols": ["regulatory_region", "gene", "transcript"]}, "doc": ""},
{"name": "ensemblId", "type": "string", "doc": ""}, {"name": "refSeqTranscriptId", "type": "string",
"doc": ""}, {"name": "refSeqProteinId", "type": "string", "doc": ""}, {"name": "geneName", "type":
"string", "doc": ""}, {"name": "roleInCancer", "type": ["null", {"type": "enum", "name":
"RoleInCancer", "doc": "", "symbols": ["oncogene", "tumor_suppressor_gene", "both"]}], "doc": ""}]},
"doc": ""}, {"name": "soTerms", "type": {"type": "array", "items": {"type": "record", "name":
"SoTerm", "doc": "", "fields": [{"name": "id", "type": "string", "doc": ""}, {"name": "name",
"type": "string", "doc": ""}]}}, "doc": ""}, {"name": "actions", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "Action", "fields": [{"name": "actionType", "type": ["null",
{"type": "enum", "name": "ActionType", "doc": "", "symbols": ["therapy", "therapeutic", "prognosis",
"diagnosis"]}]}, {"name": "evidences", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "drug", "type": ["null", "string"], "doc": ""}, {"name": "status", "type":
["null", {"type": "enum", "name": "ActionStatus", "doc": "", "symbols": ["clinical",
"pre_clinical"]}], "doc": ""}, {"name": "variantActionable", "type": "boolean", "doc": ""}, {"name":
"comments", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "url",
"type": ["null", "string"], "doc": ""}, {"name": "evidenceType", "type": ["null", "string"], "doc":
""}, {"name": "source", "type": "string", "doc": ""}]}}], "doc": ""}, {"name": "groupOfVariants",
"type": ["null", "int"], "doc": ""}, {"name": "eventJustification", "type": ["null", "string"],
"doc": ""}, {"name": "tier", "type": ["null", {"type": "enum", "name": "Tier", "doc": "", "symbols":
["NONE", "TIER1", "TIER2", "TIER3"]}], "doc": ""}]}}, "doc": ""}, {"name": "variantCalls", "type":
["null", {"type": "array", "items": {"type": "record", "name": "VariantCall", "fields": [{"name":
"sampleId", "type": "string", "doc": ""}, {"name": "depthReference", "type": ["null", "int"], "doc":
""}, {"name": "depthAlternate", "type": ["null", "int"], "doc": ""}, {"name": "vaf", "type":
["null", "double"], "doc": ""}]}}], "doc": ""}, {"name": "alleleOrigins", "type": {"type": "array",
"items": {"type": "enum", "name": "AlleleOrigin", "doc": "", "symbols": ["de_novo_variant",
"germline_variant", "maternal_variant", "paternal_variant", "pedigree_specific_variant",
"population_specific_variant", "somatic_variant"]}}, "doc": ""}]}}], "doc": ""}, {"name":
"candidateStructuralVariants", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "ReportedStructuralVariantCancer", "fields": [{"name": "chromosome", "type": "string",
"doc": ""}, {"name": "start", "type": "int", "doc": ""}, {"name": "end", "type": "int", "doc": ""},
{"name": "type", "type": {"type": "record", "name": "StructuralVariantType", "doc": "", "fields":
[{"name": "firstLevelType", "type": {"type": "enum", "name": "StructuralVariantFirstLevelType",
"doc": "", "symbols": ["DEL", "INS", "DUP", "INV", "CNV", "DUP_TANDEM", "DEL_ME", "INS_ME"]}},
{"name": "subtype", "type": ["null", "string"]}]}, "doc": ""}, {"name": "reference", "type":
"string", "doc": ""}, {"name": "alternate", "type": "string", "doc": ""}, {"name":
"additionalTextualVariantAnnotations", "type": ["null", {"type": "map", "values": "string"}], "doc":
""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type": "map", "values":
"float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "alleleOrigins", "type": {"type": "array", "items": "AlleleOrigin"}, "doc":
""}]}}], "doc": ""}, {"name": "genomicInterpretation", "type": "string", "doc": ""}, {"name":
"references", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"referenceDatabasesVersions", "type": {"type": "map", "values": "string"}, "doc": ""}, {"name":
"softwareVersions", "type": {"type": "map", "values": "string"}, "doc": ""}, {"name":
"genePanelsCoverage", "type": {"type": "map", "values": {"type": "array", "items": {"type": "map",
"values": "string"}}}, "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "candidateStructuralVariants",
        "candidateVariants",
        "genePanelsCoverage",
        "genomicInterpretation",
        "interpretationRequestId",
        "interpretationRequestVersion",
        "referenceDatabasesVersions",
        "references",
        "reportingDate",
        "softwareVersions",
        "user",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'candidateStructuralVariants': ReportedStructuralVariantCancer,
            'candidateVariants': ReportedVariantCancer,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'candidateStructuralVariants': ReportedStructuralVariantCancer,
            'candidateVariants': ReportedVariantCancer,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'candidateStructuralVariants', 'candidateVariants',
        'genePanelsCoverage', 'genomicInterpretation',
        'interpretationRequestId', 'interpretationRequestVersion',
        'referenceDatabasesVersions', 'references', 'reportingDate',
        'softwareVersions', 'user'
    ]

    def __init__(self, **kwargs):
        self.candidateStructuralVariants = kwargs.get(
            'candidateStructuralVariants', None)
        self.candidateVariants = kwargs.get(
            'candidateVariants', None)
        self.genePanelsCoverage = kwargs.get(
            'genePanelsCoverage', None)
        self.genomicInterpretation = kwargs.get(
            'genomicInterpretation', None)
        self.interpretationRequestId = kwargs.get(
            'interpretationRequestId', None)
        self.interpretationRequestVersion = kwargs.get(
            'interpretationRequestVersion', None)
        self.referenceDatabasesVersions = kwargs.get(
            'referenceDatabasesVersions', None)
        self.references = kwargs.get(
            'references', None)
        self.reportingDate = kwargs.get(
            'reportingDate', None)
        self.softwareVersions = kwargs.get(
            'softwareVersions', None)
        self.user = kwargs.get(
            'user', None)


class ClinicalReportRD(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "ClinicalReportRD", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "interpretationRequestId", "type": "string", "doc": ""}, {"name":
"interpretationRequestVersion", "type": "string", "doc": ""}, {"name":
"interpretationRequestAnalysisVersion", "type": ["null", "string"], "doc": ""}, {"name":
"reportingDate", "type": "string", "doc": ""}, {"name": "user", "type": "string", "doc": ""},
{"name": "candidateVariants", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"ReportedVariant", "fields": [{"name": "chromosome", "type": "string", "doc": ""}, {"name":
"dbSnpId", "type": ["null", "string"], "doc": ""}, {"name": "position", "type": "int", "doc": ""},
{"name": "reference", "type": "string", "doc": ""}, {"name": "alternate", "type": "string", "doc":
""}, {"name": "calledGenotypes", "type": {"type": "array", "items": {"type": "record", "name":
"CalledGenotype", "doc": "", "fields": [{"name": "gelId", "type": "string", "doc": ""}, {"name":
"sampleId", "type": "string", "doc": ""}, {"name": "genotype", "type": {"type": "enum", "name":
"Zygosity", "doc": "", "symbols": ["reference_homozygous", "heterozygous", "alternate_homozygous",
"missing", "half_missing_reference", "half_missing_alternate", "alternate_hemizigous",
"reference_hemizigous", "unk"]}, "doc": ""}, {"name": "phaseSet", "type": ["null", "int"], "doc":
""}, {"name": "depthReference", "type": ["null", "int"], "doc": ""}, {"name": "depthAlternate",
"type": ["null", "int"], "doc": ""}, {"name": "copyNumber", "type": ["null", "int"], "doc": ""}]}},
"doc": ""}, {"name": "reportEvents", "type": {"type": "array", "items": {"type": "record", "name":
"ReportEvent", "fields": [{"name": "reportEventId", "type": "string", "doc": ""}, {"name":
"phenotype", "type": "string", "doc": ""}, {"name": "panelName", "type": ["null", "string"], "doc":
""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name": "modeOfInheritance",
"type": {"type": "enum", "name": "ReportedModeOfInheritance", "doc": "", "symbols": ["monoallelic",
"monoallelic_not_imprinted", "monoallelic_maternally_imprinted", "monoallelic_paternally_imprinted",
"biallelic", "monoallelic_and_biallelic", "monoallelic_and_more_severe_biallelic",
"xlinked_biallelic", "xlinked_monoallelic", "mitochondrial", "unknown"]}, "doc": ""}, {"name":
"genomicFeature", "type": {"type": "record", "name": "GenomicFeature", "fields": [{"name":
"featureType", "type": {"type": "enum", "name": "FeatureTypes", "symbols": ["RegulatoryRegion",
"Gene", "Transcript"]}, "doc": ""}, {"name": "ensemblId", "type": "string", "doc": ""}, {"name":
"hgnc", "type": ["null", "string"], "doc": ""}, {"name": "otherIds", "type": ["null", {"type":
"map", "values": "string"}], "doc": ""}]}, "doc": ""}, {"name": "penetrance", "type": {"type":
"enum", "name": "Penetrance", "namespace": "org.gel.models.participant.avro", "doc": "", "symbols":
["complete", "incomplete"]}, "doc": ""}, {"name": "score", "type": "float", "doc": ""}, {"name":
"vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc": ""}, {"name":
"variantClassification", "type": ["null", {"type": "enum", "name": "VariantClassification", "doc":
"", "symbols": ["pathogenic_variant", "likely_pathogenic_variant",
"variant_of_unknown_clinical_significance", "likely_benign_variant", "benign_variant",
"not_assessed"]}], "doc": ""}, {"name": "fullyExplainsPhenotype", "type": ["null", "boolean"],
"doc": ""}, {"name": "groupOfVariants", "type": ["null", "int"], "doc": ""}, {"name":
"eventJustification", "type": ["null", "string"], "doc": ""}, {"name": "tier", "type": ["null",
{"type": "enum", "name": "Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3"]}], "doc":
""}]}}, "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}, {"name": "evidenceIds", "type": ["null", {"type": "map", "values":
"string"}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}}], "doc": ""}, {"name": "candidateStructuralVariants", "type":
["null", {"type": "array", "items": {"type": "record", "name": "ReportedStructuralVariant",
"fields": [{"name": "chromosome", "type": "string", "doc": ""}, {"name": "start", "type": "int",
"doc": ""}, {"name": "end", "type": "int", "doc": ""}, {"name": "type", "type": "string", "doc":
""}, {"name": "reference", "type": "string", "doc": ""}, {"name": "alternate", "type": "string",
"doc": ""}, {"name": "calledGenotypes", "type": {"type": "array", "items": "CalledGenotype"}},
{"name": "reportEvents", "type": {"type": "array", "items": "ReportEvent"}, "doc": ""}, {"name":
"additionalTextualVariantAnnotations", "type": ["null", {"type": "map", "values": "string"}], "doc":
""}, {"name": "evidenceIds", "type": ["null", {"type": "map", "values": "string"}], "doc": ""},
{"name": "additionalNumericVariantAnnotations", "type": ["null", {"type": "map", "values":
"float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}]}}], "doc": ""}, {"name": "genomicInterpretation", "type": "string", "doc": ""}, {"name":
"additionalAnalysisPanels", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"AdditionalAnalysisPanel", "fields": [{"name": "specificDisease", "type": "string"}, {"name":
"panelName", "type": "string"}, {"name": "panelVersion", "type": ["null", "string"]}]}}]}, {"name":
"supportingEvidence", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"referenceDatabasesVersions", "type": {"type": "map", "values": "string"}, "doc": ""}, {"name":
"softwareVersions", "type": {"type": "map", "values": "string"}, "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "additionalAnalysisPanels",
        "candidateStructuralVariants",
        "candidateVariants",
        "genomicInterpretation",
        "interpretationRequestAnalysisVersion",
        "interpretationRequestId",
        "interpretationRequestVersion",
        "referenceDatabasesVersions",
        "reportingDate",
        "softwareVersions",
        "supportingEvidence",
        "user",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'additionalAnalysisPanels': AdditionalAnalysisPanel,
            'candidateStructuralVariants': ReportedStructuralVariant,
            'candidateVariants': ReportedVariant,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'additionalAnalysisPanels': AdditionalAnalysisPanel,
            'candidateStructuralVariants': ReportedStructuralVariant,
            'candidateVariants': ReportedVariant,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'additionalAnalysisPanels', 'candidateStructuralVariants',
        'candidateVariants', 'genomicInterpretation',
        'interpretationRequestAnalysisVersion',
        'interpretationRequestId', 'interpretationRequestVersion',
        'referenceDatabasesVersions', 'reportingDate',
        'softwareVersions', 'supportingEvidence', 'user'
    ]

    def __init__(self, **kwargs):
        self.additionalAnalysisPanels = kwargs.get(
            'additionalAnalysisPanels', None)
        self.candidateStructuralVariants = kwargs.get(
            'candidateStructuralVariants', None)
        self.candidateVariants = kwargs.get(
            'candidateVariants', None)
        self.genomicInterpretation = kwargs.get(
            'genomicInterpretation', None)
        self.interpretationRequestAnalysisVersion = kwargs.get(
            'interpretationRequestAnalysisVersion', None)
        self.interpretationRequestId = kwargs.get(
            'interpretationRequestId', None)
        self.interpretationRequestVersion = kwargs.get(
            'interpretationRequestVersion', None)
        self.referenceDatabasesVersions = kwargs.get(
            'referenceDatabasesVersions', None)
        self.reportingDate = kwargs.get(
            'reportingDate', None)
        self.softwareVersions = kwargs.get(
            'softwareVersions', None)
        self.supportingEvidence = kwargs.get(
            'supportingEvidence', None)
        self.user = kwargs.get(
            'user', None)


class ClinicalUtility(object):
    """
    No documentation
    """
    none = "none"
    change_in_medication = "change_in_medication"
    surgical_option = "surgical_option"
    additional_surveillance_for_proband_or_relatives = "additional_surveillance_for_proband_or_relatives"
    clinical_trial_eligibility = "clinical_trial_eligibility"
    informs_reproductive_choice = "informs_reproductive_choice"
    unknown = "unknown"
    other = "other"

    def __hash__(self):
        return str(self).__hash__()


class Code(object):
    """
    This code define the change type, it can define a general change
    in the case as CLOSED or can define a change in one or more
    variants:  * `C0`: **Case Closed successfully**: Clinical Report
    was generated with **one or more Candidate Variants**. * `C1`:
    **Case Closed unsuccessfully**: Clinical Report couldn't be
    generated because **no Candidate Variants were found**. * `C2`:
    **Case Blocked**: Errors were found in this cases and was sent to
    quarantine for further investigation * `C3`: **Case Shared**: This
    cases was shared with other group of users. * `C4`: **Supporting
    evidence change**: One or More supporting evidence were modified
    to the cases __(See ClinicalReport)__. * `C5`: **Variant added**:
    One or more variant were selected as Candidate Variants. * `C6`:
    **Variant removed**: One or more variant were removed as Candidate
    Variants. * `C7`: **Variant modified**: One or more Candidate
    Variants were modified __(Any change or comment over this variants
    should be capture)__.
    """
    C0 = "C0"
    C1 = "C1"
    C2 = "C2"
    C3 = "C3"
    C4 = "C4"
    C5 = "C5"
    C6 = "C6"
    C7 = "C7"

    def __hash__(self):
        return str(self).__hash__()


class ComplexGeneticPhenomena(object):
    """
    No documentation
    """
    mosaicism = "mosaicism"
    monosomy = "monosomy"
    disomy = "disomy"
    uniparental_disomy = "uniparental_disomy"
    trisomy = "trisomy"
    other_aneuploidy = "other_aneuploidy"

    def __hash__(self):
        return str(self).__hash__()


class ConfirmationDecision(object):
    """
    No documentation
    """
    yes = "yes"
    no = "no"
    na = "na"

    def __hash__(self):
        return str(self).__hash__()


class ConfirmationOutcome(object):
    """
    No documentation
    """
    yes = "yes"
    no = "no"
    na = "na"

    def __hash__(self):
        return str(self).__hash__()


class ConsentStatus(ProtocolElement):
    """
    Consent Status
    """
    _schemaSource = """
{"type": "record", "name": "ConsentStatus", "namespace": "org.gel.models.participant.avro", "doc":
"", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "", "default": false},
{"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default": false}, {"name":
"secondaryFindingConsent", "type": "boolean", "doc": "", "default": false}, {"name":
"carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {}

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'carrierStatusConsent', 'primaryFindingConsent',
        'programmeConsent', 'secondaryFindingConsent'
    ]

    def __init__(self, **kwargs):
        self.carrierStatusConsent = kwargs.get(
            'carrierStatusConsent', False)
        self.primaryFindingConsent = kwargs.get(
            'primaryFindingConsent', False)
        self.programmeConsent = kwargs.get(
            'programmeConsent', False)
        self.secondaryFindingConsent = kwargs.get(
            'secondaryFindingConsent', False)


class DeliveryTask(ProtocolElement):
    """
    Defines a delivery task. A delivery task identifies an instance of
    the whole delivery     interaction cycle, whether successful or
    not. This allows traceability and identification     of failed
    deliveries
    """
    _schemaSource = """
{"type": "record", "name": "DeliveryTask", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "tieringResultId", "type": "int", "doc": ""}, {"name": "basePath", "type":
"string", "doc": ""}, {"name": "protocolVersion", "type": "string"}, {"name": "analysisType",
"type": {"type": "enum", "name": "AnalysisType", "symbols": ["rare_disease", "cancer"]}}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "analysisType",
        "basePath",
        "protocolVersion",
        "tieringResultId",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'analysisType', 'basePath', 'protocolVersion',
        'tieringResultId'
    ]

    def __init__(self, **kwargs):
        self.analysisType = kwargs.get(
            'analysisType', None)
        self.basePath = kwargs.get(
            'basePath', None)
        self.protocolVersion = kwargs.get(
            'protocolVersion', None)
        self.tieringResultId = kwargs.get(
            'tieringResultId', None)


class DiseasePenetrance(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "DiseasePenetrance", "namespace": "org.gel.models.participant.avro",
"fields": [{"name": "specificDisease", "type": "string"}, {"name": "penetrance", "type": {"type":
"enum", "name": "Penetrance", "doc": "", "symbols": ["complete", "incomplete"]}}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "penetrance",
        "specificDisease",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'penetrance', 'specificDisease'
    ]

    def __init__(self, **kwargs):
        self.penetrance = kwargs.get(
            'penetrance', None)
        self.specificDisease = kwargs.get(
            'specificDisease', None)


class Disorder(ProtocolElement):
    """
    This is quite GEL specific. This is the way is stored in
    ModelCatalogue and PanelApp.     Currently all specific disease
    titles are assigned to a disease subgroup so really only
    specificDisease needs to be     completed but we add the others
    for generality
    """
    _schemaSource = """
{"type": "record", "name": "Disorder", "namespace": "org.gel.models.participant.avro", "doc": "",
"fields": [{"name": "diseaseGroup", "type": ["null", "string"], "doc": ""}, {"name":
"diseaseSubGroup", "type": ["null", "string"], "doc": ""}, {"name": "specificDisease", "type":
["null", "string"], "doc": ""}, {"name": "ageOfOnset", "type": ["null", "float"], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "ageOfOnset",
        "diseaseGroup",
        "diseaseSubGroup",
        "specificDisease",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'ageOfOnset', 'diseaseGroup', 'diseaseSubGroup',
        'specificDisease'
    ]

    def __init__(self, **kwargs):
        self.ageOfOnset = kwargs.get(
            'ageOfOnset', None)
        self.diseaseGroup = kwargs.get(
            'diseaseGroup', None)
        self.diseaseSubGroup = kwargs.get(
            'diseaseSubGroup', None)
        self.specificDisease = kwargs.get(
            'specificDisease', None)


class EthnicCategory(object):
    """
    This is the list of ethnicities in ONS16      * `D`:  Mixed: White
    and Black Caribbean     * `E`:  Mixed: White and Black African
    * `F`:  Mixed: White and Asian     * `G`:  Mixed: Any other mixed
    background     * `A`:  White: British     * `B`:  White: Irish
    * `C`:  White: Any other White background     * `L`:  Asian or
    Asian British: Any other Asian background     * `M`:  Black or
    Black British: Caribbean     * `N`:  Black or Black British:
    African     * `H`:  Asian or Asian British: Indian     * `J`:
    Asian or Asian British: Pakistani     * `K`:  Asian or Asian
    British: Bangladeshi     * `P`:  Black or Black British: Any other
    Black background     * `S`:  Other Ethnic Groups: Any other ethnic
    group     * `R`:  Other Ethnic Groups: Chinese     * `Z`:  Not
    stated
    """
    D = "D"
    E = "E"
    F = "F"
    G = "G"
    A = "A"
    B = "B"
    C = "C"
    L = "L"
    M = "M"
    N = "N"
    H = "H"
    J = "J"
    K = "K"
    P = "P"
    S = "S"
    R = "R"
    Z = "Z"

    def __hash__(self):
        return str(self).__hash__()


class FamilyLevelQuestions(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "FamilyLevelQuestions", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "caseSolvedFamily", "type": {"type": "enum", "name": "CaseSolvedFamily",
"symbols": ["yes", "no", "partially", "unknown"]}, "doc": ""}, {"name": "segregationQuestion",
"type": {"type": "enum", "name": "SegregationQuestion", "symbols": ["yes", "no"]}, "doc": ""},
{"name": "additionalComments", "type": "string", "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "additionalComments",
        "caseSolvedFamily",
        "segregationQuestion",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'additionalComments', 'caseSolvedFamily',
        'segregationQuestion'
    ]

    def __init__(self, **kwargs):
        self.additionalComments = kwargs.get(
            'additionalComments', None)
        self.caseSolvedFamily = kwargs.get(
            'caseSolvedFamily', None)
        self.segregationQuestion = kwargs.get(
            'segregationQuestion', None)


class FamilyQCState(object):
    """
    FamilyQCState
    """
    noState = "noState"
    passedMedicalReviewReadyForInterpretation = "passedMedicalReviewReadyForInterpretation"
    passedMedicalReviewNotReadyForInterpretation = "passedMedicalReviewNotReadyForInterpretation"
    queryToGel = "queryToGel"
    queryToGMC = "queryToGMC"
    failed = "failed"

    def __hash__(self):
        return str(self).__hash__()


class FeatureTypeCancer(object):
    """
    The genomic feature type  * regulatory_region: A region of
    sequence that is involved in the control of a biological process.
    SO:0005836 * gene: A region (or regions) that includes all of the
    sequence elements necessary to encode a functional transcript. A
    gene may include regulatory regions, transcribed regions and/or
    other functional sequence regions. SO:0000704 * transcript: An RNA
    synthesized on a DNA or RNA template by an RNA polymerase.
    SO:0000673
    """
    regulatory_region = "regulatory_region"
    gene = "gene"
    transcript = "transcript"

    def __hash__(self):
        return str(self).__hash__()


class FeatureTypes(object):
    """
    No documentation
    """
    RegulatoryRegion = "RegulatoryRegion"
    Gene = "Gene"
    Transcript = "Transcript"

    def __hash__(self):
        return str(self).__hash__()


class File(ProtocolElement):
    """
    This defines a file     This Record is defined by the sampleID and
    a URI     Currently SampleID can be a single String or an array of
    strings if multiple samples are associated with the same file
    *
    """
    _schemaSource = """
{"type": "record", "name": "File", "namespace": "org.gel.models.report.avro", "doc": "", "fields":
[{"name": "sampleId", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"uriFile", "type": "string", "doc": ""}, {"name": "fileType", "type": {"type": "enum", "name":
"FileType", "symbols": ["BAM", "gVCF", "VCF_small", "VCF_somatic_small", "VCF_CNV",
"VCF_somatic_CNV", "VCF_SV", "VCF_somatic_SV", "VCF_SV_CNV", "SVG", "ANN", "BigWig", "MD5Sum",
"ROH", "OTHER", "PARTITION", "VARIANT_FREQUENCIES", "COVERAGE"]}}, {"name": "md5Sum", "type":
["null", "string"]}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "fileType",
        "md5Sum",
        "sampleId",
        "uriFile",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'fileType', 'md5Sum', 'sampleId', 'uriFile'
    ]

    def __init__(self, **kwargs):
        self.fileType = kwargs.get(
            'fileType', None)
        self.md5Sum = kwargs.get(
            'md5Sum', None)
        self.sampleId = kwargs.get(
            'sampleId', None)
        self.uriFile = kwargs.get(
            'uriFile', None)


class FileType(object):
    """
    No documentation
    """
    BAM = "BAM"
    gVCF = "gVCF"
    VCF_small = "VCF_small"
    VCF_somatic_small = "VCF_somatic_small"
    VCF_CNV = "VCF_CNV"
    VCF_somatic_CNV = "VCF_somatic_CNV"
    VCF_SV = "VCF_SV"
    VCF_somatic_SV = "VCF_somatic_SV"
    VCF_SV_CNV = "VCF_SV_CNV"
    SVG = "SVG"
    ANN = "ANN"
    BigWig = "BigWig"
    MD5Sum = "MD5Sum"
    ROH = "ROH"
    OTHER = "OTHER"
    PARTITION = "PARTITION"
    VARIANT_FREQUENCIES = "VARIANT_FREQUENCIES"
    COVERAGE = "COVERAGE"

    def __hash__(self):
        return str(self).__hash__()


class GenomicFeature(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "GenomicFeature", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "featureType", "type": {"type": "enum", "name": "FeatureTypes", "symbols":
["RegulatoryRegion", "Gene", "Transcript"]}, "doc": ""}, {"name": "ensemblId", "type": "string",
"doc": ""}, {"name": "hgnc", "type": ["null", "string"], "doc": ""}, {"name": "otherIds", "type":
["null", {"type": "map", "values": "string"}], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "ensemblId",
        "featureType",
        "hgnc",
        "otherIds",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'ensemblId', 'featureType', 'hgnc', 'otherIds'
    ]

    def __init__(self, **kwargs):
        self.ensemblId = kwargs.get(
            'ensemblId', None)
        self.featureType = kwargs.get(
            'featureType', None)
        self.hgnc = kwargs.get(
            'hgnc', None)
        self.otherIds = kwargs.get(
            'otherIds', None)


class GenomicFeatureCancer(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "GenomicFeatureCancer", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "featureType", "type": {"type": "enum", "name": "FeatureTypeCancer", "doc": "",
"symbols": ["regulatory_region", "gene", "transcript"]}, "doc": ""}, {"name": "ensemblId", "type":
"string", "doc": ""}, {"name": "refSeqTranscriptId", "type": "string", "doc": ""}, {"name":
"refSeqProteinId", "type": "string", "doc": ""}, {"name": "geneName", "type": "string", "doc": ""},
{"name": "roleInCancer", "type": ["null", {"type": "enum", "name": "RoleInCancer", "doc": "",
"symbols": ["oncogene", "tumor_suppressor_gene", "both"]}], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "ensemblId",
        "featureType",
        "geneName",
        "refSeqProteinId",
        "refSeqTranscriptId",
        "roleInCancer",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'ensemblId', 'featureType', 'geneName', 'refSeqProteinId',
        'refSeqTranscriptId', 'roleInCancer'
    ]

    def __init__(self, **kwargs):
        self.ensemblId = kwargs.get(
            'ensemblId', None)
        self.featureType = kwargs.get(
            'featureType', None)
        self.geneName = kwargs.get(
            'geneName', None)
        self.refSeqProteinId = kwargs.get(
            'refSeqProteinId', None)
        self.refSeqTranscriptId = kwargs.get(
            'refSeqTranscriptId', None)
        self.roleInCancer = kwargs.get(
            'roleInCancer', None)


class GermlineSample(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "GermlineSample", "namespace": "org.gel.models.participant.avro",
"fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int",
"doc": ""}, {"name": "LDPCode", "type": "string", "doc": ""}, {"name": "source", "type": ["null",
{"type": "enum", "name": "SampleSource", "symbols": ["TUMOUR",
"BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS", "BONE_MARROW_ASPIRATE_TUMOUR_CELLS", "BLOOD", "SALIVA",
"FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "product", "type": ["null", {"type": "enum", "name":
"Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name": "preparationMethod", "type": ["null",
{"type": "enum", "name": "PreparationMethod", "symbols": ["EDTA", "ORAGENE", "FF", "FFPE",
"CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}, {"name": "programmePhase", "type": ["null",
{"type": "enum", "name": "ProgrammePhase", "symbols": ["CRUK", "OXFORD", "CLL", "IIP", "MAIN",
"EXPT"]}], "doc": ""}, {"name": "clinicalSampleDateTime", "type": ["null", "string"], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "LDPCode",
        "clinicalSampleDateTime",
        "labSampleId",
        "preparationMethod",
        "product",
        "programmePhase",
        "sampleId",
        "source",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'LDPCode', 'clinicalSampleDateTime', 'labSampleId',
        'preparationMethod', 'product', 'programmePhase', 'sampleId',
        'source'
    ]

    def __init__(self, **kwargs):
        self.LDPCode = kwargs.get(
            'LDPCode', None)
        self.clinicalSampleDateTime = kwargs.get(
            'clinicalSampleDateTime', None)
        self.labSampleId = kwargs.get(
            'labSampleId', None)
        self.preparationMethod = kwargs.get(
            'preparationMethod', None)
        self.product = kwargs.get(
            'product', None)
        self.programmePhase = kwargs.get(
            'programmePhase', None)
        self.sampleId = kwargs.get(
            'sampleId', None)
        self.source = kwargs.get(
            'source', None)


class HpoTerm(ProtocolElement):
    """
    This defines an HPO term and its modifiers (possibly multiple)
    If HPO term presence is unknown we don't have a entry on the list
    """
    _schemaSource = """
{"type": "record", "name": "HpoTerm", "namespace": "org.gel.models.participant.avro", "doc": "",
"fields": [{"name": "term", "type": "string", "doc": ""}, {"name": "termPresence", "type": ["null",
{"type": "enum", "name": "TernaryOption", "doc": "", "symbols": ["yes", "no", "unknown"]}], "doc":
""}, {"name": "hpoBuildNumber", "type": ["null", "string"], "doc": ""}, {"name": "modifiers",
"type": ["null", {"type": "record", "name": "HpoTermModifiers", "fields": [{"name": "laterality",
"type": ["null", {"type": "enum", "name": "Laterality", "symbols": ["RIGHT", "UNILATERAL",
"BILATERAL", "LEFT"]}]}, {"name": "progression", "type": ["null", {"type": "enum", "name":
"Progression", "symbols": ["PROGRESSIVE", "NONPROGRESSIVE"]}]}, {"name": "severity", "type":
["null", {"type": "enum", "name": "Severity", "symbols": ["BORDERLINE", "MILD", "MODERATE",
"SEVERE", "PROFOUND"]}]}, {"name": "spatialPattern", "type": ["null", {"type": "enum", "name":
"SpatialPattern", "symbols": ["DISTAL", "GENERALIZED", "LOCALIZED", "PROXIMAL"]}]}]}], "doc": ""},
{"name": "ageOfOnset", "type": ["null", {"type": "enum", "name": "AgeOfOnset", "symbols":
["EMBRYONAL_ONSET", "FETAL_ONSET", "NEONATAL_ONSET", "INFANTILE_ONSET", "CHILDHOOD_ONSET",
"JUVENILE_ONSET", "YOUNG_ADULT_ONSET", "LATE_ONSET", "MIDDLE_AGE_ONSET"]}], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "ageOfOnset",
        "hpoBuildNumber",
        "modifiers",
        "term",
        "termPresence",
    }

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

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'modifiers': HpoTermModifiers,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'ageOfOnset', 'hpoBuildNumber', 'modifiers', 'term',
        'termPresence'
    ]

    def __init__(self, **kwargs):
        self.ageOfOnset = kwargs.get(
            'ageOfOnset', None)
        self.hpoBuildNumber = kwargs.get(
            'hpoBuildNumber', None)
        self.modifiers = kwargs.get(
            'modifiers', None)
        self.term = kwargs.get(
            'term', None)
        self.termPresence = kwargs.get(
            'termPresence', None)


class HpoTermModifiers(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "HpoTermModifiers", "namespace": "org.gel.models.participant.avro",
"fields": [{"name": "laterality", "type": ["null", {"type": "enum", "name": "Laterality", "symbols":
["RIGHT", "UNILATERAL", "BILATERAL", "LEFT"]}]}, {"name": "progression", "type": ["null", {"type":
"enum", "name": "Progression", "symbols": ["PROGRESSIVE", "NONPROGRESSIVE"]}]}, {"name": "severity",
"type": ["null", {"type": "enum", "name": "Severity", "symbols": ["BORDERLINE", "MILD", "MODERATE",
"SEVERE", "PROFOUND"]}]}, {"name": "spatialPattern", "type": ["null", {"type": "enum", "name":
"SpatialPattern", "symbols": ["DISTAL", "GENERALIZED", "LOCALIZED", "PROXIMAL"]}]}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "laterality",
        "progression",
        "severity",
        "spatialPattern",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'laterality', 'progression', 'severity', 'spatialPattern'
    ]

    def __init__(self, **kwargs):
        self.laterality = kwargs.get(
            'laterality', None)
        self.progression = kwargs.get(
            'progression', None)
        self.severity = kwargs.get(
            'severity', None)
        self.spatialPattern = kwargs.get(
            'spatialPattern', None)


class InbreedingCoefficient(ProtocolElement):
    """
    Inbreeding coefficient
    """
    _schemaSource = """
{"type": "record", "name": "InbreedingCoefficient", "namespace": "org.gel.models.participant.avro",
"doc": "", "fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "program", "type":
"string", "doc": ""}, {"name": "version", "type": "string", "doc": ""}, {"name": "estimationMethod",
"type": "string", "doc": ""}, {"name": "coefficient", "type": "double", "doc": ""}, {"name":
"standardError", "type": ["null", "double"], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "coefficient",
        "estimationMethod",
        "program",
        "sampleId",
        "standardError",
        "version",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'coefficient', 'estimationMethod', 'program', 'sampleId',
        'standardError', 'version'
    ]

    def __init__(self, **kwargs):
        self.coefficient = kwargs.get(
            'coefficient', None)
        self.estimationMethod = kwargs.get(
            'estimationMethod', None)
        self.program = kwargs.get(
            'program', None)
        self.sampleId = kwargs.get(
            'sampleId', None)
        self.standardError = kwargs.get(
            'standardError', None)
        self.version = kwargs.get(
            'version', None)


class InterpretationData(ProtocolElement):
    """
    Represents the set of all interpretation data (excluding file
    contents) to be stored in MDT for         one TieringResult.
    Semantic restrictions (not automatically verifiable):
    - All InterpretedGenomesRD in interpretationResults refer to the
    TieringResult tieringResult.             - All
    InterpretedGenomesRD in interpretationResults have passed the QC
    stage and have been               approved by the originating GMCs
    """
    _schemaSource = """
{"type": "record", "name": "InterpretationData", "namespace": "org.gel.models.report.avro", "doc":
"", "fields": [{"name": "tieringResult", "type": {"type": "record", "name": "TieringResult", "doc":
"", "fields": [{"name": "versionControl", "type": {"type": "record", "name": "ReportVersionControl",
"fields": [{"name": "gitVersionControl", "type": "string", "doc": "", "default": "4.2.0"}]}, "doc":
""}, {"name": "genomeAssemblyVersion", "type": "string", "doc": "", "default": "GRCh37.p13"},
{"name": "cellbaseVersion", "type": "string", "doc": "", "default": "4.0"}, {"name": "workspace",
"type": {"type": "array", "items": "string"}, "doc": ""}, {"name": "bams", "type": {"type": "array",
"items": {"type": "record", "name": "File", "doc": "", "fields": [{"name": "sampleId", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "uriFile", "type": "string",
"doc": ""}, {"name": "fileType", "type": {"type": "enum", "name": "FileType", "symbols": ["BAM",
"gVCF", "VCF_small", "VCF_somatic_small", "VCF_CNV", "VCF_somatic_CNV", "VCF_SV", "VCF_somatic_SV",
"VCF_SV_CNV", "SVG", "ANN", "BigWig", "MD5Sum", "ROH", "OTHER", "PARTITION", "VARIANT_FREQUENCIES",
"COVERAGE"]}}, {"name": "md5Sum", "type": ["null", "string"]}]}}, "doc": ""}, {"name": "vcfs",
"type": {"type": "array", "items": "File"}, "doc": ""}, {"name": "bigWigs", "type": ["null",
{"type": "array", "items": "File"}], "doc": ""}, {"name": "pedigreeDiagram", "type": ["null",
"File"], "doc": ""}, {"name": "annotationFile", "type": ["null", "File"], "doc": ""}, {"name":
"otherFiles", "type": ["null", {"type": "map", "values": "File"}], "doc": ""}, {"name": "pedigree",
"type": {"type": "record", "name": "Pedigree", "namespace": "org.gel.models.participant.avro",
"doc": "", "fields": [{"name": "versionControl", "type": ["null", {"type": "record", "name":
"VersionControl", "fields": [{"name": "GitVersionControl", "type": "string", "doc": "", "default":
"1.0.3"}]}], "doc": ""}, {"name": "LDPCode", "type": ["null", "string"]}, {"name": "familyId",
"type": "string", "doc": ""}, {"name": "members", "type": {"type": "array", "items": {"type":
"record", "name": "PedigreeMember", "doc": "", "fields": [{"name": "pedigreeId", "type": ["null",
"int"], "doc": ""}, {"name": "isProband", "type": ["null", "boolean"], "doc": ""}, {"name":
"participantId", "type": ["null", "string"], "doc": ""}, {"name": "participantQCState", "type":
["null", {"type": "enum", "name": "ParticipantQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}], "doc": ""}, {"name": "gelSuperFamilyId", "type": ["null",
"string"], "doc": ""}, {"name": "sex", "type": {"type": "enum", "name": "Sex", "doc": "", "symbols":
["MALE", "FEMALE", "UNKNOWN"]}, "doc": ""}, {"name": "personKaryotypicSex", "type": ["null",
{"type": "enum", "name": "PersonKaryotipicSex", "doc": "", "symbols": ["UNKNOWN", "XX", "XY", "XO",
"XXY", "XXX", "XXYY", "XXXY", "XXXX", "XYY", "OTHER"]}], "doc": ""}, {"name": "yearOfBirth", "type":
["null", "int"], "doc": ""}, {"name": "fatherId", "type": ["null", "int"], "doc": ""}, {"name":
"motherId", "type": ["null", "int"], "doc": ""}, {"name": "superFatherId", "type": ["null", "int"],
"doc": ""}, {"name": "superMotherId", "type": ["null", "int"], "doc": ""}, {"name": "twinGroup",
"type": ["null", "int"], "doc": ""}, {"name": "monozygotic", "type": ["null", {"type": "enum",
"name": "TernaryOption", "doc": "", "symbols": ["yes", "no", "unknown"]}], "doc": ""}, {"name":
"adoptedStatus", "type": ["null", {"type": "enum", "name": "AdoptedStatus", "doc": "", "symbols":
["notadopted", "adoptedin", "adoptedout"]}], "doc": ""}, {"name": "lifeStatus", "type": ["null",
{"type": "enum", "name": "LifeStatus", "doc": "", "symbols": ["ALIVE", "ABORTED", "DECEASED",
"UNBORN", "STILLBORN", "MISCARRIAGE"]}], "doc": ""}, {"name": "consanguineousParents", "type":
["null", "TernaryOption"], "doc": ""}, {"name": "affectionStatus", "type": ["null", {"type": "enum",
"name": "AffectionStatus", "doc": "", "symbols": ["UNAFFECTED", "AFFECTED", "UNCERTAIN"]}], "doc":
""}, {"name": "disorderList", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"Disorder", "doc": "", "fields": [{"name": "diseaseGroup", "type": ["null", "string"], "doc": ""},
{"name": "diseaseSubGroup", "type": ["null", "string"], "doc": ""}, {"name": "specificDisease",
"type": ["null", "string"], "doc": ""}, {"name": "ageOfOnset", "type": ["null", "float"], "doc":
""}]}}], "doc": ""}, {"name": "hpoTermList", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "HpoTerm", "doc": "", "fields": [{"name": "term", "type": "string", "doc": ""},
{"name": "termPresence", "type": ["null", "TernaryOption"], "doc": ""}, {"name": "hpoBuildNumber",
"type": ["null", "string"], "doc": ""}, {"name": "modifiers", "type": ["null", {"type": "record",
"name": "HpoTermModifiers", "fields": [{"name": "laterality", "type": ["null", {"type": "enum",
"name": "Laterality", "symbols": ["RIGHT", "UNILATERAL", "BILATERAL", "LEFT"]}]}, {"name":
"progression", "type": ["null", {"type": "enum", "name": "Progression", "symbols": ["PROGRESSIVE",
"NONPROGRESSIVE"]}]}, {"name": "severity", "type": ["null", {"type": "enum", "name": "Severity",
"symbols": ["BORDERLINE", "MILD", "MODERATE", "SEVERE", "PROFOUND"]}]}, {"name": "spatialPattern",
"type": ["null", {"type": "enum", "name": "SpatialPattern", "symbols": ["DISTAL", "GENERALIZED",
"LOCALIZED", "PROXIMAL"]}]}]}], "doc": ""}, {"name": "ageOfOnset", "type": ["null", {"type": "enum",
"name": "AgeOfOnset", "symbols": ["EMBRYONAL_ONSET", "FETAL_ONSET", "NEONATAL_ONSET",
"INFANTILE_ONSET", "CHILDHOOD_ONSET", "JUVENILE_ONSET", "YOUNG_ADULT_ONSET", "LATE_ONSET",
"MIDDLE_AGE_ONSET"]}], "doc": ""}]}}], "doc": ""}, {"name": "ancestries", "type": ["null", {"type":
"record", "name": "Ancestries", "doc": "", "fields": [{"name": "mothersEthnicOrigin", "type":
["null", {"type": "enum", "name": "EthnicCategory", "doc": "", "symbols": ["D", "E", "F", "G", "A",
"B", "C", "L", "M", "N", "H", "J", "K", "P", "S", "R", "Z"]}], "doc": ""}, {"name":
"mothersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"fathersEthnicOrigin", "type": ["null", "EthnicCategory"], "doc": ""}, {"name":
"fathersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"chiSquare1KGenomesPhase3Pop", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "ChiSquare1KGenomesPhase3Pop", "doc": "", "fields": [{"name": "kgSuperPopCategory", "type":
{"type": "enum", "name": "KgSuperPopCategory", "doc": "", "symbols": ["AFR", "AMR", "EAS", "EUR",
"SAS"]}, "doc": ""}, {"name": "kgPopCategory", "type": ["null", {"type": "enum", "name":
"KgPopCategory", "doc": "", "symbols": ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM",
"ESN", "FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK", "MSL", "MXL", "PEL", "PJL",
"PUR", "STU", "TSI", "YRI"]}], "doc": ""}, {"name": "chiSquare", "type": "double", "doc": ""}]}}],
"doc": ""}]}], "doc": ""}, {"name": "consentStatus", "type": ["null", {"type": "record", "name":
"ConsentStatus", "doc": "", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "",
"default": false}, {"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default":
false}, {"name": "secondaryFindingConsent", "type": "boolean", "doc": "", "default": false},
{"name": "carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}], "doc": ""},
{"name": "samples", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Sample",
"fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int",
"doc": ""}, {"name": "source", "type": ["null", {"type": "enum", "name": "SampleSource", "symbols":
["BLOOD", "SALIVA", "FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "product", "type": ["null",
{"type": "enum", "name": "Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name":
"preparationMethod", "type": ["null", {"type": "enum", "name": "PreparationMethod", "symbols":
["EDTA", "ORAGENE", "FF", "FFPE", "CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}]}}], "doc": ""},
{"name": "inbreedingCoefficient", "type": ["null", {"type": "record", "name":
"InbreedingCoefficient", "doc": "", "fields": [{"name": "sampleId", "type": "string", "doc": ""},
{"name": "program", "type": "string", "doc": ""}, {"name": "version", "type": "string", "doc": ""},
{"name": "estimationMethod", "type": "string", "doc": ""}, {"name": "coefficient", "type": "double",
"doc": ""}, {"name": "standardError", "type": ["null", "double"], "doc": ""}]}], "doc": ""},
{"name": "additionalInformation", "type": ["null", {"type": "map", "values": "string"}], "doc":
""}]}}}, {"name": "analysisPanels", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "AnalysisPanel", "fields": [{"name": "specificDisease", "type": "string"}, {"name":
"panelName", "type": "string"}, {"name": "panelVersion", "type": ["null", "string"]}, {"name":
"reviewOutcome", "type": "string"}, {"name": "multipleGeneticOrigins", "type": "string"}]}}]},
{"name": "diseasePenetrances", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "DiseasePenetrance", "fields": [{"name": "specificDisease", "type": "string"}, {"name":
"penetrance", "type": {"type": "enum", "name": "Penetrance", "doc": "", "symbols": ["complete",
"incomplete"]}}]}}]}, {"name": "readyForAnalysis", "type": "boolean"}, {"name": "familyQCState",
"type": ["null", {"type": "enum", "name": "FamilyQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}]}]}, "doc": ""}, {"name": "tieredVariants", "type": {"type":
"array", "items": {"type": "record", "name": "ReportedVariant", "fields": [{"name": "chromosome",
"type": "string", "doc": ""}, {"name": "dbSnpId", "type": ["null", "string"], "doc": ""}, {"name":
"position", "type": "int", "doc": ""}, {"name": "reference", "type": "string", "doc": ""}, {"name":
"alternate", "type": "string", "doc": ""}, {"name": "calledGenotypes", "type": {"type": "array",
"items": {"type": "record", "name": "CalledGenotype", "doc": "", "fields": [{"name": "gelId",
"type": "string", "doc": ""}, {"name": "sampleId", "type": "string", "doc": ""}, {"name":
"genotype", "type": {"type": "enum", "name": "Zygosity", "doc": "", "symbols":
["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk"]}, "doc": ""}, {"name": "phaseSet", "type": ["null", "int"], "doc": ""}, {"name":
"depthReference", "type": ["null", "int"], "doc": ""}, {"name": "depthAlternate", "type": ["null",
"int"], "doc": ""}, {"name": "copyNumber", "type": ["null", "int"], "doc": ""}]}}, "doc": ""},
{"name": "reportEvents", "type": {"type": "array", "items": {"type": "record", "name":
"ReportEvent", "fields": [{"name": "reportEventId", "type": "string", "doc": ""}, {"name":
"phenotype", "type": "string", "doc": ""}, {"name": "panelName", "type": ["null", "string"], "doc":
""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name": "modeOfInheritance",
"type": {"type": "enum", "name": "ReportedModeOfInheritance", "doc": "", "symbols": ["monoallelic",
"monoallelic_not_imprinted", "monoallelic_maternally_imprinted", "monoallelic_paternally_imprinted",
"biallelic", "monoallelic_and_biallelic", "monoallelic_and_more_severe_biallelic",
"xlinked_biallelic", "xlinked_monoallelic", "mitochondrial", "unknown"]}, "doc": ""}, {"name":
"genomicFeature", "type": {"type": "record", "name": "GenomicFeature", "fields": [{"name":
"featureType", "type": {"type": "enum", "name": "FeatureTypes", "symbols": ["RegulatoryRegion",
"Gene", "Transcript"]}, "doc": ""}, {"name": "ensemblId", "type": "string", "doc": ""}, {"name":
"hgnc", "type": ["null", "string"], "doc": ""}, {"name": "otherIds", "type": ["null", {"type":
"map", "values": "string"}], "doc": ""}]}, "doc": ""}, {"name": "penetrance", "type":
"org.gel.models.participant.avro.Penetrance", "doc": ""}, {"name": "score", "type": "float", "doc":
""}, {"name": "vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc":
""}, {"name": "variantClassification", "type": ["null", {"type": "enum", "name":
"VariantClassification", "doc": "", "symbols": ["pathogenic_variant", "likely_pathogenic_variant",
"variant_of_unknown_clinical_significance", "likely_benign_variant", "benign_variant",
"not_assessed"]}], "doc": ""}, {"name": "fullyExplainsPhenotype", "type": ["null", "boolean"],
"doc": ""}, {"name": "groupOfVariants", "type": ["null", "int"], "doc": ""}, {"name":
"eventJustification", "type": ["null", "string"], "doc": ""}, {"name": "tier", "type": ["null",
{"type": "enum", "name": "Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3"]}], "doc":
""}]}}, "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}, {"name": "evidenceIds", "type": ["null", {"type": "map", "values":
"string"}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}}, "doc": ""}, {"name": "tieringVersion", "type": "string", "doc":
""}, {"name": "internalStudyId", "type": "string", "doc": ""}, {"name": "complexGeneticPhenomena",
"type": ["null", {"type": "enum", "name": "ComplexGeneticPhenomena", "symbols": ["mosaicism",
"monosomy", "disomy", "uniparental_disomy", "trisomy", "other_aneuploidy"]}], "doc": ""}, {"name":
"otherFamilyHistory", "type": ["null", {"type": "record", "name": "OtherFamilyHistory", "doc": "",
"fields": [{"name": "maternalFamilyHistory", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "paternalFamilyHistory", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}]}], "doc": ""}, {"name": "genePanelsCoverage", "type": ["null", {"type":
"map", "values": {"type": "map", "values": {"type": "map", "values": "float"}}}], "doc": ""},
{"name": "additionalInfo", "type": ["null", {"type": "map", "values": "string"}], "doc": ""}]}},
{"name": "interpretationResults", "type": {"type": "array", "items": {"type": "record", "name":
"InterpretedGenomeRD", "fields": [{"name": "versionControl", "type": "ReportVersionControl", "doc":
""}, {"name": "interpretationRequestId", "type": "string", "doc": ""}, {"name": "analysisId",
"type": "string", "doc": ""}, {"name": "companyName", "type": "string", "doc": ""}, {"name":
"reportUri", "type": "string", "doc": ""}, {"name": "reportUrl", "type": "string", "doc": ""},
{"name": "reportedVariants", "type": {"type": "array", "items": "ReportedVariant"}, "doc": ""},
{"name": "referenceDatabasesVersions", "type": {"type": "map", "values": "string"}, "doc": ""},
{"name": "softwareVersions", "type": {"type": "map", "values": "string"}, "doc": ""}, {"name":
"reportedStructuralVariants", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"ReportedStructuralVariant", "fields": [{"name": "chromosome", "type": "string", "doc": ""},
{"name": "start", "type": "int", "doc": ""}, {"name": "end", "type": "int", "doc": ""}, {"name":
"type", "type": "string", "doc": ""}, {"name": "reference", "type": "string", "doc": ""}, {"name":
"alternate", "type": "string", "doc": ""}, {"name": "calledGenotypes", "type": {"type": "array",
"items": "CalledGenotype"}}, {"name": "reportEvents", "type": {"type": "array", "items":
"ReportEvent"}, "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type": ["null",
{"type": "map", "values": "string"}], "doc": ""}, {"name": "evidenceIds", "type": ["null", {"type":
"map", "values": "string"}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type":
["null", {"type": "map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}]}}], "doc": ""}, {"name": "comments", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}]}}}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "interpretationResults",
        "tieringResult",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'interpretationResults': InterpretedGenomeRD,
            'tieringResult': TieringResult,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'interpretationResults': InterpretedGenomeRD,
            'tieringResult': TieringResult,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'interpretationResults', 'tieringResult'
    ]

    def __init__(self, **kwargs):
        self.interpretationResults = kwargs.get(
            'interpretationResults', None)
        self.tieringResult = kwargs.get(
            'tieringResult', TieringResult())


class InterpretationRequestRD(ProtocolElement):
    """
    This record represents basic information for this report
    """
    _schemaSource = """
{"type": "record", "name": "InterpretationRequestRD", "namespace": "org.gel.models.report.avro",
"doc": "", "fields": [{"name": "versionControl", "type": {"type": "record", "name":
"ReportVersionControl", "fields": [{"name": "gitVersionControl", "type": "string", "doc": "",
"default": "4.2.0"}]}, "doc": ""}, {"name": "interpretationRequestId", "type": "string", "doc": ""},
{"name": "internalStudyId", "type": "string", "doc": ""}, {"name": "genomeAssemblyVersion", "type":
"string", "doc": "", "default": "GRCh37.p13"}, {"name": "cellbaseVersion", "type": "string", "doc":
"", "default": "4.0"}, {"name": "interpretationRequestVersion", "type": "int", "doc": ""}, {"name":
"interpretGenome", "type": "boolean", "doc": "", "default": false}, {"name": "workspace", "type":
{"type": "array", "items": "string"}, "doc": ""}, {"name": "bams", "type": {"type": "array",
"items": {"type": "record", "name": "File", "doc": "", "fields": [{"name": "sampleId", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "uriFile", "type": "string",
"doc": ""}, {"name": "fileType", "type": {"type": "enum", "name": "FileType", "symbols": ["BAM",
"gVCF", "VCF_small", "VCF_somatic_small", "VCF_CNV", "VCF_somatic_CNV", "VCF_SV", "VCF_somatic_SV",
"VCF_SV_CNV", "SVG", "ANN", "BigWig", "MD5Sum", "ROH", "OTHER", "PARTITION", "VARIANT_FREQUENCIES",
"COVERAGE"]}}, {"name": "md5Sum", "type": ["null", "string"]}]}}, "doc": ""}, {"name": "vcfs",
"type": {"type": "array", "items": "File"}, "doc": ""}, {"name": "bigWigs", "type": ["null",
{"type": "array", "items": "File"}], "doc": ""}, {"name": "pedigreeDiagram", "type": ["null",
"File"], "doc": ""}, {"name": "annotationFile", "type": ["null", "File"], "doc": ""}, {"name":
"otherFiles", "type": ["null", {"type": "map", "values": "File"}], "doc": ""}, {"name": "pedigree",
"type": {"type": "record", "name": "Pedigree", "namespace": "org.gel.models.participant.avro",
"doc": "", "fields": [{"name": "versionControl", "type": ["null", {"type": "record", "name":
"VersionControl", "fields": [{"name": "GitVersionControl", "type": "string", "doc": "", "default":
"1.0.3"}]}], "doc": ""}, {"name": "LDPCode", "type": ["null", "string"]}, {"name": "familyId",
"type": "string", "doc": ""}, {"name": "members", "type": {"type": "array", "items": {"type":
"record", "name": "PedigreeMember", "doc": "", "fields": [{"name": "pedigreeId", "type": ["null",
"int"], "doc": ""}, {"name": "isProband", "type": ["null", "boolean"], "doc": ""}, {"name":
"participantId", "type": ["null", "string"], "doc": ""}, {"name": "participantQCState", "type":
["null", {"type": "enum", "name": "ParticipantQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}], "doc": ""}, {"name": "gelSuperFamilyId", "type": ["null",
"string"], "doc": ""}, {"name": "sex", "type": {"type": "enum", "name": "Sex", "doc": "", "symbols":
["MALE", "FEMALE", "UNKNOWN"]}, "doc": ""}, {"name": "personKaryotypicSex", "type": ["null",
{"type": "enum", "name": "PersonKaryotipicSex", "doc": "", "symbols": ["UNKNOWN", "XX", "XY", "XO",
"XXY", "XXX", "XXYY", "XXXY", "XXXX", "XYY", "OTHER"]}], "doc": ""}, {"name": "yearOfBirth", "type":
["null", "int"], "doc": ""}, {"name": "fatherId", "type": ["null", "int"], "doc": ""}, {"name":
"motherId", "type": ["null", "int"], "doc": ""}, {"name": "superFatherId", "type": ["null", "int"],
"doc": ""}, {"name": "superMotherId", "type": ["null", "int"], "doc": ""}, {"name": "twinGroup",
"type": ["null", "int"], "doc": ""}, {"name": "monozygotic", "type": ["null", {"type": "enum",
"name": "TernaryOption", "doc": "", "symbols": ["yes", "no", "unknown"]}], "doc": ""}, {"name":
"adoptedStatus", "type": ["null", {"type": "enum", "name": "AdoptedStatus", "doc": "", "symbols":
["notadopted", "adoptedin", "adoptedout"]}], "doc": ""}, {"name": "lifeStatus", "type": ["null",
{"type": "enum", "name": "LifeStatus", "doc": "", "symbols": ["ALIVE", "ABORTED", "DECEASED",
"UNBORN", "STILLBORN", "MISCARRIAGE"]}], "doc": ""}, {"name": "consanguineousParents", "type":
["null", "TernaryOption"], "doc": ""}, {"name": "affectionStatus", "type": ["null", {"type": "enum",
"name": "AffectionStatus", "doc": "", "symbols": ["UNAFFECTED", "AFFECTED", "UNCERTAIN"]}], "doc":
""}, {"name": "disorderList", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"Disorder", "doc": "", "fields": [{"name": "diseaseGroup", "type": ["null", "string"], "doc": ""},
{"name": "diseaseSubGroup", "type": ["null", "string"], "doc": ""}, {"name": "specificDisease",
"type": ["null", "string"], "doc": ""}, {"name": "ageOfOnset", "type": ["null", "float"], "doc":
""}]}}], "doc": ""}, {"name": "hpoTermList", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "HpoTerm", "doc": "", "fields": [{"name": "term", "type": "string", "doc": ""},
{"name": "termPresence", "type": ["null", "TernaryOption"], "doc": ""}, {"name": "hpoBuildNumber",
"type": ["null", "string"], "doc": ""}, {"name": "modifiers", "type": ["null", {"type": "record",
"name": "HpoTermModifiers", "fields": [{"name": "laterality", "type": ["null", {"type": "enum",
"name": "Laterality", "symbols": ["RIGHT", "UNILATERAL", "BILATERAL", "LEFT"]}]}, {"name":
"progression", "type": ["null", {"type": "enum", "name": "Progression", "symbols": ["PROGRESSIVE",
"NONPROGRESSIVE"]}]}, {"name": "severity", "type": ["null", {"type": "enum", "name": "Severity",
"symbols": ["BORDERLINE", "MILD", "MODERATE", "SEVERE", "PROFOUND"]}]}, {"name": "spatialPattern",
"type": ["null", {"type": "enum", "name": "SpatialPattern", "symbols": ["DISTAL", "GENERALIZED",
"LOCALIZED", "PROXIMAL"]}]}]}], "doc": ""}, {"name": "ageOfOnset", "type": ["null", {"type": "enum",
"name": "AgeOfOnset", "symbols": ["EMBRYONAL_ONSET", "FETAL_ONSET", "NEONATAL_ONSET",
"INFANTILE_ONSET", "CHILDHOOD_ONSET", "JUVENILE_ONSET", "YOUNG_ADULT_ONSET", "LATE_ONSET",
"MIDDLE_AGE_ONSET"]}], "doc": ""}]}}], "doc": ""}, {"name": "ancestries", "type": ["null", {"type":
"record", "name": "Ancestries", "doc": "", "fields": [{"name": "mothersEthnicOrigin", "type":
["null", {"type": "enum", "name": "EthnicCategory", "doc": "", "symbols": ["D", "E", "F", "G", "A",
"B", "C", "L", "M", "N", "H", "J", "K", "P", "S", "R", "Z"]}], "doc": ""}, {"name":
"mothersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"fathersEthnicOrigin", "type": ["null", "EthnicCategory"], "doc": ""}, {"name":
"fathersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"chiSquare1KGenomesPhase3Pop", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "ChiSquare1KGenomesPhase3Pop", "doc": "", "fields": [{"name": "kgSuperPopCategory", "type":
{"type": "enum", "name": "KgSuperPopCategory", "doc": "", "symbols": ["AFR", "AMR", "EAS", "EUR",
"SAS"]}, "doc": ""}, {"name": "kgPopCategory", "type": ["null", {"type": "enum", "name":
"KgPopCategory", "doc": "", "symbols": ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM",
"ESN", "FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK", "MSL", "MXL", "PEL", "PJL",
"PUR", "STU", "TSI", "YRI"]}], "doc": ""}, {"name": "chiSquare", "type": "double", "doc": ""}]}}],
"doc": ""}]}], "doc": ""}, {"name": "consentStatus", "type": ["null", {"type": "record", "name":
"ConsentStatus", "doc": "", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "",
"default": false}, {"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default":
false}, {"name": "secondaryFindingConsent", "type": "boolean", "doc": "", "default": false},
{"name": "carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}], "doc": ""},
{"name": "samples", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Sample",
"fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int",
"doc": ""}, {"name": "source", "type": ["null", {"type": "enum", "name": "SampleSource", "symbols":
["BLOOD", "SALIVA", "FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "product", "type": ["null",
{"type": "enum", "name": "Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name":
"preparationMethod", "type": ["null", {"type": "enum", "name": "PreparationMethod", "symbols":
["EDTA", "ORAGENE", "FF", "FFPE", "CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}]}}], "doc": ""},
{"name": "inbreedingCoefficient", "type": ["null", {"type": "record", "name":
"InbreedingCoefficient", "doc": "", "fields": [{"name": "sampleId", "type": "string", "doc": ""},
{"name": "program", "type": "string", "doc": ""}, {"name": "version", "type": "string", "doc": ""},
{"name": "estimationMethod", "type": "string", "doc": ""}, {"name": "coefficient", "type": "double",
"doc": ""}, {"name": "standardError", "type": ["null", "double"], "doc": ""}]}], "doc": ""},
{"name": "additionalInformation", "type": ["null", {"type": "map", "values": "string"}], "doc":
""}]}}}, {"name": "analysisPanels", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "AnalysisPanel", "fields": [{"name": "specificDisease", "type": "string"}, {"name":
"panelName", "type": "string"}, {"name": "panelVersion", "type": ["null", "string"]}, {"name":
"reviewOutcome", "type": "string"}, {"name": "multipleGeneticOrigins", "type": "string"}]}}]},
{"name": "diseasePenetrances", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "DiseasePenetrance", "fields": [{"name": "specificDisease", "type": "string"}, {"name":
"penetrance", "type": {"type": "enum", "name": "Penetrance", "doc": "", "symbols": ["complete",
"incomplete"]}}]}}]}, {"name": "readyForAnalysis", "type": "boolean"}, {"name": "familyQCState",
"type": ["null", {"type": "enum", "name": "FamilyQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}]}]}, "doc": ""}, {"name": "tieredVariants", "type": {"type":
"array", "items": {"type": "record", "name": "ReportedVariant", "fields": [{"name": "chromosome",
"type": "string", "doc": ""}, {"name": "dbSnpId", "type": ["null", "string"], "doc": ""}, {"name":
"position", "type": "int", "doc": ""}, {"name": "reference", "type": "string", "doc": ""}, {"name":
"alternate", "type": "string", "doc": ""}, {"name": "calledGenotypes", "type": {"type": "array",
"items": {"type": "record", "name": "CalledGenotype", "doc": "", "fields": [{"name": "gelId",
"type": "string", "doc": ""}, {"name": "sampleId", "type": "string", "doc": ""}, {"name":
"genotype", "type": {"type": "enum", "name": "Zygosity", "doc": "", "symbols":
["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk"]}, "doc": ""}, {"name": "phaseSet", "type": ["null", "int"], "doc": ""}, {"name":
"depthReference", "type": ["null", "int"], "doc": ""}, {"name": "depthAlternate", "type": ["null",
"int"], "doc": ""}, {"name": "copyNumber", "type": ["null", "int"], "doc": ""}]}}, "doc": ""},
{"name": "reportEvents", "type": {"type": "array", "items": {"type": "record", "name":
"ReportEvent", "fields": [{"name": "reportEventId", "type": "string", "doc": ""}, {"name":
"phenotype", "type": "string", "doc": ""}, {"name": "panelName", "type": ["null", "string"], "doc":
""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name": "modeOfInheritance",
"type": {"type": "enum", "name": "ReportedModeOfInheritance", "doc": "", "symbols": ["monoallelic",
"monoallelic_not_imprinted", "monoallelic_maternally_imprinted", "monoallelic_paternally_imprinted",
"biallelic", "monoallelic_and_biallelic", "monoallelic_and_more_severe_biallelic",
"xlinked_biallelic", "xlinked_monoallelic", "mitochondrial", "unknown"]}, "doc": ""}, {"name":
"genomicFeature", "type": {"type": "record", "name": "GenomicFeature", "fields": [{"name":
"featureType", "type": {"type": "enum", "name": "FeatureTypes", "symbols": ["RegulatoryRegion",
"Gene", "Transcript"]}, "doc": ""}, {"name": "ensemblId", "type": "string", "doc": ""}, {"name":
"hgnc", "type": ["null", "string"], "doc": ""}, {"name": "otherIds", "type": ["null", {"type":
"map", "values": "string"}], "doc": ""}]}, "doc": ""}, {"name": "penetrance", "type":
"org.gel.models.participant.avro.Penetrance", "doc": ""}, {"name": "score", "type": "float", "doc":
""}, {"name": "vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc":
""}, {"name": "variantClassification", "type": ["null", {"type": "enum", "name":
"VariantClassification", "doc": "", "symbols": ["pathogenic_variant", "likely_pathogenic_variant",
"variant_of_unknown_clinical_significance", "likely_benign_variant", "benign_variant",
"not_assessed"]}], "doc": ""}, {"name": "fullyExplainsPhenotype", "type": ["null", "boolean"],
"doc": ""}, {"name": "groupOfVariants", "type": ["null", "int"], "doc": ""}, {"name":
"eventJustification", "type": ["null", "string"], "doc": ""}, {"name": "tier", "type": ["null",
{"type": "enum", "name": "Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3"]}], "doc":
""}]}}, "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}, {"name": "evidenceIds", "type": ["null", {"type": "map", "values":
"string"}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}}, "doc": ""}, {"name": "tieringVersion", "type": "string", "doc":
""}, {"name": "complexGeneticPhenomena", "type": ["null", {"type": "enum", "name":
"ComplexGeneticPhenomena", "symbols": ["mosaicism", "monosomy", "disomy", "uniparental_disomy",
"trisomy", "other_aneuploidy"]}], "doc": ""}, {"name": "otherFamilyHistory", "type": ["null",
{"type": "record", "name": "OtherFamilyHistory", "doc": "", "fields": [{"name":
"maternalFamilyHistory", "type": ["null", {"type": "array", "items": "string"}], "doc": ""},
{"name": "paternalFamilyHistory", "type": ["null", {"type": "array", "items": "string"}], "doc":
""}]}], "doc": ""}, {"name": "analysisReturnUri", "type": "string", "doc": ""}, {"name":
"analysisVersion", "type": ["null", "string"], "doc": ""}, {"name": "genePanelsCoverage", "type":
["null", {"type": "map", "values": {"type": "map", "values": {"type": "map", "values": "float"}}}],
"doc": ""}, {"name": "additionalInfo", "type": ["null", {"type": "map", "values": "string"}], "doc":
""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "additionalInfo",
        "analysisReturnUri",
        "analysisVersion",
        "annotationFile",
        "bams",
        "bigWigs",
        "complexGeneticPhenomena",
        "genePanelsCoverage",
        "internalStudyId",
        "interpretationRequestId",
        "interpretationRequestVersion",
        "otherFamilyHistory",
        "otherFiles",
        "pedigree",
        "pedigreeDiagram",
        "tieredVariants",
        "tieringVersion",
        "vcfs",
        "versionControl",
        "workspace",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'annotationFile': File,
            'bams': File,
            'bigWigs': File,
            'otherFamilyHistory': OtherFamilyHistory,
            'otherFiles': File,
            'pedigree': Pedigree,
            'pedigreeDiagram': File,
            'tieredVariants': ReportedVariant,
            'vcfs': File,
            'versionControl': ReportVersionControl,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'annotationFile': File,
            'bams': File,
            'bigWigs': File,
            'otherFamilyHistory': OtherFamilyHistory,
            'otherFiles': File,
            'pedigree': Pedigree,
            'pedigreeDiagram': File,
            'tieredVariants': ReportedVariant,
            'vcfs': File,
            'versionControl': ReportVersionControl,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'additionalInfo', 'analysisReturnUri', 'analysisVersion',
        'annotationFile', 'bams', 'bigWigs', 'cellbaseVersion',
        'complexGeneticPhenomena', 'genePanelsCoverage',
        'genomeAssemblyVersion', 'internalStudyId', 'interpretGenome',
        'interpretationRequestId', 'interpretationRequestVersion',
        'otherFamilyHistory', 'otherFiles', 'pedigree',
        'pedigreeDiagram', 'tieredVariants', 'tieringVersion', 'vcfs',
        'versionControl', 'workspace'
    ]

    def __init__(self, **kwargs):
        self.additionalInfo = kwargs.get(
            'additionalInfo', None)
        self.analysisReturnUri = kwargs.get(
            'analysisReturnUri', None)
        self.analysisVersion = kwargs.get(
            'analysisVersion', None)
        self.annotationFile = kwargs.get(
            'annotationFile', None)
        self.bams = kwargs.get(
            'bams', None)
        self.bigWigs = kwargs.get(
            'bigWigs', None)
        self.cellbaseVersion = kwargs.get(
            'cellbaseVersion', '4.0')
        self.complexGeneticPhenomena = kwargs.get(
            'complexGeneticPhenomena', None)
        self.genePanelsCoverage = kwargs.get(
            'genePanelsCoverage', None)
        self.genomeAssemblyVersion = kwargs.get(
            'genomeAssemblyVersion', 'GRCh37.p13')
        self.internalStudyId = kwargs.get(
            'internalStudyId', None)
        self.interpretGenome = kwargs.get(
            'interpretGenome', False)
        self.interpretationRequestId = kwargs.get(
            'interpretationRequestId', None)
        self.interpretationRequestVersion = kwargs.get(
            'interpretationRequestVersion', None)
        self.otherFamilyHistory = kwargs.get(
            'otherFamilyHistory', None)
        self.otherFiles = kwargs.get(
            'otherFiles', None)
        self.pedigree = kwargs.get(
            'pedigree', Pedigree())
        self.pedigreeDiagram = kwargs.get(
            'pedigreeDiagram', None)
        self.tieredVariants = kwargs.get(
            'tieredVariants', None)
        self.tieringVersion = kwargs.get(
            'tieringVersion', None)
        self.vcfs = kwargs.get(
            'vcfs', None)
        self.versionControl = kwargs.get(
            'versionControl', ReportVersionControl())
        self.workspace = kwargs.get(
            'workspace', None)


class InterpretedGenomeRD(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "InterpretedGenomeRD", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "versionControl", "type": {"type": "record", "name": "ReportVersionControl",
"fields": [{"name": "gitVersionControl", "type": "string", "doc": "", "default": "4.2.0"}]}, "doc":
""}, {"name": "interpretationRequestId", "type": "string", "doc": ""}, {"name": "analysisId",
"type": "string", "doc": ""}, {"name": "companyName", "type": "string", "doc": ""}, {"name":
"reportUri", "type": "string", "doc": ""}, {"name": "reportUrl", "type": "string", "doc": ""},
{"name": "reportedVariants", "type": {"type": "array", "items": {"type": "record", "name":
"ReportedVariant", "fields": [{"name": "chromosome", "type": "string", "doc": ""}, {"name":
"dbSnpId", "type": ["null", "string"], "doc": ""}, {"name": "position", "type": "int", "doc": ""},
{"name": "reference", "type": "string", "doc": ""}, {"name": "alternate", "type": "string", "doc":
""}, {"name": "calledGenotypes", "type": {"type": "array", "items": {"type": "record", "name":
"CalledGenotype", "doc": "", "fields": [{"name": "gelId", "type": "string", "doc": ""}, {"name":
"sampleId", "type": "string", "doc": ""}, {"name": "genotype", "type": {"type": "enum", "name":
"Zygosity", "doc": "", "symbols": ["reference_homozygous", "heterozygous", "alternate_homozygous",
"missing", "half_missing_reference", "half_missing_alternate", "alternate_hemizigous",
"reference_hemizigous", "unk"]}, "doc": ""}, {"name": "phaseSet", "type": ["null", "int"], "doc":
""}, {"name": "depthReference", "type": ["null", "int"], "doc": ""}, {"name": "depthAlternate",
"type": ["null", "int"], "doc": ""}, {"name": "copyNumber", "type": ["null", "int"], "doc": ""}]}},
"doc": ""}, {"name": "reportEvents", "type": {"type": "array", "items": {"type": "record", "name":
"ReportEvent", "fields": [{"name": "reportEventId", "type": "string", "doc": ""}, {"name":
"phenotype", "type": "string", "doc": ""}, {"name": "panelName", "type": ["null", "string"], "doc":
""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name": "modeOfInheritance",
"type": {"type": "enum", "name": "ReportedModeOfInheritance", "doc": "", "symbols": ["monoallelic",
"monoallelic_not_imprinted", "monoallelic_maternally_imprinted", "monoallelic_paternally_imprinted",
"biallelic", "monoallelic_and_biallelic", "monoallelic_and_more_severe_biallelic",
"xlinked_biallelic", "xlinked_monoallelic", "mitochondrial", "unknown"]}, "doc": ""}, {"name":
"genomicFeature", "type": {"type": "record", "name": "GenomicFeature", "fields": [{"name":
"featureType", "type": {"type": "enum", "name": "FeatureTypes", "symbols": ["RegulatoryRegion",
"Gene", "Transcript"]}, "doc": ""}, {"name": "ensemblId", "type": "string", "doc": ""}, {"name":
"hgnc", "type": ["null", "string"], "doc": ""}, {"name": "otherIds", "type": ["null", {"type":
"map", "values": "string"}], "doc": ""}]}, "doc": ""}, {"name": "penetrance", "type": {"type":
"enum", "name": "Penetrance", "namespace": "org.gel.models.participant.avro", "doc": "", "symbols":
["complete", "incomplete"]}, "doc": ""}, {"name": "score", "type": "float", "doc": ""}, {"name":
"vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc": ""}, {"name":
"variantClassification", "type": ["null", {"type": "enum", "name": "VariantClassification", "doc":
"", "symbols": ["pathogenic_variant", "likely_pathogenic_variant",
"variant_of_unknown_clinical_significance", "likely_benign_variant", "benign_variant",
"not_assessed"]}], "doc": ""}, {"name": "fullyExplainsPhenotype", "type": ["null", "boolean"],
"doc": ""}, {"name": "groupOfVariants", "type": ["null", "int"], "doc": ""}, {"name":
"eventJustification", "type": ["null", "string"], "doc": ""}, {"name": "tier", "type": ["null",
{"type": "enum", "name": "Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3"]}], "doc":
""}]}}, "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}, {"name": "evidenceIds", "type": ["null", {"type": "map", "values":
"string"}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}}, "doc": ""}, {"name": "referenceDatabasesVersions", "type":
{"type": "map", "values": "string"}, "doc": ""}, {"name": "softwareVersions", "type": {"type":
"map", "values": "string"}, "doc": ""}, {"name": "reportedStructuralVariants", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "ReportedStructuralVariant", "fields":
[{"name": "chromosome", "type": "string", "doc": ""}, {"name": "start", "type": "int", "doc": ""},
{"name": "end", "type": "int", "doc": ""}, {"name": "type", "type": "string", "doc": ""}, {"name":
"reference", "type": "string", "doc": ""}, {"name": "alternate", "type": "string", "doc": ""},
{"name": "calledGenotypes", "type": {"type": "array", "items": "CalledGenotype"}}, {"name":
"reportEvents", "type": {"type": "array", "items": "ReportEvent"}, "doc": ""}, {"name":
"additionalTextualVariantAnnotations", "type": ["null", {"type": "map", "values": "string"}], "doc":
""}, {"name": "evidenceIds", "type": ["null", {"type": "map", "values": "string"}], "doc": ""},
{"name": "additionalNumericVariantAnnotations", "type": ["null", {"type": "map", "values":
"float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}]}}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "analysisId",
        "comments",
        "companyName",
        "interpretationRequestId",
        "referenceDatabasesVersions",
        "reportUri",
        "reportUrl",
        "reportedStructuralVariants",
        "reportedVariants",
        "softwareVersions",
        "versionControl",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'reportedStructuralVariants': ReportedStructuralVariant,
            'reportedVariants': ReportedVariant,
            'versionControl': ReportVersionControl,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'reportedStructuralVariants': ReportedStructuralVariant,
            'reportedVariants': ReportedVariant,
            'versionControl': ReportVersionControl,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'analysisId', 'comments', 'companyName',
        'interpretationRequestId', 'referenceDatabasesVersions',
        'reportUri', 'reportUrl', 'reportedStructuralVariants',
        'reportedVariants', 'softwareVersions', 'versionControl'
    ]

    def __init__(self, **kwargs):
        self.analysisId = kwargs.get(
            'analysisId', None)
        self.comments = kwargs.get(
            'comments', None)
        self.companyName = kwargs.get(
            'companyName', None)
        self.interpretationRequestId = kwargs.get(
            'interpretationRequestId', None)
        self.referenceDatabasesVersions = kwargs.get(
            'referenceDatabasesVersions', None)
        self.reportUri = kwargs.get(
            'reportUri', None)
        self.reportUrl = kwargs.get(
            'reportUrl', None)
        self.reportedStructuralVariants = kwargs.get(
            'reportedStructuralVariants', None)
        self.reportedVariants = kwargs.get(
            'reportedVariants', None)
        self.softwareVersions = kwargs.get(
            'softwareVersions', None)
        self.versionControl = kwargs.get(
            'versionControl', ReportVersionControl())


class KgPopCategory(object):
    """
    1K Population
    """
    ACB = "ACB"
    ASW = "ASW"
    BEB = "BEB"
    CDX = "CDX"
    CEU = "CEU"
    CHB = "CHB"
    CHS = "CHS"
    CLM = "CLM"
    ESN = "ESN"
    FIN = "FIN"
    GBR = "GBR"
    GIH = "GIH"
    GWD = "GWD"
    IBS = "IBS"
    ITU = "ITU"
    JPT = "JPT"
    KHV = "KHV"
    LWK = "LWK"
    MSL = "MSL"
    MXL = "MXL"
    PEL = "PEL"
    PJL = "PJL"
    PUR = "PUR"
    STU = "STU"
    TSI = "TSI"
    YRI = "YRI"

    def __hash__(self):
        return str(self).__hash__()


class KgSuperPopCategory(object):
    """
    1K Super Population
    """
    AFR = "AFR"
    AMR = "AMR"
    EAS = "EAS"
    EUR = "EUR"
    SAS = "SAS"

    def __hash__(self):
        return str(self).__hash__()


class Laterality(object):
    """
    No documentation
    """
    RIGHT = "RIGHT"
    UNILATERAL = "UNILATERAL"
    BILATERAL = "BILATERAL"
    LEFT = "LEFT"

    def __hash__(self):
        return str(self).__hash__()


class LifeStatus(object):
    """
    Life Status
    """
    ALIVE = "ALIVE"
    ABORTED = "ABORTED"
    DECEASED = "DECEASED"
    UNBORN = "UNBORN"
    STILLBORN = "STILLBORN"
    MISCARRIAGE = "MISCARRIAGE"

    def __hash__(self):
        return str(self).__hash__()


class MatchedSamples(ProtocolElement):
    """
    This defines a pair of germline and tumor, this pair should/must
    be analyzed together
    """
    _schemaSource = """
{"type": "record", "name": "MatchedSamples", "namespace": "org.gel.models.participant.avro", "doc":
"", "fields": [{"name": "germlineSampleId", "type": ["null", "string"], "doc": ""}, {"name":
"tumourSampleId", "type": ["null", "string"], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "germlineSampleId",
        "tumourSampleId",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'germlineSampleId', 'tumourSampleId'
    ]

    def __init__(self, **kwargs):
        self.germlineSampleId = kwargs.get(
            'germlineSampleId', None)
        self.tumourSampleId = kwargs.get(
            'tumourSampleId', None)


class Method(object):
    """
    No documentation
    """
    RESECTION = "RESECTION"
    BIOPSY = "BIOPSY"
    BLOOD = "BLOOD"

    def __hash__(self):
        return str(self).__hash__()


class ModifiedVariant(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "ModifiedVariant", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "previousVariant", "type": {"type": "record", "name": "ReportedVariant", "fields":
[{"name": "chromosome", "type": "string", "doc": ""}, {"name": "dbSnpId", "type": ["null",
"string"], "doc": ""}, {"name": "position", "type": "int", "doc": ""}, {"name": "reference", "type":
"string", "doc": ""}, {"name": "alternate", "type": "string", "doc": ""}, {"name":
"calledGenotypes", "type": {"type": "array", "items": {"type": "record", "name": "CalledGenotype",
"doc": "", "fields": [{"name": "gelId", "type": "string", "doc": ""}, {"name": "sampleId", "type":
"string", "doc": ""}, {"name": "genotype", "type": {"type": "enum", "name": "Zygosity", "doc": "",
"symbols": ["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk"]}, "doc": ""}, {"name": "phaseSet", "type": ["null", "int"], "doc": ""}, {"name":
"depthReference", "type": ["null", "int"], "doc": ""}, {"name": "depthAlternate", "type": ["null",
"int"], "doc": ""}, {"name": "copyNumber", "type": ["null", "int"], "doc": ""}]}}, "doc": ""},
{"name": "reportEvents", "type": {"type": "array", "items": {"type": "record", "name":
"ReportEvent", "fields": [{"name": "reportEventId", "type": "string", "doc": ""}, {"name":
"phenotype", "type": "string", "doc": ""}, {"name": "panelName", "type": ["null", "string"], "doc":
""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name": "modeOfInheritance",
"type": {"type": "enum", "name": "ReportedModeOfInheritance", "doc": "", "symbols": ["monoallelic",
"monoallelic_not_imprinted", "monoallelic_maternally_imprinted", "monoallelic_paternally_imprinted",
"biallelic", "monoallelic_and_biallelic", "monoallelic_and_more_severe_biallelic",
"xlinked_biallelic", "xlinked_monoallelic", "mitochondrial", "unknown"]}, "doc": ""}, {"name":
"genomicFeature", "type": {"type": "record", "name": "GenomicFeature", "fields": [{"name":
"featureType", "type": {"type": "enum", "name": "FeatureTypes", "symbols": ["RegulatoryRegion",
"Gene", "Transcript"]}, "doc": ""}, {"name": "ensemblId", "type": "string", "doc": ""}, {"name":
"hgnc", "type": ["null", "string"], "doc": ""}, {"name": "otherIds", "type": ["null", {"type":
"map", "values": "string"}], "doc": ""}]}, "doc": ""}, {"name": "penetrance", "type": {"type":
"enum", "name": "Penetrance", "namespace": "org.gel.models.participant.avro", "doc": "", "symbols":
["complete", "incomplete"]}, "doc": ""}, {"name": "score", "type": "float", "doc": ""}, {"name":
"vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc": ""}, {"name":
"variantClassification", "type": ["null", {"type": "enum", "name": "VariantClassification", "doc":
"", "symbols": ["pathogenic_variant", "likely_pathogenic_variant",
"variant_of_unknown_clinical_significance", "likely_benign_variant", "benign_variant",
"not_assessed"]}], "doc": ""}, {"name": "fullyExplainsPhenotype", "type": ["null", "boolean"],
"doc": ""}, {"name": "groupOfVariants", "type": ["null", "int"], "doc": ""}, {"name":
"eventJustification", "type": ["null", "string"], "doc": ""}, {"name": "tier", "type": ["null",
{"type": "enum", "name": "Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3"]}], "doc":
""}]}}, "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}, {"name": "evidenceIds", "type": ["null", {"type": "map", "values":
"string"}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}}, {"name": "modifiedVariant", "type": "ReportedVariant"}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "modifiedVariant",
        "previousVariant",
    }

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

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'modifiedVariant': ReportedVariant,
            'previousVariant': ReportedVariant,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'modifiedVariant', 'previousVariant'
    ]

    def __init__(self, **kwargs):
        self.modifiedVariant = kwargs.get(
            'modifiedVariant', ReportedVariant())
        self.previousVariant = kwargs.get(
            'previousVariant', ReportedVariant())


class OtherFamilyHistory(ProtocolElement):
    """
    Family history for secondary findings.     Arrays of strings
    describing discrete family history phenotypes.     Usually:
    `EndocrineTumours`, `colorectal`, `BreastOvarian` and `HDOrStroke`
    but can be others
    """
    _schemaSource = """
{"type": "record", "name": "OtherFamilyHistory", "namespace": "org.gel.models.report.avro", "doc":
"", "fields": [{"name": "maternalFamilyHistory", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "paternalFamilyHistory", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "maternalFamilyHistory",
        "paternalFamilyHistory",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'maternalFamilyHistory', 'paternalFamilyHistory'
    ]

    def __init__(self, **kwargs):
        self.maternalFamilyHistory = kwargs.get(
            'maternalFamilyHistory', None)
        self.paternalFamilyHistory = kwargs.get(
            'paternalFamilyHistory', None)


class ParticipantQCState(object):
    """
    QCState Status
    """
    noState = "noState"
    passedMedicalReviewReadyForInterpretation = "passedMedicalReviewReadyForInterpretation"
    passedMedicalReviewNotReadyForInterpretation = "passedMedicalReviewNotReadyForInterpretation"
    queryToGel = "queryToGel"
    queryToGMC = "queryToGMC"
    failed = "failed"

    def __hash__(self):
        return str(self).__hash__()


class Pedigree(ProtocolElement):
    """
    This is the concept of a family with associated phenotypes as
    present in the record RDParticipant
    """
    _schemaSource = """
{"type": "record", "name": "Pedigree", "namespace": "org.gel.models.participant.avro", "doc": "",
"fields": [{"name": "versionControl", "type": ["null", {"type": "record", "name": "VersionControl",
"fields": [{"name": "GitVersionControl", "type": "string", "doc": "", "default": "1.0.3"}]}], "doc":
""}, {"name": "LDPCode", "type": ["null", "string"]}, {"name": "familyId", "type": "string", "doc":
""}, {"name": "members", "type": {"type": "array", "items": {"type": "record", "name":
"PedigreeMember", "doc": "", "fields": [{"name": "pedigreeId", "type": ["null", "int"], "doc": ""},
{"name": "isProband", "type": ["null", "boolean"], "doc": ""}, {"name": "participantId", "type":
["null", "string"], "doc": ""}, {"name": "participantQCState", "type": ["null", {"type": "enum",
"name": "ParticipantQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}], "doc": ""}, {"name": "gelSuperFamilyId", "type": ["null",
"string"], "doc": ""}, {"name": "sex", "type": {"type": "enum", "name": "Sex", "doc": "", "symbols":
["MALE", "FEMALE", "UNKNOWN"]}, "doc": ""}, {"name": "personKaryotypicSex", "type": ["null",
{"type": "enum", "name": "PersonKaryotipicSex", "doc": "", "symbols": ["UNKNOWN", "XX", "XY", "XO",
"XXY", "XXX", "XXYY", "XXXY", "XXXX", "XYY", "OTHER"]}], "doc": ""}, {"name": "yearOfBirth", "type":
["null", "int"], "doc": ""}, {"name": "fatherId", "type": ["null", "int"], "doc": ""}, {"name":
"motherId", "type": ["null", "int"], "doc": ""}, {"name": "superFatherId", "type": ["null", "int"],
"doc": ""}, {"name": "superMotherId", "type": ["null", "int"], "doc": ""}, {"name": "twinGroup",
"type": ["null", "int"], "doc": ""}, {"name": "monozygotic", "type": ["null", {"type": "enum",
"name": "TernaryOption", "doc": "", "symbols": ["yes", "no", "unknown"]}], "doc": ""}, {"name":
"adoptedStatus", "type": ["null", {"type": "enum", "name": "AdoptedStatus", "doc": "", "symbols":
["notadopted", "adoptedin", "adoptedout"]}], "doc": ""}, {"name": "lifeStatus", "type": ["null",
{"type": "enum", "name": "LifeStatus", "doc": "", "symbols": ["ALIVE", "ABORTED", "DECEASED",
"UNBORN", "STILLBORN", "MISCARRIAGE"]}], "doc": ""}, {"name": "consanguineousParents", "type":
["null", "TernaryOption"], "doc": ""}, {"name": "affectionStatus", "type": ["null", {"type": "enum",
"name": "AffectionStatus", "doc": "", "symbols": ["UNAFFECTED", "AFFECTED", "UNCERTAIN"]}], "doc":
""}, {"name": "disorderList", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"Disorder", "doc": "", "fields": [{"name": "diseaseGroup", "type": ["null", "string"], "doc": ""},
{"name": "diseaseSubGroup", "type": ["null", "string"], "doc": ""}, {"name": "specificDisease",
"type": ["null", "string"], "doc": ""}, {"name": "ageOfOnset", "type": ["null", "float"], "doc":
""}]}}], "doc": ""}, {"name": "hpoTermList", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "HpoTerm", "doc": "", "fields": [{"name": "term", "type": "string", "doc": ""},
{"name": "termPresence", "type": ["null", "TernaryOption"], "doc": ""}, {"name": "hpoBuildNumber",
"type": ["null", "string"], "doc": ""}, {"name": "modifiers", "type": ["null", {"type": "record",
"name": "HpoTermModifiers", "fields": [{"name": "laterality", "type": ["null", {"type": "enum",
"name": "Laterality", "symbols": ["RIGHT", "UNILATERAL", "BILATERAL", "LEFT"]}]}, {"name":
"progression", "type": ["null", {"type": "enum", "name": "Progression", "symbols": ["PROGRESSIVE",
"NONPROGRESSIVE"]}]}, {"name": "severity", "type": ["null", {"type": "enum", "name": "Severity",
"symbols": ["BORDERLINE", "MILD", "MODERATE", "SEVERE", "PROFOUND"]}]}, {"name": "spatialPattern",
"type": ["null", {"type": "enum", "name": "SpatialPattern", "symbols": ["DISTAL", "GENERALIZED",
"LOCALIZED", "PROXIMAL"]}]}]}], "doc": ""}, {"name": "ageOfOnset", "type": ["null", {"type": "enum",
"name": "AgeOfOnset", "symbols": ["EMBRYONAL_ONSET", "FETAL_ONSET", "NEONATAL_ONSET",
"INFANTILE_ONSET", "CHILDHOOD_ONSET", "JUVENILE_ONSET", "YOUNG_ADULT_ONSET", "LATE_ONSET",
"MIDDLE_AGE_ONSET"]}], "doc": ""}]}}], "doc": ""}, {"name": "ancestries", "type": ["null", {"type":
"record", "name": "Ancestries", "doc": "", "fields": [{"name": "mothersEthnicOrigin", "type":
["null", {"type": "enum", "name": "EthnicCategory", "doc": "", "symbols": ["D", "E", "F", "G", "A",
"B", "C", "L", "M", "N", "H", "J", "K", "P", "S", "R", "Z"]}], "doc": ""}, {"name":
"mothersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"fathersEthnicOrigin", "type": ["null", "EthnicCategory"], "doc": ""}, {"name":
"fathersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"chiSquare1KGenomesPhase3Pop", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "ChiSquare1KGenomesPhase3Pop", "doc": "", "fields": [{"name": "kgSuperPopCategory", "type":
{"type": "enum", "name": "KgSuperPopCategory", "doc": "", "symbols": ["AFR", "AMR", "EAS", "EUR",
"SAS"]}, "doc": ""}, {"name": "kgPopCategory", "type": ["null", {"type": "enum", "name":
"KgPopCategory", "doc": "", "symbols": ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM",
"ESN", "FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK", "MSL", "MXL", "PEL", "PJL",
"PUR", "STU", "TSI", "YRI"]}], "doc": ""}, {"name": "chiSquare", "type": "double", "doc": ""}]}}],
"doc": ""}]}], "doc": ""}, {"name": "consentStatus", "type": ["null", {"type": "record", "name":
"ConsentStatus", "doc": "", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "",
"default": false}, {"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default":
false}, {"name": "secondaryFindingConsent", "type": "boolean", "doc": "", "default": false},
{"name": "carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}], "doc": ""},
{"name": "samples", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Sample",
"fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int",
"doc": ""}, {"name": "source", "type": ["null", {"type": "enum", "name": "SampleSource", "symbols":
["BLOOD", "SALIVA", "FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "product", "type": ["null",
{"type": "enum", "name": "Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name":
"preparationMethod", "type": ["null", {"type": "enum", "name": "PreparationMethod", "symbols":
["EDTA", "ORAGENE", "FF", "FFPE", "CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}]}}], "doc": ""},
{"name": "inbreedingCoefficient", "type": ["null", {"type": "record", "name":
"InbreedingCoefficient", "doc": "", "fields": [{"name": "sampleId", "type": "string", "doc": ""},
{"name": "program", "type": "string", "doc": ""}, {"name": "version", "type": "string", "doc": ""},
{"name": "estimationMethod", "type": "string", "doc": ""}, {"name": "coefficient", "type": "double",
"doc": ""}, {"name": "standardError", "type": ["null", "double"], "doc": ""}]}], "doc": ""},
{"name": "additionalInformation", "type": ["null", {"type": "map", "values": "string"}], "doc":
""}]}}}, {"name": "analysisPanels", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "AnalysisPanel", "fields": [{"name": "specificDisease", "type": "string"}, {"name":
"panelName", "type": "string"}, {"name": "panelVersion", "type": ["null", "string"]}, {"name":
"reviewOutcome", "type": "string"}, {"name": "multipleGeneticOrigins", "type": "string"}]}}]},
{"name": "diseasePenetrances", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "DiseasePenetrance", "fields": [{"name": "specificDisease", "type": "string"}, {"name":
"penetrance", "type": {"type": "enum", "name": "Penetrance", "doc": "", "symbols": ["complete",
"incomplete"]}}]}}]}, {"name": "readyForAnalysis", "type": "boolean"}, {"name": "familyQCState",
"type": ["null", {"type": "enum", "name": "FamilyQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}]}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "LDPCode",
        "analysisPanels",
        "diseasePenetrances",
        "familyId",
        "familyQCState",
        "members",
        "readyForAnalysis",
        "versionControl",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'analysisPanels': AnalysisPanel,
            'diseasePenetrances': DiseasePenetrance,
            'members': PedigreeMember,
            'versionControl': VersionControl,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'analysisPanels': AnalysisPanel,
            'diseasePenetrances': DiseasePenetrance,
            'members': PedigreeMember,
            'versionControl': VersionControl,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'LDPCode', 'analysisPanels', 'diseasePenetrances', 'familyId',
        'familyQCState', 'members', 'readyForAnalysis',
        'versionControl'
    ]

    def __init__(self, **kwargs):
        self.LDPCode = kwargs.get(
            'LDPCode', None)
        self.analysisPanels = kwargs.get(
            'analysisPanels', None)
        self.diseasePenetrances = kwargs.get(
            'diseasePenetrances', None)
        self.familyId = kwargs.get(
            'familyId', None)
        self.familyQCState = kwargs.get(
            'familyQCState', None)
        self.members = kwargs.get(
            'members', None)
        self.readyForAnalysis = kwargs.get(
            'readyForAnalysis', None)
        self.versionControl = kwargs.get(
            'versionControl', None)


class PedigreeMember(ProtocolElement):
    """
    This defines a RD Participant (demographics and pedigree
    information)
    """
    _schemaSource = """
{"type": "record", "name": "PedigreeMember", "namespace": "org.gel.models.participant.avro", "doc":
"", "fields": [{"name": "pedigreeId", "type": ["null", "int"], "doc": ""}, {"name": "isProband",
"type": ["null", "boolean"], "doc": ""}, {"name": "participantId", "type": ["null", "string"],
"doc": ""}, {"name": "participantQCState", "type": ["null", {"type": "enum", "name":
"ParticipantQCState", "doc": "", "symbols": ["noState", "passedMedicalReviewReadyForInterpretation",
"passedMedicalReviewNotReadyForInterpretation", "queryToGel", "queryToGMC", "failed"]}], "doc": ""},
{"name": "gelSuperFamilyId", "type": ["null", "string"], "doc": ""}, {"name": "sex", "type":
{"type": "enum", "name": "Sex", "doc": "", "symbols": ["MALE", "FEMALE", "UNKNOWN"]}, "doc": ""},
{"name": "personKaryotypicSex", "type": ["null", {"type": "enum", "name": "PersonKaryotipicSex",
"doc": "", "symbols": ["UNKNOWN", "XX", "XY", "XO", "XXY", "XXX", "XXYY", "XXXY", "XXXX", "XYY",
"OTHER"]}], "doc": ""}, {"name": "yearOfBirth", "type": ["null", "int"], "doc": ""}, {"name":
"fatherId", "type": ["null", "int"], "doc": ""}, {"name": "motherId", "type": ["null", "int"],
"doc": ""}, {"name": "superFatherId", "type": ["null", "int"], "doc": ""}, {"name": "superMotherId",
"type": ["null", "int"], "doc": ""}, {"name": "twinGroup", "type": ["null", "int"], "doc": ""},
{"name": "monozygotic", "type": ["null", {"type": "enum", "name": "TernaryOption", "doc": "",
"symbols": ["yes", "no", "unknown"]}], "doc": ""}, {"name": "adoptedStatus", "type": ["null",
{"type": "enum", "name": "AdoptedStatus", "doc": "", "symbols": ["notadopted", "adoptedin",
"adoptedout"]}], "doc": ""}, {"name": "lifeStatus", "type": ["null", {"type": "enum", "name":
"LifeStatus", "doc": "", "symbols": ["ALIVE", "ABORTED", "DECEASED", "UNBORN", "STILLBORN",
"MISCARRIAGE"]}], "doc": ""}, {"name": "consanguineousParents", "type": ["null", "TernaryOption"],
"doc": ""}, {"name": "affectionStatus", "type": ["null", {"type": "enum", "name": "AffectionStatus",
"doc": "", "symbols": ["UNAFFECTED", "AFFECTED", "UNCERTAIN"]}], "doc": ""}, {"name":
"disorderList", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Disorder",
"doc": "", "fields": [{"name": "diseaseGroup", "type": ["null", "string"], "doc": ""}, {"name":
"diseaseSubGroup", "type": ["null", "string"], "doc": ""}, {"name": "specificDisease", "type":
["null", "string"], "doc": ""}, {"name": "ageOfOnset", "type": ["null", "float"], "doc": ""}]}}],
"doc": ""}, {"name": "hpoTermList", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "HpoTerm", "doc": "", "fields": [{"name": "term", "type": "string", "doc": ""}, {"name":
"termPresence", "type": ["null", "TernaryOption"], "doc": ""}, {"name": "hpoBuildNumber", "type":
["null", "string"], "doc": ""}, {"name": "modifiers", "type": ["null", {"type": "record", "name":
"HpoTermModifiers", "fields": [{"name": "laterality", "type": ["null", {"type": "enum", "name":
"Laterality", "symbols": ["RIGHT", "UNILATERAL", "BILATERAL", "LEFT"]}]}, {"name": "progression",
"type": ["null", {"type": "enum", "name": "Progression", "symbols": ["PROGRESSIVE",
"NONPROGRESSIVE"]}]}, {"name": "severity", "type": ["null", {"type": "enum", "name": "Severity",
"symbols": ["BORDERLINE", "MILD", "MODERATE", "SEVERE", "PROFOUND"]}]}, {"name": "spatialPattern",
"type": ["null", {"type": "enum", "name": "SpatialPattern", "symbols": ["DISTAL", "GENERALIZED",
"LOCALIZED", "PROXIMAL"]}]}]}], "doc": ""}, {"name": "ageOfOnset", "type": ["null", {"type": "enum",
"name": "AgeOfOnset", "symbols": ["EMBRYONAL_ONSET", "FETAL_ONSET", "NEONATAL_ONSET",
"INFANTILE_ONSET", "CHILDHOOD_ONSET", "JUVENILE_ONSET", "YOUNG_ADULT_ONSET", "LATE_ONSET",
"MIDDLE_AGE_ONSET"]}], "doc": ""}]}}], "doc": ""}, {"name": "ancestries", "type": ["null", {"type":
"record", "name": "Ancestries", "doc": "", "fields": [{"name": "mothersEthnicOrigin", "type":
["null", {"type": "enum", "name": "EthnicCategory", "doc": "", "symbols": ["D", "E", "F", "G", "A",
"B", "C", "L", "M", "N", "H", "J", "K", "P", "S", "R", "Z"]}], "doc": ""}, {"name":
"mothersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"fathersEthnicOrigin", "type": ["null", "EthnicCategory"], "doc": ""}, {"name":
"fathersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"chiSquare1KGenomesPhase3Pop", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "ChiSquare1KGenomesPhase3Pop", "doc": "", "fields": [{"name": "kgSuperPopCategory", "type":
{"type": "enum", "name": "KgSuperPopCategory", "doc": "", "symbols": ["AFR", "AMR", "EAS", "EUR",
"SAS"]}, "doc": ""}, {"name": "kgPopCategory", "type": ["null", {"type": "enum", "name":
"KgPopCategory", "doc": "", "symbols": ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM",
"ESN", "FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK", "MSL", "MXL", "PEL", "PJL",
"PUR", "STU", "TSI", "YRI"]}], "doc": ""}, {"name": "chiSquare", "type": "double", "doc": ""}]}}],
"doc": ""}]}], "doc": ""}, {"name": "consentStatus", "type": ["null", {"type": "record", "name":
"ConsentStatus", "doc": "", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "",
"default": false}, {"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default":
false}, {"name": "secondaryFindingConsent", "type": "boolean", "doc": "", "default": false},
{"name": "carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}], "doc": ""},
{"name": "samples", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Sample",
"fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int",
"doc": ""}, {"name": "source", "type": ["null", {"type": "enum", "name": "SampleSource", "symbols":
["BLOOD", "SALIVA", "FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "product", "type": ["null",
{"type": "enum", "name": "Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name":
"preparationMethod", "type": ["null", {"type": "enum", "name": "PreparationMethod", "symbols":
["EDTA", "ORAGENE", "FF", "FFPE", "CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}]}}], "doc": ""},
{"name": "inbreedingCoefficient", "type": ["null", {"type": "record", "name":
"InbreedingCoefficient", "doc": "", "fields": [{"name": "sampleId", "type": "string", "doc": ""},
{"name": "program", "type": "string", "doc": ""}, {"name": "version", "type": "string", "doc": ""},
{"name": "estimationMethod", "type": "string", "doc": ""}, {"name": "coefficient", "type": "double",
"doc": ""}, {"name": "standardError", "type": ["null", "double"], "doc": ""}]}], "doc": ""},
{"name": "additionalInformation", "type": ["null", {"type": "map", "values": "string"}], "doc":
""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "additionalInformation",
        "adoptedStatus",
        "affectionStatus",
        "ancestries",
        "consanguineousParents",
        "consentStatus",
        "disorderList",
        "fatherId",
        "gelSuperFamilyId",
        "hpoTermList",
        "inbreedingCoefficient",
        "isProband",
        "lifeStatus",
        "monozygotic",
        "motherId",
        "participantId",
        "participantQCState",
        "pedigreeId",
        "personKaryotypicSex",
        "samples",
        "sex",
        "superFatherId",
        "superMotherId",
        "twinGroup",
        "yearOfBirth",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'ancestries': Ancestries,
            'consentStatus': ConsentStatus,
            'disorderList': Disorder,
            'hpoTermList': HpoTerm,
            'inbreedingCoefficient': InbreedingCoefficient,
            'samples': Sample,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'ancestries': Ancestries,
            'consentStatus': ConsentStatus,
            'disorderList': Disorder,
            'hpoTermList': HpoTerm,
            'inbreedingCoefficient': InbreedingCoefficient,
            'samples': Sample,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'additionalInformation', 'adoptedStatus', 'affectionStatus',
        'ancestries', 'consanguineousParents', 'consentStatus',
        'disorderList', 'fatherId', 'gelSuperFamilyId', 'hpoTermList',
        'inbreedingCoefficient', 'isProband', 'lifeStatus',
        'monozygotic', 'motherId', 'participantId',
        'participantQCState', 'pedigreeId', 'personKaryotypicSex',
        'samples', 'sex', 'superFatherId', 'superMotherId',
        'twinGroup', 'yearOfBirth'
    ]

    def __init__(self, **kwargs):
        self.additionalInformation = kwargs.get(
            'additionalInformation', None)
        self.adoptedStatus = kwargs.get(
            'adoptedStatus', None)
        self.affectionStatus = kwargs.get(
            'affectionStatus', None)
        self.ancestries = kwargs.get(
            'ancestries', None)
        self.consanguineousParents = kwargs.get(
            'consanguineousParents', None)
        self.consentStatus = kwargs.get(
            'consentStatus', None)
        self.disorderList = kwargs.get(
            'disorderList', None)
        self.fatherId = kwargs.get(
            'fatherId', None)
        self.gelSuperFamilyId = kwargs.get(
            'gelSuperFamilyId', None)
        self.hpoTermList = kwargs.get(
            'hpoTermList', None)
        self.inbreedingCoefficient = kwargs.get(
            'inbreedingCoefficient', None)
        self.isProband = kwargs.get(
            'isProband', None)
        self.lifeStatus = kwargs.get(
            'lifeStatus', None)
        self.monozygotic = kwargs.get(
            'monozygotic', None)
        self.motherId = kwargs.get(
            'motherId', None)
        self.participantId = kwargs.get(
            'participantId', None)
        self.participantQCState = kwargs.get(
            'participantQCState', None)
        self.pedigreeId = kwargs.get(
            'pedigreeId', None)
        self.personKaryotypicSex = kwargs.get(
            'personKaryotypicSex', None)
        self.samples = kwargs.get(
            'samples', None)
        self.sex = kwargs.get(
            'sex', None)
        self.superFatherId = kwargs.get(
            'superFatherId', None)
        self.superMotherId = kwargs.get(
            'superMotherId', None)
        self.twinGroup = kwargs.get(
            'twinGroup', None)
        self.yearOfBirth = kwargs.get(
            'yearOfBirth', None)


class Penetrance(object):
    """
    Penetrance assumed in the analysis
    """
    complete = "complete"
    incomplete = "incomplete"

    def __hash__(self):
        return str(self).__hash__()


class PersonKaryotipicSex(object):
    """
    Karyotipic Sex
    """
    UNKNOWN = "UNKNOWN"
    XX = "XX"
    XY = "XY"
    XO = "XO"
    XXY = "XXY"
    XXX = "XXX"
    XXYY = "XXYY"
    XXXY = "XXXY"
    XXXX = "XXXX"
    XYY = "XYY"
    OTHER = "OTHER"

    def __hash__(self):
        return str(self).__hash__()


class PhenotypesSolved(object):
    """
    No documentation
    """
    yes = "yes"
    no = "no"
    partially = "partially"
    unknown = "unknown"

    def __hash__(self):
        return str(self).__hash__()


class PreparationMethod(object):
    """
    No documentation
    """
    EDTA = "EDTA"
    ORAGENE = "ORAGENE"
    FF = "FF"
    FFPE = "FFPE"
    CD128_SORTED_CELLS = "CD128_SORTED_CELLS"
    ASPIRATE = "ASPIRATE"

    def __hash__(self):
        return str(self).__hash__()


class Product(object):
    """
    No documentation
    """
    DNA = "DNA"
    RNA = "RNA"

    def __hash__(self):
        return str(self).__hash__()


class ProgrammePhase(object):
    """
    No documentation
    """
    CRUK = "CRUK"
    OXFORD = "OXFORD"
    CLL = "CLL"
    IIP = "IIP"
    MAIN = "MAIN"
    EXPT = "EXPT"

    def __hash__(self):
        return str(self).__hash__()


class Progression(object):
    """
    No documentation
    """
    PROGRESSIVE = "PROGRESSIVE"
    NONPROGRESSIVE = "NONPROGRESSIVE"

    def __hash__(self):
        return str(self).__hash__()


class RDFamilyChange(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "RDFamilyChange", "namespace": "org.gel.models.participant.avro",
"fields": [{"name": "FamilyId", "type": "string", "doc": ""}, {"name": "code", "type": {"type":
"enum", "name": "RDFamilyChangeCode", "doc": "", "symbols": ["FamilyAdded", "FamilyDeleted",
"ProbandChanged", "ParticipantAdded", "ParticipantRemoved", "ConsentStatusChanged",
"AffectionStatusChanged", "PanelAssignmentChanged", "SexChanged", "SampleChanged"]}, "doc": ""},
{"name": "Family", "type": {"type": "record", "name": "Pedigree", "doc": "", "fields": [{"name":
"versionControl", "type": ["null", {"type": "record", "name": "VersionControl", "fields": [{"name":
"GitVersionControl", "type": "string", "doc": "", "default": "1.0.3"}]}], "doc": ""}, {"name":
"LDPCode", "type": ["null", "string"]}, {"name": "familyId", "type": "string", "doc": ""}, {"name":
"members", "type": {"type": "array", "items": {"type": "record", "name": "PedigreeMember", "doc":
"", "fields": [{"name": "pedigreeId", "type": ["null", "int"], "doc": ""}, {"name": "isProband",
"type": ["null", "boolean"], "doc": ""}, {"name": "participantId", "type": ["null", "string"],
"doc": ""}, {"name": "participantQCState", "type": ["null", {"type": "enum", "name":
"ParticipantQCState", "doc": "", "symbols": ["noState", "passedMedicalReviewReadyForInterpretation",
"passedMedicalReviewNotReadyForInterpretation", "queryToGel", "queryToGMC", "failed"]}], "doc": ""},
{"name": "gelSuperFamilyId", "type": ["null", "string"], "doc": ""}, {"name": "sex", "type":
{"type": "enum", "name": "Sex", "doc": "", "symbols": ["MALE", "FEMALE", "UNKNOWN"]}, "doc": ""},
{"name": "personKaryotypicSex", "type": ["null", {"type": "enum", "name": "PersonKaryotipicSex",
"doc": "", "symbols": ["UNKNOWN", "XX", "XY", "XO", "XXY", "XXX", "XXYY", "XXXY", "XXXX", "XYY",
"OTHER"]}], "doc": ""}, {"name": "yearOfBirth", "type": ["null", "int"], "doc": ""}, {"name":
"fatherId", "type": ["null", "int"], "doc": ""}, {"name": "motherId", "type": ["null", "int"],
"doc": ""}, {"name": "superFatherId", "type": ["null", "int"], "doc": ""}, {"name": "superMotherId",
"type": ["null", "int"], "doc": ""}, {"name": "twinGroup", "type": ["null", "int"], "doc": ""},
{"name": "monozygotic", "type": ["null", {"type": "enum", "name": "TernaryOption", "doc": "",
"symbols": ["yes", "no", "unknown"]}], "doc": ""}, {"name": "adoptedStatus", "type": ["null",
{"type": "enum", "name": "AdoptedStatus", "doc": "", "symbols": ["notadopted", "adoptedin",
"adoptedout"]}], "doc": ""}, {"name": "lifeStatus", "type": ["null", {"type": "enum", "name":
"LifeStatus", "doc": "", "symbols": ["ALIVE", "ABORTED", "DECEASED", "UNBORN", "STILLBORN",
"MISCARRIAGE"]}], "doc": ""}, {"name": "consanguineousParents", "type": ["null", "TernaryOption"],
"doc": ""}, {"name": "affectionStatus", "type": ["null", {"type": "enum", "name": "AffectionStatus",
"doc": "", "symbols": ["UNAFFECTED", "AFFECTED", "UNCERTAIN"]}], "doc": ""}, {"name":
"disorderList", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Disorder",
"doc": "", "fields": [{"name": "diseaseGroup", "type": ["null", "string"], "doc": ""}, {"name":
"diseaseSubGroup", "type": ["null", "string"], "doc": ""}, {"name": "specificDisease", "type":
["null", "string"], "doc": ""}, {"name": "ageOfOnset", "type": ["null", "float"], "doc": ""}]}}],
"doc": ""}, {"name": "hpoTermList", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "HpoTerm", "doc": "", "fields": [{"name": "term", "type": "string", "doc": ""}, {"name":
"termPresence", "type": ["null", "TernaryOption"], "doc": ""}, {"name": "hpoBuildNumber", "type":
["null", "string"], "doc": ""}, {"name": "modifiers", "type": ["null", {"type": "record", "name":
"HpoTermModifiers", "fields": [{"name": "laterality", "type": ["null", {"type": "enum", "name":
"Laterality", "symbols": ["RIGHT", "UNILATERAL", "BILATERAL", "LEFT"]}]}, {"name": "progression",
"type": ["null", {"type": "enum", "name": "Progression", "symbols": ["PROGRESSIVE",
"NONPROGRESSIVE"]}]}, {"name": "severity", "type": ["null", {"type": "enum", "name": "Severity",
"symbols": ["BORDERLINE", "MILD", "MODERATE", "SEVERE", "PROFOUND"]}]}, {"name": "spatialPattern",
"type": ["null", {"type": "enum", "name": "SpatialPattern", "symbols": ["DISTAL", "GENERALIZED",
"LOCALIZED", "PROXIMAL"]}]}]}], "doc": ""}, {"name": "ageOfOnset", "type": ["null", {"type": "enum",
"name": "AgeOfOnset", "symbols": ["EMBRYONAL_ONSET", "FETAL_ONSET", "NEONATAL_ONSET",
"INFANTILE_ONSET", "CHILDHOOD_ONSET", "JUVENILE_ONSET", "YOUNG_ADULT_ONSET", "LATE_ONSET",
"MIDDLE_AGE_ONSET"]}], "doc": ""}]}}], "doc": ""}, {"name": "ancestries", "type": ["null", {"type":
"record", "name": "Ancestries", "doc": "", "fields": [{"name": "mothersEthnicOrigin", "type":
["null", {"type": "enum", "name": "EthnicCategory", "doc": "", "symbols": ["D", "E", "F", "G", "A",
"B", "C", "L", "M", "N", "H", "J", "K", "P", "S", "R", "Z"]}], "doc": ""}, {"name":
"mothersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"fathersEthnicOrigin", "type": ["null", "EthnicCategory"], "doc": ""}, {"name":
"fathersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"chiSquare1KGenomesPhase3Pop", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "ChiSquare1KGenomesPhase3Pop", "doc": "", "fields": [{"name": "kgSuperPopCategory", "type":
{"type": "enum", "name": "KgSuperPopCategory", "doc": "", "symbols": ["AFR", "AMR", "EAS", "EUR",
"SAS"]}, "doc": ""}, {"name": "kgPopCategory", "type": ["null", {"type": "enum", "name":
"KgPopCategory", "doc": "", "symbols": ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM",
"ESN", "FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK", "MSL", "MXL", "PEL", "PJL",
"PUR", "STU", "TSI", "YRI"]}], "doc": ""}, {"name": "chiSquare", "type": "double", "doc": ""}]}}],
"doc": ""}]}], "doc": ""}, {"name": "consentStatus", "type": ["null", {"type": "record", "name":
"ConsentStatus", "doc": "", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "",
"default": false}, {"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default":
false}, {"name": "secondaryFindingConsent", "type": "boolean", "doc": "", "default": false},
{"name": "carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}], "doc": ""},
{"name": "samples", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Sample",
"fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int",
"doc": ""}, {"name": "source", "type": ["null", {"type": "enum", "name": "SampleSource", "symbols":
["BLOOD", "SALIVA", "FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "product", "type": ["null",
{"type": "enum", "name": "Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name":
"preparationMethod", "type": ["null", {"type": "enum", "name": "PreparationMethod", "symbols":
["EDTA", "ORAGENE", "FF", "FFPE", "CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}]}}], "doc": ""},
{"name": "inbreedingCoefficient", "type": ["null", {"type": "record", "name":
"InbreedingCoefficient", "doc": "", "fields": [{"name": "sampleId", "type": "string", "doc": ""},
{"name": "program", "type": "string", "doc": ""}, {"name": "version", "type": "string", "doc": ""},
{"name": "estimationMethod", "type": "string", "doc": ""}, {"name": "coefficient", "type": "double",
"doc": ""}, {"name": "standardError", "type": ["null", "double"], "doc": ""}]}], "doc": ""},
{"name": "additionalInformation", "type": ["null", {"type": "map", "values": "string"}], "doc":
""}]}}}, {"name": "analysisPanels", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "AnalysisPanel", "fields": [{"name": "specificDisease", "type": "string"}, {"name":
"panelName", "type": "string"}, {"name": "panelVersion", "type": ["null", "string"]}, {"name":
"reviewOutcome", "type": "string"}, {"name": "multipleGeneticOrigins", "type": "string"}]}}]},
{"name": "diseasePenetrances", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "DiseasePenetrance", "fields": [{"name": "specificDisease", "type": "string"}, {"name":
"penetrance", "type": {"type": "enum", "name": "Penetrance", "doc": "", "symbols": ["complete",
"incomplete"]}}]}}]}, {"name": "readyForAnalysis", "type": "boolean"}, {"name": "familyQCState",
"type": ["null", {"type": "enum", "name": "FamilyQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}]}]}, "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "Family",
        "FamilyId",
        "code",
    }

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

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'Family': Pedigree,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'Family', 'FamilyId', 'code'
    ]

    def __init__(self, **kwargs):
        self.Family = kwargs.get(
            'Family', Pedigree())
        self.FamilyId = kwargs.get(
            'FamilyId', None)
        self.code = kwargs.get(
            'code', None)


class RDFamilyChangeCode(object):
    """
    This code define the change type:      * `FamilyAdded`: This is a
    new family.     * `FamilyDeleted`: This family should be removed.
    * `ProbandChanged`: The proband participant is now a different
    member of the family.     * `ParticipantAdded`: A new participant
    has been sequenced and added to the family.     *
    `ParticipantRemoved`: A participant has been removed.     *
    `ConsentStatusChanged`: One or more participant in this family has
    a different consent status.     * `AffectionStatusChanged`:
    HPOterms or Disorder changed in one or more participants in this
    family.     * `PanelAssignmentChanged`: Gene Panels has changed in
    this family.     * `SexChanged`: Sex has changed for one or more
    participants in this family.     * `SampleChanged`: The sample/s
    associated to one or more participant in this family has changed.
    """
    FamilyAdded = "FamilyAdded"
    FamilyDeleted = "FamilyDeleted"
    ProbandChanged = "ProbandChanged"
    ParticipantAdded = "ParticipantAdded"
    ParticipantRemoved = "ParticipantRemoved"
    ConsentStatusChanged = "ConsentStatusChanged"
    AffectionStatusChanged = "AffectionStatusChanged"
    PanelAssignmentChanged = "PanelAssignmentChanged"
    SexChanged = "SexChanged"
    SampleChanged = "SampleChanged"

    def __hash__(self):
        return str(self).__hash__()


class RareDiseaseExitQuestionnaire(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "RareDiseaseExitQuestionnaire", "namespace":
"org.gel.models.report.avro", "fields": [{"name": "eventDate", "type": "string"}, {"name":
"reporter", "type": "string"}, {"name": "familyLevelQuestions", "type": {"type": "record", "name":
"FamilyLevelQuestions", "fields": [{"name": "caseSolvedFamily", "type": {"type": "enum", "name":
"CaseSolvedFamily", "symbols": ["yes", "no", "partially", "unknown"]}, "doc": ""}, {"name":
"segregationQuestion", "type": {"type": "enum", "name": "SegregationQuestion", "symbols": ["yes",
"no"]}, "doc": ""}, {"name": "additionalComments", "type": "string", "doc": ""}]}}, {"name":
"variantGroupLevelQuestions", "type": {"type": "array", "items": {"type": "record", "name":
"VariantGroupLevelQuestions", "fields": [{"name": "variantGroup", "type": "int"}, {"name":
"variantLevelQuestions", "type": {"type": "array", "items": {"type": "record", "name":
"VariantLevelQuestions", "fields": [{"name": "variantDetails", "type": "string", "doc": ""},
{"name": "confirmationDecision", "type": {"type": "enum", "name": "ConfirmationDecision", "symbols":
["yes", "no", "na"]}, "doc": ""}, {"name": "confirmationOutcome", "type": {"type": "enum", "name":
"ConfirmationOutcome", "symbols": ["yes", "no", "na"]}, "doc": ""}, {"name": "reportingQuestion",
"type": {"type": "enum", "name": "ReportingQuestion", "symbols": ["yes", "no", "na"]}, "doc": ""},
{"name": "acmgClassification", "type": {"type": "enum", "name": "ACMGClassification", "symbols":
["pathogenic_variant", "likely_pathogenic_variant", "variant_of_unknown_clinical_significance",
"likely_benign_variant", "benign_variant", "not_assessed"]}, "doc": ""}, {"name": "publications",
"type": "string", "doc": ""}]}}}, {"name": "actionability", "type": {"type": "enum", "name":
"Actionability", "symbols": ["yes", "no", "not_yet", "na"]}, "doc": ""}, {"name": "clinicalUtility",
"type": {"type": "array", "items": {"type": "enum", "name": "ClinicalUtility", "symbols": ["none",
"change_in_medication", "surgical_option", "additional_surveillance_for_proband_or_relatives",
"clinical_trial_eligibility", "informs_reproductive_choice", "unknown", "other"]}}, "doc": ""},
{"name": "phenotypesSolved", "type": {"type": "enum", "name": "PhenotypesSolved", "symbols": ["yes",
"no", "partially", "unknown"]}, "doc": ""}, {"name": "phenotypesExplained", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}]}}}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "eventDate",
        "familyLevelQuestions",
        "reporter",
        "variantGroupLevelQuestions",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'familyLevelQuestions': FamilyLevelQuestions,
            'variantGroupLevelQuestions': VariantGroupLevelQuestions,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'familyLevelQuestions': FamilyLevelQuestions,
            'variantGroupLevelQuestions': VariantGroupLevelQuestions,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'eventDate', 'familyLevelQuestions', 'reporter',
        'variantGroupLevelQuestions'
    ]

    def __init__(self, **kwargs):
        self.eventDate = kwargs.get(
            'eventDate', None)
        self.familyLevelQuestions = kwargs.get(
            'familyLevelQuestions', FamilyLevelQuestions())
        self.reporter = kwargs.get(
            'reporter', None)
        self.variantGroupLevelQuestions = kwargs.get(
            'variantGroupLevelQuestions', None)


class ReportEvent(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "ReportEvent", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "reportEventId", "type": "string", "doc": ""}, {"name": "phenotype", "type": "string",
"doc": ""}, {"name": "panelName", "type": ["null", "string"], "doc": ""}, {"name": "panelVersion",
"type": ["null", "string"], "doc": ""}, {"name": "modeOfInheritance", "type": {"type": "enum",
"name": "ReportedModeOfInheritance", "doc": "", "symbols": ["monoallelic",
"monoallelic_not_imprinted", "monoallelic_maternally_imprinted", "monoallelic_paternally_imprinted",
"biallelic", "monoallelic_and_biallelic", "monoallelic_and_more_severe_biallelic",
"xlinked_biallelic", "xlinked_monoallelic", "mitochondrial", "unknown"]}, "doc": ""}, {"name":
"genomicFeature", "type": {"type": "record", "name": "GenomicFeature", "fields": [{"name":
"featureType", "type": {"type": "enum", "name": "FeatureTypes", "symbols": ["RegulatoryRegion",
"Gene", "Transcript"]}, "doc": ""}, {"name": "ensemblId", "type": "string", "doc": ""}, {"name":
"hgnc", "type": ["null", "string"], "doc": ""}, {"name": "otherIds", "type": ["null", {"type":
"map", "values": "string"}], "doc": ""}]}, "doc": ""}, {"name": "penetrance", "type": {"type":
"enum", "name": "Penetrance", "namespace": "org.gel.models.participant.avro", "doc": "", "symbols":
["complete", "incomplete"]}, "doc": ""}, {"name": "score", "type": "float", "doc": ""}, {"name":
"vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc": ""}, {"name":
"variantClassification", "type": ["null", {"type": "enum", "name": "VariantClassification", "doc":
"", "symbols": ["pathogenic_variant", "likely_pathogenic_variant",
"variant_of_unknown_clinical_significance", "likely_benign_variant", "benign_variant",
"not_assessed"]}], "doc": ""}, {"name": "fullyExplainsPhenotype", "type": ["null", "boolean"],
"doc": ""}, {"name": "groupOfVariants", "type": ["null", "int"], "doc": ""}, {"name":
"eventJustification", "type": ["null", "string"], "doc": ""}, {"name": "tier", "type": ["null",
{"type": "enum", "name": "Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3"]}], "doc":
""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "eventJustification",
        "fullyExplainsPhenotype",
        "genomicFeature",
        "groupOfVariants",
        "modeOfInheritance",
        "panelName",
        "panelVersion",
        "penetrance",
        "phenotype",
        "reportEventId",
        "score",
        "tier",
        "variantClassification",
        "vendorSpecificScores",
    }

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

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'genomicFeature': GenomicFeature,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'eventJustification', 'fullyExplainsPhenotype',
        'genomicFeature', 'groupOfVariants', 'modeOfInheritance',
        'panelName', 'panelVersion', 'penetrance', 'phenotype',
        'reportEventId', 'score', 'tier', 'variantClassification',
        'vendorSpecificScores'
    ]

    def __init__(self, **kwargs):
        self.eventJustification = kwargs.get(
            'eventJustification', None)
        self.fullyExplainsPhenotype = kwargs.get(
            'fullyExplainsPhenotype', None)
        self.genomicFeature = kwargs.get(
            'genomicFeature', GenomicFeature())
        self.groupOfVariants = kwargs.get(
            'groupOfVariants', None)
        self.modeOfInheritance = kwargs.get(
            'modeOfInheritance', None)
        self.panelName = kwargs.get(
            'panelName', None)
        self.panelVersion = kwargs.get(
            'panelVersion', None)
        self.penetrance = kwargs.get(
            'penetrance', None)
        self.phenotype = kwargs.get(
            'phenotype', None)
        self.reportEventId = kwargs.get(
            'reportEventId', None)
        self.score = kwargs.get(
            'score', None)
        self.tier = kwargs.get(
            'tier', None)
        self.variantClassification = kwargs.get(
            'variantClassification', None)
        self.vendorSpecificScores = kwargs.get(
            'vendorSpecificScores', None)


class ReportEventCancer(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "ReportEventCancer", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "reportEventId", "type": "string", "doc": ""}, {"name": "genomicFeatureCancer", "type":
{"type": "record", "name": "GenomicFeatureCancer", "fields": [{"name": "featureType", "type":
{"type": "enum", "name": "FeatureTypeCancer", "doc": "", "symbols": ["regulatory_region", "gene",
"transcript"]}, "doc": ""}, {"name": "ensemblId", "type": "string", "doc": ""}, {"name":
"refSeqTranscriptId", "type": "string", "doc": ""}, {"name": "refSeqProteinId", "type": "string",
"doc": ""}, {"name": "geneName", "type": "string", "doc": ""}, {"name": "roleInCancer", "type":
["null", {"type": "enum", "name": "RoleInCancer", "doc": "", "symbols": ["oncogene",
"tumor_suppressor_gene", "both"]}], "doc": ""}]}, "doc": ""}, {"name": "soTerms", "type": {"type":
"array", "items": {"type": "record", "name": "SoTerm", "doc": "", "fields": [{"name": "id", "type":
"string", "doc": ""}, {"name": "name", "type": "string", "doc": ""}]}}, "doc": ""}, {"name":
"actions", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Action",
"fields": [{"name": "actionType", "type": ["null", {"type": "enum", "name": "ActionType", "doc": "",
"symbols": ["therapy", "therapeutic", "prognosis", "diagnosis"]}]}, {"name": "evidences", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "drug", "type": ["null",
"string"], "doc": ""}, {"name": "status", "type": ["null", {"type": "enum", "name": "ActionStatus",
"doc": "", "symbols": ["clinical", "pre_clinical"]}], "doc": ""}, {"name": "variantActionable",
"type": "boolean", "doc": ""}, {"name": "comments", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "url", "type": ["null", "string"], "doc": ""}, {"name":
"evidenceType", "type": ["null", "string"], "doc": ""}, {"name": "source", "type": "string", "doc":
""}]}}], "doc": ""}, {"name": "groupOfVariants", "type": ["null", "int"], "doc": ""}, {"name":
"eventJustification", "type": ["null", "string"], "doc": ""}, {"name": "tier", "type": ["null",
{"type": "enum", "name": "Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3"]}], "doc":
""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "actions",
        "eventJustification",
        "genomicFeatureCancer",
        "groupOfVariants",
        "reportEventId",
        "soTerms",
        "tier",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'actions': Action,
            'genomicFeatureCancer': GenomicFeatureCancer,
            'soTerms': SoTerm,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'actions': Action,
            'genomicFeatureCancer': GenomicFeatureCancer,
            'soTerms': SoTerm,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'actions', 'eventJustification', 'genomicFeatureCancer',
        'groupOfVariants', 'reportEventId', 'soTerms', 'tier'
    ]

    def __init__(self, **kwargs):
        self.actions = kwargs.get(
            'actions', None)
        self.eventJustification = kwargs.get(
            'eventJustification', None)
        self.genomicFeatureCancer = kwargs.get(
            'genomicFeatureCancer', GenomicFeatureCancer())
        self.groupOfVariants = kwargs.get(
            'groupOfVariants', None)
        self.reportEventId = kwargs.get(
            'reportEventId', None)
        self.soTerms = kwargs.get(
            'soTerms', None)
        self.tier = kwargs.get(
            'tier', None)


class ReportVersionControl(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "ReportVersionControl", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "gitVersionControl", "type": "string", "doc": "", "default": "4.2.0"}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {}

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'gitVersionControl'
    ]

    def __init__(self, **kwargs):
        self.gitVersionControl = kwargs.get(
            'gitVersionControl', '4.2.0')


class ReportedModeOfInheritance(object):
    """
    An enumeration for the different mode of inheritances:  *
    `monoallelic_not_imprinted`: MONOALLELIC, autosomal or
    pseudoautosomal, not imprinted *
    `monoallelic_maternally_imprinted`: MONOALLELIC, autosomal or
    pseudoautosomal, maternally imprinted (paternal allele expressed)
    * `monoallelic_paternally_imprinted`: MONOALLELIC, autosomal or
    pseudoautosomal, paternally imprinted (maternal allele expressed)
    * `monoallelic`: MONOALLELIC, autosomal or pseudoautosomal,
    imprinted status unknown * `biallelic`: BIALLELIC, autosomal or
    pseudoautosomal * `monoallelic_and_biallelic`: BOTH monoallelic
    and biallelic, autosomal or pseudoautosomal *
    `monoallelic_and_more_severe_biallelic`: BOTH monoallelic and
    biallelic, autosomal or pseudoautosomal (but BIALLELIC mutations
    cause a more SEVERE disease form), autosomal or pseudoautosomal *
    `xlinked_biallelic`: X-LINKED: hemizygous mutation in males,
    biallelic mutations in females * `xlinked_monoallelic`: X linked:
    hemizygous mutation in males, monoallelic mutations in females may
    cause disease (may be less severe, later onset than males) *
    `mitochondrial`: MITOCHONDRIAL * `unknown`: Unknown
    """
    monoallelic = "monoallelic"
    monoallelic_not_imprinted = "monoallelic_not_imprinted"
    monoallelic_maternally_imprinted = "monoallelic_maternally_imprinted"
    monoallelic_paternally_imprinted = "monoallelic_paternally_imprinted"
    biallelic = "biallelic"
    monoallelic_and_biallelic = "monoallelic_and_biallelic"
    monoallelic_and_more_severe_biallelic = "monoallelic_and_more_severe_biallelic"
    xlinked_biallelic = "xlinked_biallelic"
    xlinked_monoallelic = "xlinked_monoallelic"
    mitochondrial = "mitochondrial"
    unknown = "unknown"

    def __hash__(self):
        return str(self).__hash__()


class ReportedStructuralVariant(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "ReportedStructuralVariant", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "chromosome", "type": "string", "doc": ""}, {"name": "start", "type": "int",
"doc": ""}, {"name": "end", "type": "int", "doc": ""}, {"name": "type", "type": "string", "doc":
""}, {"name": "reference", "type": "string", "doc": ""}, {"name": "alternate", "type": "string",
"doc": ""}, {"name": "calledGenotypes", "type": {"type": "array", "items": {"type": "record",
"name": "CalledGenotype", "doc": "", "fields": [{"name": "gelId", "type": "string", "doc": ""},
{"name": "sampleId", "type": "string", "doc": ""}, {"name": "genotype", "type": {"type": "enum",
"name": "Zygosity", "doc": "", "symbols": ["reference_homozygous", "heterozygous",
"alternate_homozygous", "missing", "half_missing_reference", "half_missing_alternate",
"alternate_hemizigous", "reference_hemizigous", "unk"]}, "doc": ""}, {"name": "phaseSet", "type":
["null", "int"], "doc": ""}, {"name": "depthReference", "type": ["null", "int"], "doc": ""},
{"name": "depthAlternate", "type": ["null", "int"], "doc": ""}, {"name": "copyNumber", "type":
["null", "int"], "doc": ""}]}}}, {"name": "reportEvents", "type": {"type": "array", "items":
{"type": "record", "name": "ReportEvent", "fields": [{"name": "reportEventId", "type": "string",
"doc": ""}, {"name": "phenotype", "type": "string", "doc": ""}, {"name": "panelName", "type":
["null", "string"], "doc": ""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""},
{"name": "modeOfInheritance", "type": {"type": "enum", "name": "ReportedModeOfInheritance", "doc":
"", "symbols": ["monoallelic", "monoallelic_not_imprinted", "monoallelic_maternally_imprinted",
"monoallelic_paternally_imprinted", "biallelic", "monoallelic_and_biallelic",
"monoallelic_and_more_severe_biallelic", "xlinked_biallelic", "xlinked_monoallelic",
"mitochondrial", "unknown"]}, "doc": ""}, {"name": "genomicFeature", "type": {"type": "record",
"name": "GenomicFeature", "fields": [{"name": "featureType", "type": {"type": "enum", "name":
"FeatureTypes", "symbols": ["RegulatoryRegion", "Gene", "Transcript"]}, "doc": ""}, {"name":
"ensemblId", "type": "string", "doc": ""}, {"name": "hgnc", "type": ["null", "string"], "doc": ""},
{"name": "otherIds", "type": ["null", {"type": "map", "values": "string"}], "doc": ""}]}, "doc":
""}, {"name": "penetrance", "type": {"type": "enum", "name": "Penetrance", "namespace":
"org.gel.models.participant.avro", "doc": "", "symbols": ["complete", "incomplete"]}, "doc": ""},
{"name": "score", "type": "float", "doc": ""}, {"name": "vendorSpecificScores", "type": ["null",
{"type": "map", "values": "float"}], "doc": ""}, {"name": "variantClassification", "type": ["null",
{"type": "enum", "name": "VariantClassification", "doc": "", "symbols": ["pathogenic_variant",
"likely_pathogenic_variant", "variant_of_unknown_clinical_significance", "likely_benign_variant",
"benign_variant", "not_assessed"]}], "doc": ""}, {"name": "fullyExplainsPhenotype", "type": ["null",
"boolean"], "doc": ""}, {"name": "groupOfVariants", "type": ["null", "int"], "doc": ""}, {"name":
"eventJustification", "type": ["null", "string"], "doc": ""}, {"name": "tier", "type": ["null",
{"type": "enum", "name": "Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3"]}], "doc":
""}]}}, "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}, {"name": "evidenceIds", "type": ["null", {"type": "map", "values":
"string"}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "additionalNumericVariantAnnotations",
        "additionalTextualVariantAnnotations",
        "alternate",
        "calledGenotypes",
        "chromosome",
        "comments",
        "end",
        "evidenceIds",
        "reference",
        "reportEvents",
        "start",
        "type",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'calledGenotypes': CalledGenotype,
            'reportEvents': ReportEvent,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'calledGenotypes': CalledGenotype,
            'reportEvents': ReportEvent,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'additionalNumericVariantAnnotations',
        'additionalTextualVariantAnnotations', 'alternate',
        'calledGenotypes', 'chromosome', 'comments', 'end',
        'evidenceIds', 'reference', 'reportEvents', 'start', 'type'
    ]

    def __init__(self, **kwargs):
        self.additionalNumericVariantAnnotations = kwargs.get(
            'additionalNumericVariantAnnotations', None)
        self.additionalTextualVariantAnnotations = kwargs.get(
            'additionalTextualVariantAnnotations', None)
        self.alternate = kwargs.get(
            'alternate', None)
        self.calledGenotypes = kwargs.get(
            'calledGenotypes', None)
        self.chromosome = kwargs.get(
            'chromosome', None)
        self.comments = kwargs.get(
            'comments', None)
        self.end = kwargs.get(
            'end', None)
        self.evidenceIds = kwargs.get(
            'evidenceIds', None)
        self.reference = kwargs.get(
            'reference', None)
        self.reportEvents = kwargs.get(
            'reportEvents', None)
        self.start = kwargs.get(
            'start', None)
        self.type = kwargs.get(
            'type', None)


class ReportedStructuralVariantCancer(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "ReportedStructuralVariantCancer", "namespace":
"org.gel.models.report.avro", "fields": [{"name": "chromosome", "type": "string", "doc": ""},
{"name": "start", "type": "int", "doc": ""}, {"name": "end", "type": "int", "doc": ""}, {"name":
"type", "type": {"type": "record", "name": "StructuralVariantType", "doc": "", "fields": [{"name":
"firstLevelType", "type": {"type": "enum", "name": "StructuralVariantFirstLevelType", "doc": "",
"symbols": ["DEL", "INS", "DUP", "INV", "CNV", "DUP_TANDEM", "DEL_ME", "INS_ME"]}}, {"name":
"subtype", "type": ["null", "string"]}]}, "doc": ""}, {"name": "reference", "type": "string", "doc":
""}, {"name": "alternate", "type": "string", "doc": ""}, {"name":
"additionalTextualVariantAnnotations", "type": ["null", {"type": "map", "values": "string"}], "doc":
""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type": "map", "values":
"float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "alleleOrigins", "type": {"type": "array", "items": {"type": "enum", "name":
"AlleleOrigin", "doc": "", "symbols": ["de_novo_variant", "germline_variant", "maternal_variant",
"paternal_variant", "pedigree_specific_variant", "population_specific_variant",
"somatic_variant"]}}, "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "additionalNumericVariantAnnotations",
        "additionalTextualVariantAnnotations",
        "alleleOrigins",
        "alternate",
        "chromosome",
        "comments",
        "end",
        "reference",
        "start",
        "type",
    }

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

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'type': StructuralVariantType,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'additionalNumericVariantAnnotations',
        'additionalTextualVariantAnnotations', 'alleleOrigins',
        'alternate', 'chromosome', 'comments', 'end', 'reference',
        'start', 'type'
    ]

    def __init__(self, **kwargs):
        self.additionalNumericVariantAnnotations = kwargs.get(
            'additionalNumericVariantAnnotations', None)
        self.additionalTextualVariantAnnotations = kwargs.get(
            'additionalTextualVariantAnnotations', None)
        self.alleleOrigins = kwargs.get(
            'alleleOrigins', None)
        self.alternate = kwargs.get(
            'alternate', None)
        self.chromosome = kwargs.get(
            'chromosome', None)
        self.comments = kwargs.get(
            'comments', None)
        self.end = kwargs.get(
            'end', None)
        self.reference = kwargs.get(
            'reference', None)
        self.start = kwargs.get(
            'start', None)
        self.type = kwargs.get(
            'type', StructuralVariantType())


class ReportedVariant(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "ReportedVariant", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "chromosome", "type": "string", "doc": ""}, {"name": "dbSnpId", "type": ["null",
"string"], "doc": ""}, {"name": "position", "type": "int", "doc": ""}, {"name": "reference", "type":
"string", "doc": ""}, {"name": "alternate", "type": "string", "doc": ""}, {"name":
"calledGenotypes", "type": {"type": "array", "items": {"type": "record", "name": "CalledGenotype",
"doc": "", "fields": [{"name": "gelId", "type": "string", "doc": ""}, {"name": "sampleId", "type":
"string", "doc": ""}, {"name": "genotype", "type": {"type": "enum", "name": "Zygosity", "doc": "",
"symbols": ["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk"]}, "doc": ""}, {"name": "phaseSet", "type": ["null", "int"], "doc": ""}, {"name":
"depthReference", "type": ["null", "int"], "doc": ""}, {"name": "depthAlternate", "type": ["null",
"int"], "doc": ""}, {"name": "copyNumber", "type": ["null", "int"], "doc": ""}]}}, "doc": ""},
{"name": "reportEvents", "type": {"type": "array", "items": {"type": "record", "name":
"ReportEvent", "fields": [{"name": "reportEventId", "type": "string", "doc": ""}, {"name":
"phenotype", "type": "string", "doc": ""}, {"name": "panelName", "type": ["null", "string"], "doc":
""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name": "modeOfInheritance",
"type": {"type": "enum", "name": "ReportedModeOfInheritance", "doc": "", "symbols": ["monoallelic",
"monoallelic_not_imprinted", "monoallelic_maternally_imprinted", "monoallelic_paternally_imprinted",
"biallelic", "monoallelic_and_biallelic", "monoallelic_and_more_severe_biallelic",
"xlinked_biallelic", "xlinked_monoallelic", "mitochondrial", "unknown"]}, "doc": ""}, {"name":
"genomicFeature", "type": {"type": "record", "name": "GenomicFeature", "fields": [{"name":
"featureType", "type": {"type": "enum", "name": "FeatureTypes", "symbols": ["RegulatoryRegion",
"Gene", "Transcript"]}, "doc": ""}, {"name": "ensemblId", "type": "string", "doc": ""}, {"name":
"hgnc", "type": ["null", "string"], "doc": ""}, {"name": "otherIds", "type": ["null", {"type":
"map", "values": "string"}], "doc": ""}]}, "doc": ""}, {"name": "penetrance", "type": {"type":
"enum", "name": "Penetrance", "namespace": "org.gel.models.participant.avro", "doc": "", "symbols":
["complete", "incomplete"]}, "doc": ""}, {"name": "score", "type": "float", "doc": ""}, {"name":
"vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc": ""}, {"name":
"variantClassification", "type": ["null", {"type": "enum", "name": "VariantClassification", "doc":
"", "symbols": ["pathogenic_variant", "likely_pathogenic_variant",
"variant_of_unknown_clinical_significance", "likely_benign_variant", "benign_variant",
"not_assessed"]}], "doc": ""}, {"name": "fullyExplainsPhenotype", "type": ["null", "boolean"],
"doc": ""}, {"name": "groupOfVariants", "type": ["null", "int"], "doc": ""}, {"name":
"eventJustification", "type": ["null", "string"], "doc": ""}, {"name": "tier", "type": ["null",
{"type": "enum", "name": "Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3"]}], "doc":
""}]}}, "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}, {"name": "evidenceIds", "type": ["null", {"type": "map", "values":
"string"}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "additionalNumericVariantAnnotations",
        "additionalTextualVariantAnnotations",
        "alternate",
        "calledGenotypes",
        "chromosome",
        "comments",
        "dbSnpId",
        "evidenceIds",
        "position",
        "reference",
        "reportEvents",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'calledGenotypes': CalledGenotype,
            'reportEvents': ReportEvent,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'calledGenotypes': CalledGenotype,
            'reportEvents': ReportEvent,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'additionalNumericVariantAnnotations',
        'additionalTextualVariantAnnotations', 'alternate',
        'calledGenotypes', 'chromosome', 'comments', 'dbSnpId',
        'evidenceIds', 'position', 'reference', 'reportEvents'
    ]

    def __init__(self, **kwargs):
        self.additionalNumericVariantAnnotations = kwargs.get(
            'additionalNumericVariantAnnotations', None)
        self.additionalTextualVariantAnnotations = kwargs.get(
            'additionalTextualVariantAnnotations', None)
        self.alternate = kwargs.get(
            'alternate', None)
        self.calledGenotypes = kwargs.get(
            'calledGenotypes', None)
        self.chromosome = kwargs.get(
            'chromosome', None)
        self.comments = kwargs.get(
            'comments', None)
        self.dbSnpId = kwargs.get(
            'dbSnpId', None)
        self.evidenceIds = kwargs.get(
            'evidenceIds', None)
        self.position = kwargs.get(
            'position', None)
        self.reference = kwargs.get(
            'reference', None)
        self.reportEvents = kwargs.get(
            'reportEvents', None)


class ReportedVariantCancer(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "ReportedVariantCancer", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "chromosome", "type": "string", "doc": ""}, {"name": "position", "type": "int",
"doc": ""}, {"name": "reference", "type": "string", "doc": ""}, {"name": "alternate", "type":
"string", "doc": ""}, {"name": "cosmicIds", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "clinVarIds", "type": ["null", {"type": "array", "items": "string"}], "doc":
""}, {"name": "dbSnpId", "type": ["null", "string"], "doc": ""}, {"name": "cdnaChange", "type":
["null", "string"], "doc": ""}, {"name": "proteinChange", "type": ["null", "string"], "doc": ""},
{"name": "commonAf", "type": ["null", "int"], "doc": ""}, {"name": "ihp", "type": ["null", "int"],
"doc": ""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null",
{"type": "map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type":
"array", "items": "string"}], "doc": ""}, {"name": "reportEvents", "type": {"type": "array",
"items": {"type": "record", "name": "ReportEventCancer", "fields": [{"name": "reportEventId",
"type": "string", "doc": ""}, {"name": "genomicFeatureCancer", "type": {"type": "record", "name":
"GenomicFeatureCancer", "fields": [{"name": "featureType", "type": {"type": "enum", "name":
"FeatureTypeCancer", "doc": "", "symbols": ["regulatory_region", "gene", "transcript"]}, "doc": ""},
{"name": "ensemblId", "type": "string", "doc": ""}, {"name": "refSeqTranscriptId", "type": "string",
"doc": ""}, {"name": "refSeqProteinId", "type": "string", "doc": ""}, {"name": "geneName", "type":
"string", "doc": ""}, {"name": "roleInCancer", "type": ["null", {"type": "enum", "name":
"RoleInCancer", "doc": "", "symbols": ["oncogene", "tumor_suppressor_gene", "both"]}], "doc": ""}]},
"doc": ""}, {"name": "soTerms", "type": {"type": "array", "items": {"type": "record", "name":
"SoTerm", "doc": "", "fields": [{"name": "id", "type": "string", "doc": ""}, {"name": "name",
"type": "string", "doc": ""}]}}, "doc": ""}, {"name": "actions", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "Action", "fields": [{"name": "actionType", "type": ["null",
{"type": "enum", "name": "ActionType", "doc": "", "symbols": ["therapy", "therapeutic", "prognosis",
"diagnosis"]}]}, {"name": "evidences", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "drug", "type": ["null", "string"], "doc": ""}, {"name": "status", "type":
["null", {"type": "enum", "name": "ActionStatus", "doc": "", "symbols": ["clinical",
"pre_clinical"]}], "doc": ""}, {"name": "variantActionable", "type": "boolean", "doc": ""}, {"name":
"comments", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "url",
"type": ["null", "string"], "doc": ""}, {"name": "evidenceType", "type": ["null", "string"], "doc":
""}, {"name": "source", "type": "string", "doc": ""}]}}], "doc": ""}, {"name": "groupOfVariants",
"type": ["null", "int"], "doc": ""}, {"name": "eventJustification", "type": ["null", "string"],
"doc": ""}, {"name": "tier", "type": ["null", {"type": "enum", "name": "Tier", "doc": "", "symbols":
["NONE", "TIER1", "TIER2", "TIER3"]}], "doc": ""}]}}, "doc": ""}, {"name": "variantCalls", "type":
["null", {"type": "array", "items": {"type": "record", "name": "VariantCall", "fields": [{"name":
"sampleId", "type": "string", "doc": ""}, {"name": "depthReference", "type": ["null", "int"], "doc":
""}, {"name": "depthAlternate", "type": ["null", "int"], "doc": ""}, {"name": "vaf", "type":
["null", "double"], "doc": ""}]}}], "doc": ""}, {"name": "alleleOrigins", "type": {"type": "array",
"items": {"type": "enum", "name": "AlleleOrigin", "doc": "", "symbols": ["de_novo_variant",
"germline_variant", "maternal_variant", "paternal_variant", "pedigree_specific_variant",
"population_specific_variant", "somatic_variant"]}}, "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "additionalNumericVariantAnnotations",
        "additionalTextualVariantAnnotations",
        "alleleOrigins",
        "alternate",
        "cdnaChange",
        "chromosome",
        "clinVarIds",
        "comments",
        "commonAf",
        "cosmicIds",
        "dbSnpId",
        "ihp",
        "position",
        "proteinChange",
        "reference",
        "reportEvents",
        "variantCalls",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'reportEvents': ReportEventCancer,
            'variantCalls': VariantCall,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'reportEvents': ReportEventCancer,
            'variantCalls': VariantCall,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'additionalNumericVariantAnnotations',
        'additionalTextualVariantAnnotations', 'alleleOrigins',
        'alternate', 'cdnaChange', 'chromosome', 'clinVarIds',
        'comments', 'commonAf', 'cosmicIds', 'dbSnpId', 'ihp',
        'position', 'proteinChange', 'reference', 'reportEvents',
        'variantCalls'
    ]

    def __init__(self, **kwargs):
        self.additionalNumericVariantAnnotations = kwargs.get(
            'additionalNumericVariantAnnotations', None)
        self.additionalTextualVariantAnnotations = kwargs.get(
            'additionalTextualVariantAnnotations', None)
        self.alleleOrigins = kwargs.get(
            'alleleOrigins', None)
        self.alternate = kwargs.get(
            'alternate', None)
        self.cdnaChange = kwargs.get(
            'cdnaChange', None)
        self.chromosome = kwargs.get(
            'chromosome', None)
        self.clinVarIds = kwargs.get(
            'clinVarIds', None)
        self.comments = kwargs.get(
            'comments', None)
        self.commonAf = kwargs.get(
            'commonAf', None)
        self.cosmicIds = kwargs.get(
            'cosmicIds', None)
        self.dbSnpId = kwargs.get(
            'dbSnpId', None)
        self.ihp = kwargs.get(
            'ihp', None)
        self.position = kwargs.get(
            'position', None)
        self.proteinChange = kwargs.get(
            'proteinChange', None)
        self.reference = kwargs.get(
            'reference', None)
        self.reportEvents = kwargs.get(
            'reportEvents', None)
        self.variantCalls = kwargs.get(
            'variantCalls', None)


class ReportingQuestion(object):
    """
    No documentation
    """
    yes = "yes"
    no = "no"
    na = "na"

    def __hash__(self):
        return str(self).__hash__()


class ReviewedParts(object):
    """
    An enumeration for Which parts of the WGA were reviewed?:
    * `domain_1`: Domain 1 only         * `domain_1_and_2`: Domains 1
    and 2         * `domain_1_2_and_suplementary`: Domains 1, 2 and
    supplementary analysis
    """
    domain_1 = "domain_1"
    domain_1_and_2 = "domain_1_and_2"
    domain_1_2_and_suplementary = "domain_1_2_and_suplementary"

    def __hash__(self):
        return str(self).__hash__()


class RoleInCancer(object):
    """
    The role of a given genomic feature in cancer  * oncogene: A gene
    that is a mutated (changed) form of a gene involved in normal cell
    growth. Oncogenes may cause the growth of cancer cells. Mutations
    in genes that become oncogenes can be inherited or caused by being
    exposed to substances in the environment that cause cancer.
    http://purl.obolibrary.org/obo/NCIT_C16936 *
    tumor_suppressor_gene: A type of gene that makes a protein called
    a tumor suppressor protein that helps control cell growth.
    Mutations (changes in DNA) in antioncogenes may lead to cancer.
    http://purl.obolibrary.org/obo/NCIT_C17362
    """
    oncogene = "oncogene"
    tumor_suppressor_gene = "tumor_suppressor_gene"
    both = "both"

    def __hash__(self):
        return str(self).__hash__()


class Sample(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "Sample", "namespace": "org.gel.models.participant.avro", "fields":
[{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int", "doc":
""}, {"name": "source", "type": ["null", {"type": "enum", "name": "SampleSource", "symbols":
["BLOOD", "SALIVA", "FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "product", "type": ["null",
{"type": "enum", "name": "Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name":
"preparationMethod", "type": ["null", {"type": "enum", "name": "PreparationMethod", "symbols":
["EDTA", "ORAGENE", "FF", "FFPE", "CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "labSampleId",
        "preparationMethod",
        "product",
        "sampleId",
        "source",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'labSampleId', 'preparationMethod', 'product', 'sampleId',
        'source'
    ]

    def __init__(self, **kwargs):
        self.labSampleId = kwargs.get(
            'labSampleId', None)
        self.preparationMethod = kwargs.get(
            'preparationMethod', None)
        self.product = kwargs.get(
            'product', None)
        self.sampleId = kwargs.get(
            'sampleId', None)
        self.source = kwargs.get(
            'source', None)


class SampleSource(object):
    """
    No documentation
    """
    TUMOUR = "TUMOUR"
    BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS = "BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS"
    BONE_MARROW_ASPIRATE_TUMOUR_CELLS = "BONE_MARROW_ASPIRATE_TUMOUR_CELLS"
    BLOOD = "BLOOD"
    SALIVA = "SALIVA"
    FIBROBLAST = "FIBROBLAST"
    TISSUE = "TISSUE"

    def __hash__(self):
        return str(self).__hash__()


class SegregationQuestion(object):
    """
    No documentation
    """
    yes = "yes"
    no = "no"

    def __hash__(self):
        return str(self).__hash__()


class SensitiveInformation(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "SensitiveInformation", "namespace": "org.gel.models.participant.avro",
"fields": [{"name": "versionControl", "type": {"type": "record", "name": "VersionControl", "fields":
[{"name": "GitVersionControl", "type": "string", "doc": "", "default": "1.0.3"}]}, "doc": ""},
{"name": "gelID", "type": "string"}, {"name": "externalIds", "type": ["null", {"type": "array",
"items": "string"}]}, {"name": "genomicMedicineCenter", "type": ["null", "string"]}, {"name":
"fullNameOfResponsibleConsultant", "type": ["null", "string"]}, {"name": "contactNumber", "type":
["null", "string"]}, {"name": "hospitalOfResponsibleConsultant", "type": ["null", "string"]},
{"name": "centerSampleId", "type": ["null", "string"]}, {"name": "originatingCenter", "type":
["null", "string"]}, {"name": "centerPatientId", "type": ["null", "string"]}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "centerPatientId",
        "centerSampleId",
        "contactNumber",
        "externalIds",
        "fullNameOfResponsibleConsultant",
        "gelID",
        "genomicMedicineCenter",
        "hospitalOfResponsibleConsultant",
        "originatingCenter",
        "versionControl",
    }

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

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'versionControl': VersionControl,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'centerPatientId', 'centerSampleId', 'contactNumber',
        'externalIds', 'fullNameOfResponsibleConsultant', 'gelID',
        'genomicMedicineCenter', 'hospitalOfResponsibleConsultant',
        'originatingCenter', 'versionControl'
    ]

    def __init__(self, **kwargs):
        self.centerPatientId = kwargs.get(
            'centerPatientId', None)
        self.centerSampleId = kwargs.get(
            'centerSampleId', None)
        self.contactNumber = kwargs.get(
            'contactNumber', None)
        self.externalIds = kwargs.get(
            'externalIds', None)
        self.fullNameOfResponsibleConsultant = kwargs.get(
            'fullNameOfResponsibleConsultant', None)
        self.gelID = kwargs.get(
            'gelID', None)
        self.genomicMedicineCenter = kwargs.get(
            'genomicMedicineCenter', None)
        self.hospitalOfResponsibleConsultant = kwargs.get(
            'hospitalOfResponsibleConsultant', None)
        self.originatingCenter = kwargs.get(
            'originatingCenter', None)
        self.versionControl = kwargs.get(
            'versionControl', VersionControl())


class Severity(object):
    """
    No documentation
    """
    BORDERLINE = "BORDERLINE"
    MILD = "MILD"
    MODERATE = "MODERATE"
    SEVERE = "SEVERE"
    PROFOUND = "PROFOUND"

    def __hash__(self):
        return str(self).__hash__()


class Sex(object):
    """
    Sex
    """
    MALE = "MALE"
    FEMALE = "FEMALE"
    UNKNOWN = "UNKNOWN"

    def __hash__(self):
        return str(self).__hash__()


class SoTerm(ProtocolElement):
    """
    A Sequence Ontology term identifier by its id and name (e.g.: id =
    SO:0001816 ; name = non synonymous)
    """
    _schemaSource = """
{"type": "record", "name": "SoTerm", "namespace": "org.gel.models.report.avro", "doc": "", "fields":
[{"name": "id", "type": "string", "doc": ""}, {"name": "name", "type": "string", "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "id",
        "name",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'id', 'name'
    ]

    def __init__(self, **kwargs):
        self.id = kwargs.get(
            'id', None)
        self.name = kwargs.get(
            'name', None)


class SpatialPattern(object):
    """
    No documentation
    """
    DISTAL = "DISTAL"
    GENERALIZED = "GENERALIZED"
    LOCALIZED = "LOCALIZED"
    PROXIMAL = "PROXIMAL"

    def __hash__(self):
        return str(self).__hash__()


class StructuralVariantFirstLevelType(object):
    """
    The first level type must be one of the following:  * `DEL`
    Deletion relative to the reference * `INS` Insertion of novel
    sequence relative to the reference * `DUP` Region of elevated copy
    number relative to the reference * `INV` Inversion of reference
    sequence * `CNV` Copy number variable region (may be both deletion
    and duplication) The CNV category should not be used when a more
    specific category can be applied.  Reserved subtypes include: *
    `DUP:TANDEM` Tandem duplication * `DEL:ME` Deletion of mobile
    element relative to the reference * `INS:ME` Insertion of a mobile
    element relative to the reference
    """
    DEL = "DEL"
    INS = "INS"
    DUP = "DUP"
    INV = "INV"
    CNV = "CNV"
    DUP_TANDEM = "DUP_TANDEM"
    DEL_ME = "DEL_ME"
    INS_ME = "INS_ME"

    def __hash__(self):
        return str(self).__hash__()


class StructuralVariantType(ProtocolElement):
    """
    Structural variant type as defined by the VCF specification 4.2
    for field ID.
    """
    _schemaSource = """
{"type": "record", "name": "StructuralVariantType", "namespace": "org.gel.models.report.avro",
"doc": "", "fields": [{"name": "firstLevelType", "type": {"type": "enum", "name":
"StructuralVariantFirstLevelType", "doc": "", "symbols": ["DEL", "INS", "DUP", "INV", "CNV",
"DUP_TANDEM", "DEL_ME", "INS_ME"]}}, {"name": "subtype", "type": ["null", "string"]}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "firstLevelType",
        "subtype",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'firstLevelType', 'subtype'
    ]

    def __init__(self, **kwargs):
        self.firstLevelType = kwargs.get(
            'firstLevelType', None)
        self.subtype = kwargs.get(
            'subtype', None)


class SupportingEvidences(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "SupportingEvidences", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "previousSupportingEvidences", "type": {"type": "array", "items": "string"}},
{"name": "modifiedSupportingEvidences", "type": {"type": "array", "items": "string"}}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "modifiedSupportingEvidences",
        "previousSupportingEvidences",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'modifiedSupportingEvidences', 'previousSupportingEvidences'
    ]

    def __init__(self, **kwargs):
        self.modifiedSupportingEvidences = kwargs.get(
            'modifiedSupportingEvidences', None)
        self.previousSupportingEvidences = kwargs.get(
            'previousSupportingEvidences', None)


class TernaryOption(object):
    """
    This defines a yes/no/unknown case
    """
    yes = "yes"
    no = "no"
    unknown = "unknown"

    def __hash__(self):
        return str(self).__hash__()


class Tier(object):
    """
    Possible tiers as defined by Genomics England
    """
    NONE = "NONE"
    TIER1 = "TIER1"
    TIER2 = "TIER2"
    TIER3 = "TIER3"

    def __hash__(self):
        return str(self).__hash__()


class TieringResult(ProtocolElement):
    """
    Represents the results of a tiering process and its input patient
    data. TieringResult     is simply a more specific, less ambiguous
    term for "cohort".     We cannot use the InterpretationRequestRD
    structure because there may be many interpretation     requests
    for the same tiering results.
    """
    _schemaSource = """
{"type": "record", "name": "TieringResult", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "versionControl", "type": {"type": "record", "name": "ReportVersionControl",
"fields": [{"name": "gitVersionControl", "type": "string", "doc": "", "default": "4.2.0"}]}, "doc":
""}, {"name": "genomeAssemblyVersion", "type": "string", "doc": "", "default": "GRCh37.p13"},
{"name": "cellbaseVersion", "type": "string", "doc": "", "default": "4.0"}, {"name": "workspace",
"type": {"type": "array", "items": "string"}, "doc": ""}, {"name": "bams", "type": {"type": "array",
"items": {"type": "record", "name": "File", "doc": "", "fields": [{"name": "sampleId", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "uriFile", "type": "string",
"doc": ""}, {"name": "fileType", "type": {"type": "enum", "name": "FileType", "symbols": ["BAM",
"gVCF", "VCF_small", "VCF_somatic_small", "VCF_CNV", "VCF_somatic_CNV", "VCF_SV", "VCF_somatic_SV",
"VCF_SV_CNV", "SVG", "ANN", "BigWig", "MD5Sum", "ROH", "OTHER", "PARTITION", "VARIANT_FREQUENCIES",
"COVERAGE"]}}, {"name": "md5Sum", "type": ["null", "string"]}]}}, "doc": ""}, {"name": "vcfs",
"type": {"type": "array", "items": "File"}, "doc": ""}, {"name": "bigWigs", "type": ["null",
{"type": "array", "items": "File"}], "doc": ""}, {"name": "pedigreeDiagram", "type": ["null",
"File"], "doc": ""}, {"name": "annotationFile", "type": ["null", "File"], "doc": ""}, {"name":
"otherFiles", "type": ["null", {"type": "map", "values": "File"}], "doc": ""}, {"name": "pedigree",
"type": {"type": "record", "name": "Pedigree", "namespace": "org.gel.models.participant.avro",
"doc": "", "fields": [{"name": "versionControl", "type": ["null", {"type": "record", "name":
"VersionControl", "fields": [{"name": "GitVersionControl", "type": "string", "doc": "", "default":
"1.0.3"}]}], "doc": ""}, {"name": "LDPCode", "type": ["null", "string"]}, {"name": "familyId",
"type": "string", "doc": ""}, {"name": "members", "type": {"type": "array", "items": {"type":
"record", "name": "PedigreeMember", "doc": "", "fields": [{"name": "pedigreeId", "type": ["null",
"int"], "doc": ""}, {"name": "isProband", "type": ["null", "boolean"], "doc": ""}, {"name":
"participantId", "type": ["null", "string"], "doc": ""}, {"name": "participantQCState", "type":
["null", {"type": "enum", "name": "ParticipantQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}], "doc": ""}, {"name": "gelSuperFamilyId", "type": ["null",
"string"], "doc": ""}, {"name": "sex", "type": {"type": "enum", "name": "Sex", "doc": "", "symbols":
["MALE", "FEMALE", "UNKNOWN"]}, "doc": ""}, {"name": "personKaryotypicSex", "type": ["null",
{"type": "enum", "name": "PersonKaryotipicSex", "doc": "", "symbols": ["UNKNOWN", "XX", "XY", "XO",
"XXY", "XXX", "XXYY", "XXXY", "XXXX", "XYY", "OTHER"]}], "doc": ""}, {"name": "yearOfBirth", "type":
["null", "int"], "doc": ""}, {"name": "fatherId", "type": ["null", "int"], "doc": ""}, {"name":
"motherId", "type": ["null", "int"], "doc": ""}, {"name": "superFatherId", "type": ["null", "int"],
"doc": ""}, {"name": "superMotherId", "type": ["null", "int"], "doc": ""}, {"name": "twinGroup",
"type": ["null", "int"], "doc": ""}, {"name": "monozygotic", "type": ["null", {"type": "enum",
"name": "TernaryOption", "doc": "", "symbols": ["yes", "no", "unknown"]}], "doc": ""}, {"name":
"adoptedStatus", "type": ["null", {"type": "enum", "name": "AdoptedStatus", "doc": "", "symbols":
["notadopted", "adoptedin", "adoptedout"]}], "doc": ""}, {"name": "lifeStatus", "type": ["null",
{"type": "enum", "name": "LifeStatus", "doc": "", "symbols": ["ALIVE", "ABORTED", "DECEASED",
"UNBORN", "STILLBORN", "MISCARRIAGE"]}], "doc": ""}, {"name": "consanguineousParents", "type":
["null", "TernaryOption"], "doc": ""}, {"name": "affectionStatus", "type": ["null", {"type": "enum",
"name": "AffectionStatus", "doc": "", "symbols": ["UNAFFECTED", "AFFECTED", "UNCERTAIN"]}], "doc":
""}, {"name": "disorderList", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"Disorder", "doc": "", "fields": [{"name": "diseaseGroup", "type": ["null", "string"], "doc": ""},
{"name": "diseaseSubGroup", "type": ["null", "string"], "doc": ""}, {"name": "specificDisease",
"type": ["null", "string"], "doc": ""}, {"name": "ageOfOnset", "type": ["null", "float"], "doc":
""}]}}], "doc": ""}, {"name": "hpoTermList", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "HpoTerm", "doc": "", "fields": [{"name": "term", "type": "string", "doc": ""},
{"name": "termPresence", "type": ["null", "TernaryOption"], "doc": ""}, {"name": "hpoBuildNumber",
"type": ["null", "string"], "doc": ""}, {"name": "modifiers", "type": ["null", {"type": "record",
"name": "HpoTermModifiers", "fields": [{"name": "laterality", "type": ["null", {"type": "enum",
"name": "Laterality", "symbols": ["RIGHT", "UNILATERAL", "BILATERAL", "LEFT"]}]}, {"name":
"progression", "type": ["null", {"type": "enum", "name": "Progression", "symbols": ["PROGRESSIVE",
"NONPROGRESSIVE"]}]}, {"name": "severity", "type": ["null", {"type": "enum", "name": "Severity",
"symbols": ["BORDERLINE", "MILD", "MODERATE", "SEVERE", "PROFOUND"]}]}, {"name": "spatialPattern",
"type": ["null", {"type": "enum", "name": "SpatialPattern", "symbols": ["DISTAL", "GENERALIZED",
"LOCALIZED", "PROXIMAL"]}]}]}], "doc": ""}, {"name": "ageOfOnset", "type": ["null", {"type": "enum",
"name": "AgeOfOnset", "symbols": ["EMBRYONAL_ONSET", "FETAL_ONSET", "NEONATAL_ONSET",
"INFANTILE_ONSET", "CHILDHOOD_ONSET", "JUVENILE_ONSET", "YOUNG_ADULT_ONSET", "LATE_ONSET",
"MIDDLE_AGE_ONSET"]}], "doc": ""}]}}], "doc": ""}, {"name": "ancestries", "type": ["null", {"type":
"record", "name": "Ancestries", "doc": "", "fields": [{"name": "mothersEthnicOrigin", "type":
["null", {"type": "enum", "name": "EthnicCategory", "doc": "", "symbols": ["D", "E", "F", "G", "A",
"B", "C", "L", "M", "N", "H", "J", "K", "P", "S", "R", "Z"]}], "doc": ""}, {"name":
"mothersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"fathersEthnicOrigin", "type": ["null", "EthnicCategory"], "doc": ""}, {"name":
"fathersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"chiSquare1KGenomesPhase3Pop", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "ChiSquare1KGenomesPhase3Pop", "doc": "", "fields": [{"name": "kgSuperPopCategory", "type":
{"type": "enum", "name": "KgSuperPopCategory", "doc": "", "symbols": ["AFR", "AMR", "EAS", "EUR",
"SAS"]}, "doc": ""}, {"name": "kgPopCategory", "type": ["null", {"type": "enum", "name":
"KgPopCategory", "doc": "", "symbols": ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM",
"ESN", "FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK", "MSL", "MXL", "PEL", "PJL",
"PUR", "STU", "TSI", "YRI"]}], "doc": ""}, {"name": "chiSquare", "type": "double", "doc": ""}]}}],
"doc": ""}]}], "doc": ""}, {"name": "consentStatus", "type": ["null", {"type": "record", "name":
"ConsentStatus", "doc": "", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "",
"default": false}, {"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default":
false}, {"name": "secondaryFindingConsent", "type": "boolean", "doc": "", "default": false},
{"name": "carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}], "doc": ""},
{"name": "samples", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Sample",
"fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int",
"doc": ""}, {"name": "source", "type": ["null", {"type": "enum", "name": "SampleSource", "symbols":
["BLOOD", "SALIVA", "FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "product", "type": ["null",
{"type": "enum", "name": "Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name":
"preparationMethod", "type": ["null", {"type": "enum", "name": "PreparationMethod", "symbols":
["EDTA", "ORAGENE", "FF", "FFPE", "CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}]}}], "doc": ""},
{"name": "inbreedingCoefficient", "type": ["null", {"type": "record", "name":
"InbreedingCoefficient", "doc": "", "fields": [{"name": "sampleId", "type": "string", "doc": ""},
{"name": "program", "type": "string", "doc": ""}, {"name": "version", "type": "string", "doc": ""},
{"name": "estimationMethod", "type": "string", "doc": ""}, {"name": "coefficient", "type": "double",
"doc": ""}, {"name": "standardError", "type": ["null", "double"], "doc": ""}]}], "doc": ""},
{"name": "additionalInformation", "type": ["null", {"type": "map", "values": "string"}], "doc":
""}]}}}, {"name": "analysisPanels", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "AnalysisPanel", "fields": [{"name": "specificDisease", "type": "string"}, {"name":
"panelName", "type": "string"}, {"name": "panelVersion", "type": ["null", "string"]}, {"name":
"reviewOutcome", "type": "string"}, {"name": "multipleGeneticOrigins", "type": "string"}]}}]},
{"name": "diseasePenetrances", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "DiseasePenetrance", "fields": [{"name": "specificDisease", "type": "string"}, {"name":
"penetrance", "type": {"type": "enum", "name": "Penetrance", "doc": "", "symbols": ["complete",
"incomplete"]}}]}}]}, {"name": "readyForAnalysis", "type": "boolean"}, {"name": "familyQCState",
"type": ["null", {"type": "enum", "name": "FamilyQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}]}]}, "doc": ""}, {"name": "tieredVariants", "type": {"type":
"array", "items": {"type": "record", "name": "ReportedVariant", "fields": [{"name": "chromosome",
"type": "string", "doc": ""}, {"name": "dbSnpId", "type": ["null", "string"], "doc": ""}, {"name":
"position", "type": "int", "doc": ""}, {"name": "reference", "type": "string", "doc": ""}, {"name":
"alternate", "type": "string", "doc": ""}, {"name": "calledGenotypes", "type": {"type": "array",
"items": {"type": "record", "name": "CalledGenotype", "doc": "", "fields": [{"name": "gelId",
"type": "string", "doc": ""}, {"name": "sampleId", "type": "string", "doc": ""}, {"name":
"genotype", "type": {"type": "enum", "name": "Zygosity", "doc": "", "symbols":
["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk"]}, "doc": ""}, {"name": "phaseSet", "type": ["null", "int"], "doc": ""}, {"name":
"depthReference", "type": ["null", "int"], "doc": ""}, {"name": "depthAlternate", "type": ["null",
"int"], "doc": ""}, {"name": "copyNumber", "type": ["null", "int"], "doc": ""}]}}, "doc": ""},
{"name": "reportEvents", "type": {"type": "array", "items": {"type": "record", "name":
"ReportEvent", "fields": [{"name": "reportEventId", "type": "string", "doc": ""}, {"name":
"phenotype", "type": "string", "doc": ""}, {"name": "panelName", "type": ["null", "string"], "doc":
""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name": "modeOfInheritance",
"type": {"type": "enum", "name": "ReportedModeOfInheritance", "doc": "", "symbols": ["monoallelic",
"monoallelic_not_imprinted", "monoallelic_maternally_imprinted", "monoallelic_paternally_imprinted",
"biallelic", "monoallelic_and_biallelic", "monoallelic_and_more_severe_biallelic",
"xlinked_biallelic", "xlinked_monoallelic", "mitochondrial", "unknown"]}, "doc": ""}, {"name":
"genomicFeature", "type": {"type": "record", "name": "GenomicFeature", "fields": [{"name":
"featureType", "type": {"type": "enum", "name": "FeatureTypes", "symbols": ["RegulatoryRegion",
"Gene", "Transcript"]}, "doc": ""}, {"name": "ensemblId", "type": "string", "doc": ""}, {"name":
"hgnc", "type": ["null", "string"], "doc": ""}, {"name": "otherIds", "type": ["null", {"type":
"map", "values": "string"}], "doc": ""}]}, "doc": ""}, {"name": "penetrance", "type":
"org.gel.models.participant.avro.Penetrance", "doc": ""}, {"name": "score", "type": "float", "doc":
""}, {"name": "vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc":
""}, {"name": "variantClassification", "type": ["null", {"type": "enum", "name":
"VariantClassification", "doc": "", "symbols": ["pathogenic_variant", "likely_pathogenic_variant",
"variant_of_unknown_clinical_significance", "likely_benign_variant", "benign_variant",
"not_assessed"]}], "doc": ""}, {"name": "fullyExplainsPhenotype", "type": ["null", "boolean"],
"doc": ""}, {"name": "groupOfVariants", "type": ["null", "int"], "doc": ""}, {"name":
"eventJustification", "type": ["null", "string"], "doc": ""}, {"name": "tier", "type": ["null",
{"type": "enum", "name": "Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3"]}], "doc":
""}]}}, "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}, {"name": "evidenceIds", "type": ["null", {"type": "map", "values":
"string"}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}}, "doc": ""}, {"name": "tieringVersion", "type": "string", "doc":
""}, {"name": "internalStudyId", "type": "string", "doc": ""}, {"name": "complexGeneticPhenomena",
"type": ["null", {"type": "enum", "name": "ComplexGeneticPhenomena", "symbols": ["mosaicism",
"monosomy", "disomy", "uniparental_disomy", "trisomy", "other_aneuploidy"]}], "doc": ""}, {"name":
"otherFamilyHistory", "type": ["null", {"type": "record", "name": "OtherFamilyHistory", "doc": "",
"fields": [{"name": "maternalFamilyHistory", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "paternalFamilyHistory", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}]}], "doc": ""}, {"name": "genePanelsCoverage", "type": ["null", {"type":
"map", "values": {"type": "map", "values": {"type": "map", "values": "float"}}}], "doc": ""},
{"name": "additionalInfo", "type": ["null", {"type": "map", "values": "string"}], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "additionalInfo",
        "annotationFile",
        "bams",
        "bigWigs",
        "complexGeneticPhenomena",
        "genePanelsCoverage",
        "internalStudyId",
        "otherFamilyHistory",
        "otherFiles",
        "pedigree",
        "pedigreeDiagram",
        "tieredVariants",
        "tieringVersion",
        "vcfs",
        "versionControl",
        "workspace",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'annotationFile': File,
            'bams': File,
            'bigWigs': File,
            'otherFamilyHistory': OtherFamilyHistory,
            'otherFiles': File,
            'pedigree': Pedigree,
            'pedigreeDiagram': File,
            'tieredVariants': ReportedVariant,
            'vcfs': File,
            'versionControl': ReportVersionControl,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'annotationFile': File,
            'bams': File,
            'bigWigs': File,
            'otherFamilyHistory': OtherFamilyHistory,
            'otherFiles': File,
            'pedigree': Pedigree,
            'pedigreeDiagram': File,
            'tieredVariants': ReportedVariant,
            'vcfs': File,
            'versionControl': ReportVersionControl,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'additionalInfo', 'annotationFile', 'bams', 'bigWigs',
        'cellbaseVersion', 'complexGeneticPhenomena',
        'genePanelsCoverage', 'genomeAssemblyVersion',
        'internalStudyId', 'otherFamilyHistory', 'otherFiles',
        'pedigree', 'pedigreeDiagram', 'tieredVariants',
        'tieringVersion', 'vcfs', 'versionControl', 'workspace'
    ]

    def __init__(self, **kwargs):
        self.additionalInfo = kwargs.get(
            'additionalInfo', None)
        self.annotationFile = kwargs.get(
            'annotationFile', None)
        self.bams = kwargs.get(
            'bams', None)
        self.bigWigs = kwargs.get(
            'bigWigs', None)
        self.cellbaseVersion = kwargs.get(
            'cellbaseVersion', '4.0')
        self.complexGeneticPhenomena = kwargs.get(
            'complexGeneticPhenomena', None)
        self.genePanelsCoverage = kwargs.get(
            'genePanelsCoverage', None)
        self.genomeAssemblyVersion = kwargs.get(
            'genomeAssemblyVersion', 'GRCh37.p13')
        self.internalStudyId = kwargs.get(
            'internalStudyId', None)
        self.otherFamilyHistory = kwargs.get(
            'otherFamilyHistory', None)
        self.otherFiles = kwargs.get(
            'otherFiles', None)
        self.pedigree = kwargs.get(
            'pedigree', Pedigree())
        self.pedigreeDiagram = kwargs.get(
            'pedigreeDiagram', None)
        self.tieredVariants = kwargs.get(
            'tieredVariants', None)
        self.tieringVersion = kwargs.get(
            'tieringVersion', None)
        self.vcfs = kwargs.get(
            'vcfs', None)
        self.versionControl = kwargs.get(
            'versionControl', ReportVersionControl())
        self.workspace = kwargs.get(
            'workspace', None)


class TissueSource(object):
    """
    No documentation
    """
    BMA_TUMOUR_SORTED_CELLS = "BMA_TUMOUR_SORTED_CELLS"
    CT_GUIDED_BIOPSY = "CT_GUIDED_BIOPSY"
    ENDOSCOPIC_BIOPSY = "ENDOSCOPIC_BIOPSY"
    ENDOSCOPIC_ULTRASOUND_GUIDED_BIOPSY = "ENDOSCOPIC_ULTRASOUND_GUIDED_BIOPSY"
    ENDOSCOPIC_ULTRASOUND_GUIDED_FNA = "ENDOSCOPIC_ULTRASOUND_GUIDED_FNA"
    LAPAROSCOPIC_BIOPSY = "LAPAROSCOPIC_BIOPSY"
    LAPAROSCOPIC_EXCISION = "LAPAROSCOPIC_EXCISION"
    MRI_GUIDED_BIOPSY = "MRI_GUIDED_BIOPSY"
    NON_GUIDED_BIOPSY = "NON_GUIDED_BIOPSY"
    SURGICAL_RESECTION = "SURGICAL_RESECTION"
    STEREOTACTICALLY_GUIDED_BIOPSY = "STEREOTACTICALLY_GUIDED_BIOPSY"
    USS_GUIDED_BIOPSY = "USS_GUIDED_BIOPSY"
    NON_STANDARD_BIOPSY = "NON_STANDARD_BIOPSY"

    def __hash__(self):
        return str(self).__hash__()


class TumourContent(object):
    """
    No documentation
    """
    High = "High"
    Medium = "Medium"
    Low = "Low"

    def __hash__(self):
        return str(self).__hash__()


class TumourSample(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "TumourSample", "namespace": "org.gel.models.participant.avro", "fields":
[{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int", "doc":
""}, {"name": "LDPCode", "type": "string", "doc": ""}, {"name": "tumourId", "type": "string", "doc":
""}, {"name": "programmePhase", "type": ["null", {"type": "enum", "name": "ProgrammePhase",
"symbols": ["CRUK", "OXFORD", "CLL", "IIP", "MAIN", "EXPT"]}], "doc": ""}, {"name": "diseaseType",
"type": ["null", {"type": "enum", "name": "diseaseType", "symbols": ["ADULT_GLIOMA", "BLADDER",
"BREAST", "CARCINOMA_OF_UNKNOWN_PRIMARY", "CHILDHOOD", "COLORECTAL", "ENDOMETRIAL_CARCINOMA",
"HAEMONC", "HEPATOPANCREATOBILIARY", "LUNG", "MALIGNANT_MELANOMA", "NASOPHARYNGEAL",
"ORAL_OROPHARYNGEAL", "OVARIAN", "PROSTATE", "RENAL", "SARCOMA", "SINONASAL",
"TESTICULAR_GERM_CELL_TUMOURS", "UPPER_GASTROINTESTINAL",
"NON_HODGKINS_B_CELL_LYMPHOMA_LOW_MOD_GRADE", "CLASSICAL_HODGKINS",
"NODULAR_LYMPHOCYTE_PREDOMINANT_HODGKINS", "T_CELL_LYMPHOMA"]}], "doc": ""}, {"name":
"diseaseSubType", "type": ["null", "string"], "doc": ""}, {"name": "clinicalSampleDateTime", "type":
["null", "string"], "doc": ""}, {"name": "tumourType", "type": ["null", {"type": "enum", "name":
"TumourType", "symbols": ["PRIMARY", "METASTATIC_RECURRENCE", "RECURRENCE_OF_PRIMARY_TUMOUR",
"METASTASES"]}], "doc": ""}, {"name": "tumourContent", "type": ["null", {"type": "enum", "name":
"TumourContent", "symbols": ["High", "Medium", "Low"]}], "doc": ""}, {"name": "source", "type":
["null", {"type": "enum", "name": "SampleSource", "symbols": ["TUMOUR",
"BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS", "BONE_MARROW_ASPIRATE_TUMOUR_CELLS", "BLOOD", "SALIVA",
"FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "preparationMethod", "type": ["null", {"type":
"enum", "name": "PreparationMethod", "symbols": ["EDTA", "ORAGENE", "FF", "FFPE",
"CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}, {"name": "tissueSource", "type": ["null", {"type":
"enum", "name": "TissueSource", "symbols": ["BMA_TUMOUR_SORTED_CELLS", "CT_GUIDED_BIOPSY",
"ENDOSCOPIC_BIOPSY", "ENDOSCOPIC_ULTRASOUND_GUIDED_BIOPSY", "ENDOSCOPIC_ULTRASOUND_GUIDED_FNA",
"LAPAROSCOPIC_BIOPSY", "LAPAROSCOPIC_EXCISION", "MRI_GUIDED_BIOPSY", "NON_GUIDED_BIOPSY",
"SURGICAL_RESECTION", "STEREOTACTICALLY_GUIDED_BIOPSY", "USS_GUIDED_BIOPSY",
"NON_STANDARD_BIOPSY"]}], "doc": ""}, {"name": "product", "type": ["null", {"type": "enum", "name":
"Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name": "morphologyICD", "type": ["null",
"string"], "doc": ""}, {"name": "morphologySnomedCT", "type": ["null", "string"], "doc": ""},
{"name": "morphologySnomedRT", "type": ["null", "string"], "doc": ""}, {"name": "topographyICD",
"type": ["null", "string"], "doc": ""}, {"name": "topographySnomedCT", "type": ["null", "string"],
"doc": ""}, {"name": "topographySnomedRT", "type": ["null", "string"], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "LDPCode",
        "clinicalSampleDateTime",
        "diseaseSubType",
        "diseaseType",
        "labSampleId",
        "morphologyICD",
        "morphologySnomedCT",
        "morphologySnomedRT",
        "preparationMethod",
        "product",
        "programmePhase",
        "sampleId",
        "source",
        "tissueSource",
        "topographyICD",
        "topographySnomedCT",
        "topographySnomedRT",
        "tumourContent",
        "tumourId",
        "tumourType",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'LDPCode', 'clinicalSampleDateTime', 'diseaseSubType',
        'diseaseType', 'labSampleId', 'morphologyICD',
        'morphologySnomedCT', 'morphologySnomedRT',
        'preparationMethod', 'product', 'programmePhase', 'sampleId',
        'source', 'tissueSource', 'topographyICD',
        'topographySnomedCT', 'topographySnomedRT', 'tumourContent',
        'tumourId', 'tumourType'
    ]

    def __init__(self, **kwargs):
        self.LDPCode = kwargs.get(
            'LDPCode', None)
        self.clinicalSampleDateTime = kwargs.get(
            'clinicalSampleDateTime', None)
        self.diseaseSubType = kwargs.get(
            'diseaseSubType', None)
        self.diseaseType = kwargs.get(
            'diseaseType', None)
        self.labSampleId = kwargs.get(
            'labSampleId', None)
        self.morphologyICD = kwargs.get(
            'morphologyICD', None)
        self.morphologySnomedCT = kwargs.get(
            'morphologySnomedCT', None)
        self.morphologySnomedRT = kwargs.get(
            'morphologySnomedRT', None)
        self.preparationMethod = kwargs.get(
            'preparationMethod', None)
        self.product = kwargs.get(
            'product', None)
        self.programmePhase = kwargs.get(
            'programmePhase', None)
        self.sampleId = kwargs.get(
            'sampleId', None)
        self.source = kwargs.get(
            'source', None)
        self.tissueSource = kwargs.get(
            'tissueSource', None)
        self.topographyICD = kwargs.get(
            'topographyICD', None)
        self.topographySnomedCT = kwargs.get(
            'topographySnomedCT', None)
        self.topographySnomedRT = kwargs.get(
            'topographySnomedRT', None)
        self.tumourContent = kwargs.get(
            'tumourContent', None)
        self.tumourId = kwargs.get(
            'tumourId', None)
        self.tumourType = kwargs.get(
            'tumourType', None)


class TumourType(object):
    """
    No documentation
    """
    PRIMARY = "PRIMARY"
    METASTATIC_RECURRENCE = "METASTATIC_RECURRENCE"
    RECURRENCE_OF_PRIMARY_TUMOUR = "RECURRENCE_OF_PRIMARY_TUMOUR"
    METASTASES = "METASTASES"

    def __hash__(self):
        return str(self).__hash__()


class VariantCall(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "VariantCall", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "sampleId", "type": "string", "doc": ""}, {"name": "depthReference", "type": ["null",
"int"], "doc": ""}, {"name": "depthAlternate", "type": ["null", "int"], "doc": ""}, {"name": "vaf",
"type": ["null", "double"], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "depthAlternate",
        "depthReference",
        "sampleId",
        "vaf",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'depthAlternate', 'depthReference', 'sampleId', 'vaf'
    ]

    def __init__(self, **kwargs):
        self.depthAlternate = kwargs.get(
            'depthAlternate', None)
        self.depthReference = kwargs.get(
            'depthReference', None)
        self.sampleId = kwargs.get(
            'sampleId', None)
        self.vaf = kwargs.get(
            'vaf', None)


class VariantClassification(object):
    """
    This is the classification of the variant according to standard
    practice guidelines (e.g. ACMG)
    """
    pathogenic_variant = "pathogenic_variant"
    likely_pathogenic_variant = "likely_pathogenic_variant"
    variant_of_unknown_clinical_significance = "variant_of_unknown_clinical_significance"
    likely_benign_variant = "likely_benign_variant"
    benign_variant = "benign_variant"
    not_assessed = "not_assessed"

    def __hash__(self):
        return str(self).__hash__()


class VariantGroupLevelQuestions(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "VariantGroupLevelQuestions", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "variantGroup", "type": "int"}, {"name": "variantLevelQuestions", "type":
{"type": "array", "items": {"type": "record", "name": "VariantLevelQuestions", "fields": [{"name":
"variantDetails", "type": "string", "doc": ""}, {"name": "confirmationDecision", "type": {"type":
"enum", "name": "ConfirmationDecision", "symbols": ["yes", "no", "na"]}, "doc": ""}, {"name":
"confirmationOutcome", "type": {"type": "enum", "name": "ConfirmationOutcome", "symbols": ["yes",
"no", "na"]}, "doc": ""}, {"name": "reportingQuestion", "type": {"type": "enum", "name":
"ReportingQuestion", "symbols": ["yes", "no", "na"]}, "doc": ""}, {"name": "acmgClassification",
"type": {"type": "enum", "name": "ACMGClassification", "symbols": ["pathogenic_variant",
"likely_pathogenic_variant", "variant_of_unknown_clinical_significance", "likely_benign_variant",
"benign_variant", "not_assessed"]}, "doc": ""}, {"name": "publications", "type": "string", "doc":
""}]}}}, {"name": "actionability", "type": {"type": "enum", "name": "Actionability", "symbols":
["yes", "no", "not_yet", "na"]}, "doc": ""}, {"name": "clinicalUtility", "type": {"type": "array",
"items": {"type": "enum", "name": "ClinicalUtility", "symbols": ["none", "change_in_medication",
"surgical_option", "additional_surveillance_for_proband_or_relatives", "clinical_trial_eligibility",
"informs_reproductive_choice", "unknown", "other"]}}, "doc": ""}, {"name": "phenotypesSolved",
"type": {"type": "enum", "name": "PhenotypesSolved", "symbols": ["yes", "no", "partially",
"unknown"]}, "doc": ""}, {"name": "phenotypesExplained", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "actionability",
        "clinicalUtility",
        "phenotypesExplained",
        "phenotypesSolved",
        "variantGroup",
        "variantLevelQuestions",
    }

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

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'variantLevelQuestions': VariantLevelQuestions,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'actionability', 'clinicalUtility', 'phenotypesExplained',
        'phenotypesSolved', 'variantGroup', 'variantLevelQuestions'
    ]

    def __init__(self, **kwargs):
        self.actionability = kwargs.get(
            'actionability', None)
        self.clinicalUtility = kwargs.get(
            'clinicalUtility', None)
        self.phenotypesExplained = kwargs.get(
            'phenotypesExplained', None)
        self.phenotypesSolved = kwargs.get(
            'phenotypesSolved', None)
        self.variantGroup = kwargs.get(
            'variantGroup', None)
        self.variantLevelQuestions = kwargs.get(
            'variantLevelQuestions', None)


class VariantLevelQuestions(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "VariantLevelQuestions", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "variantDetails", "type": "string", "doc": ""}, {"name": "confirmationDecision",
"type": {"type": "enum", "name": "ConfirmationDecision", "symbols": ["yes", "no", "na"]}, "doc":
""}, {"name": "confirmationOutcome", "type": {"type": "enum", "name": "ConfirmationOutcome",
"symbols": ["yes", "no", "na"]}, "doc": ""}, {"name": "reportingQuestion", "type": {"type": "enum",
"name": "ReportingQuestion", "symbols": ["yes", "no", "na"]}, "doc": ""}, {"name":
"acmgClassification", "type": {"type": "enum", "name": "ACMGClassification", "symbols":
["pathogenic_variant", "likely_pathogenic_variant", "variant_of_unknown_clinical_significance",
"likely_benign_variant", "benign_variant", "not_assessed"]}, "doc": ""}, {"name": "publications",
"type": "string", "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "acmgClassification",
        "confirmationDecision",
        "confirmationOutcome",
        "publications",
        "reportingQuestion",
        "variantDetails",
    }

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'acmgClassification', 'confirmationDecision',
        'confirmationOutcome', 'publications', 'reportingQuestion',
        'variantDetails'
    ]

    def __init__(self, **kwargs):
        self.acmgClassification = kwargs.get(
            'acmgClassification', None)
        self.confirmationDecision = kwargs.get(
            'confirmationDecision', None)
        self.confirmationOutcome = kwargs.get(
            'confirmationOutcome', None)
        self.publications = kwargs.get(
            'publications', None)
        self.reportingQuestion = kwargs.get(
            'reportingQuestion', None)
        self.variantDetails = kwargs.get(
            'variantDetails', None)


class VersionControl(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "VersionControl", "namespace": "org.gel.models.participant.avro",
"fields": [{"name": "GitVersionControl", "type": "string", "doc": "", "default": "1.0.3"}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {}

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

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

        return embeddedTypes[fieldName]

    __slots__ = [
        'GitVersionControl'
    ]

    def __init__(self, **kwargs):
        self.GitVersionControl = kwargs.get(
            'GitVersionControl', '1.0.3')


class Zygosity(object):
    """
    It is a representation of the zygosity  * `reference_homozygous`:
    0/0, 0|0 * `heterozygous`: 0/1, 1/0, 1|0, 0|1 *
    `alternate_homozygous`: 1/1, 1|1 * `missing`: ./., .|. *
    `half_missing_reference`: ./0, 0/., 0|., .|0 *
    `half_missing_alternate`: ./1, 1/., 1|., .|1 *
    `alternate_hemizigous`: 1 * `reference_hemizigous`: 0 * `unk`:
    Anything unexpected
    """
    reference_homozygous = "reference_homozygous"
    heterozygous = "heterozygous"
    alternate_homozygous = "alternate_homozygous"
    missing = "missing"
    half_missing_reference = "half_missing_reference"
    half_missing_alternate = "half_missing_alternate"
    alternate_hemizigous = "alternate_hemizigous"
    reference_hemizigous = "reference_hemizigous"
    unk = "unk"

    def __hash__(self):
        return str(self).__hash__()


class diseaseType(object):
    """
    No documentation
    """
    ADULT_GLIOMA = "ADULT_GLIOMA"
    BLADDER = "BLADDER"
    BREAST = "BREAST"
    CARCINOMA_OF_UNKNOWN_PRIMARY = "CARCINOMA_OF_UNKNOWN_PRIMARY"
    CHILDHOOD = "CHILDHOOD"
    COLORECTAL = "COLORECTAL"
    ENDOMETRIAL_CARCINOMA = "ENDOMETRIAL_CARCINOMA"
    HAEMONC = "HAEMONC"
    HEPATOPANCREATOBILIARY = "HEPATOPANCREATOBILIARY"
    LUNG = "LUNG"
    MALIGNANT_MELANOMA = "MALIGNANT_MELANOMA"
    NASOPHARYNGEAL = "NASOPHARYNGEAL"
    ORAL_OROPHARYNGEAL = "ORAL_OROPHARYNGEAL"
    OVARIAN = "OVARIAN"
    PROSTATE = "PROSTATE"
    RENAL = "RENAL"
    SARCOMA = "SARCOMA"
    SINONASAL = "SINONASAL"
    TESTICULAR_GERM_CELL_TUMOURS = "TESTICULAR_GERM_CELL_TUMOURS"
    UPPER_GASTROINTESTINAL = "UPPER_GASTROINTESTINAL"
    NON_HODGKINS_B_CELL_LYMPHOMA_LOW_MOD_GRADE = "NON_HODGKINS_B_CELL_LYMPHOMA_LOW_MOD_GRADE"
    CLASSICAL_HODGKINS = "CLASSICAL_HODGKINS"
    NODULAR_LYMPHOCYTE_PREDOMINANT_HODGKINS = "NODULAR_LYMPHOCYTE_PREDOMINANT_HODGKINS"
    T_CELL_LYMPHOMA = "T_CELL_LYMPHOMA"

    def __hash__(self):
        return str(self).__hash__()
