bled = _messages.BooleanField(1)
  changeStreamName = _messages.StringField(2)
  excludeObjects = _messages.MessageField('SpannerDatabase', 3)
  fgacRole = _messages.StringField(4)
  includeObjects = _messages.MessageField('SpannerDatabase', 5)
  maxConcurrentBackfillTasks = _messages.IntegerField(6, variant=_messages.Variant.INT32)
  maxConcurrentCdcTasks = _messages.IntegerField(7, variant=_messages.Variant.INT32)
  spannerRpcPriority = _messages.EnumField('SpannerRpcPriorityValueValuesEnum', 8)


class SpannerTable(_messages.Message):
  r"""Spanner table.

  Fields:
    columns: Optional. Spanner columns in the table.
    table: Required. The table name.
  """

  columns = _messages.MessageField('SpannerColumn', 1, repeated=True)
  table = _messages.StringField(2)


class SpecificStartPosition(_messages.Message):
  r"""CDC strategy to start replicating from a specific position in the
  source.

  Fields:
    mongodbChangeStreamPosition: MongoDB change stream position to start
      replicating from.
    mysqlGtidPosition: MySQL GTID set to start replicating from.
    mysqlLogPosition: MySQL specific log position to start replicating from.
    oracleScnPosition: Oracle SCN to start replicating from.
    sqlServerLsnPosition: SqlServer LSN to start replicating from.
  """

  mongodbChangeStreamPosition = _messages.MessageField('MongodbChangeStreamPosition', 1)
  mysqlGtidPosition = _messages.MessageField('MysqlGtidPosition', 2)
  mysqlLogPosition = _messages.MessageField('MysqlLogPosition', 3)
  oracleScnPosition = _messages.MessageField('OracleScnPosition', 4)
  sqlServerLsnPosition = _messages.MessageField('SqlServerLsnPosition', 5)


class SqlServerChangeTables(_messages.Message):
  r"""Configuration to use Change Tables CDC read method."""


class SqlServerColumn(_messages.Message):
  r"""SQLServer Column.

  Fields:
    column: The column name.
    dataType: The SQLServer data type.
    length: Column length.
    nullable: Whether or not the column can accept a null value.
    ordinalPosition: The ordinal position of the column in the table.
    precision: Column precision.
    primaryKey: Whether or not the column represents a primary key.
    scale: Column scale.
  """

  column = _messages.StringField(1)
  dataType = _messages.StringField(2)
  length = _messages.IntegerField(3, variant=_messages.Variant.INT32)
  nullable = _messages.BooleanField(4)
  ordinalPosition = _messages.IntegerField(5, variant=_messages.Variant.INT32)
  precision = _messages.IntegerField(6, variant=_messages.Variant.INT32)
  primaryKey = _messages.BooleanField(7)
  scale = _messages.IntegerField(8, variant=_messages.Variant.INT32)


class SqlServerLsnPosition(_messages.Message):
  r"""SQL Server LSN position

  Fields:
    lsn: Required. Log sequence number (LSN) from where Logs will be read
  """

  lsn = _messages.StringField(1)


class SqlServerObjectIdentifier(_messages.Message):
  r"""SQLServer data source object identifier.

  Fields:
    schema: Required. The schema name.
    table: Required. The table name.
  """

  schema = _messages.StringField(1)
  table = _messages.StringField(2)


class SqlServerProfile(_messages.Message):
  r"""Profile for connecting to a SQLServer source.

  Fields:
    database: Required. Database for the SQLServer connection.
    hostname: Required. Hostname for the SQLServer connection.
    password: Optional. Password for the SQLServer connection. Mutually
      exclusive with the `secret_manager_stored_password` field.
    port: Port for the SQLServer connection, default value is 1433.
    secretManagerStoredPassword: Optional. A reference to a Secret Manager
      resource name storing the SQLServer connection password. Mutually
      exclusive with the `password` field.
    sslConfig: Optional. SSL configuration for the SQLServer connection.
    username: Required. Username for the SQLServer connection.
  """

  database = _messages.StringField(1)
  hostname = _messages.StringField(2)
  password = _messages.StringField(3)
  port = _messages.IntegerField(4, variant=_messages.Variant.INT32)
  secretManagerStoredPassword = _messages.StringField(5)
  sslConfig = _messages.MessageField('SqlServerSslConfig', 6)
  username = _messages.StringField(7)


