# coding: utf-8

"""
    IGVF Project API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

    The version of the OpenAPI document: 108.0.1
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


from __future__ import annotations
import pprint
import re  # noqa: F401
import json

from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self

class AnalysisStep(BaseModel):
    """
    A step in a computational analysis workflow. For example, a sequence alignment step that represents the phase of the computational analysis in which sequenced reads are being aligned to the reference genome.
    """ # noqa: E501
    preview_timestamp: Optional[StrictStr] = Field(default=None, description="The date the object was previewed.")
    release_timestamp: Optional[StrictStr] = Field(default=None, description="The date the object was released.")
    status: Optional[StrictStr] = Field(default=None, description="The status of the metadata object.")
    lab: Optional[StrictStr] = Field(default=None, description="Lab associated with the submission.")
    award: Optional[StrictStr] = Field(default=None, description="Grant associated with the submission.")
    schema_version: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="The version of the JSON schema that the server uses to validate the object.")
    uuid: Optional[StrictStr] = Field(default=None, description="The unique identifier associated with every object.")
    notes: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="DACC internal notes.")
    aliases: Optional[List[Annotated[str, Field(strict=True)]]] = Field(default=None, description="Lab specific identifiers to reference an object.")
    creation_timestamp: Optional[StrictStr] = Field(default=None, description="The date the object was created.")
    submitted_by: Optional[StrictStr] = Field(default=None, description="The user who submitted the object.")
    submitter_comment: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Additional information specified by the submitter to be displayed as a comment on the portal.")
    description: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="A plain text description of the object.")
    analysis_step_types: Optional[List[StrictStr]] = Field(default=None, description="The classification of the software.")
    step_label: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Unique lowercased label of the analysis step that includes the relevant assays, the software used, and the purpose of the step, e.g. rampage-grit-peak-calling-step")
    title: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="The preferred viewable name of the analysis step, likely the same as the step label.")
    parents: Optional[List[StrictStr]] = Field(default=None, description="The precursor steps.")
    input_content_types: Optional[List[StrictStr]] = Field(default=None, description="The content types used as input for the analysis step.")
    output_content_types: Optional[List[StrictStr]] = Field(default=None, description="The content types produced as output by the analysis step.")
    id: Optional[StrictStr] = Field(default=None, alias="@id")
    type: Optional[List[StrictStr]] = Field(default=None, alias="@type")
    summary: Optional[StrictStr] = Field(default=None, description="A summary of the object.")
    analysis_step_versions: Optional[List[StrictStr]] = Field(default=None, description="The analysis step versions associated with this analysis step.")
    __properties: ClassVar[List[str]] = ["preview_timestamp", "release_timestamp", "status", "lab", "award", "schema_version", "uuid", "notes", "aliases", "creation_timestamp", "submitted_by", "submitter_comment", "description", "analysis_step_types", "step_label", "title", "parents", "input_content_types", "output_content_types", "@id", "@type", "summary", "analysis_step_versions"]

    @field_validator('status')
    def status_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        if value not in set(['archived', 'deleted', 'in progress', 'preview', 'released']):
            raise ValueError("must be one of enum values ('archived', 'deleted', 'in progress', 'preview', 'released')")
        return value

    @field_validator('schema_version')
    def schema_version_validate_regular_expression(cls, value):
        """Validates the regular expression"""
        if value is None:
            return value

        if not re.match(r"^\d+(\.\d+)*$", value):
            raise ValueError(r"must validate the regular expression /^\d+(\.\d+)*$/")
        return value

    @field_validator('notes')
    def notes_validate_regular_expression(cls, value):
        """Validates the regular expression"""
        if value is None:
            return value

        if not re.match(r"^(\S+(\s|\S)*\S+|\S)$", value):
            raise ValueError(r"must validate the regular expression /^(\S+(\s|\S)*\S+|\S)$/")
        return value

    @field_validator('submitter_comment')
    def submitter_comment_validate_regular_expression(cls, value):
        """Validates the regular expression"""
        if value is None:
            return value

        if not re.match(r"^(\S+(\s|\S)*\S+|\S)$", value):
            raise ValueError(r"must validate the regular expression /^(\S+(\s|\S)*\S+|\S)$/")
        return value

    @field_validator('description')
    def description_validate_regular_expression(cls, value):
        """Validates the regular expression"""
        if value is None:
            return value

        if not re.match(r"^(\S+(\s|\S)*\S+|\S)$", value):
            raise ValueError(r"must validate the regular expression /^(\S+(\s|\S)*\S+|\S)$/")
        return value

    @field_validator('analysis_step_types')
    def analysis_step_types_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        for i in value:
            if i not in set(['alignment', 'barcode correction', 'barcode counting', 'barcode mapping generation', 'base calling', 'calibration', 'cell profiling', 'cell to feature barcode mapping', 'computational model prediction', 'computational model training', 'counts normalization', 'custom genome assembly', 'demultiplexing', 'differential expression analysis', 'fastq concatenation', 'file format conversion', 'filtering', 'fragment generation', 'genome index generation', 'heteroplasmy ratio determination', 'image analysis', 'interaction calling', 'logistic regression', 'matrix generation', 'merging', 'modification calling', 'modification site annotation', 'peak calling', 'read trimming', 'quantification', 'signal generation', 'signal normalization', 'spatial feature detection', 'transcriptome index generation', 'UMAP embedding', 'UMI deduplication', 'UMI quantification', 'variant annotation']):
                raise ValueError("each list item must be one of ('alignment', 'barcode correction', 'barcode counting', 'barcode mapping generation', 'base calling', 'calibration', 'cell profiling', 'cell to feature barcode mapping', 'computational model prediction', 'computational model training', 'counts normalization', 'custom genome assembly', 'demultiplexing', 'differential expression analysis', 'fastq concatenation', 'file format conversion', 'filtering', 'fragment generation', 'genome index generation', 'heteroplasmy ratio determination', 'image analysis', 'interaction calling', 'logistic regression', 'matrix generation', 'merging', 'modification calling', 'modification site annotation', 'peak calling', 'read trimming', 'quantification', 'signal generation', 'signal normalization', 'spatial feature detection', 'transcriptome index generation', 'UMAP embedding', 'UMI deduplication', 'UMI quantification', 'variant annotation')")
        return value

    @field_validator('step_label')
    def step_label_validate_regular_expression(cls, value):
        """Validates the regular expression"""
        if value is None:
            return value

        if not re.match(r"^[a-z0-9-]+-step$", value):
            raise ValueError(r"must validate the regular expression /^[a-z0-9-]+-step$/")
        return value

    @field_validator('title')
    def title_validate_regular_expression(cls, value):
        """Validates the regular expression"""
        if value is None:
            return value

        if not re.match(r"^[a-zA-Z\d_().,-]+(?:\s[a-zA-Z\d_().,-]+)*[step|Step]$", value):
            raise ValueError(r"must validate the regular expression /^[a-zA-Z\d_().,-]+(?:\s[a-zA-Z\d_().,-]+)*[step|Step]$/")
        return value

    @field_validator('input_content_types')
    def input_content_types_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        for i in value:
            if i not in set(['DNA footprint scores', 'DUAL-IPA score', 'GO annotation', 'GWAS', 'MPRA sequence designs', 'Nanopore reads', 'PacBio subreads', 'SNP effect matrix', 'TF binding scores', 'UMAP plot', 'aggregated calibrated coding variant effects', 'alignments', 'alignments with modifications', 'allele specific binding', 'annotated multimodal CRISPR matrix', 'annotated sparse gene count matrix', 'annotated sparse peak count matrix', 'barcode onlist', 'barcode replacement', 'barcode to TF overexpression mapping', 'barcode to cluster mapping', 'barcode to donor mapping', 'barcode to element mapping', 'barcode to hashtag mapping', 'barcode to sample mapping', 'barcode to variant mapping', 'bin paired count', 'caQTL', 'calibrated coding variant effect thresholds', 'calibrated coding variant effects', 'cell annotations', 'cell hashing barcodes', 'co-localization scores', 'coding variant effects', 'coding variants', 'coexpression', 'complexes', 'contact matrix', 'control signal', 'covariance matrix', 'derived barcode mapping', 'detected tissue', 'differential chromatin contact quantifications', 'differential element quantifications', 'differential gene expression quantifications', 'differential guide quantifications', 'differential peak quantifications', 'differential transcript expression quantifications', 'documentation (readme)', 'drugs', 'eQTL', 'edge weights', 'editing templates', 'element quantifications', 'element to gene interactions', 'elements reference', 'exclusion list', 'exclusion list regions', 'external source data', 'feature weights', 'fiducial alignment', 'filtered feature barcode matrix', 'filtered global differential expressions', 'fold change of post-selection and pre-selection', 'fold change over control', 'fragments', 'functional conservation mapping', 'functional impact score', 'gene dependency', 'gene disease links', 'gene program regulators', 'gene programs', 'gene quantifications', 'gene universe', 'genes', 'genes in pathway', 'genome index', 'genome reference', 'graph structure', 'guide RNA sequences', 'guide RNA sequences reference', 'guide quantifications', 'heritability enrichment', 'high resolution tissue', 'inclusion list', 'index', 'index plate', 'individual cells profile', 'kallisto single cell RNAseq output', 'linkage disequilibrium', 'loci', 'low resolution tissue', 'machine learning model features', 'methylated reads', 'minus strand modification state', 'mitochondrial DNA heteroplasmy', 'model parameters', 'modification state', 'motif protein mapping', 'motifs', 'nascent transcriptome index', 'neural network architecture', 'neural network architecture and edge weights', 'normalized variants profile', 'ontology terms', 'orthologs', 'pQTL', 'pathogenicity validation', 'pathway hierarchy', 'pathways', 'peak quantifications', 'peaks', 'per cell type enrichment scores', 'pipeline parameters', 'plus strand modification state', 'position weight matrix', 'prime editing guide RNA sequences', 'primer sequences', 'primers table', 'primers track', 'probes track', 'protein language model', 'protein protein interactions', 'protein sequences', 'protein stability fluorescence score', 'protein to protein interaction score', 'protein-protein interaction edge-perturbation score', 'protein-protein interaction edgotyping score', 'proteins', 'raw feature barcode matrix', 'raw signal', 'read count', 'read-depth signal', 'reads', 'regional constraint', 'reporter elements', 'reporter experiment', 'reporter experiment barcode', 'reporter genomic element effects', 'reporter genomic variant effects', 'reporter variants', 'sample barcode count matrix', 'sample sort parameters', 'scale factors', 'selected normalized variants profile', 'seqspec', 'sequence attributes', 'signal', 'signal of all reads', 'signal of unique reads', 'signal p-value', 'sparse gene count matrix', 'sparse peak count matrix', 'sparse transcript count matrix', 'spike-ins', 'spliceQTL', 'target transcripts', 'tissue positions', 'transcript quantifications', 'transcriptome alignments', 'transcriptome annotations', 'transcriptome index', 'transcriptome reference', 'unfiltered global differential expression', 'unfiltered local differential expression', 'variant binding effects', 'variant disease links', 'variant drug annotations', 'variant effects', 'variant functions', 'variant localization impacts', 'variant pathogenicity', 'variant to cluster mapping', 'variant to element mapping', 'variants']):
                raise ValueError("each list item must be one of ('DNA footprint scores', 'DUAL-IPA score', 'GO annotation', 'GWAS', 'MPRA sequence designs', 'Nanopore reads', 'PacBio subreads', 'SNP effect matrix', 'TF binding scores', 'UMAP plot', 'aggregated calibrated coding variant effects', 'alignments', 'alignments with modifications', 'allele specific binding', 'annotated multimodal CRISPR matrix', 'annotated sparse gene count matrix', 'annotated sparse peak count matrix', 'barcode onlist', 'barcode replacement', 'barcode to TF overexpression mapping', 'barcode to cluster mapping', 'barcode to donor mapping', 'barcode to element mapping', 'barcode to hashtag mapping', 'barcode to sample mapping', 'barcode to variant mapping', 'bin paired count', 'caQTL', 'calibrated coding variant effect thresholds', 'calibrated coding variant effects', 'cell annotations', 'cell hashing barcodes', 'co-localization scores', 'coding variant effects', 'coding variants', 'coexpression', 'complexes', 'contact matrix', 'control signal', 'covariance matrix', 'derived barcode mapping', 'detected tissue', 'differential chromatin contact quantifications', 'differential element quantifications', 'differential gene expression quantifications', 'differential guide quantifications', 'differential peak quantifications', 'differential transcript expression quantifications', 'documentation (readme)', 'drugs', 'eQTL', 'edge weights', 'editing templates', 'element quantifications', 'element to gene interactions', 'elements reference', 'exclusion list', 'exclusion list regions', 'external source data', 'feature weights', 'fiducial alignment', 'filtered feature barcode matrix', 'filtered global differential expressions', 'fold change of post-selection and pre-selection', 'fold change over control', 'fragments', 'functional conservation mapping', 'functional impact score', 'gene dependency', 'gene disease links', 'gene program regulators', 'gene programs', 'gene quantifications', 'gene universe', 'genes', 'genes in pathway', 'genome index', 'genome reference', 'graph structure', 'guide RNA sequences', 'guide RNA sequences reference', 'guide quantifications', 'heritability enrichment', 'high resolution tissue', 'inclusion list', 'index', 'index plate', 'individual cells profile', 'kallisto single cell RNAseq output', 'linkage disequilibrium', 'loci', 'low resolution tissue', 'machine learning model features', 'methylated reads', 'minus strand modification state', 'mitochondrial DNA heteroplasmy', 'model parameters', 'modification state', 'motif protein mapping', 'motifs', 'nascent transcriptome index', 'neural network architecture', 'neural network architecture and edge weights', 'normalized variants profile', 'ontology terms', 'orthologs', 'pQTL', 'pathogenicity validation', 'pathway hierarchy', 'pathways', 'peak quantifications', 'peaks', 'per cell type enrichment scores', 'pipeline parameters', 'plus strand modification state', 'position weight matrix', 'prime editing guide RNA sequences', 'primer sequences', 'primers table', 'primers track', 'probes track', 'protein language model', 'protein protein interactions', 'protein sequences', 'protein stability fluorescence score', 'protein to protein interaction score', 'protein-protein interaction edge-perturbation score', 'protein-protein interaction edgotyping score', 'proteins', 'raw feature barcode matrix', 'raw signal', 'read count', 'read-depth signal', 'reads', 'regional constraint', 'reporter elements', 'reporter experiment', 'reporter experiment barcode', 'reporter genomic element effects', 'reporter genomic variant effects', 'reporter variants', 'sample barcode count matrix', 'sample sort parameters', 'scale factors', 'selected normalized variants profile', 'seqspec', 'sequence attributes', 'signal', 'signal of all reads', 'signal of unique reads', 'signal p-value', 'sparse gene count matrix', 'sparse peak count matrix', 'sparse transcript count matrix', 'spike-ins', 'spliceQTL', 'target transcripts', 'tissue positions', 'transcript quantifications', 'transcriptome alignments', 'transcriptome annotations', 'transcriptome index', 'transcriptome reference', 'unfiltered global differential expression', 'unfiltered local differential expression', 'variant binding effects', 'variant disease links', 'variant drug annotations', 'variant effects', 'variant functions', 'variant localization impacts', 'variant pathogenicity', 'variant to cluster mapping', 'variant to element mapping', 'variants')")
        return value

    @field_validator('output_content_types')
    def output_content_types_validate_enum(cls, value):
        """Validates the enum"""
        if value is None:
            return value

        for i in value:
            if i not in set(['DNA footprint scores', 'DUAL-IPA score', 'GO annotation', 'GWAS', 'MPRA sequence designs', 'Nanopore reads', 'PacBio subreads', 'SNP effect matrix', 'TF binding scores', 'UMAP plot', 'aggregated calibrated coding variant effects', 'alignments', 'alignments with modifications', 'allele specific binding', 'annotated multimodal CRISPR matrix', 'annotated sparse gene count matrix', 'annotated sparse peak count matrix', 'barcode onlist', 'barcode replacement', 'barcode to TF overexpression mapping', 'barcode to cluster mapping', 'barcode to donor mapping', 'barcode to element mapping', 'barcode to hashtag mapping', 'barcode to sample mapping', 'barcode to variant mapping', 'bin paired count', 'caQTL', 'calibrated coding variant effect thresholds', 'calibrated coding variant effects', 'cell annotations', 'cell hashing barcodes', 'co-localization scores', 'coding variant effects', 'coding variants', 'coexpression', 'complexes', 'contact matrix', 'control signal', 'covariance matrix', 'derived barcode mapping', 'detected tissue', 'differential chromatin contact quantifications', 'differential element quantifications', 'differential gene expression quantifications', 'differential guide quantifications', 'differential peak quantifications', 'differential transcript expression quantifications', 'documentation (readme)', 'drugs', 'eQTL', 'edge weights', 'editing templates', 'element quantifications', 'element to gene interactions', 'elements reference', 'exclusion list', 'exclusion list regions', 'external source data', 'feature weights', 'fiducial alignment', 'filtered feature barcode matrix', 'filtered global differential expressions', 'fold change of post-selection and pre-selection', 'fold change over control', 'fragments', 'functional conservation mapping', 'functional impact score', 'gene dependency', 'gene disease links', 'gene program regulators', 'gene programs', 'gene quantifications', 'gene universe', 'genes', 'genes in pathway', 'genome index', 'genome reference', 'graph structure', 'guide RNA sequences', 'guide RNA sequences reference', 'guide quantifications', 'heritability enrichment', 'high resolution tissue', 'inclusion list', 'index', 'index plate', 'individual cells profile', 'kallisto single cell RNAseq output', 'linkage disequilibrium', 'loci', 'low resolution tissue', 'machine learning model features', 'methylated reads', 'minus strand modification state', 'mitochondrial DNA heteroplasmy', 'model parameters', 'modification state', 'motif protein mapping', 'motifs', 'nascent transcriptome index', 'neural network architecture', 'neural network architecture and edge weights', 'normalized variants profile', 'ontology terms', 'orthologs', 'pQTL', 'pathogenicity validation', 'pathway hierarchy', 'pathways', 'peak quantifications', 'peaks', 'per cell type enrichment scores', 'pipeline parameters', 'plus strand modification state', 'position weight matrix', 'prime editing guide RNA sequences', 'primer sequences', 'primers table', 'primers track', 'probes track', 'protein language model', 'protein protein interactions', 'protein sequences', 'protein stability fluorescence score', 'protein to protein interaction score', 'protein-protein interaction edge-perturbation score', 'protein-protein interaction edgotyping score', 'proteins', 'raw feature barcode matrix', 'raw signal', 'read count', 'read-depth signal', 'reads', 'regional constraint', 'reporter elements', 'reporter experiment', 'reporter experiment barcode', 'reporter genomic element effects', 'reporter genomic variant effects', 'reporter variants', 'sample barcode count matrix', 'sample sort parameters', 'scale factors', 'selected normalized variants profile', 'seqspec', 'sequence attributes', 'signal', 'signal of all reads', 'signal of unique reads', 'signal p-value', 'sparse gene count matrix', 'sparse peak count matrix', 'sparse transcript count matrix', 'spike-ins', 'spliceQTL', 'target transcripts', 'tissue positions', 'transcript quantifications', 'transcriptome alignments', 'transcriptome annotations', 'transcriptome index', 'transcriptome reference', 'unfiltered global differential expression', 'unfiltered local differential expression', 'variant binding effects', 'variant disease links', 'variant drug annotations', 'variant effects', 'variant functions', 'variant localization impacts', 'variant pathogenicity', 'variant to cluster mapping', 'variant to element mapping', 'variants']):
                raise ValueError("each list item must be one of ('DNA footprint scores', 'DUAL-IPA score', 'GO annotation', 'GWAS', 'MPRA sequence designs', 'Nanopore reads', 'PacBio subreads', 'SNP effect matrix', 'TF binding scores', 'UMAP plot', 'aggregated calibrated coding variant effects', 'alignments', 'alignments with modifications', 'allele specific binding', 'annotated multimodal CRISPR matrix', 'annotated sparse gene count matrix', 'annotated sparse peak count matrix', 'barcode onlist', 'barcode replacement', 'barcode to TF overexpression mapping', 'barcode to cluster mapping', 'barcode to donor mapping', 'barcode to element mapping', 'barcode to hashtag mapping', 'barcode to sample mapping', 'barcode to variant mapping', 'bin paired count', 'caQTL', 'calibrated coding variant effect thresholds', 'calibrated coding variant effects', 'cell annotations', 'cell hashing barcodes', 'co-localization scores', 'coding variant effects', 'coding variants', 'coexpression', 'complexes', 'contact matrix', 'control signal', 'covariance matrix', 'derived barcode mapping', 'detected tissue', 'differential chromatin contact quantifications', 'differential element quantifications', 'differential gene expression quantifications', 'differential guide quantifications', 'differential peak quantifications', 'differential transcript expression quantifications', 'documentation (readme)', 'drugs', 'eQTL', 'edge weights', 'editing templates', 'element quantifications', 'element to gene interactions', 'elements reference', 'exclusion list', 'exclusion list regions', 'external source data', 'feature weights', 'fiducial alignment', 'filtered feature barcode matrix', 'filtered global differential expressions', 'fold change of post-selection and pre-selection', 'fold change over control', 'fragments', 'functional conservation mapping', 'functional impact score', 'gene dependency', 'gene disease links', 'gene program regulators', 'gene programs', 'gene quantifications', 'gene universe', 'genes', 'genes in pathway', 'genome index', 'genome reference', 'graph structure', 'guide RNA sequences', 'guide RNA sequences reference', 'guide quantifications', 'heritability enrichment', 'high resolution tissue', 'inclusion list', 'index', 'index plate', 'individual cells profile', 'kallisto single cell RNAseq output', 'linkage disequilibrium', 'loci', 'low resolution tissue', 'machine learning model features', 'methylated reads', 'minus strand modification state', 'mitochondrial DNA heteroplasmy', 'model parameters', 'modification state', 'motif protein mapping', 'motifs', 'nascent transcriptome index', 'neural network architecture', 'neural network architecture and edge weights', 'normalized variants profile', 'ontology terms', 'orthologs', 'pQTL', 'pathogenicity validation', 'pathway hierarchy', 'pathways', 'peak quantifications', 'peaks', 'per cell type enrichment scores', 'pipeline parameters', 'plus strand modification state', 'position weight matrix', 'prime editing guide RNA sequences', 'primer sequences', 'primers table', 'primers track', 'probes track', 'protein language model', 'protein protein interactions', 'protein sequences', 'protein stability fluorescence score', 'protein to protein interaction score', 'protein-protein interaction edge-perturbation score', 'protein-protein interaction edgotyping score', 'proteins', 'raw feature barcode matrix', 'raw signal', 'read count', 'read-depth signal', 'reads', 'regional constraint', 'reporter elements', 'reporter experiment', 'reporter experiment barcode', 'reporter genomic element effects', 'reporter genomic variant effects', 'reporter variants', 'sample barcode count matrix', 'sample sort parameters', 'scale factors', 'selected normalized variants profile', 'seqspec', 'sequence attributes', 'signal', 'signal of all reads', 'signal of unique reads', 'signal p-value', 'sparse gene count matrix', 'sparse peak count matrix', 'sparse transcript count matrix', 'spike-ins', 'spliceQTL', 'target transcripts', 'tissue positions', 'transcript quantifications', 'transcriptome alignments', 'transcriptome annotations', 'transcriptome index', 'transcriptome reference', 'unfiltered global differential expression', 'unfiltered local differential expression', 'variant binding effects', 'variant disease links', 'variant drug annotations', 'variant effects', 'variant functions', 'variant localization impacts', 'variant pathogenicity', 'variant to cluster mapping', 'variant to element mapping', 'variants')")
        return value

    model_config = ConfigDict(
        populate_by_name=True,
        validate_assignment=True,
        protected_namespaces=(),
    )


    def to_str(self) -> str:
        """Returns the string representation of the model using alias"""
        return pprint.pformat(self.model_dump(by_alias=True))

    def to_json(self) -> str:
        """Returns the JSON representation of the model using alias"""
        # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
        return json.dumps(self.to_dict())

    @classmethod
    def from_json(cls, json_str: str) -> Optional[Self]:
        """Create an instance of AnalysisStep from a JSON string"""
        return cls.from_dict(json.loads(json_str))

    def to_dict(self) -> Dict[str, Any]:
        """Return the dictionary representation of the model using alias.

        This has the following differences from calling pydantic's
        `self.model_dump(by_alias=True)`:

        * `None` is only added to the output dict for nullable fields that
          were set at model initialization. Other fields with value `None`
          are ignored.
        """
        excluded_fields: Set[str] = set([
        ])

        _dict = self.model_dump(
            by_alias=True,
            exclude=excluded_fields,
            exclude_none=True,
        )
        return _dict

    @classmethod
    def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
        """Create an instance of AnalysisStep from a dict"""
        if obj is None:
            return None

        if not isinstance(obj, dict):
            return cls.model_validate(obj)

        _obj = cls.model_validate({
            "preview_timestamp": obj.get("preview_timestamp"),
            "release_timestamp": obj.get("release_timestamp"),
            "status": obj.get("status"),
            "lab": obj.get("lab"),
            "award": obj.get("award"),
            "schema_version": obj.get("schema_version"),
            "uuid": obj.get("uuid"),
            "notes": obj.get("notes"),
            "aliases": obj.get("aliases"),
            "creation_timestamp": obj.get("creation_timestamp"),
            "submitted_by": obj.get("submitted_by"),
            "submitter_comment": obj.get("submitter_comment"),
            "description": obj.get("description"),
            "analysis_step_types": obj.get("analysis_step_types"),
            "step_label": obj.get("step_label"),
            "title": obj.get("title"),
            "parents": obj.get("parents"),
            "input_content_types": obj.get("input_content_types"),
            "output_content_types": obj.get("output_content_types"),
            "@id": obj.get("@id"),
            "@type": obj.get("@type"),
            "summary": obj.get("summary"),
            "analysis_step_versions": obj.get("analysis_step_versions")
        })
        return _obj


