2021-08-21 17:52:24 -07:00
|
|
|
# generated by datamodel-codegen:
|
|
|
|
# filename: schema/entity/services/messagingService.json
|
2021-10-11 20:12:40 -07:00
|
|
|
# timestamp: 2021-10-12T00:34:28+00:00
|
2021-08-21 17:52:24 -07:00
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from enum import Enum
|
|
|
|
from typing import List, Optional
|
|
|
|
|
|
|
|
from pydantic import AnyUrl, BaseModel, Field, constr
|
|
|
|
|
|
|
|
from ...type import basic, schedule
|
|
|
|
|
|
|
|
|
|
|
|
class MessagingServiceType(Enum):
|
|
|
|
Kafka = 'Kafka'
|
|
|
|
Pulsar = 'Pulsar'
|
|
|
|
|
|
|
|
|
|
|
|
class Brokers(BaseModel):
|
|
|
|
__root__: List[str] = Field(
|
|
|
|
...,
|
|
|
|
description='Multiple bootstrap addresses for Kafka. Single proxy address for Pulsar.',
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
class MessagingService(BaseModel):
|
|
|
|
id: basic.Uuid = Field(
|
|
|
|
..., description='Unique identifier of this messaging service instance.'
|
|
|
|
)
|
|
|
|
name: constr(min_length=1, max_length=64) = Field(
|
|
|
|
..., description='Name that identifies this messaging service.'
|
|
|
|
)
|
|
|
|
serviceType: MessagingServiceType = Field(
|
|
|
|
..., description='Type of messaging service such as Kafka or Pulsar...'
|
|
|
|
)
|
|
|
|
description: Optional[str] = Field(
|
|
|
|
None, description='Description of a messaging service instance.'
|
|
|
|
)
|
|
|
|
brokers: Brokers = Field(
|
|
|
|
...,
|
|
|
|
description='Multiple bootstrap addresses for Kafka. Single proxy address for Pulsar.',
|
|
|
|
)
|
2021-08-27 21:33:42 -07:00
|
|
|
schemaRegistry: Optional[AnyUrl] = Field(None, description='Schema registry URL.')
|
2021-08-21 17:52:24 -07:00
|
|
|
ingestionSchedule: Optional[schedule.Schedule] = Field(
|
|
|
|
None, description='Schedule for running metadata ingestion jobs.'
|
|
|
|
)
|
|
|
|
href: Optional[basic.Href] = Field(
|
|
|
|
None,
|
|
|
|
description='Link to the resource corresponding to this messaging service.',
|
|
|
|
)
|