class SqlServerRdbms(_messages.Message):
  r"""SQLServer database structure.

  Fields:
    schemas: SQLServer schemas in the database server.
  """

  schemas = _messages.MessageField('SqlServerSchema', 1, repeated=True)


class SqlServerSchema(_messages.Message):
  r"""SQLServer schema.

  Fields:
    schema: The schema name.
    tables: Tables in the schema.
  """

  schema = _messages.StringField(1)
  tables = _messages.MessageField('SqlServerTable', 2, repeated=True)


class SqlServerSourceConfig(_messages.Message):
  r"""Configuration for syncing data from a SQLServer source.

  Fields:
    changeTables: CDC reader reads from change tables.
    excludeObjects: The SQLServer objects to exclude from the stream.
    includeObjects: The SQLServer objects to include in the stream.
    maxConcurrentBackfillTasks: Max concurrent backfill tasks.
    maxConcurrentCdcTasks: Max concurrent CDC tasks.
    transactionLogs: CDC reader reads from transaction logs.
  """

  changeTables = _messages.MessageField('SqlServerChangeTables', 1)
  excludeObjects = _messages.MessageField('SqlServerRdbms', 2)
  includeObjects = _messages.MessageField('SqlServerRdbms', 3)
  maxConcurrentBackfillTasks = _messages.IntegerField(4, variant=_messages.Variant.INT32)
  maxConcurrentCdcTasks = _messages.IntegerField(5, variant=_messages.Variant.INT32)
  transactionLogs = _messages.MessageField('SqlServerTransactionLogs', 6)


class SqlServerSslConfig(_messages.Message):
  r"""SQL Server SSL configuration information.

  Fields:
    basicEncryption: If set, Datastream will enforce encryption without
      authenticating server identity. Server certificates will be trusted by
      default.
    encryptionAndServerValidation: If set, Datastream will enforce encryption
      and authenticate server identity.
    encryptionNotEnforced: If set, Datastream will not enforce encryption. If
      the DB server mandates encryption, then connection will be encrypted but
      server identity will not be authenticated.
  """

  basicEncryption = _messages.MessageField('BasicEncryption', 1)
  encryptionAndServerValidation = _messages.MessageField('EncryptionAndServerValidation', 2)
  encryptionNotEnforced = _messages.MessageField('EncryptionNotEnforced', 3)


class SqlServerTable(_messages.Message):
  r"""SQLServer table.

  Fields:
    columns: SQLServer columns in the schema. When unspecified as part of
      include/exclude objects, includes/excludes everything.
    table: The table name.
  """

  columns = _messages.MessageField('SqlServerColumn', 1, repeated=True)
  table = _messages.StringField(2)


class SqlServerTransactionLogs(_messages.Message):
  r"""Configuration to use Transaction Logs CDC read method."""


class SrvConnectionFormat(_messages.Message):
  r"""Srv connection format."""


class StandardConnectionFormat(_messages.Message):
  r"""Standard connection format.

  Fields:
    directConnection: Optional. Deprecated: Use the `additional_options` map
      to specify the `directConnection` parameter instead. For example:
      `additional_options = {"directConnection": "true"}`. Specifies whether
      the client connects directly to the host[:port] in the connection URI.
  """

  directConnection = _messages.BooleanField(1)


