"""Generated message classes for biglake version v1beta.

The Lakehouse API (formerly BigLake API) provides access to a serverless,
fully managed, and highly available metastore that provides a single source of
truth for your data lakehouse. It lets multiple engines-including Apache
Spark, Google Managed Spark, Apache Flink, Trino and BigQuery-share tables and
metadata for key open formats (Apache Iceberg, Apache Hive), and query the
same copy of data. Plus, through the Lakehouse runtime catalog federation
seamlessly unite your lakehouse ecosystem, letting Iceberg compatible engines
on Google Cloud (BigQuery, Google Managed Spark) discover and analyze
enterprise data across Snowflake, Databricks, and AWS Glue.
"""
# NOTE: This file is autogenerated and should not be edited by hand.

from apitools.base.protorpclite import messages as _messages
from apitools.base.py import encoding


package = 'biglake'


class BatchCreatePartitionsRequest(_messages.Message):
  r"""Request message for the BatchCreatePartitions method.

  Fields:
    requests: Required. Requests to add partitions to the table.
    skipExistingPartitions: Optional. Corresponds to the `ifNotExists` flag in
      the Hive Metastore APIs. If the flag is set to false, the server will
      return ALREADY_EXISTS if any partition already exists. If the flag is
      set to true, the server will skip existing partitions and insert only
      the non-existing partitions. A maximum of 900 partitions can be inserted
      in a batch.
  """

  requests = _messages.MessageField('CreatePartitionRequest', 1, repeated=True)
  skipExistingPartitions = _messages.BooleanField(2)


class BatchCreatePartitionsResponse(_messages.Message):
  r"""Response message for BatchCreatePartitions.

  Fields:
    partitions: The list of partitions that have been added.
  """

  partitions = _messages.MessageField('Partition', 1, repeated=True)


class BatchDeletePartitionsRequest(_messages.Message):
  r"""Request message for BatchDeletePartitions. The Partition is uniquely
  identified by values, which is an ordered list. Hence, there is no separate
  name or partition id field.

  Fields:
    partitionValues: Required. The list of partitions (identified by its
      values) to be deleted. A maximum of 900 partitions can be deleted in a
      batch.
  """

  partitionValues = _messages.MessageField('PartitionValues', 1, repeated=True)


class BatchUpdatePartitionsRequest(_messages.Message):
  r"""Request message for BatchUpdatePartitions.

  Fields:
    requests: Required. Requests to update partitions in the table.
  """

  requests = _messages.MessageField('UpdatePartitionRequest', 1, repeated=True)


class BatchUpdatePartitionsResponse(_messages.Message):
  r"""Response message for BatchUpdatePartitions.

  Fields:
    partitions: The list of partitions that have been updated. A maximum of
      900 partitions can be updated in a batch.
  """

  partitions = _messages.MessageField('Partition', 1, repeated=True)


class BiglakeHiveV1betaProjectsCatalogsCreateRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsCreateRequest object.

  Fields:
    hiveCatalog: A HiveCatalog resource to be passed as the request body.
    hiveCatalogId: Required. The Hive Catalog ID to use for the catalog that
      will become the final component of the catalog's resource name. The
      maximum length is 256 characters.
    parent: Required. The parent resource where this catalog will be created.
      Format: projects/{project_id_or_number}
    primary_location: Required. The GCP region that specifies where the
      catalog metadata is stored, e.g. us-central1, EU, etc.
  """

  hiveCatalog = _messages.MessageField('HiveCatalog', 1)
  hiveCatalogId = _messages.StringField(2)
  parent = _messages.StringField(3, required=True)
  primary_location = _messages.StringField(4)


class BiglakeHiveV1betaProjectsCatalogsDatabasesCreateRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsDatabasesCreateRequest object.

  Fields:
    hiveDatabase: A HiveDatabase resource to be passed as the request body.
    hiveDatabaseId: Required. The ID to use for the Hive Database. The maximum
      length is 128 characters.
    parent: Required. The parent resource where this database will be created.
      Format: projects/{project_id_or_number}/catalogs/{catalog_id}
  """

  hiveDatabase = _messages.MessageField('HiveDatabase', 1)
  hiveDatabaseId = _messages.StringField(2)
  parent = _messages.StringField(3, required=True)


