# frozen_string_literal: true

# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Auto-generated by gapic-generator-ruby. DO NOT EDIT!


module Google
  module Cloud
    module AlloyDB
      module V1beta
        # The username/password for a database user. Used for specifying initial
        # users at cluster creation time.
        # @!attribute [rw] user
        #   @return [::String]
        #     The database username.
        # @!attribute [rw] password
        #   @return [::String]
        #     The initial password for the user.
        class UserPassword
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Subset of the source instance configuration that is available when reading
        # the cluster resource.
        # @!attribute [r] host_port
        #   @return [::String]
        #     Output only. The host and port of the on-premises instance in host:port
        #     format
        # @!attribute [r] reference_id
        #   @return [::String]
        #     Output only. Place holder for the external source identifier(e.g DMS job
        #     name) that created the cluster.
        # @!attribute [r] source_type
        #   @return [::Google::Cloud::AlloyDB::V1beta::MigrationSource::MigrationSourceType]
        #     Output only. Type of migration source.
        class MigrationSource
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Denote the type of migration source that created this cluster.
          module MigrationSourceType
            # Migration source is unknown.
            MIGRATION_SOURCE_TYPE_UNSPECIFIED = 0

            # DMS source means the cluster was created via DMS migration job.
            DMS = 1
          end
        end

        # EncryptionConfig describes the encryption config of a cluster or a backup
        # that is encrypted with a CMEK (customer-managed encryption key).
        # @!attribute [rw] kms_key_name
        #   @return [::String]
        #     The fully-qualified resource name of the KMS key.
        #     Each Cloud KMS key is regionalized and has the following format:
        #     projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]
        class EncryptionConfig
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # EncryptionInfo describes the encryption information of a cluster or a backup.
        # @!attribute [r] encryption_type
        #   @return [::Google::Cloud::AlloyDB::V1beta::EncryptionInfo::Type]
        #     Output only. Type of encryption.
        # @!attribute [r] kms_key_versions
        #   @return [::Array<::String>]
        #     Output only. Cloud KMS key versions that are being used to protect the
        #     database or the backup.
        class EncryptionInfo
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Possible encryption types.
          module Type
            # Encryption type not specified. Defaults to GOOGLE_DEFAULT_ENCRYPTION.
            TYPE_UNSPECIFIED = 0

            # The data is encrypted at rest with a key that is fully managed by Google.
            # No key version will be populated. This is the default state.
            GOOGLE_DEFAULT_ENCRYPTION = 1

            # The data is encrypted at rest with a key that is managed by the customer.
            # KMS key versions will be populated.
            CUSTOMER_MANAGED_ENCRYPTION = 2
          end
        end

        # SSL configuration.
        # @!attribute [rw] ssl_mode
        #   @return [::Google::Cloud::AlloyDB::V1beta::SslConfig::SslMode]
        #     Optional. SSL mode. Specifies client-server SSL/TLS connection behavior.
        # @!attribute [rw] ca_source
        #   @return [::Google::Cloud::AlloyDB::V1beta::SslConfig::CaSource]
        #     Optional. Certificate Authority (CA) source. Only CA_SOURCE_MANAGED is
        #     supported currently, and is the default value.
        class SslConfig
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # SSL mode options.
          module SslMode
            # SSL mode is not specified. Defaults to ENCRYPTED_ONLY.
            SSL_MODE_UNSPECIFIED = 0

            # SSL connections are optional. CA verification not enforced.
            SSL_MODE_ALLOW = 1

            # SSL connections are required. CA verification not enforced.
            # Clients may use locally self-signed certificates (default psql client
            # behavior).
            SSL_MODE_REQUIRE = 2

            # SSL connections are required. CA verification enforced.
            # Clients must have certificates signed by a Cluster CA, for example, using
            # GenerateClientCertificate.
            SSL_MODE_VERIFY_CA = 3

            # SSL connections are optional. CA verification not enforced.
            ALLOW_UNENCRYPTED_AND_ENCRYPTED = 4

            # SSL connections are required. CA verification not enforced.
            ENCRYPTED_ONLY = 5
          end

          # Certificate Authority (CA) source for SSL/TLS certificates.
          module CaSource
            # Certificate Authority (CA) source not specified. Defaults to
            # CA_SOURCE_MANAGED.
            CA_SOURCE_UNSPECIFIED = 0

            # Certificate Authority (CA) managed by the AlloyDB Cluster.
            CA_SOURCE_MANAGED = 1
          end
        end

        # Message describing the user-specified automated backup policy.
        #
        # All fields in the automated backup policy are optional. Defaults for each
        # field are provided if they are not set.
        # @!attribute [rw] weekly_schedule
        #   @return [::Google::Cloud::AlloyDB::V1beta::AutomatedBackupPolicy::WeeklySchedule]
        #     Weekly schedule for the Backup.
        # @!attribute [rw] time_based_retention
        #   @return [::Google::Cloud::AlloyDB::V1beta::AutomatedBackupPolicy::TimeBasedRetention]
        #     Time-based Backup retention policy.
        # @!attribute [rw] quantity_based_retention
        #   @return [::Google::Cloud::AlloyDB::V1beta::AutomatedBackupPolicy::QuantityBasedRetention]
        #     Quantity-based Backup retention policy to retain recent backups.
        # @!attribute [rw] enabled
        #   @return [::Boolean]
        #     Whether automated automated backups are enabled. If not set, defaults to
        #     true.
        # @!attribute [rw] backup_window
        #   @return [::Google::Protobuf::Duration]
        #     The length of the time window during which a backup can be
        #     taken. If a backup does not succeed within this time window, it will be
        #     canceled and considered failed.
        #
        #     The backup window must be at least 5 minutes long. There is no upper bound
        #     on the window. If not set, it defaults to 1 hour.
        # @!attribute [rw] encryption_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::EncryptionConfig]
        #     Optional. The encryption config can be specified to encrypt the
        #     backups with a customer-managed encryption key (CMEK). When this field is
        #     not specified, the backup will then use default encryption scheme to
        #     protect the user data.
        # @!attribute [rw] location
        #   @return [::String]
        #     The location where the backup will be stored. Currently, the only supported
        #     option is to store the backup in the same region as the cluster.
        #
        #     If empty, defaults to the region of the cluster.
        # @!attribute [rw] labels
        #   @return [::Google::Protobuf::Map{::String => ::String}]
        #     Labels to apply to backups created using this configuration.
        class AutomatedBackupPolicy
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # A weekly schedule starts a backup at prescribed start times within a
          # day, for the specified days of the week.
          #
          # The weekly schedule message is flexible and can be used to create many
          # types of schedules. For example, to have a daily backup that starts at
          # 22:00, configure the `start_times` field to have one element "22:00" and
          # the `days_of_week` field to have all seven days of the week.
          # @!attribute [rw] start_times
          #   @return [::Array<::Google::Type::TimeOfDay>]
          #     The times during the day to start a backup. The start times are assumed
          #     to be in UTC and to be an exact hour (e.g., 04:00:00).
          #
          #     If no start times are provided, a single fixed start time is chosen
          #     arbitrarily.
          # @!attribute [rw] days_of_week
          #   @return [::Array<::Google::Type::DayOfWeek>]
          #     The days of the week to perform a backup.
          #
          #     If this field is left empty, the default of every day of the week is
          #     used.
          class WeeklySchedule
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # A time based retention policy specifies that all backups within a certain
          # time period should be retained.
          # @!attribute [rw] retention_period
          #   @return [::Google::Protobuf::Duration]
          #     The retention period.
          class TimeBasedRetention
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # A quantity based policy specifies that a certain number of the most recent
          # successful backups should be retained.
          # @!attribute [rw] count
          #   @return [::Integer]
          #     The number of backups to retain.
          class QuantityBasedRetention
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # @!attribute [rw] key
          #   @return [::String]
          # @!attribute [rw] value
          #   @return [::String]
          class LabelsEntry
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end
        end

        # ContinuousBackupConfig describes the continuous backups recovery
        # configurations of a cluster.
        # @!attribute [rw] enabled
        #   @return [::Boolean]
        #     Whether ContinuousBackup is enabled.
        # @!attribute [rw] recovery_window_days
        #   @return [::Integer]
        #     The number of days that are eligible to restore from using PITR. To support
        #     the entire recovery window, backups and logs are retained for one day more
        #     than the recovery window. If not set, defaults to 14 days.
        # @!attribute [rw] encryption_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::EncryptionConfig]
        #     The encryption config can be specified to encrypt the
        #     backups with a customer-managed encryption key (CMEK). When this field is
        #     not specified, the backup will then use default encryption scheme to
        #     protect the user data.
        class ContinuousBackupConfig
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # ContinuousBackupInfo describes the continuous backup properties of a
        # cluster.
        # @!attribute [r] encryption_info
        #   @return [::Google::Cloud::AlloyDB::V1beta::EncryptionInfo]
        #     Output only. The encryption information for the WALs and backups required
        #     for ContinuousBackup.
        # @!attribute [r] enabled_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. When ContinuousBackup was most recently enabled. Set to null
        #     if ContinuousBackup is not enabled.
        # @!attribute [r] schedule
        #   @return [::Array<::Google::Type::DayOfWeek>]
        #     Output only. Days of the week on which a continuous backup is taken. Output
        #     only field. Ignored if passed into the request.
        # @!attribute [r] earliest_restorable_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. The earliest restorable time that can be restored to. Output
        #     only field.
        class ContinuousBackupInfo
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Message describing a BackupSource.
        # @!attribute [r] backup_uid
        #   @return [::String]
        #     Output only. The system-generated UID of the backup which was used to
        #     create this resource. The UID is generated when the backup is created, and
        #     it is retained until the backup is deleted.
        # @!attribute [rw] backup_name
        #   @return [::String]
        #     Required. The name of the backup resource with the format:
        #      * projects/\\{project}/locations/\\{region}/backups/\\{backup_id}
        class BackupSource
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Message describing a ContinuousBackupSource.
        # @!attribute [rw] cluster
        #   @return [::String]
        #     Required. The source cluster from which to restore. This cluster must have
        #     continuous backup enabled for this operation to succeed. For the required
        #     format, see the comment on the Cluster.name field.
        # @!attribute [rw] point_in_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Required. The point in time to restore to.
        class ContinuousBackupSource
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # MaintenanceUpdatePolicy defines the policy for system updates.
        # @!attribute [rw] maintenance_windows
        #   @return [::Array<::Google::Cloud::AlloyDB::V1beta::MaintenanceUpdatePolicy::MaintenanceWindow>]
        #     Preferred windows to perform maintenance. Currently limited to 1.
        class MaintenanceUpdatePolicy
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # MaintenanceWindow specifies a preferred day and time for maintenance.
          # @!attribute [rw] day
          #   @return [::Google::Type::DayOfWeek]
          #     Preferred day of the week for maintenance, e.g. MONDAY, TUESDAY, etc.
          # @!attribute [rw] start_time
          #   @return [::Google::Type::TimeOfDay]
          #     Preferred time to start the maintenance operation on the specified day.
          #     Maintenance will start within 1 hour of this time.
          class MaintenanceWindow
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end
        end

        # MaintenanceSchedule stores the maintenance schedule generated from
        # the MaintenanceUpdatePolicy, once a maintenance rollout is triggered, if
        # MaintenanceWindow is set, and if there is no conflicting DenyPeriod.
        # The schedule is cleared once the update takes place. This field cannot be
        # manually changed; modify the MaintenanceUpdatePolicy instead.
        # @!attribute [r] start_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. The scheduled start time for the maintenance.
        class MaintenanceSchedule
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # A cluster is a collection of regional AlloyDB resources. It can include a
        # primary instance and one or more read pool instances.
        # All cluster resources share a storage layer, which scales as needed.
        # @!attribute [r] backup_source
        #   @return [::Google::Cloud::AlloyDB::V1beta::BackupSource]
        #     Output only. Cluster created from backup.
        # @!attribute [r] migration_source
        #   @return [::Google::Cloud::AlloyDB::V1beta::MigrationSource]
        #     Output only. Cluster created via DMS migration.
        # @!attribute [r] cloudsql_backup_run_source
        #   @return [::Google::Cloud::AlloyDB::V1beta::CloudSQLBackupRunSource]
        #     Output only. Cluster created from CloudSQL snapshot.
        # @!attribute [r] name
        #   @return [::String]
        #     Output only. The name of the cluster resource with the format:
        #      * projects/\\{project}/locations/\\{region}/clusters/\\{cluster_id}
        #     where the cluster ID segment should satisfy the regex expression
        #     `[a-z0-9-]+`. For more details see https://google.aip.dev/122.
        #     The prefix of the cluster resource name is the name of the parent resource:
        #      * projects/\\{project}/locations/\\{region}
        # @!attribute [rw] display_name
        #   @return [::String]
        #     User-settable and human-readable display name for the Cluster.
        # @!attribute [r] uid
        #   @return [::String]
        #     Output only. The system-generated UID of the resource. The UID is assigned
        #     when the resource is created, and it is retained until it is deleted.
        # @!attribute [r] create_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. Create time stamp
        # @!attribute [r] update_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. Update time stamp
        # @!attribute [r] delete_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. Delete time stamp
        # @!attribute [rw] labels
        #   @return [::Google::Protobuf::Map{::String => ::String}]
        #     Labels as key value pairs
        # @!attribute [r] state
        #   @return [::Google::Cloud::AlloyDB::V1beta::Cluster::State]
        #     Output only. The current serving state of the cluster.
        # @!attribute [r] cluster_type
        #   @return [::Google::Cloud::AlloyDB::V1beta::Cluster::ClusterType]
        #     Output only. The type of the cluster. This is an output-only field and it's
        #     populated at the Cluster creation time or the Cluster promotion
        #     time. The cluster type is determined by which RPC was used to create
        #     the cluster (i.e. `CreateCluster` vs. `CreateSecondaryCluster`
        # @!attribute [rw] database_version
        #   @return [::Google::Cloud::AlloyDB::V1beta::DatabaseVersion]
        #     Optional. The database engine major version. This is an optional field and
        #     it is populated at the Cluster creation time. If a database version is not
        #     supplied at cluster creation time, then a default database version will
        #     be used.
        # @!attribute [rw] network_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::Cluster::NetworkConfig]
        # @!attribute [rw] network
        #   @deprecated This field is deprecated and may be removed in the next major version update.
        #   @return [::String]
        #     Required. The resource link for the VPC network in which cluster resources
        #     are created and from which they are accessible via Private IP. The network
        #     must belong to the same project as the cluster. It is specified in the
        #     form: `projects/{project}/global/networks/{network_id}`. This is required
        #     to create a cluster. Deprecated, use network_config.network instead.
        # @!attribute [rw] etag
        #   @return [::String]
        #     For Resource freshness validation (https://google.aip.dev/154)
        # @!attribute [rw] annotations
        #   @return [::Google::Protobuf::Map{::String => ::String}]
        #     Annotations to allow client tools to store small amount of arbitrary data.
        #     This is distinct from labels.
        #     https://google.aip.dev/128
        # @!attribute [r] reconciling
        #   @return [::Boolean]
        #     Output only. Reconciling (https://google.aip.dev/128#reconciliation).
        #     Set to true if the current state of Cluster does not match the user's
        #     intended state, and the service is actively updating the resource to
        #     reconcile them. This can happen due to user-triggered updates or
        #     system actions like failover or maintenance.
        # @!attribute [rw] initial_user
        #   @return [::Google::Cloud::AlloyDB::V1beta::UserPassword]
        #     Input only. Initial user to setup during cluster creation. Required.
        #     If used in `RestoreCluster` this is ignored.
        # @!attribute [rw] automated_backup_policy
        #   @return [::Google::Cloud::AlloyDB::V1beta::AutomatedBackupPolicy]
        #     The automated backup policy for this cluster.
        #
        #     If no policy is provided then the default policy will be used. If backups
        #     are supported for the cluster, the default policy takes one backup a day,
        #     has a backup window of 1 hour, and retains backups for 14 days.
        #     For more information on the defaults, consult the
        #     documentation for the message type.
        # @!attribute [rw] ssl_config
        #   @deprecated This field is deprecated and may be removed in the next major version update.
        #   @return [::Google::Cloud::AlloyDB::V1beta::SslConfig]
        #     SSL configuration for this AlloyDB cluster.
        # @!attribute [rw] encryption_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::EncryptionConfig]
        #     Optional. The encryption config can be specified to encrypt the data disks
        #     and other persistent data resources of a cluster with a
        #     customer-managed encryption key (CMEK). When this field is not
        #     specified, the cluster will then use default encryption scheme to
        #     protect the user data.
        # @!attribute [r] encryption_info
        #   @return [::Google::Cloud::AlloyDB::V1beta::EncryptionInfo]
        #     Output only. The encryption information for the cluster.
        # @!attribute [rw] continuous_backup_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::ContinuousBackupConfig]
        #     Optional. Continuous backup configuration for this cluster.
        # @!attribute [r] continuous_backup_info
        #   @return [::Google::Cloud::AlloyDB::V1beta::ContinuousBackupInfo]
        #     Output only. Continuous backup properties for this cluster.
        # @!attribute [rw] secondary_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::Cluster::SecondaryConfig]
        #     Cross Region replication config specific to SECONDARY cluster.
        # @!attribute [r] primary_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::Cluster::PrimaryConfig]
        #     Output only. Cross Region replication config specific to PRIMARY cluster.
        # @!attribute [r] satisfies_pzs
        #   @return [::Boolean]
        #     Output only. Reserved for future use.
        # @!attribute [rw] psc_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::Cluster::PscConfig]
        #     Optional. The configuration for Private Service Connect (PSC) for the
        #     cluster.
        # @!attribute [rw] maintenance_update_policy
        #   @return [::Google::Cloud::AlloyDB::V1beta::MaintenanceUpdatePolicy]
        #     Optional. The maintenance update policy determines when to allow or deny
        #     updates.
        # @!attribute [r] maintenance_schedule
        #   @return [::Google::Cloud::AlloyDB::V1beta::MaintenanceSchedule]
        #     Output only. The maintenance schedule for the cluster, generated for a
        #     specific rollout if a maintenance window is set.
        # @!attribute [rw] gemini_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::GeminiClusterConfig]
        #     Optional. Configuration parameters related to the Gemini in Databases
        #     add-on.
        # @!attribute [rw] subscription_type
        #   @return [::Google::Cloud::AlloyDB::V1beta::SubscriptionType]
        #     Optional. Subscription type of the cluster.
        # @!attribute [r] trial_metadata
        #   @return [::Google::Cloud::AlloyDB::V1beta::Cluster::TrialMetadata]
        #     Output only. Metadata for free trial clusters
        # @!attribute [rw] tags
        #   @return [::Google::Protobuf::Map{::String => ::String}]
        #     Optional. Input only. Immutable. Tag keys/values directly bound to this
        #     resource. For example:
        #     ```
        #     "123/environment": "production",
        #     "123/costCenter": "marketing"
        #     ```
        class Cluster
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Metadata related to network configuration.
          # @!attribute [rw] network
          #   @return [::String]
          #     Optional. The resource link for the VPC network in which cluster
          #     resources are created and from which they are accessible via Private IP.
          #     The network must belong to the same project as the cluster. It is
          #     specified in the form:
          #     `projects/{project_number}/global/networks/{network_id}`. This is
          #     required to create a cluster.
          # @!attribute [rw] allocated_ip_range
          #   @return [::String]
          #     Optional. Name of the allocated IP range for the private IP AlloyDB
          #     cluster, for example: "google-managed-services-default". If set, the
          #     instance IPs for this cluster will be created in the allocated range. The
          #     range name must comply with RFC 1035. Specifically, the name must be 1-63
          #     characters long and match the regular expression
          #     `[a-z]([-a-z0-9]*[a-z0-9])?`.
          #     Field name is intended to be consistent with Cloud SQL.
          class NetworkConfig
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Configuration information for the secondary cluster. This should be set
          # if and only if the cluster is of type SECONDARY.
          # @!attribute [rw] primary_cluster_name
          #   @return [::String]
          #     The name of the primary cluster name with the format:
          #     * projects/\\{project}/locations/\\{region}/clusters/\\{cluster_id}
          class SecondaryConfig
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Configuration for the primary cluster. It has the list of clusters that are
          # replicating from this cluster. This should be set if and only if the
          # cluster is of type PRIMARY.
          # @!attribute [r] secondary_cluster_names
          #   @return [::Array<::String>]
          #     Output only. Names of the clusters that are replicating from this
          #     cluster.
          class PrimaryConfig
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # PscConfig contains PSC related configuration at a cluster level.
          # @!attribute [rw] psc_enabled
          #   @return [::Boolean]
          #     Optional. Create an instance that allows connections from Private Service
          #     Connect endpoints to the instance.
          class PscConfig
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Contains information and all metadata related to TRIAL clusters.
          # @!attribute [rw] start_time
          #   @return [::Google::Protobuf::Timestamp]
          #     start time of the trial cluster.
          # @!attribute [rw] end_time
          #   @return [::Google::Protobuf::Timestamp]
          #     End time of the trial cluster.
          # @!attribute [rw] upgrade_time
          #   @return [::Google::Protobuf::Timestamp]
          #     Upgrade time of trial cluster to Standard cluster.
          # @!attribute [rw] grace_end_time
          #   @return [::Google::Protobuf::Timestamp]
          #     grace end time of the cluster.
          class TrialMetadata
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # @!attribute [rw] key
          #   @return [::String]
          # @!attribute [rw] value
          #   @return [::String]
          class LabelsEntry
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # @!attribute [rw] key
          #   @return [::String]
          # @!attribute [rw] value
          #   @return [::String]
          class AnnotationsEntry
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # @!attribute [rw] key
          #   @return [::String]
          # @!attribute [rw] value
          #   @return [::String]
          class TagsEntry
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Cluster State
          module State
            # The state of the cluster is unknown.
            STATE_UNSPECIFIED = 0

            # The cluster is active and running.
            READY = 1

            # The cluster is stopped. All instances in the cluster are stopped.
            # Customers can start a stopped cluster at any point and all their
            # instances will come back to life with same names and IP resources. In
            # this state, customer pays for storage.
            # Associated backups could also be present in a stopped cluster.
            STOPPED = 2

            # The cluster is empty and has no associated resources.
            # All instances, associated storage and backups have been deleted.
            EMPTY = 3

            # The cluster is being created.
            CREATING = 4

            # The cluster is being deleted.
            DELETING = 5

            # The creation of the cluster failed.
            FAILED = 6

            # The cluster is bootstrapping with data from some other source.
            # Direct mutations to the cluster (e.g. adding read pool) are not allowed.
            BOOTSTRAPPING = 7

            # The cluster is under maintenance. AlloyDB regularly performs maintenance
            # and upgrades on customer clusters. Updates on the cluster are
            # not allowed while the cluster is in this state.
            MAINTENANCE = 8

            # The cluster is being promoted.
            PROMOTING = 9
          end

          # Type of Cluster
          module ClusterType
            # The type of the cluster is unknown.
            CLUSTER_TYPE_UNSPECIFIED = 0

            # Primary cluster that support read and write operations.
            PRIMARY = 1

            # Secondary cluster that is replicating from another region.
            # This only supports read.
            SECONDARY = 2
          end
        end

        # An Instance is a computing unit that an end customer can connect to.
        # It's the main unit of computing resources in AlloyDB.
        # @!attribute [r] name
        #   @return [::String]
        #     Output only. The name of the instance resource with the format:
        #      * projects/\\{project}/locations/\\{region}/clusters/\\{cluster_id}/instances/\\{instance_id}
        #     where the cluster and instance ID segments should satisfy the regex
        #     expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
        #     lowercase letters, numbers, and dashes, starting with a letter, and ending
        #     with a letter or number. For more details see https://google.aip.dev/122.
        #     The prefix of the instance resource name is the name of the parent
        #     resource:
        #      * projects/\\{project}/locations/\\{region}/clusters/\\{cluster_id}
        # @!attribute [rw] display_name
        #   @return [::String]
        #     User-settable and human-readable display name for the Instance.
        # @!attribute [r] uid
        #   @return [::String]
        #     Output only. The system-generated UID of the resource. The UID is assigned
        #     when the resource is created, and it is retained until it is deleted.
        # @!attribute [r] create_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. Create time stamp
        # @!attribute [r] update_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. Update time stamp
        # @!attribute [r] delete_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. Delete time stamp
        # @!attribute [rw] labels
        #   @return [::Google::Protobuf::Map{::String => ::String}]
        #     Labels as key value pairs
        # @!attribute [r] state
        #   @return [::Google::Cloud::AlloyDB::V1beta::Instance::State]
        #     Output only. The current serving state of the instance.
        # @!attribute [rw] instance_type
        #   @return [::Google::Cloud::AlloyDB::V1beta::Instance::InstanceType]
        #     Required. The type of the instance. Specified at creation time.
        # @!attribute [rw] machine_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::Instance::MachineConfig]
        #     Configurations for the machines that host the underlying
        #     database engine.
        # @!attribute [rw] availability_type
        #   @return [::Google::Cloud::AlloyDB::V1beta::Instance::AvailabilityType]
        #     Availability type of an Instance.
        #     If empty, defaults to REGIONAL for primary instances.
        #     For read pools, availability_type is always UNSPECIFIED. Instances in the
        #     read pools are evenly distributed across available zones within the region
        #     (i.e. read pools with more than one node will have a node in at
        #     least two zones).
        # @!attribute [rw] gce_zone
        #   @return [::String]
        #     The Compute Engine zone that the instance should serve from, per
        #     https://cloud.google.com/compute/docs/regions-zones
        #     This can ONLY be specified for ZONAL instances.
        #     If present for a REGIONAL instance, an error will be thrown.
        #     If this is absent for a ZONAL instance, instance is created in a random
        #     zone with available capacity.
        # @!attribute [rw] database_flags
        #   @return [::Google::Protobuf::Map{::String => ::String}]
        #     Database flags. Set at instance level.
        #      * They are copied from primary instance on read instance creation.
        #      * Read instances can set new or override existing flags that are relevant
        #        for reads, e.g. for enabling columnar cache on a read instance. Flags
        #        set on read instance may or may not be present on primary.
        #
        #
        #     This is a list of "key": "value" pairs.
        #     "key": The name of the flag. These flags are passed at instance setup time,
        #     so include both server options and system variables for Postgres. Flags are
        #     specified with underscores, not hyphens.
        #     "value": The value of the flag. Booleans are set to **on** for true
        #     and **off** for false. This field must be omitted if the flag
        #     doesn't take a value.
        # @!attribute [r] writable_node
        #   @return [::Google::Cloud::AlloyDB::V1beta::Instance::Node]
        #     Output only. This is set for the read-write VM of the PRIMARY instance
        #     only.
        # @!attribute [r] nodes
        #   @return [::Array<::Google::Cloud::AlloyDB::V1beta::Instance::Node>]
        #     Output only. List of available read-only VMs in this instance, including
        #     the standby for a PRIMARY instance.
        # @!attribute [rw] query_insights_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::Instance::QueryInsightsInstanceConfig]
        #     Configuration for query insights.
        # @!attribute [rw] observability_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::Instance::ObservabilityInstanceConfig]
        #     Configuration for observability.
        # @!attribute [rw] read_pool_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::Instance::ReadPoolConfig]
        #     Read pool instance configuration.
        #     This is required if the value of instanceType is READ_POOL.
        # @!attribute [r] ip_address
        #   @return [::String]
        #     Output only. The IP address for the Instance.
        #     This is the connection endpoint for an end-user application.
        # @!attribute [r] public_ip_address
        #   @return [::String]
        #     Output only. The public IP addresses for the Instance. This is available
        #     ONLY when enable_public_ip is set. This is the connection endpoint for an
        #     end-user application.
        # @!attribute [r] reconciling
        #   @return [::Boolean]
        #     Output only. Reconciling (https://google.aip.dev/128#reconciliation).
        #     Set to true if the current state of Instance does not match the user's
        #     intended state, and the service is actively updating the resource to
        #     reconcile them. This can happen due to user-triggered updates or
        #     system actions like failover or maintenance.
        # @!attribute [rw] etag
        #   @return [::String]
        #     For Resource freshness validation (https://google.aip.dev/154)
        # @!attribute [rw] annotations
        #   @return [::Google::Protobuf::Map{::String => ::String}]
        #     Annotations to allow client tools to store small amount of arbitrary data.
        #     This is distinct from labels.
        #     https://google.aip.dev/128
        # @!attribute [rw] update_policy
        #   @return [::Google::Cloud::AlloyDB::V1beta::Instance::UpdatePolicy]
        #     Update policy that will be applied during instance update.
        #     This field is not persisted when you update the instance.
        #     To use a non-default update policy, you must
        #     specify explicitly specify the value in each update request.
        # @!attribute [rw] client_connection_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::Instance::ClientConnectionConfig]
        #     Optional. Client connection specific configurations
        # @!attribute [r] satisfies_pzs
        #   @return [::Boolean]
        #     Output only. Reserved for future use.
        # @!attribute [rw] psc_instance_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::Instance::PscInstanceConfig]
        #     Optional. The configuration for Private Service Connect (PSC) for the
        #     instance.
        # @!attribute [rw] network_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::Instance::InstanceNetworkConfig]
        #     Optional. Instance-level network configuration.
        # @!attribute [rw] gemini_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::GeminiInstanceConfig]
        #     Optional. Configuration parameters related to the Gemini in Databases
        #     add-on.
        # @!attribute [r] outbound_public_ip_addresses
        #   @return [::Array<::String>]
        #     Output only. All outbound public IP addresses configured for the instance.
        class Instance
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # MachineConfig describes the configuration of a machine.
          # @!attribute [rw] cpu_count
          #   @return [::Integer]
          #     The number of CPU's in the VM instance.
          class MachineConfig
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Details of a single node in the instance.
          # Nodes in an AlloyDB instance are ephemereal, they can change during
          # update, failover, autohealing and resize operations.
          # @!attribute [rw] zone_id
          #   @return [::String]
          #     The Compute Engine zone of the VM e.g. "us-central1-b".
          # @!attribute [rw] id
          #   @return [::String]
          #     The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
          # @!attribute [rw] ip
          #   @return [::String]
          #     The private IP address of the VM e.g. "10.57.0.34".
          # @!attribute [rw] state
          #   @return [::String]
          #     Determined by state of the compute VM and postgres-service health.
          #     Compute VM state can have values listed in
          #     https://cloud.google.com/compute/docs/instances/instance-life-cycle and
          #     postgres-service health can have values: HEALTHY and UNHEALTHY.
          class Node
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # QueryInsights Instance specific configuration.
          # @!attribute [rw] record_application_tags
          #   @return [::Boolean]
          #     Record application tags for an instance.
          #     This flag is turned "on" by default.
          # @!attribute [rw] record_client_address
          #   @return [::Boolean]
          #     Record client address for an instance. Client address is PII information.
          #     This flag is turned "on" by default.
          # @!attribute [rw] query_string_length
          #   @return [::Integer]
          #     Query string length. The default value is 1024.
          #     Any integer between 256 and 4500 is considered valid.
          # @!attribute [rw] query_plans_per_minute
          #   @return [::Integer]
          #     Number of query execution plans captured by Insights per minute
          #     for all queries combined. The default value is 5.
          #     Any integer between 0 and 20 is considered valid.
          class QueryInsightsInstanceConfig
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Observability Instance specific configuration.
          # @!attribute [rw] enabled
          #   @return [::Boolean]
          #     Observability feature status for an instance.
          #     This flag is turned "off" by default.
          # @!attribute [rw] preserve_comments
          #   @return [::Boolean]
          #     Preserve comments in query string for an instance.
          #     This flag is turned "off" by default.
          # @!attribute [rw] track_wait_events
          #   @return [::Boolean]
          #     Track wait events during query execution for an instance.
          #     This flag is turned "on" by default but tracking is enabled only after
          #     observability enabled flag is also turned on.
          # @!attribute [r] track_wait_event_types
          #   @return [::Boolean]
          #     Output only. Track wait event types during query execution for an
          #     instance. This flag is turned "on" by default but tracking is enabled
          #     only after observability enabled flag is also turned on. This is
          #     read-only flag and only modifiable by producer API.
          # @!attribute [rw] max_query_string_length
          #   @return [::Integer]
          #     Query string length. The default value is 10k.
          # @!attribute [rw] record_application_tags
          #   @return [::Boolean]
          #     Record application tags for an instance.
          #     This flag is turned "off" by default.
          # @!attribute [rw] query_plans_per_minute
          #   @return [::Integer]
          #     Number of query execution plans captured by Insights per minute
          #     for all queries combined. The default value is 200.
          #     Any integer between 0 to 200 is considered valid.
          # @!attribute [rw] track_active_queries
          #   @return [::Boolean]
          #     Track actively running queries on the instance.
          #     If not set, this flag is "off" by default.
          # @!attribute [rw] track_client_address
          #   @return [::Boolean]
          #     Track client address for an instance.
          #     If not set, default value is "off".
          class ObservabilityInstanceConfig
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Configuration for a read pool instance.
          # @!attribute [rw] node_count
          #   @return [::Integer]
          #     Read capacity, i.e. number of nodes in a read pool instance.
          class ReadPoolConfig
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Policy to be used while updating the instance.
          # @!attribute [rw] mode
          #   @return [::Google::Cloud::AlloyDB::V1beta::Instance::UpdatePolicy::Mode]
          #     Mode for updating the instance.
          class UpdatePolicy
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods

            # Specifies the available modes of update.
            module Mode
              # Mode is unknown.
              MODE_UNSPECIFIED = 0

              # Least disruptive way to apply the update.
              DEFAULT = 1

              # Performs a forced update when applicable. This will be fast but may
              # incur a downtime.
              FORCE_APPLY = 2
            end
          end

          # Client connection configuration
          # @!attribute [rw] require_connectors
          #   @return [::Boolean]
          #     Optional. Configuration to enforce connectors only (ex: AuthProxy)
          #     connections to the database.
          # @!attribute [rw] ssl_config
          #   @return [::Google::Cloud::AlloyDB::V1beta::SslConfig]
          #     Optional. SSL configuration option for this instance.
          class ClientConnectionConfig
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # PscInstanceConfig contains PSC related configuration at an
          # instance level.
          # @!attribute [r] service_attachment_link
          #   @return [::String]
          #     Output only. The service attachment created when Private
          #     Service Connect (PSC) is enabled for the instance.
          #     The name of the resource will be in the format of
          #     `projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>`
          # @!attribute [rw] allowed_consumer_projects
          #   @return [::Array<::String>]
          #     Optional. List of consumer projects that are allowed to create
          #     PSC endpoints to service-attachments to this instance.
          # @!attribute [r] psc_dns_name
          #   @return [::String]
          #     Output only. The DNS name of the instance for PSC connectivity.
          #     Name convention: <uid>.<uid>.<region>.alloydb-psc.goog
          class PscInstanceConfig
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Metadata related to instance-level network configuration.
          # @!attribute [rw] authorized_external_networks
          #   @return [::Array<::Google::Cloud::AlloyDB::V1beta::Instance::InstanceNetworkConfig::AuthorizedNetwork>]
          #     Optional. A list of external network authorized to access this instance.
          # @!attribute [rw] enable_public_ip
          #   @return [::Boolean]
          #     Optional. Enabling public ip for the instance.
          # @!attribute [rw] enable_outbound_public_ip
          #   @return [::Boolean]
          #     Optional. Enabling an outbound public IP address to support a database
          #     server sending requests out into the internet.
          class InstanceNetworkConfig
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods

            # AuthorizedNetwork contains metadata for an authorized network.
            # @!attribute [rw] cidr_range
            #   @return [::String]
            #     CIDR range for one authorzied network of the instance.
            class AuthorizedNetwork
              include ::Google::Protobuf::MessageExts
              extend ::Google::Protobuf::MessageExts::ClassMethods
            end
          end

          # @!attribute [rw] key
          #   @return [::String]
          # @!attribute [rw] value
          #   @return [::String]
          class LabelsEntry
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # @!attribute [rw] key
          #   @return [::String]
          # @!attribute [rw] value
          #   @return [::String]
          class DatabaseFlagsEntry
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # @!attribute [rw] key
          #   @return [::String]
          # @!attribute [rw] value
          #   @return [::String]
          class AnnotationsEntry
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Instance State
          module State
            # The state of the instance is unknown.
            STATE_UNSPECIFIED = 0

            # The instance is active and running.
            READY = 1

            # The instance is stopped. Instance name and IP resources are preserved.
            STOPPED = 2

            # The instance is being created.
            CREATING = 3

            # The instance is being deleted.
            DELETING = 4

            # The instance is down for maintenance.
            MAINTENANCE = 5

            # The creation of the instance failed or a fatal error occurred during
            # an operation on the instance.
            # Note: Instances in this state would tried to be auto-repaired. And
            # Customers should be able to restart, update or delete these instances.
            FAILED = 6

            # Index 7 is used in the producer apis for ROLLED_BACK state. Keeping that
            # index unused in case that state also needs to exposed via consumer apis
            # in future.
            # The instance has been configured to sync data from some other source.
            BOOTSTRAPPING = 8

            # The instance is being promoted.
            PROMOTING = 9
          end

          # Type of an Instance
          module InstanceType
            # The type of the instance is unknown.
            INSTANCE_TYPE_UNSPECIFIED = 0

            # PRIMARY instances support read and write operations.
            PRIMARY = 1

            # READ POOL instances support read operations only. Each read pool instance
            # consists of one or more homogeneous nodes.
            #  * Read pool of size 1 can only have zonal availability.
            #  * Read pools with node count of 2 or more can have regional
            #    availability (nodes are present in 2 or more zones in a region).
            READ_POOL = 2

            # SECONDARY instances support read operations only. SECONDARY instance
            # is a cross-region read replica
            SECONDARY = 3
          end

          # The Availability type of an instance. Potential values:
          #
          # - ZONAL: The instance serves data from only one zone. Outages in that
          #     zone affect instance availability.
          # - REGIONAL: The instance can serve data from more than one zone in a
          #     region (it is highly available).
          module AvailabilityType
            # This is an unknown Availability type.
            AVAILABILITY_TYPE_UNSPECIFIED = 0

            # Zonal available instance.
            ZONAL = 1

            # Regional (or Highly) available instance.
            REGIONAL = 2
          end
        end

        # ConnectionInfo singleton resource.
        # https://google.aip.dev/156
        # @!attribute [rw] name
        #   @return [::String]
        #     The name of the ConnectionInfo singleton resource, e.g.:
        #     projects/\\{project}/locations/\\{location}/clusters/*/instances/*/connectionInfo
        #     This field currently has no semantic meaning.
        # @!attribute [r] ip_address
        #   @return [::String]
        #     Output only. The private network IP address for the Instance. This is the
        #     default IP for the instance and is always created (even if enable_public_ip
        #     is set). This is the connection endpoint for an end-user application.
        # @!attribute [r] public_ip_address
        #   @return [::String]
        #     Output only. The public IP addresses for the Instance. This is available
        #     ONLY when enable_public_ip is set. This is the connection endpoint for an
        #     end-user application.
        # @!attribute [r] pem_certificate_chain
        #   @deprecated This field is deprecated and may be removed in the next major version update.
        #   @return [::Array<::String>]
        #     Output only. The pem-encoded chain that may be used to verify the X.509
        #     certificate. Expected to be in issuer-to-root order according to RFC 5246.
        # @!attribute [r] instance_uid
        #   @return [::String]
        #     Output only. The unique ID of the Instance.
        # @!attribute [r] psc_dns_name
        #   @return [::String]
        #     Output only. The DNS name to use with PSC for the Instance.
        class ConnectionInfo
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Message describing Backup object
        # @!attribute [r] name
        #   @return [::String]
        #     Output only. The name of the backup resource with the format:
        #      * projects/\\{project}/locations/\\{region}/backups/\\{backup_id}
        #     where the cluster and backup ID segments should satisfy the regex
        #     expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
        #     lowercase letters, numbers, and dashes, starting with a letter, and ending
        #     with a letter or number. For more details see https://google.aip.dev/122.
        #     The prefix of the backup resource name is the name of the parent
        #     resource:
        #      * projects/\\{project}/locations/\\{region}
        # @!attribute [rw] display_name
        #   @return [::String]
        #     User-settable and human-readable display name for the Backup.
        # @!attribute [r] uid
        #   @return [::String]
        #     Output only. The system-generated UID of the resource. The UID is assigned
        #     when the resource is created, and it is retained until it is deleted.
        # @!attribute [r] create_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. Create time stamp
        # @!attribute [r] update_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. Update time stamp
        # @!attribute [r] delete_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. Delete time stamp
        # @!attribute [rw] labels
        #   @return [::Google::Protobuf::Map{::String => ::String}]
        #     Labels as key value pairs
        # @!attribute [r] state
        #   @return [::Google::Cloud::AlloyDB::V1beta::Backup::State]
        #     Output only. The current state of the backup.
        # @!attribute [rw] type
        #   @return [::Google::Cloud::AlloyDB::V1beta::Backup::Type]
        #     The backup type, which suggests the trigger for the backup.
        # @!attribute [rw] description
        #   @return [::String]
        #     User-provided description of the backup.
        # @!attribute [r] cluster_uid
        #   @return [::String]
        #     Output only. The system-generated UID of the cluster which was used to
        #     create this resource.
        # @!attribute [rw] cluster_name
        #   @return [::String]
        #     Required. The full resource name of the backup source cluster
        #     (e.g., projects/\\{project}/locations/\\{region}/clusters/\\{cluster_id}).
        # @!attribute [r] reconciling
        #   @return [::Boolean]
        #     Output only. Reconciling (https://google.aip.dev/128#reconciliation), if
        #     true, indicates that the service is actively updating the resource. This
        #     can happen due to user-triggered updates or system actions like failover or
        #     maintenance.
        # @!attribute [rw] encryption_config
        #   @return [::Google::Cloud::AlloyDB::V1beta::EncryptionConfig]
        #     Optional. The encryption config can be specified to encrypt the
        #     backup with a customer-managed encryption key (CMEK). When this field is
        #     not specified, the backup will then use default encryption scheme to
        #     protect the user data.
        # @!attribute [r] encryption_info
        #   @return [::Google::Cloud::AlloyDB::V1beta::EncryptionInfo]
        #     Output only. The encryption information for the backup.
        # @!attribute [rw] etag
        #   @return [::String]
        #     For Resource freshness validation (https://google.aip.dev/154)
        # @!attribute [rw] annotations
        #   @return [::Google::Protobuf::Map{::String => ::String}]
        #     Annotations to allow client tools to store small amount of arbitrary data.
        #     This is distinct from labels.
        #     https://google.aip.dev/128
        # @!attribute [r] size_bytes
        #   @return [::Integer]
        #     Output only. The size of the backup in bytes.
        # @!attribute [r] expiry_time
        #   @return [::Google::Protobuf::Timestamp]
        #     Output only. The time at which after the backup is eligible to be garbage
        #     collected. It is the duration specified by the backup's retention policy,
        #     added to the backup's create_time.
        # @!attribute [r] expiry_quantity
        #   @return [::Google::Cloud::AlloyDB::V1beta::Backup::QuantityBasedExpiry]
        #     Output only. The QuantityBasedExpiry of the backup, specified by the
        #     backup's retention policy. Once the expiry quantity is over retention, the
        #     backup is eligible to be garbage collected.
        # @!attribute [r] satisfies_pzs
        #   @return [::Boolean]
        #     Output only. Reserved for future use.
        # @!attribute [r] database_version
        #   @return [::Google::Cloud::AlloyDB::V1beta::DatabaseVersion]
        #     Output only. The database engine major version of the cluster this backup
        #     was created from. Any restored cluster created from this backup will have
        #     the same database version.
        # @!attribute [rw] tags
        #   @return [::Google::Protobuf::Map{::String => ::String}]
        #     Optional. Input only. Immutable. Tag keys/values directly bound to this
        #     resource. For example:
        #     ```
        #     "123/environment": "production",
        #     "123/costCenter": "marketing"
        #     ```
        class Backup
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # A backup's position in a quantity-based retention queue, of backups with
          # the same source cluster and type, with length, retention, specified by the
          # backup's retention policy.
          # Once the position is greater than the retention, the backup is eligible to
          # be garbage collected.
          #
          # Example: 5 backups from the same source cluster and type with a
          # quantity-based retention of 3 and denoted by backup_id (position,
          # retention).
          #
          # Safe: backup_5 (1, 3), backup_4, (2, 3), backup_3 (3, 3).
          # Awaiting garbage collection: backup_2 (4, 3), backup_1 (5, 3)
          # @!attribute [r] retention_count
          #   @return [::Integer]
          #     Output only. The backup's position among its backups with the same source
          #     cluster and type, by descending chronological order create time(i.e.
          #     newest first).
          # @!attribute [r] total_retention_count
          #   @return [::Integer]
          #     Output only. The length of the quantity-based queue, specified by the
          #     backup's retention policy.
          class QuantityBasedExpiry
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # @!attribute [rw] key
          #   @return [::String]
          # @!attribute [rw] value
          #   @return [::String]
          class LabelsEntry
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # @!attribute [rw] key
          #   @return [::String]
          # @!attribute [rw] value
          #   @return [::String]
          class AnnotationsEntry
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # @!attribute [rw] key
          #   @return [::String]
          # @!attribute [rw] value
          #   @return [::String]
          class TagsEntry
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Backup State
          module State
            # The state of the backup is unknown.
            STATE_UNSPECIFIED = 0

            # The backup is ready.
            READY = 1

            # The backup is creating.
            CREATING = 2

            # The backup failed.
            FAILED = 3

            # The backup is being deleted.
            DELETING = 4
          end

          # Backup Type
          module Type
            # Backup Type is unknown.
            TYPE_UNSPECIFIED = 0

            # ON_DEMAND backups that were triggered by the customer (e.g., not
            # AUTOMATED).
            ON_DEMAND = 1

            # AUTOMATED backups triggered by the automated backups scheduler pursuant
            # to an automated backup policy.
            AUTOMATED = 2

            # CONTINUOUS backups triggered by the automated backups scheduler
            # due to a continuous backup policy.
            CONTINUOUS = 3
          end
        end

        # SupportedDatabaseFlag gives general information about a database flag,
        # like type and allowed values. This is a static value that is defined
        # on the server side, and it cannot be modified by callers.
        # To set the Database flags on a particular Instance, a caller should modify
        # the Instance.database_flags field.
        # @!attribute [rw] string_restrictions
        #   @return [::Google::Cloud::AlloyDB::V1beta::SupportedDatabaseFlag::StringRestrictions]
        #     Restriction on STRING type value.
        # @!attribute [rw] integer_restrictions
        #   @return [::Google::Cloud::AlloyDB::V1beta::SupportedDatabaseFlag::IntegerRestrictions]
        #     Restriction on INTEGER type value.
        # @!attribute [rw] name
        #   @return [::String]
        #     The name of the flag resource, following Google Cloud conventions, e.g.:
        #      * projects/\\{project}/locations/\\{location}/flags/\\{flag}
        #     This field currently has no semantic meaning.
        # @!attribute [rw] flag_name
        #   @return [::String]
        #     The name of the database flag, e.g. "max_allowed_packets".
        #     The is a possibly key for the Instance.database_flags map field.
        # @!attribute [rw] value_type
        #   @return [::Google::Cloud::AlloyDB::V1beta::SupportedDatabaseFlag::ValueType]
        # @!attribute [rw] accepts_multiple_values
        #   @return [::Boolean]
        #     Whether the database flag accepts multiple values. If true,
        #     a comma-separated list of stringified values may be specified.
        # @!attribute [rw] supported_db_versions
        #   @return [::Array<::Google::Cloud::AlloyDB::V1beta::DatabaseVersion>]
        #     Major database engine versions for which this flag is supported.
        # @!attribute [rw] requires_db_restart
        #   @return [::Boolean]
        #     Whether setting or updating this flag on an Instance requires a database
        #     restart. If a flag that requires database restart is set, the backend
        #     will automatically restart the database (making sure to satisfy any
        #     availability SLO's).
        class SupportedDatabaseFlag
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Restrictions on STRING type values
          # @!attribute [rw] allowed_values
          #   @return [::Array<::String>]
          #     The list of allowed values, if bounded. This field will be empty
          #     if there is a unbounded number of allowed values.
          class StringRestrictions
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # Restrictions on INTEGER type values.
          # @!attribute [rw] min_value
          #   @return [::Google::Protobuf::Int64Value]
          #     The minimum value that can be specified, if applicable.
          # @!attribute [rw] max_value
          #   @return [::Google::Protobuf::Int64Value]
          #     The maximum value that can be specified, if applicable.
          class IntegerRestrictions
            include ::Google::Protobuf::MessageExts
            extend ::Google::Protobuf::MessageExts::ClassMethods
          end

          # ValueType describes the semantic type of the value that the flag accepts.
          # Regardless of the ValueType, the Instance.database_flags field accepts the
          # stringified version of the value, i.e. "20" or "3.14".
          module ValueType
            # This is an unknown flag type.
            VALUE_TYPE_UNSPECIFIED = 0

            # String type flag.
            STRING = 1

            # Integer type flag.
            INTEGER = 2

            # Float type flag.
            FLOAT = 3

            # Denotes that the flag does not accept any values.
            NONE = 4
          end
        end

        # Message describing User object.
        # @!attribute [r] name
        #   @return [::String]
        #     Output only. Name of the resource in the form of
        #     projects/\\{project}/locations/\\{location}/cluster/\\{cluster}/users/\\{user}.
        # @!attribute [rw] password
        #   @return [::String]
        #     Input only. Password for the user.
        # @!attribute [rw] database_roles
        #   @return [::Array<::String>]
        #     Optional. List of database roles this user has.
        #     The database role strings are subject to the PostgreSQL naming conventions.
        # @!attribute [rw] user_type
        #   @return [::Google::Cloud::AlloyDB::V1beta::User::UserType]
        #     Optional. Type of this user.
        # @!attribute [rw] keep_extra_roles
        #   @return [::Boolean]
        #     Input only. If the user already exists and it has additional roles, keep
        #     them granted.
        class User
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods

          # Enum that details the user type.
          module UserType
            # Unspecified user type.
            USER_TYPE_UNSPECIFIED = 0

            # The default user type that authenticates via password-based
            # authentication.
            ALLOYDB_BUILT_IN = 1

            # Database user that can authenticate via IAM-Based authentication.
            ALLOYDB_IAM_USER = 2
          end
        end

        # Message describing Database object.
        # @!attribute [rw] name
        #   @return [::String]
        #     Identifier. Name of the resource in the form of
        #     `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
        # @!attribute [rw] charset
        #   @return [::String]
        #     Optional. Charset for the database.
        #     This field can contain any PostgreSQL supported charset name.
        #     Example values include "UTF8", "SQL_ASCII", etc.
        # @!attribute [rw] collation
        #   @return [::String]
        #     Optional. Collation for the database.
        #     Name of the custom or native collation for postgres.
        #     Example values include "C", "POSIX", etc
        class Database
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # View on Instance. Pass this enum to rpcs that returns an Instance message to
        # control which subsets of fields to get.
        module InstanceView
          # INSTANCE_VIEW_UNSPECIFIED Not specified, equivalent to BASIC.
          INSTANCE_VIEW_UNSPECIFIED = 0

          # BASIC server responses for a primary or read instance include all the
          # relevant instance details, excluding the details of each node in the
          # instance. The default value.
          INSTANCE_VIEW_BASIC = 1

          # FULL response is equivalent to BASIC for primary instance (for now).
          # For read pool instance, this includes details of each node in the pool.
          INSTANCE_VIEW_FULL = 2
        end

        # View on Cluster. Pass this enum to rpcs that returns a cluster message to
        # control which subsets of fields to get.
        module ClusterView
          # CLUSTER_VIEW_UNSPECIFIED Not specified, equivalent to BASIC.
          CLUSTER_VIEW_UNSPECIFIED = 0

          # BASIC server responses include all the relevant cluster details, excluding
          # Cluster.ContinuousBackupInfo.EarliestRestorableTime and other view-specific
          # fields. The default value.
          CLUSTER_VIEW_BASIC = 1

          # CONTINUOUS_BACKUP response returns all the fields from BASIC plus
          # the earliest restorable time if continuous backups are enabled.
          # May increase latency.
          CLUSTER_VIEW_CONTINUOUS_BACKUP = 2
        end

        # The supported database engine versions.
        module DatabaseVersion
          # This is an unknown database version.
          DATABASE_VERSION_UNSPECIFIED = 0

          # DEPRECATED - The database version is Postgres 13.
          POSTGRES_13 = 1

          # The database version is Postgres 14.
          POSTGRES_14 = 2

          # The database version is Postgres 15.
          POSTGRES_15 = 3

          # The database version is Postgres 16.
          POSTGRES_16 = 4
        end

        # Subscription_type added to distinguish between Standard and Trial
        # subscriptions. By default, a subscription type is considered STANDARD unless
        # explicitly specified.
        module SubscriptionType
          # This is an unknown subscription type. By default, the subscription type is
          # STANDARD.
          SUBSCRIPTION_TYPE_UNSPECIFIED = 0

          # Standard subscription.
          STANDARD = 1

          # Trial subscription.
          TRIAL = 2
        end
      end
    end
  end
end