class StandardQueryParameters(_messages.Message):
  r"""Query parameters accepted by all methods.

  Enums:
    FXgafvValueValuesEnum: V1 error format.
    AltValueValuesEnum: Data format for response.

  Fields:
    f__xgafv: V1 error format.
    access_token: OAuth access token.
    alt: Data format for response.
    callback: JSONP
    fields: Selector specifying which fields to include in a partial response.
    key: API key. Your API key identifies your project and provides you with
      API access, quota, and reports. Required unless you provide an OAuth 2.0
      token.
    oauth_token: OAuth 2.0 token for the current user.
    prettyPrint: Returns response with indentations and line breaks.
    quotaUser: Available to use for quota purposes for server-side
      applications. Can be any arbitrary string assigned to a user, but should
      not exceed 40 characters.
    trace: A tracing token of the form "token:<tokenid>" to include in api
      requests.
    uploadType: Legacy upload protocol for media (e.g. "media", "multipart").
    upload_protocol: Upload protocol for media (e.g. "raw", "multipart").
  """

  class AltValueValuesEnum(_messages.Enum):
    r"""Data format for response.

    Values:
      json: Responses with Content-Type of application/json
      media: Media download with context-dependent Content-Type
      proto: Responses with Content-Type of application/x-protobuf
    """
    json = 0
    media = 1
    proto = 2

  class FXgafvValueValuesEnum(_messages.Enum):
    r"""V1 error format.

    Values:
      _1: v1 error format
      _2: v2 error format
    """
    _1 = 0
    _2 = 1

  f__xgafv = _messages.EnumField('FXgafvValueValuesEnum', 1)
  access_token = _messages.StringField(2)
  alt = _messages.EnumField('AltValueValuesEnum', 3, default='json')
  callback = _messages.StringField(4)
  fields = _messages.StringField(5)
  key = _messages.StringField(6)
  oauth_token = _messages.StringField(7)
  prettyPrint = _messages.BooleanField(8, default=True)
  quotaUser = _messages.StringField(9)
  trace = _messages.StringField(10)
  uploadType = _messages.StringField(11)
  upload_protocol = _messages.StringField(12)


class StartBackfillJobRequest(_messages.Message):
  r"""Request for manually initiating a backfill job for a specific stream
  object.

  Fields:
    eventFilter: Optional. Optional event filter. If not set, or empty, the
      backfill will be performed on the entire object. This is currently used
      for partial backfill and only supported for SQL Server sources.
  """

  eventFilter = _messages.MessageField('EventFilter', 1)


class StartBackfillJobResponse(_messages.Message):
  r"""Response for manually initiating a backfill job for a specific stream
  object.

  Fields:
    object: The stream object resource a backfill job was started for.
  """

  object = _messages.MessageField('StreamObject', 1)


class StaticServiceIpConnectivity(_messages.Message):
  r"""Static IP address connectivity. Used when the source database is
  configured to allow incoming connections from the Datastream public IP
  addresses for the region specified in the connection profile.
  """



class Status(_messages.Message):
  r"""The `Status` type defines a logical error model that is suitable for
  different programming environments, including REST APIs and RPC APIs. It is
  used by [gRPC](https://github.com/grpc). Each `Status` message contains
  three pieces of data: error code, error message, and error details. You can
  find out more about this error model and how to work with it in the [API
  Design Guide](https://cloud.google.com/apis/design/errors).

  Messages:
    DetailsValueListEntry: A DetailsValueListEntry object.

  Fields:
    code: The status code, which should be an enum value of google.rpc.Code.
    details: A list of messages that carry the error details. There is a
      common set of message types for APIs to use.
    message: A developer-facing error message, which should be in English. Any
      user-facing error message should be localized and sent in the
      google.rpc.Status.details field, or localized by the client.
  """

  @encoding.MapUnrecognizedFields('additionalProperties')
  class DetailsValueListEntry(_messages.Message):
    r"""A DetailsValueListEntry object.

    Messages:
      AdditionalProperty: An additional property for a DetailsValueListEntry
        object.

    Fields:
      additionalProperties: Properties of the object. Contains field @type
        with type URL.
    """

    class AdditionalProperty(_messages.Message):
      r"""An additional property for a DetailsValueListEntry object.

      Fields:
        key: Name of the additional property.
        value: A extra_types.JsonValue attribute.
      """

      key = _messages.StringField(1)
      value = _messages.MessageField('extra_types.JsonValue', 2)

    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)

  code = _messages.IntegerField(1, variant=_messages.Variant.INT32)
  details = _messages.MessageField('DetailsValueListEntry', 2, repeated=True)
  message = _messages.StringField(3)


