# generated by datamodel-codegen:
#   filename:  schema/api/services/ingestionPipelines/createIngestionPipeline.json
#   timestamp: 2022-04-20T15:52:56+00:00

from __future__ import annotations

from typing import Optional

from pydantic import BaseModel, Extra, Field

from ....entity.services.ingestionPipelines import ingestionPipeline
from ....metadataIngestion import workflow
from ....type import basic, entityReference


class CreateIngestionPipelineRequest(BaseModel):
    class Config:
        extra = Extra.forbid

    name: basic.EntityName = Field(
        ..., description='Name that identifies this pipeline instance uniquely.'
    )
    displayName: Optional[str] = Field(
        None, description='Display Name that identifies this pipeline.'
    )
    description: Optional[str] = Field(None, description='Description of the pipeline.')
    pipelineType: ingestionPipeline.PipelineType
    sourceConfig: workflow.SourceConfig
    airflowConfig: ingestionPipeline.AirflowConfig
    service: entityReference.EntityReference = Field(
        ...,
        description='Link to the database service where this database is hosted in.',
    )
    owner: Optional[entityReference.EntityReference] = Field(
        None, description='Owner of this Pipeline.'
    )
