"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.message
import typing
import yandex.cloud.datatransfer.v1.endpoint.common_pb2

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing.final
class PostgresObjectTransferSettings(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SEQUENCE_FIELD_NUMBER: builtins.int
    SEQUENCE_OWNED_BY_FIELD_NUMBER: builtins.int
    TABLE_FIELD_NUMBER: builtins.int
    PRIMARY_KEY_FIELD_NUMBER: builtins.int
    FK_CONSTRAINT_FIELD_NUMBER: builtins.int
    DEFAULT_VALUES_FIELD_NUMBER: builtins.int
    CONSTRAINT_FIELD_NUMBER: builtins.int
    INDEX_FIELD_NUMBER: builtins.int
    VIEW_FIELD_NUMBER: builtins.int
    FUNCTION_FIELD_NUMBER: builtins.int
    TRIGGER_FIELD_NUMBER: builtins.int
    TYPE_FIELD_NUMBER: builtins.int
    RULE_FIELD_NUMBER: builtins.int
    COLLATION_FIELD_NUMBER: builtins.int
    POLICY_FIELD_NUMBER: builtins.int
    CAST_FIELD_NUMBER: builtins.int
    MATERIALIZED_VIEW_FIELD_NUMBER: builtins.int
    SEQUENCE_SET_FIELD_NUMBER: builtins.int
    sequence: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Sequences

    CREATE SEQUENCE ...
    """
    sequence_owned_by: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Owned sequences

    CREATE SEQUENCE ... OWNED BY ...
    """
    table: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Tables

    CREATE TABLE ...
    """
    primary_key: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Primary keys

    ALTER TABLE ... ADD PRIMARY KEY ...
    """
    fk_constraint: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Foreign keys

    ALTER TABLE ... ADD FOREIGN KEY ...
    """
    default_values: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Default values

    ALTER TABLE ... ALTER COLUMN ... SET DEFAULT ...
    """
    constraint: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Constraints

    ALTER TABLE ... ADD CONSTRAINT ...
    """
    index: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Indexes

    CREATE INDEX ...
    """
    view: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Views

    CREATE VIEW ...
    """
    function: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Functions

    CREATE FUNCTION ...
    """
    trigger: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Triggers

    CREATE TRIGGER ...
    """
    type: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Types

    CREATE TYPE ...
    """
    rule: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Rules

    CREATE RULE ...
    """
    collation: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Collations

    CREATE COLLATION ...
    """
    policy: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Policies

    CREATE POLICY ...
    """
    cast: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Casts

    CREATE CAST ...
    """
    materialized_view: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Materialized views

    CREATE MATERIALIZED VIEW ...
    """
    sequence_set: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """"""
    def __init__(
        self,
        *,
        sequence: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        sequence_owned_by: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        table: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        primary_key: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        fk_constraint: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        default_values: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        constraint: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        index: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        view: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        function: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        trigger: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        type: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        rule: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        collation: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        policy: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        cast: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        materialized_view: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        sequence_set: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["cast", b"cast", "collation", b"collation", "constraint", b"constraint", "default_values", b"default_values", "fk_constraint", b"fk_constraint", "function", b"function", "index", b"index", "materialized_view", b"materialized_view", "policy", b"policy", "primary_key", b"primary_key", "rule", b"rule", "sequence", b"sequence", "sequence_owned_by", b"sequence_owned_by", "sequence_set", b"sequence_set", "table", b"table", "trigger", b"trigger", "type", b"type", "view", b"view"]) -> None: ...

global___PostgresObjectTransferSettings = PostgresObjectTransferSettings

@typing.final
class OnPremisePostgres(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PORT_FIELD_NUMBER: builtins.int
    SUBNET_ID_FIELD_NUMBER: builtins.int
    HOSTS_FIELD_NUMBER: builtins.int
    TLS_MODE_FIELD_NUMBER: builtins.int
    port: builtins.int
    """Will be used if the cluster ID is not specified."""
    subnet_id: builtins.str
    """Network interface for endpoint. If none will assume public ipv4"""
    @property
    def hosts(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
    @property
    def tls_mode(self) -> yandex.cloud.datatransfer.v1.endpoint.common_pb2.TLSMode:
        """TLS settings for server connection. Disabled by default."""

    def __init__(
        self,
        *,
        port: builtins.int = ...,
        subnet_id: builtins.str = ...,
        hosts: collections.abc.Iterable[builtins.str] | None = ...,
        tls_mode: yandex.cloud.datatransfer.v1.endpoint.common_pb2.TLSMode | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["tls_mode", b"tls_mode"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["hosts", b"hosts", "port", b"port", "subnet_id", b"subnet_id", "tls_mode", b"tls_mode"]) -> None: ...

global___OnPremisePostgres = OnPremisePostgres

@typing.final
class PostgresConnection(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    MDB_CLUSTER_ID_FIELD_NUMBER: builtins.int
    ON_PREMISE_FIELD_NUMBER: builtins.int
    mdb_cluster_id: builtins.str
    """Managed Service for PostgreSQL cluster ID"""
    @property
    def on_premise(self) -> global___OnPremisePostgres:
        """Connection options for on-premise PostgreSQL"""

    def __init__(
        self,
        *,
        mdb_cluster_id: builtins.str = ...,
        on_premise: global___OnPremisePostgres | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["connection", b"connection", "mdb_cluster_id", b"mdb_cluster_id", "on_premise", b"on_premise"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["connection", b"connection", "mdb_cluster_id", b"mdb_cluster_id", "on_premise", b"on_premise"]) -> None: ...
    def WhichOneof(self, oneof_group: typing.Literal["connection", b"connection"]) -> typing.Literal["mdb_cluster_id", "on_premise"] | None: ...

global___PostgresConnection = PostgresConnection

@typing.final
class PostgresSource(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    CONNECTION_FIELD_NUMBER: builtins.int
    DATABASE_FIELD_NUMBER: builtins.int
    USER_FIELD_NUMBER: builtins.int
    PASSWORD_FIELD_NUMBER: builtins.int
    INCLUDE_TABLES_FIELD_NUMBER: builtins.int
    EXCLUDE_TABLES_FIELD_NUMBER: builtins.int
    SLOT_BYTE_LAG_LIMIT_FIELD_NUMBER: builtins.int
    SERVICE_SCHEMA_FIELD_NUMBER: builtins.int
    OBJECT_TRANSFER_SETTINGS_FIELD_NUMBER: builtins.int
    SECURITY_GROUPS_FIELD_NUMBER: builtins.int
    database: builtins.str
    """Database name"""
    user: builtins.str
    """User for database access. not required as may be in connection"""
    slot_byte_lag_limit: builtins.int
    """Maximum lag of replication slot (in bytes); after exceeding this limit
    replication will be aborted.
    """
    service_schema: builtins.str
    """Database schema for service tables (__consumer_keeper,
    __data_transfer_mole_finder). Default is public
    """
    @property
    def connection(self) -> global___PostgresConnection:
        """Database connection settings"""

    @property
    def password(self) -> yandex.cloud.datatransfer.v1.endpoint.common_pb2.Secret:
        """Password for database access."""

    @property
    def include_tables(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """Included tables

        If none or empty list is presented, all tables are replicated. Full table name
        with schema. Can contain schema_name.* patterns.
        """

    @property
    def exclude_tables(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """Excluded tables

        If none or empty list is presented, all tables are replicated. Full table name
        with schema. Can contain schema_name.* patterns.
        """

    @property
    def object_transfer_settings(self) -> global___PostgresObjectTransferSettings:
        """Select database objects to be transferred during activation or deactivation."""

    @property
    def security_groups(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """Security groups"""

    def __init__(
        self,
        *,
        connection: global___PostgresConnection | None = ...,
        database: builtins.str = ...,
        user: builtins.str = ...,
        password: yandex.cloud.datatransfer.v1.endpoint.common_pb2.Secret | None = ...,
        include_tables: collections.abc.Iterable[builtins.str] | None = ...,
        exclude_tables: collections.abc.Iterable[builtins.str] | None = ...,
        slot_byte_lag_limit: builtins.int = ...,
        service_schema: builtins.str = ...,
        object_transfer_settings: global___PostgresObjectTransferSettings | None = ...,
        security_groups: collections.abc.Iterable[builtins.str] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["connection", b"connection", "object_transfer_settings", b"object_transfer_settings", "password", b"password"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["connection", b"connection", "database", b"database", "exclude_tables", b"exclude_tables", "include_tables", b"include_tables", "object_transfer_settings", b"object_transfer_settings", "password", b"password", "security_groups", b"security_groups", "service_schema", b"service_schema", "slot_byte_lag_limit", b"slot_byte_lag_limit", "user", b"user"]) -> None: ...

global___PostgresSource = PostgresSource

@typing.final
class PostgresTarget(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    CONNECTION_FIELD_NUMBER: builtins.int
    DATABASE_FIELD_NUMBER: builtins.int
    USER_FIELD_NUMBER: builtins.int
    PASSWORD_FIELD_NUMBER: builtins.int
    CLEANUP_POLICY_FIELD_NUMBER: builtins.int
    SECURITY_GROUPS_FIELD_NUMBER: builtins.int
    database: builtins.str
    """Database name"""
    user: builtins.str
    """User for database access. not required as may be in connection"""
    cleanup_policy: yandex.cloud.datatransfer.v1.endpoint.common_pb2.CleanupPolicy.ValueType
    """Cleanup policy for activate, reactivate and reupload processes. Default is
    truncate.
    """
    @property
    def connection(self) -> global___PostgresConnection:
        """Database connection settings"""

    @property
    def password(self) -> yandex.cloud.datatransfer.v1.endpoint.common_pb2.Secret:
        """Password for database access."""

    @property
    def security_groups(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
        """Security groups"""

    def __init__(
        self,
        *,
        connection: global___PostgresConnection | None = ...,
        database: builtins.str = ...,
        user: builtins.str = ...,
        password: yandex.cloud.datatransfer.v1.endpoint.common_pb2.Secret | None = ...,
        cleanup_policy: yandex.cloud.datatransfer.v1.endpoint.common_pb2.CleanupPolicy.ValueType = ...,
        security_groups: collections.abc.Iterable[builtins.str] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["connection", b"connection", "password", b"password"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["cleanup_policy", b"cleanup_policy", "connection", b"connection", "database", b"database", "password", b"password", "security_groups", b"security_groups", "user", b"user"]) -> None: ...

global___PostgresTarget = PostgresTarget