class StopBackfillJobRequest(_messages.Message):
  r"""Request for manually stopping a running backfill job for a specific
  stream object.
  """



class StopBackfillJobResponse(_messages.Message):
  r"""Response for manually stop a backfill job for a specific stream object.

  Fields:
    object: The stream object resource the backfill job was stopped for.
  """

  object = _messages.MessageField('StreamObject', 1)


class Stream(_messages.Message):
  r"""A resource representing streaming data from a source to a destination.

  Enums:
    StateValueValuesEnum: The state of the stream.

  Messages:
    LabelsValue: Labels.

  Fields:
    backfillAll: Automatically backfill objects included in the stream source
      configuration. Specific objects can be excluded.
    backfillNone: Do not automatically backfill any objects.
    createTime: Output only. The creation time of the stream.
    customerManagedEncryptionKey: Immutable. A reference to a KMS encryption
      key. If provided, it will be used to encrypt the data. If left blank,
      data will be encrypted using an internal Stream-specific encryption key
      provisioned through KMS.
    destinationConfig: Required. Destination connection profile configuration.
    displayName: Required. Display name.
    errors: Output only. Errors on the Stream.
    labels: Labels.
    lastRecoveryTime: Output only. If the stream was recovered, the time of
      the last recovery. Note: This field is currently experimental.
    name: Output only. Identifier. The stream's name.
    ruleSets: Optional. Rule sets to apply to the stream.
    satisfiesPzi: Output only. Reserved for future use.
    satisfiesPzs: Output only. Reserved for future use.
    sourceConfig: Required. Source connection profile configuration.
    state: The state of the stream.
    updateTime: Output only. The last update time of the stream.
  """

  class StateValueValuesEnum(_messages.Enum):
    r"""The state of the stream.

    Values:
      STATE_UNSPECIFIED: Unspecified stream state.
      NOT_STARTED: The stream has been created but has not yet started
        streaming data.
      RUNNING: The stream is running.
      PAUSED: The stream is paused.
      MAINTENANCE: The stream is in maintenance mode. Updates are rejected on
        the resource in this state.
      FAILED: The stream is experiencing an error that is preventing data from
        being streamed.
      FAILED_PERMANENTLY: The stream has experienced a terminal failure.
      STARTING: The stream is starting, but not yet running.
      DRAINING: The Stream is no longer reading new events, but still writing
        events in the buffer.
    """
    STATE_UNSPECIFIED = 0
    NOT_STARTED = 1
    RUNNING = 2
    PAUSED = 3
    MAINTENANCE = 4
    FAILED = 5
    FAILED_PERMANENTLY = 6
    STARTING = 7
    DRAINING = 8

  @encoding.MapUnrecognizedFields('additionalProperties')
  class LabelsValue(_messages.Message):
    r"""Labels.

    Messages:
      AdditionalProperty: An additional property for a LabelsValue object.

    Fields:
      additionalProperties: Additional properties of type LabelsValue
    """

    class AdditionalProperty(_messages.Message):
      r"""An additional property for a LabelsValue object.

      Fields:
        key: Name of the additional property.
        value: A string attribute.
      """

      key = _messages.StringField(1)
      value = _messages.StringField(2)

    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)

  backfillAll = _messages.MessageField('BackfillAllStrategy', 1)
  backfillNone = _messages.MessageField('BackfillNoneStrategy', 2)
  createTime = _messages.StringField(3)
  customerManagedEncryptionKey = _messages.StringField(4)
  destinationConfig = _messages.MessageField('DestinationConfig', 5)
  displayName = _messages.StringField(6)
  errors = _messages.MessageField('Error', 7, repeated=True)
  labels = _messages.MessageField('LabelsValue', 8)
  lastRecoveryTime = _messages.StringField(9)
  name = _messages.StringField(10)
  ruleSets = _messages.MessageField('RuleSet', 11, repeated=True)
  satisfiesPzi = _messages.BooleanField(12)
  satisfiesPzs = _messages.BooleanField(13)
  sourceConfig = _messages.MessageField('SourceConfig', 14)
  state = _messages.EnumField('StateValueValuesEnum', 15)
  updateTime = _messages.StringField(16)


