"""
@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 OnPremiseMysql(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
    """Database port"""
    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___OnPremiseMysql = OnPremiseMysql

@typing.final
class MysqlConnection(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 MySQL cluster ID"""
    @property
    def on_premise(self) -> global___OnPremiseMysql:
        """Connection options for on-premise MySQL"""

    def __init__(
        self,
        *,
        mdb_cluster_id: builtins.str = ...,
        on_premise: global___OnPremiseMysql | 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___MysqlConnection = MysqlConnection

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

    VIEW_FIELD_NUMBER: builtins.int
    ROUTINE_FIELD_NUMBER: builtins.int
    TRIGGER_FIELD_NUMBER: builtins.int
    TABLES_FIELD_NUMBER: builtins.int
    view: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Views

    CREATE VIEW ...
    """
    routine: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    """Routines

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

    CREATE TRIGGER ...
    """
    tables: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType
    def __init__(
        self,
        *,
        view: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        routine: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        trigger: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
        tables: yandex.cloud.datatransfer.v1.endpoint.common_pb2.ObjectTransferStage.ValueType = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["routine", b"routine", "tables", b"tables", "trigger", b"trigger", "view", b"view"]) -> None: ...

global___MysqlObjectTransferSettings = MysqlObjectTransferSettings

@typing.final
class MysqlSource(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
    TIMEZONE_FIELD_NUMBER: builtins.int
    OBJECT_TRANSFER_SETTINGS_FIELD_NUMBER: builtins.int
    INCLUDE_TABLES_REGEX_FIELD_NUMBER: builtins.int
    EXCLUDE_TABLES_REGEX_FIELD_NUMBER: builtins.int
    SECURITY_GROUPS_FIELD_NUMBER: builtins.int
    SERVICE_DATABASE_FIELD_NUMBER: builtins.int
    database: builtins.str
    """Database name

    You can leave it empty, then it will be possible to transfer tables from several
    databases at the same time from this source.
    """
    user: builtins.str
    """User for database access."""
    timezone: builtins.str
    """Database timezone

    Is used for parsing timestamps for saving source timezones. Accepts values from
    IANA timezone database. Default: local timezone.
    """
    service_database: builtins.str
    """Database for service tables

    Default: data source database. Here created technical tables (__tm_keeper,
    __tm_gtid_keeper).
    """
    @property
    def connection(self) -> global___MysqlConnection:
        """Database connection settings"""

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

    @property
    def object_transfer_settings(self) -> global___MysqlObjectTransferSettings:
        """Schema migration

        Select database objects to be transferred during activation or deactivation.
        """

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

    def __init__(
        self,
        *,
        connection: global___MysqlConnection | None = ...,
        database: builtins.str = ...,
        user: builtins.str = ...,
        password: yandex.cloud.datatransfer.v1.endpoint.common_pb2.Secret | None = ...,
        timezone: builtins.str = ...,
        object_transfer_settings: global___MysqlObjectTransferSettings | None = ...,
        include_tables_regex: collections.abc.Iterable[builtins.str] | None = ...,
        exclude_tables_regex: collections.abc.Iterable[builtins.str] | None = ...,
        security_groups: collections.abc.Iterable[builtins.str] | None = ...,
        service_database: builtins.str = ...,
    ) -> 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_regex", b"exclude_tables_regex", "include_tables_regex", b"include_tables_regex", "object_transfer_settings", b"object_transfer_settings", "password", b"password", "security_groups", b"security_groups", "service_database", b"service_database", "timezone", b"timezone", "user", b"user"]) -> None: ...

global___MysqlSource = MysqlSource

@typing.final
class MysqlTarget(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
    SQL_MODE_FIELD_NUMBER: builtins.int
    SKIP_CONSTRAINT_CHECKS_FIELD_NUMBER: builtins.int
    TIMEZONE_FIELD_NUMBER: builtins.int
    CLEANUP_POLICY_FIELD_NUMBER: builtins.int
    SERVICE_DATABASE_FIELD_NUMBER: builtins.int
    SECURITY_GROUPS_FIELD_NUMBER: builtins.int
    database: builtins.str
    """Database name

    Allowed to leave it empty, then the tables will be created in databases with the
    same names as on the source. If this field is empty, then you must fill below db
    schema for service table.
    """
    user: builtins.str
    """User for database access."""
    sql_mode: builtins.str
    """Default: NO_AUTO_VALUE_ON_ZERO,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION."""
    skip_constraint_checks: builtins.bool
    """Disable constraints checks

    Recommend to disable for increase replication speed, but if schema contain
    cascading operations we don't recommend to disable. This option set
    FOREIGN_KEY_CHECKS=0 and UNIQUE_CHECKS=0.
    """
    timezone: builtins.str
    """Database timezone

    Is used for parsing timestamps for saving source timezones. Accepts values from
    IANA timezone database. Default: local timezone.
    """
    cleanup_policy: yandex.cloud.datatransfer.v1.endpoint.common_pb2.CleanupPolicy.ValueType
    """Cleanup policy

    Cleanup policy for activate, reactivate and reupload processes. Default is
    DISABLED.
    """
    service_database: builtins.str
    """Database schema for service table

    Default: db name. Here created technical tables (__tm_keeper, __tm_gtid_keeper).
    """
    @property
    def connection(self) -> global___MysqlConnection:
        """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___MysqlConnection | None = ...,
        database: builtins.str = ...,
        user: builtins.str = ...,
        password: yandex.cloud.datatransfer.v1.endpoint.common_pb2.Secret | None = ...,
        sql_mode: builtins.str = ...,
        skip_constraint_checks: builtins.bool = ...,
        timezone: builtins.str = ...,
        cleanup_policy: yandex.cloud.datatransfer.v1.endpoint.common_pb2.CleanupPolicy.ValueType = ...,
        service_database: builtins.str = ...,
        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", "service_database", b"service_database", "skip_constraint_checks", b"skip_constraint_checks", "sql_mode", b"sql_mode", "timezone", b"timezone", "user", b"user"]) -> None: ...

global___MysqlTarget = MysqlTarget