class BiglakeHiveV1betaProjectsCatalogsDatabasesDeleteRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsDatabasesDeleteRequest object.

  Fields:
    name: Required. The name of the database to delete. Format: projects/{proj
      ect_id_or_number}/catalogs/{catalog_id}/databases/{database_id}
  """

  name = _messages.StringField(1, required=True)


class BiglakeHiveV1betaProjectsCatalogsDatabasesGetRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsDatabasesGetRequest object.

  Fields:
    name: Required. The name of the database to retrieve. Format: projects/{pr
      oject_id_or_number}/catalogs/{catalog_id}/databases/{database_id}
  """

  name = _messages.StringField(1, required=True)


class BiglakeHiveV1betaProjectsCatalogsDatabasesListRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsDatabasesListRequest object.

  Fields:
    pageSize: Optional. Page size for pagination.
    pageToken: Optional. PageToken for pagination.
    parent: Required. The hive catalog to list databases from. Format:
      projects/{project_id_or_number}/catalogs/{catalog_id}
  """

  pageSize = _messages.IntegerField(1, variant=_messages.Variant.INT32)
  pageToken = _messages.StringField(2)
  parent = _messages.StringField(3, required=True)


class BiglakeHiveV1betaProjectsCatalogsDatabasesPatchRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsDatabasesPatchRequest object.

  Fields:
    hiveDatabase: A HiveDatabase resource to be passed as the request body.
    name: Identifier. The resource name. Format: projects/{project_id_or_numbe
      r}/catalogs/{catalog_id}/databases/{database_id}
    updateMask: Optional. The list of fields to update.
  """

  hiveDatabase = _messages.MessageField('HiveDatabase', 1)
  name = _messages.StringField(2, required=True)
  updateMask = _messages.StringField(3)


class BiglakeHiveV1betaProjectsCatalogsDatabasesTablesCreateRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsDatabasesTablesCreateRequest object.

  Fields:
    hiveTable: A HiveTable resource to be passed as the request body.
    hiveTableId: Required. The Hive Table ID to use for the table that will
      become the final component of the table's resource name. The maximum
      length is 256 characters.
    parent: Required. The parent resource for the table to be created. Format:
      projects/{project_id_or_number}/catalogs/{catalog_id}/databases/{databas
      e_id}
  """

  hiveTable = _messages.MessageField('HiveTable', 1)
  hiveTableId = _messages.StringField(2)
  parent = _messages.StringField(3, required=True)


class BiglakeHiveV1betaProjectsCatalogsDatabasesTablesDeleteRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsDatabasesTablesDeleteRequest object.

  Fields:
    name: Required. The name of the database to delete. Format: projects/{proj
      ect_id_or_number}/catalogs/{catalog_id}/databases/{database_id}/tables/{
      table_id}
  """

  name = _messages.StringField(1, required=True)


class BiglakeHiveV1betaProjectsCatalogsDatabasesTablesGetRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsDatabasesTablesGetRequest object.

  Fields:
    name: Required. The name of the table to retrieve. Format: projects/{proje
      ct_id_or_number}/catalogs/{catalog_id}/databases/{database_id}/tables/{t
      able_id}
  """

  name = _messages.StringField(1, required=True)


class BiglakeHiveV1betaProjectsCatalogsDatabasesTablesListRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsDatabasesTablesListRequest object.

  Fields:
    pageSize: Optional. Page size for pagination.
    pageToken: Optional. PageToken for pagination.
    parent: Required. The database to list tables from. Format: projects/{proj
      ect_id_or_number}/catalogs/{catalog_id}/databases/{database_id}
  """

  pageSize = _messages.IntegerField(1, variant=_messages.Variant.INT32)
  pageToken = _messages.StringField(2)
  parent = _messages.StringField(3, required=True)


class BiglakeHiveV1betaProjectsCatalogsDatabasesTablesPartitionsBatchCreateRequest(_messages.Message):
  r"""A
  BiglakeHiveV1betaProjectsCatalogsDatabasesTablesPartitionsBatchCreateRequest
  object.

  Fields:
    batchCreatePartitionsRequest: A BatchCreatePartitionsRequest resource to
      be passed as the request body.
    parent: Required. Reference to the table to where the partitions to be
      added, in the format of projects/{project}/catalogs/{catalogs}/databases
      /{database}/tables/{table}.
  """

  batchCreatePartitionsRequest = _messages.MessageField('BatchCreatePartitionsRequest', 1)
  parent = _messages.StringField(2, required=True)