class StreamLargeObjects(_messages.Message):
  r"""Configuration to stream large object values."""


class StreamObject(_messages.Message):
  r"""A specific stream object (e.g a specific DB table).

  Fields:
    backfillJob: The latest backfill job that was initiated for the stream
      object.
    createTime: Output only. The creation time of the object.
    customizationRules: Output only. The customization rules for the object.
      These rules are derived from the parent Stream's `rule_sets` and
      represent the intended configuration for the object.
    displayName: Required. Display name.
    errors: Output only. Active errors on the object.
    name: Output only. Identifier. The object resource's name.
    sourceObject: The object identifier in the data source.
    updateTime: Output only. The last update time of the object.
  """

  backfillJob = _messages.MessageField('BackfillJob', 1)
  createTime = _messages.StringField(2)
  customizationRules = _messages.MessageField('CustomizationRule', 3, repeated=True)
  displayName = _messages.StringField(4)
  errors = _messages.MessageField('Error', 5, repeated=True)
  name = _messages.StringField(6)
  sourceObject = _messages.MessageField('SourceObjectIdentifier', 7)
  updateTime = _messages.StringField(8)


class TimeUnitPartition(_messages.Message):
  r"""Time unit column partitioning. see
  https://cloud.google.com/bigquery/docs/partitioned-
  tables#date_timestamp_partitioned_tables

  Enums:
    PartitioningTimeGranularityValueValuesEnum: Optional. Partition
      granularity.

  Fields:
    column: Required. The partitioning column.
    partitioningTimeGranularity: Optional. Partition granularity.
  """

  class PartitioningTimeGranularityValueValuesEnum(_messages.Enum):
    r"""Optional. Partition granularity.

    Values:
      PARTITIONING_TIME_GRANULARITY_UNSPECIFIED: Unspecified partitioing
        interval.
      PARTITIONING_TIME_GRANULARITY_HOUR: Hourly partitioning.
      PARTITIONING_TIME_GRANULARITY_DAY: Daily partitioning.
      PARTITIONING_TIME_GRANULARITY_MONTH: Monthly partitioning.
      PARTITIONING_TIME_GRANULARITY_YEAR: Yearly partitioning.
    """
    PARTITIONING_TIME_GRANULARITY_UNSPECIFIED = 0
    PARTITIONING_TIME_GRANULARITY_HOUR = 1
    PARTITIONING_TIME_GRANULARITY_DAY = 2
    PARTITIONING_TIME_GRANULARITY_MONTH = 3
    PARTITIONING_TIME_GRANULARITY_YEAR = 4

  column = _messages.StringField(1)
  partitioningTimeGranularity = _messages.EnumField('PartitioningTimeGranularityValueValuesEnum', 2)


class UserCredentials(_messages.Message):
  r"""Username-password credentials.

  Fields:
    password: Optional. Password for the Salesforce connection. Mutually
      exclusive with the `secret_manager_stored_password` field.
    secretManagerStoredPassword: Optional. A reference to a Secret Manager
      resource name storing the Salesforce connection's password. Mutually
      exclusive with the `password` field.
    secretManagerStoredSecurityToken: Optional. A reference to a Secret
      Manager resource name storing the Salesforce connection's security
      token. Mutually exclusive with the `security_token` field.
    securityToken: Optional. Security token for the Salesforce connection.
      Mutually exclusive with the `secret_manager_stored_security_token`
      field.
    username: Required. Username for the Salesforce connection.
  """

  password = _messages.StringField(1)
  secretManagerStoredPassword = _messages.StringField(2)
  secretManagerStoredSecurityToken = _messages.StringField(3)
  securityToken = _messages.StringField(4)
  username = _messages.StringField(5)


