Skip to content

Commit

Permalink
update CDK airbyte protocol models to fix master build (#12829)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroslopez authored and suhomud committed May 23, 2022
1 parent ceafa8d commit 215b8d6
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions airbyte-cdk/python/airbyte_cdk/models/airbyte_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,16 @@ class Config:
namespace: Optional[str] = Field(None, description="the namespace of this record's stream")


class AirbyteStateMessage(BaseModel):
class Config:
extra = Extra.allow
class AirbyteStateType(Enum):
GLOBAL = "GLOBAL"
PER_STREAM = "PER_STREAM"


data: Dict[str, Any] = Field(..., description="the state data")
class AirbyteStateBlob(BaseModel):
pass

class Config:
extra = Extra.forbid


class Level(Enum):
Expand Down Expand Up @@ -157,6 +162,14 @@ class OAuthConfigSpecification(BaseModel):
)


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

name: Optional[str] = Field(None, description="Stream name")
state: Optional[AirbyteStateBlob] = None


class AirbyteTraceMessage(BaseModel):
class Config:
extra = Extra.allow
Expand Down Expand Up @@ -244,6 +257,16 @@ class Config:
)


class AirbyteStateMessage(BaseModel):
class Config:
extra = Extra.allow

state_type: Optional[AirbyteStateType] = None
data: Optional[Dict[str, Any]] = Field(None, description="(Deprecated) the state data")
global_: Optional[AirbyteStateBlob] = Field(None, alias="global")
streams: Optional[List[AirbyteStreamState]] = None


class AirbyteCatalog(BaseModel):
class Config:
extra = Extra.allow
Expand Down

0 comments on commit 215b8d6

Please sign in to comment.