class BiglakeHiveV1betaProjectsCatalogsDatabasesTablesPartitionsBatchDeleteRequest(_messages.Message):
  r"""A
  BiglakeHiveV1betaProjectsCatalogsDatabasesTablesPartitionsBatchDeleteRequest
  object.

  Fields:
    batchDeletePartitionsRequest: A BatchDeletePartitionsRequest resource to
      be passed as the request body.
    parent: Required. Reference to the table to which these partitions belong,
      in the format of projects/{project}/catalogs/{catalogs}/databases/{datab
      ase}/tables/{table}.
  """

  batchDeletePartitionsRequest = _messages.MessageField('BatchDeletePartitionsRequest', 1)
  parent = _messages.StringField(2, required=True)


class BiglakeHiveV1betaProjectsCatalogsDatabasesTablesPartitionsBatchUpdateRequest(_messages.Message):
  r"""A
  BiglakeHiveV1betaProjectsCatalogsDatabasesTablesPartitionsBatchUpdateRequest
  object.

  Fields:
    batchUpdatePartitionsRequest: A BatchUpdatePartitionsRequest resource to
      be passed as the request body.
    parent: Required. Reference to the table to which these partitions belong,
      in the format of projects/{project}/catalogs/{catalogs}/databases/{datab
      ase}/tables/{table}.
  """

  batchUpdatePartitionsRequest = _messages.MessageField('BatchUpdatePartitionsRequest', 1)
  parent = _messages.StringField(2, required=True)


class BiglakeHiveV1betaProjectsCatalogsDatabasesTablesPartitionsListRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsDatabasesTablesPartitionsListRequest
  object.

  Fields:
    filter: Optional. SQL text filtering statement, similar to a `WHERE`
      clause in a query. Only supports single-row expressions. Aggregate
      functions are not supported. Examples: * `"int_field > 5"` *
      `"date_field = CAST('2014-9-27' as DATE)"` * `"nullable_field is not
      NULL"` * `"st_equals(geo_field, st_geofromtext("POINT(2, 2)"))"` *
      `"numeric_field BETWEEN 1.0 AND 5.0"` Restricted to a maximum length of
      1 MB.
    parent: Required. Reference to the table to which these partitions belong,
      in the format of projects/{project}/catalogs/{catalogs}/databases/{datab
      ase}/tables/{table}.
  """

  filter = _messages.StringField(1)
  parent = _messages.StringField(2, required=True)


class BiglakeHiveV1betaProjectsCatalogsDatabasesTablesPatchRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsDatabasesTablesPatchRequest object.

  Fields:
    hiveTable: A HiveTable resource to be passed as the request body.
    name: Identifier. The resource name. Format: projects/{project_id_or_numbe
      r}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id}
    updateMask: Optional. The list of fields to update.
  """

  hiveTable = _messages.MessageField('HiveTable', 1)
  name = _messages.StringField(2, required=True)
  updateMask = _messages.StringField(3)


class BiglakeHiveV1betaProjectsCatalogsDeleteRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsDeleteRequest object.

  Fields:
    name: Required. The name of the catalog to delete. Format:
      projects/{project_id_or_number}/catalogs/{catalog_id}
  """

  name = _messages.StringField(1, required=True)


class BiglakeHiveV1betaProjectsCatalogsGetRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsGetRequest object.

  Fields:
    name: Required. The name of the catalog to retrieve. Format:
      projects/{project_id_or_number}/catalogs/{catalog_id}
  """

  name = _messages.StringField(1, required=True)