class Validation(_messages.Message):
  r"""A validation to perform on a stream.

  Enums:
    StateValueValuesEnum: Output only. Validation execution status.

  Fields:
    code: A custom code identifying this validation.
    description: A short description of the validation.
    message: Messages reflecting the validation results.
    state: Output only. Validation execution status.
  """

  class StateValueValuesEnum(_messages.Enum):
    r"""Output only. Validation execution status.

    Values:
      STATE_UNSPECIFIED: Unspecified state.
      NOT_EXECUTED: Validation did not execute.
      FAILED: Validation failed.
      PASSED: Validation passed.
      WARNING: Validation executed with warnings.
    """
    STATE_UNSPECIFIED = 0
    NOT_EXECUTED = 1
    FAILED = 2
    PASSED = 3
    WARNING = 4

  code = _messages.StringField(1)
  description = _messages.StringField(2)
  message = _messages.MessageField('ValidationMessage', 3, repeated=True)
  state = _messages.EnumField('StateValueValuesEnum', 4)


class ValidationMessage(_messages.Message):
  r"""Represent user-facing validation result message.

  Enums:
    LevelValueValuesEnum: Message severity level (warning or error).

  Messages:
    MetadataValue: Additional metadata related to the result.

  Fields:
    code: A custom code identifying this specific message.
    level: Message severity level (warning or error).
    message: The result of the validation.
    metadata: Additional metadata related to the result.
  """

  class LevelValueValuesEnum(_messages.Enum):
    r"""Message severity level (warning or error).

    Values:
      LEVEL_UNSPECIFIED: Unspecified level.
      WARNING: Potentially cause issues with the Stream.
      ERROR: Definitely cause issues with the Stream.
    """
    LEVEL_UNSPECIFIED = 0
    WARNING = 1
    ERROR = 2

  @encoding.MapUnrecognizedFields('additionalProperties')
  class MetadataValue(_messages.Message):
    r"""Additional metadata related to the result.

    Messages:
      AdditionalProperty: An additional property for a MetadataValue object.

    Fields:
      additionalProperties: Additional properties of type MetadataValue
    """

    class AdditionalProperty(_messages.Message):
      r"""An additional property for a MetadataValue object.

      Fields:
        key: Name of the additional property.
        value: A string attribute.
      """

      key = _messages.StringField(1)
      value = _messages.StringField(2)

    additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True)

  code = _messages.StringField(1)
  level = _messages.EnumField('LevelValueValuesEnum', 2)
  message = _messages.StringField(3)
  metadata = _messages.MessageField('MetadataValue', 4)


class ValidationResult(_messages.Message):
  r"""Contains the current validation results.

  Fields:
    validations: A list of validations (includes both executed as well as not
      executed validations).
  """

  validations = _messages.MessageField('Validation', 1, repeated=True)


class VpcPeeringConfig(_messages.Message):
  r"""The VPC Peering configuration is used to create VPC peering between
  Datastream and the consumer's VPC.

  Fields:
    subnet: Required. A free subnet for peering. (CIDR of /29)
    vpc: Required. Fully qualified name of the VPC that Datastream will peer
      to. Format: `projects/{project}/global/{networks}/{name}`
  """

  subnet = _messages.StringField(1)
  vpc = _messages.StringField(2)


encoding.AddCustomJsonFieldMapping(
    StandardQueryParameters, 'f__xgafv', '$.xgafv')
encoding.AddCustomJsonEnumMapping(
    StandardQueryParameters.FXgafvValueValuesEnum, '_1', '1')
encoding.AddCustomJsonEnumMapping(
    StandardQueryParameters.FXgafvValueValuesEnum, '_2', '2')