class BiglakeHiveV1betaProjectsCatalogsListRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsListRequest object.

  Fields:
    pageSize: Optional. Page size for pagination.
    pageToken: Optional. Page token for pagination.
    parent: Required. The project to list catalogs from. Format:
      projects/{project_id_or_number}
  """

  pageSize = _messages.IntegerField(1, variant=_messages.Variant.INT32)
  pageToken = _messages.StringField(2)
  parent = _messages.StringField(3, required=True)


class BiglakeHiveV1betaProjectsCatalogsPatchRequest(_messages.Message):
  r"""A BiglakeHiveV1betaProjectsCatalogsPatchRequest object.

  Fields:
    hiveCatalog: A HiveCatalog resource to be passed as the request body.
    name: Identifier. The resource name. Format:
      projects/{project_id_or_number}/catalogs/{catalog_id}
    updateMask: Optional. The list of fields to update. For the `FieldMask`
      definition, see https://developers.google.com/protocol-
      buffers/docs/reference/google.protobuf#fieldmask If not set, defaults to
      all of the fields that are allowed to update.
  """

  hiveCatalog = _messages.MessageField('HiveCatalog', 1)
  name = _messages.StringField(2, required=True)
  updateMask = _messages.StringField(3)


class CreatePartitionRequest(_messages.Message):
  r"""Request message for CreatePartition. The Partition is uniquely
  identified by values, which is an ordered list. Hence, there is no separate
  name or partition id field.

  Fields:
    parent: Required. Reference to the table to where the partition to be
      added, in the format of projects/{project}/catalogs/{catalogs}/databases
      /{databases}/tables/{table}.
    partition: Required. The partition to be added.
  """

  parent = _messages.StringField(1)
  partition = _messages.MessageField('Partition', 2)


class Empty(_messages.Message):
  r"""A generic empty message that you can re-use to avoid defining duplicated
  empty messages in your APIs. A typical example is to use it as the request
  or the response type of an API method. For instance: service Foo { rpc
  Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
  """



class FieldSchema(_messages.Message):
  r"""Field schema information.

  Fields:
    comment: Optional. Comment of the field. The maximum length is 256
      characters.
    name: Required. Name of the field. The maximum length is 767 characters.
    type: Required. Type of the field. The maximum length is 128 characters.
  """

  comment = _messages.StringField(1)
  name = _messages.StringField(2)
  type = _messages.StringField(3)


class HiveCatalog(_messages.Message):
  r"""The HiveCatalog contains spark/hive databases and tables in the BigLake
  Metastore. While creating resources under a catalog, ideally ensure that the
  storage bucket location, spark / hive engine location or any other compute
  location match. Catalog can be viewed as the destination for migrating an
  on-prem Hive metastore to GCP.

  Fields:
    createTime: Output only. The creation time of the catalog.
    description: Optional. Stores the catalog description. The maximum length
      is 4000 characters.
    locationUri: Required. The Cloud Storage location path where the catalog
      exists. Format: gs://bucket/path/to/catalog The maximum length is 4000
      characters.
    name: Identifier. The resource name. Format:
      projects/{project_id_or_number}/catalogs/{catalog_id}
    replicas: Output only. The replicas for the catalog metadata.
    updateTime: Output only. The update time of the catalog.
  """

  createTime = _messages.StringField(1)
  description = _messages.StringField(2)
  locationUri = _messages.StringField(3)
  name = _messages.StringField(4)
  replicas = _messages.MessageField('Replica', 5, repeated=True)
  updateTime = _messages.StringField(6)


class HiveDatabase(_messages.Message):
  r"""Stores the hive database information. It includes the database name,
  description, location and properties associated with the database.

  Messages:
    ParametersValue: Optional. Stores the properties associated with the
      database. The maximum size is 2 MiB.

  Fields:
    createTime: Output only. The creation time of the database.
    description: Optional. Stores the database description. The maximum length
      is 4000 characters.
    locationUri: Optional. The Cloud Storage location path where the database
      exists. Format: `gs://bucket/path/to/database` If unspecified, the
      database will be stored in the catalog location. The maximum length is
      4000 characters.
    name: Identifier. The resource name. Format: projects/{project_id_or_numbe
      r}/catalogs/{catalog_id}/databases/{database_id}
    parameters: Optional. Stores the properties associated with the database.
      The maximum size is 2 MiB.
    updateTime: Output only. The update time of the database.
  """

  @encoding.MapUnrecognizedFields('additionalProperties')
  class ParametersValue(_messages.Message):
    r"""Optional. Stores the properties associated with the database. The
    maximum size is 2 MiB.

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

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

    class AdditionalProperty(_messages.Message):
      r"""An additional property for a ParametersValue 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)

  createTime = _messages.StringField(1)
  description = _messages.StringField(2)
  locationUri = _messages.StringField(3)
  name = _messages.StringField(4)
  parameters = _messages.MessageField('ParametersValue', 5)
  updateTime = _messages.StringField(6)


class HiveTable(_messages.Message):
  r"""Stores the hive table information. It includes the table name, schema
  (column names and types), data location, storage format, serde info, etc.
  This message closely matches the Table object in the IMetastoreClient

  Messages:
    ParametersValue: Optional. Stores the properties associated with the
      table. The maximum size is 4MiB.

  Fields:
    createTime: Output only. The creation time of the table.
    description: Optional. Description of the table. The maximum length is
      4000 characters.
    name: Identifier. The resource name. Format: projects/{project_id_or_numbe
      r}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id}
    parameters: Optional. Stores the properties associated with the table. The
      maximum size is 4MiB.
    partitionKeys: Optional. The partition keys of the table.
    storageDescriptor: Required. Storage descriptor of the table.
    tableType: Output only. The type of the table. This is EXTERNAL for
      BigLake hive tables.
    updateTime: Output only. The update time of the table.
    viewExpandedText: Optional. The expanded view text. Empty for non-view.
      The maximum size is 16MiB.
    viewOriginalText: Optional. The original view text. Empty for non-view.
      The maximum size is 16MiB.
  """

  @encoding.MapUnrecognizedFields('additionalProperties')
  class ParametersValue(_messages.Message):
    r"""Optional. Stores the properties associated with the table. The maximum
    size is 4MiB.

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

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

    class AdditionalProperty(_messages.Message):
      r"""An additional property for a ParametersValue 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)

  createTime = _messages.StringField(1)
  description = _messages.StringField(2)
  name = _messages.StringField(3)
  parameters = _messages.MessageField('ParametersValue', 4)
  partitionKeys = _messages.MessageField('FieldSchema', 5, repeated=True)
  storageDescriptor = _messages.MessageField('StorageDescriptor', 6)
  tableType = _messages.StringField(7)
  updateTime = _messages.StringField(8)
  viewExpandedText = _messages.StringField(9)
  viewOriginalText = _messages.StringField(10)


class ListHiveCatalogsResponse(_messages.Message):
  r"""Response message for the ListHiveCatalogs method.

  Fields:
    catalogs: Output only. The catalogs from the specified project.
    nextPageToken: Output only. A token, which can be sent as `page_token` to
      retrieve the next page. If this field is omitted, there are no
      subsequent pages.
    unreachable: Output only. The list of unreachable cloud regions. If non-
      empty, the result set might be incomplete.
  """

  catalogs = _messages.MessageField('HiveCatalog', 1, repeated=True)
  nextPageToken = _messages.StringField(2)
  unreachable = _messages.StringField(3, repeated=True)


class ListHiveDatabasesResponse(_messages.Message):
  r"""Response message for the ListHiveDatabases method.

  Fields:
    databases: Output only. The databases from the specified project and
      catalog.
    nextPageToken: Output only. A token, which can be sent as `page_token` to
      retrieve the next page. If this field is omitted, there are no
      subsequent pages.
  """

  databases = _messages.MessageField('HiveDatabase', 1, repeated=True)
  nextPageToken = _messages.StringField(2)


class ListHiveTablesResponse(_messages.Message):
  r"""Response message for the ListHiveTables method.

  Fields:
    nextPageToken: Output only. A token, which can be sent as `page_token` to
      retrieve the next page. If this field is omitted, there are no
      subsequent pages.
    tables: Output only. The tables from the specified project, catalog and
      database.
  """

  nextPageToken = _messages.StringField(1)
  tables = _messages.MessageField('HiveTable', 2, repeated=True)


class ListPartitionsResponse(_messages.Message):
  r"""Response message for ListPartitions.

  Fields:
    partitions: Output only. List of partitions.
  """

  partitions = _messages.MessageField('Partition', 1, repeated=True)


class Order(_messages.Message):
  r"""Sort order of the stored data per column.

  Fields:
    col: Required. The column name. The maximum length is 767 characters.
    order: Required. Defines the sort order of the column. Ascending if 1,
      descending if 0.
  """

  col = _messages.StringField(1)
  order = _messages.IntegerField(2, variant=_messages.Variant.INT32)


class Partition(_messages.Message):
  r"""Information about a Hive partition.

  Messages:
    ParametersValue: Optional. Additional parameters or metadata associated
      with the partition. Maximum size 10 KiB.

  Fields:
    createTime: Output only. The creation time of the partition.
    fields: Optional. List of columns.
    parameters: Optional. Additional parameters or metadata associated with
      the partition. Maximum size 10 KiB.
    storageDescriptor: Optional. Contains information about the physical
      storage of the data in the partition.
    values: Required. Represents the values of the partition keys, where each
      value corresponds to a specific partition key in the order in which the
      keys are defined. Each value is limited to 1024 characters.
  """

  @encoding.MapUnrecognizedFields('additionalProperties')
  class ParametersValue(_messages.Message):
    r"""Optional. Additional parameters or metadata associated with the
    partition. Maximum size 10 KiB.

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

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

    class AdditionalProperty(_messages.Message):
      r"""An additional property for a ParametersValue 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)

  createTime = _messages.StringField(1)
  fields = _messages.MessageField('FieldSchema', 2, repeated=True)
  parameters = _messages.MessageField('ParametersValue', 3)
  storageDescriptor = _messages.MessageField('StorageDescriptor', 4)
  values = _messages.StringField(5, repeated=True)


class PartitionValues(_messages.Message):
  r"""Represents the values of a partition.

  Fields:
    values: Required. The values of the partition keys, where each value
      corresponds to a specific partition key in the order in which the keys
      are defined.
  """

  values = _messages.StringField(1, repeated=True)


class Replica(_messages.Message):
  r"""The replica of the Catalog.

  Enums:
    StateValueValuesEnum: Output only. The current state of the replica.

  Fields:
    region: Output only. The region of the replica. For example `us-east1`.
    state: Output only. The current state of the replica.
  """

  class StateValueValuesEnum(_messages.Enum):
    r"""Output only. The current state of the replica.

    Values:
      STATE_UNSPECIFIED: The replica state is unknown.
      STATE_PRIMARY: Indicates the replica is the writable primary.
      STATE_PRIMARY_IN_PROGRESS: Indicates the replica has been recently
        assigned as the primary, but not all databases are writeable yet.
      STATE_SECONDARY: Indicates the replica is a read-only secondary replica.
    """
    STATE_UNSPECIFIED = 0
    STATE_PRIMARY = 1
    STATE_PRIMARY_IN_PROGRESS = 2
    STATE_SECONDARY = 3

  region = _messages.StringField(1)
  state = _messages.EnumField('StateValueValuesEnum', 2)


class SerdeInfo(_messages.Message):
  r"""Serialization and deserialization information.

  Enums:
    SerdeTypeValueValuesEnum: Optional. The serde type.

  Messages:
    ParametersValue: Optional. Parameters of the serde. The maximum size is
      10Kib.

  Fields:
    description: Optional. Description of the serde. The maximum length is
      4000 characters.
    deserializerClass: Optional. The fully qualified Java class name of the
      deserializer. The maximum length is 4000 characters.
    name: Required. Name of the SerDe. Table name by default. The maximum
      length is 128 characters.
    parameters: Optional. Parameters of the serde. The maximum size is 10Kib.
    serdeType: Optional. The serde type.
    serializationLib: Required. The fully qualified Java class name of the
      serialization library. The maximum length is 4000 characters.
    serializerClass: Optional. The fully qualified Java class name of the
      serializer. The maximum length is 4000 characters.
  """

  class SerdeTypeValueValuesEnum(_messages.Enum):
    r"""Optional. The serde type.

    Values:
      SERDE_TYPE_UNSPECIFIED: The serde type is not specified.
      HIVE: Hive.
      SCHEMA_REGISTRY: Schema registry.
    """
    SERDE_TYPE_UNSPECIFIED = 0
    HIVE = 1
    SCHEMA_REGISTRY = 2

  @encoding.MapUnrecognizedFields('additionalProperties')
  class ParametersValue(_messages.Message):
    r"""Optional. Parameters of the serde. The maximum size is 10Kib.

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

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

    class AdditionalProperty(_messages.Message):
      r"""An additional property for a ParametersValue 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)

  description = _messages.StringField(1)
  deserializerClass = _messages.StringField(2)
  name = _messages.StringField(3)
  parameters = _messages.MessageField('ParametersValue', 4)
  serdeType = _messages.EnumField('SerdeTypeValueValuesEnum', 5)
  serializationLib = _messages.StringField(6)
  serializerClass = _messages.StringField(7)


class SkewedColumnValue(_messages.Message):
  r"""The skewed column values.

  Fields:
    values: Required. The skewed column values. The maximum length is 256
      characters per value.
  """

  values = _messages.StringField(1, repeated=True)


class SkewedInfo(_messages.Message):
  r"""Stores all the information about skewed table.

  Fields:
    skewedColNames: Required. The column names that are skewed. The maximum
      length is 256 characters per column name.
    skewedColValues: Required. The skewed column values.
    skewedKeyValuesLocations: Required. The skewed key values locations.
  """

  skewedColNames = _messages.StringField(1, repeated=True)
  skewedColValues = _messages.MessageField('SkewedColumnValue', 2, repeated=True)
  skewedKeyValuesLocations = _messages.MessageField('SkewedKeyValuesLocation', 3, repeated=True)


class SkewedKeyValuesLocation(_messages.Message):
  r"""The skewed key values and their corresponding location.

  Fields:
    location: Required. The location of the skewed column values. The maximum
      length is 4000 characters.
    values: Required. The skewed column values. The maximum length is 256
      characters per value.
  """

  location = _messages.StringField(1)
  values = _messages.StringField(2, repeated=True)


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 StorageDescriptor(_messages.Message):
  r"""Contains information about the physical storage of the table data.

  Messages:
    ParametersValue: Optional. Key-value pairs for the storage descriptor. The
      maximum size is 10Kib.

  Fields:
    bucketCols: Optional. Reducer grouping columns and clustering columns and
      bucketing columns
    columns: Required. Specifies the columns of the table.
    compressed: Optional. Whether the table is compressed.
    inputFormat: Optional. The fully qualified Java class name of the input
      format. The maximum length is 4000 characters.
    locationUri: Optional. The Cloud storage uri where the table is located.
      Defaults to `/`. The maximum length is 4000 characters.
    numBuckets: Optional. The number of buckets in the table.
    outputFormat: Optional. The fully qualified Java class name of the output
      format. The maximum length is 4000 characters.
    parameters: Optional. Key-value pairs for the storage descriptor. The
      maximum size is 10Kib.
    serdeInfo: Optional. Serialization and deserialization information.
    skewedInfo: Optional. Table data skew information.
    sortCols: Optional. Sort order of the data in each bucket
    storedAsSubDirs: Optional. Whether the table is stored as sub directories.
  """

  @encoding.MapUnrecognizedFields('additionalProperties')
  class ParametersValue(_messages.Message):
    r"""Optional. Key-value pairs for the storage descriptor. The maximum size
    is 10Kib.

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

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

    class AdditionalProperty(_messages.Message):
      r"""An additional property for a ParametersValue 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)

  bucketCols = _messages.StringField(1, repeated=True)
  columns = _messages.MessageField('FieldSchema', 2, repeated=True)
  compressed = _messages.BooleanField(3)
  inputFormat = _messages.StringField(4)
  locationUri = _messages.StringField(5)
  numBuckets = _messages.IntegerField(6, variant=_messages.Variant.INT32)
  outputFormat = _messages.StringField(7)
  parameters = _messages.MessageField('ParametersValue', 8)
  serdeInfo = _messages.MessageField('SerdeInfo', 9)
  skewedInfo = _messages.MessageField('SkewedInfo', 10)
  sortCols = _messages.MessageField('Order', 11, repeated=True)
  storedAsSubDirs = _messages.BooleanField(12)


class UpdatePartitionRequest(_messages.Message):
  r"""Request message for UpdatePartition.

  Fields:
    partition: Required. The partition to be updated.
    updateMask: Optional. The list of fields to update.
  """

  partition = _messages.MessageField('Partition', 1)
  updateMask = _messages.StringField(2)


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