// This file is @generated by prost-build.
/// Request for \[CreateCluster\]\[CloudRedis.CreateCluster\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateClusterRequest {
    /// Required. The resource name of the cluster location using the form:
    /// `projects/{project_id}/locations/{location_id}`
    /// where `location_id` refers to a GCP region.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The logical name of the Redis cluster in the customer project
    /// with the following restrictions:
    ///
    /// * Must contain only lowercase letters, numbers, and hyphens.
    /// * Must start with a letter.
    /// * Must be between 1-63 characters.
    /// * Must end with a number or a letter.
    /// * Must be unique within the customer project / location
    #[prost(string, tag = "2")]
    pub cluster_id: ::prost::alloc::string::String,
    /// Required. The cluster that is to be created.
    #[prost(message, optional, tag = "3")]
    pub cluster: ::core::option::Option<Cluster>,
    /// Idempotent request UUID.
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request for \[ListClusters\]\[CloudRedis.ListClusters\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListClustersRequest {
    /// Required. The resource name of the cluster location using the form:
    /// `projects/{project_id}/locations/{location_id}`
    /// where `location_id` refers to a GCP region.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of items to return.
    ///
    /// If not specified, a default value of 1000 will be used by the service.
    /// Regardless of the page_size value, the response may include a partial list
    /// and a caller should only rely on response's
    /// \[`next_page_token`\]\[google.cloud.redis.cluster.v1beta1.ListClustersResponse.next_page_token\]
    /// to determine if there are more clusters left to be queried.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// The `next_page_token` value returned from a previous
    /// \[ListClusters\]\[CloudRedis.ListClusters\] request, if any.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response for \[ListClusters\]\[CloudRedis.ListClusters\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClustersResponse {
    /// A list of Redis clusters in the project in the specified location,
    /// or across all locations.
    ///
    /// If the `location_id` in the parent field of the request is "-", all regions
    /// available to the project are queried, and the results aggregated.
    /// If in such an aggregated query a location is unavailable, a placeholder
    /// Redis entry is included in the response with the `name` field set to a
    /// value of the form
    /// `projects/{project_id}/locations/{location_id}/clusters/`- and the
    /// `status` field set to ERROR and `status_message` field set to "location not
    /// available for ListClusters".
    #[prost(message, repeated, tag = "1")]
    pub clusters: ::prost::alloc::vec::Vec<Cluster>,
    /// Token to retrieve the next page of results, or empty if there are no more
    /// results in the list.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for \[UpdateCluster\]\[CloudRedis.UpdateCluster\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterRequest {
    /// Required. Mask of fields to update. At least one path must be supplied in
    /// this field. The elements of the repeated paths field may only include these
    /// fields from \[Cluster\]\[google.cloud.redis.cluster.v1beta1.Cluster\]:
    ///
    /// * `size_gb`
    /// * `replica_count`
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. Update description.
    /// Only fields specified in update_mask are updated.
    #[prost(message, optional, tag = "2")]
    pub cluster: ::core::option::Option<Cluster>,
    /// Idempotent request UUID.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request for \[GetCluster\]\[CloudRedis.GetCluster\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetClusterRequest {
    /// Required. Redis cluster resource name using the form:
    /// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
    /// where `location_id` refers to a GCP region.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for \[DeleteCluster\]\[CloudRedis.DeleteCluster\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteClusterRequest {
    /// Required. Redis cluster resource name using the form:
    /// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
    /// where `location_id` refers to a GCP region.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Idempotent request UUID.
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request for
/// \[GetClusterCertificateAuthorityRequest\]\[CloudRedis.GetClusterCertificateAuthorityRequest\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetClusterCertificateAuthorityRequest {
    /// Required. Redis cluster certificate authority resource name using the form:
    /// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
    /// where `location_id` refers to a GCP region.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for \[ListBackupCollections\]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListBackupCollectionsRequest {
    /// Required. The resource name of the backupCollection location using the
    /// form:
    /// `projects/{project_id}/locations/{location_id}`
    /// where `location_id` refers to a GCP region.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of items to return.
    ///
    /// If not specified, a default value of 1000 will be used by the service.
    /// Regardless of the page_size value, the response may include a partial list
    /// and a caller should only rely on response's
    /// \[`next_page_token`\]\[google.cloud.redis.cluster.v1beta1.ListBackupCollectionsResponse.next_page_token\]
    /// to determine if there are more clusters left to be queried.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. The `next_page_token` value returned from a previous
    /// \[ListBackupCollections\] request, if any.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response for \[ListBackupCollections\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupCollectionsResponse {
    /// A list of backupCollections in the project.
    ///
    /// If the `location_id` in the parent field of the request is "-", all regions
    /// available to the project are queried, and the results aggregated.
    /// If in such an aggregated query a location is unavailable, a placeholder
    /// backupCollection entry is included in the response with the `name` field
    /// set to a value of the form
    /// `projects/{project_id}/locations/{location_id}/backupCollections/`- and the
    /// `status` field set to ERROR and `status_message` field set to "location not
    /// available for ListBackupCollections".
    #[prost(message, repeated, tag = "1")]
    pub backup_collections: ::prost::alloc::vec::Vec<BackupCollection>,
    /// Token to retrieve the next page of results, or empty if there are no more
    /// results in the list.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for \[GetBackupCollection\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetBackupCollectionRequest {
    /// Required. Redis backupCollection resource name using the form:
    /// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
    /// where `location_id` refers to a GCP region.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for \[ListBackups\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListBackupsRequest {
    /// Required. The resource name of the backupCollection using the form:
    /// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of items to return.
    ///
    /// If not specified, a default value of 1000 will be used by the service.
    /// Regardless of the page_size value, the response may include a partial list
    /// and a caller should only rely on response's
    /// \[`next_page_token`\]\[google.cloud.redis.cluster.v1beta1.ListBackupsResponse.next_page_token\]
    /// to determine if there are more clusters left to be queried.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. The `next_page_token` value returned from a previous
    /// \[ListBackupCollections\] request, if any.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response for \[ListBackups\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupsResponse {
    /// A list of backups in the project.
    #[prost(message, repeated, tag = "1")]
    pub backups: ::prost::alloc::vec::Vec<Backup>,
    /// Token to retrieve the next page of results, or empty if there are no more
    /// results in the list.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Backups that could not be reached.
    #[prost(string, repeated, tag = "3")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request for \[GetBackup\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetBackupRequest {
    /// Required. Redis backup resource name using the form:
    /// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request for \[DeleteBackup\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteBackupRequest {
    /// Required. Redis backup resource name using the form:
    /// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. Idempotent request UUID.
    #[prost(string, tag = "2")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request for \[ExportBackup\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExportBackupRequest {
    /// Required. Redis backup resource name using the form:
    /// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. Specify destination to export a backup.
    #[prost(oneof = "export_backup_request::Destination", tags = "3")]
    pub destination: ::core::option::Option<export_backup_request::Destination>,
}
/// Nested message and enum types in `ExportBackupRequest`.
pub mod export_backup_request {
    /// Required. Specify destination to export a backup.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Destination {
        /// Google Cloud Storage bucket, like "my-bucket".
        #[prost(string, tag = "3")]
        GcsBucket(::prost::alloc::string::String),
    }
}
/// Request for \[BackupCluster\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BackupClusterRequest {
    /// Required. Redis cluster resource name using the form:
    /// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
    /// where `location_id` refers to a GCP region.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. TTL for the backup to expire. Value range is 1 day to 100 years.
    /// If not specified, the default value is 100 years.
    #[prost(message, optional, tag = "2")]
    pub ttl: ::core::option::Option<::prost_types::Duration>,
    /// Optional. The id of the backup to be created. If not specified, the
    /// default value (\[YYYYMMDDHHMMSS\]\_\[Shortened Cluster UID\] is used.
    #[prost(string, optional, tag = "3")]
    pub backup_id: ::core::option::Option<::prost::alloc::string::String>,
}
/// A cluster instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Cluster {
    /// Required. Identifier. Unique name of the resource in this scope including
    /// project and location using the form:
    /// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The timestamp associated with the cluster creation request.
    #[prost(message, optional, tag = "3")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The current state of this cluster.
    /// Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
    #[prost(enumeration = "cluster::State", tag = "4")]
    pub state: i32,
    /// Output only. System assigned, unique identifier for the cluster.
    #[prost(string, tag = "5")]
    pub uid: ::prost::alloc::string::String,
    /// Optional. The number of replica nodes per shard.
    #[prost(int32, optional, tag = "8")]
    pub replica_count: ::core::option::Option<i32>,
    /// Optional. The authorization mode of the Redis cluster.
    /// If not provided, auth feature is disabled for the cluster.
    #[prost(enumeration = "AuthorizationMode", tag = "11")]
    pub authorization_mode: i32,
    /// Optional. The in-transit encryption for the Redis cluster.
    /// If not provided, encryption  is disabled for the cluster.
    #[prost(enumeration = "TransitEncryptionMode", tag = "12")]
    pub transit_encryption_mode: i32,
    /// Output only. Redis memory size in GB for the entire cluster rounded up to
    /// the next integer.
    #[prost(int32, optional, tag = "13")]
    pub size_gb: ::core::option::Option<i32>,
    /// Optional. Number of shards for the Redis cluster.
    #[prost(int32, optional, tag = "14")]
    pub shard_count: ::core::option::Option<i32>,
    /// Optional. Each PscConfig configures the consumer network where IPs will
    /// be designated to the cluster for client access through Private Service
    /// Connect Automation. Currently, only one PscConfig is supported.
    #[prost(message, repeated, tag = "15")]
    pub psc_configs: ::prost::alloc::vec::Vec<PscConfig>,
    /// Output only. Endpoints created on each given network, for Redis clients to
    /// connect to the cluster. Currently only one discovery endpoint is supported.
    #[prost(message, repeated, tag = "16")]
    pub discovery_endpoints: ::prost::alloc::vec::Vec<DiscoveryEndpoint>,
    /// Output only. The list of PSC connections that are auto-created through
    /// service connectivity automation.
    #[prost(message, repeated, tag = "17")]
    pub psc_connections: ::prost::alloc::vec::Vec<PscConnection>,
    /// Output only. Additional information about the current state of the cluster.
    #[prost(message, optional, tag = "18")]
    pub state_info: ::core::option::Option<cluster::StateInfo>,
    /// Optional. The type of a redis node in the cluster. NodeType determines the
    /// underlying machine-type of a redis node.
    #[prost(enumeration = "NodeType", tag = "19")]
    pub node_type: i32,
    /// Optional. Persistence config (RDB, AOF) for the cluster.
    #[prost(message, optional, tag = "20")]
    pub persistence_config: ::core::option::Option<ClusterPersistenceConfig>,
    /// Optional. Key/Value pairs of customer overrides for mutable Redis Configs
    #[prost(map = "string, string", tag = "21")]
    pub redis_configs: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Output only. Precise value of redis memory size in GB for the entire
    /// cluster.
    #[prost(double, optional, tag = "22")]
    pub precise_size_gb: ::core::option::Option<f64>,
    /// Optional. This config will be used to determine how the customer wants us
    /// to distribute cluster resources within the region.
    #[prost(message, optional, tag = "23")]
    pub zone_distribution_config: ::core::option::Option<ZoneDistributionConfig>,
    /// Optional. Cross cluster replication config.
    #[prost(message, optional, tag = "24")]
    pub cross_cluster_replication_config: ::core::option::Option<
        CrossClusterReplicationConfig,
    >,
    /// Optional. The delete operation will fail when the value is set to true.
    #[prost(bool, optional, tag = "25")]
    pub deletion_protection_enabled: ::core::option::Option<bool>,
    /// Optional. ClusterMaintenancePolicy determines when to allow or deny
    /// updates.
    #[prost(message, optional, tag = "26")]
    pub maintenance_policy: ::core::option::Option<ClusterMaintenancePolicy>,
    /// Output only. ClusterMaintenanceSchedule Output only Published maintenance
    /// schedule.
    #[prost(message, optional, tag = "27")]
    pub maintenance_schedule: ::core::option::Option<ClusterMaintenanceSchedule>,
    /// Output only. Service attachment details to configure Psc connections
    #[prost(message, repeated, tag = "30")]
    pub psc_service_attachments: ::prost::alloc::vec::Vec<PscServiceAttachment>,
    /// Optional. A list of cluster enpoints.
    #[prost(message, repeated, tag = "36")]
    pub cluster_endpoints: ::prost::alloc::vec::Vec<ClusterEndpoint>,
    /// Optional. Output only. The backup collection full resource name. Example:
    /// projects/{project}/locations/{location}/backupCollections/{collection}
    #[prost(string, optional, tag = "39")]
    pub backup_collection: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. The KMS key used to encrypt the at-rest data of the cluster.
    #[prost(string, optional, tag = "40")]
    pub kms_key: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. The automated backup config for the cluster.
    #[prost(message, optional, tag = "42")]
    pub automated_backup_config: ::core::option::Option<AutomatedBackupConfig>,
    /// Output only. Encryption information of the data at rest of the cluster.
    #[prost(message, optional, tag = "43")]
    pub encryption_info: ::core::option::Option<EncryptionInfo>,
    /// Optional. Server CA mode for the cluster.
    #[prost(enumeration = "ServerCaMode", optional, tag = "53")]
    pub server_ca_mode: ::core::option::Option<i32>,
    /// Optional. Customer-managed CA pool for the cluster. Only applicable for
    /// BYOCA i.e. if server_ca_mode is SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA.
    /// Format: "projects/{project}/locations/{region}/caPools/{ca_pool}".
    #[prost(string, optional, tag = "54")]
    pub server_ca_pool: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. Input only. Rotate the server certificates.
    #[prost(bool, optional, tag = "55")]
    pub rotate_server_certificate: ::core::option::Option<bool>,
    /// The source to import from.
    #[prost(oneof = "cluster::ImportSources", tags = "34, 35")]
    pub import_sources: ::core::option::Option<cluster::ImportSources>,
}
/// Nested message and enum types in `Cluster`.
pub mod cluster {
    /// Represents additional information about the state of the cluster.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct StateInfo {
        #[prost(oneof = "state_info::Info", tags = "1")]
        pub info: ::core::option::Option<state_info::Info>,
    }
    /// Nested message and enum types in `StateInfo`.
    pub mod state_info {
        /// Represents information about an updating cluster.
        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct UpdateInfo {
            /// Target number of shards for redis cluster
            #[prost(int32, optional, tag = "1")]
            pub target_shard_count: ::core::option::Option<i32>,
            /// Target number of replica nodes per shard.
            #[prost(int32, optional, tag = "2")]
            pub target_replica_count: ::core::option::Option<i32>,
        }
        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum Info {
            /// Describes ongoing update on the cluster when cluster state is UPDATING.
            #[prost(message, tag = "1")]
            UpdateInfo(UpdateInfo),
        }
    }
    /// Backups stored in Cloud Storage buckets.
    /// The Cloud Storage buckets need to be the same region as the clusters.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct GcsBackupSource {
        /// Optional. URIs of the GCS objects to import.
        /// Example: gs://bucket1/object1, gs://bucket2/folder2/object2
        #[prost(string, repeated, tag = "1")]
        pub uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    }
    /// Backups that generated and managed by memorystore.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct ManagedBackupSource {
        /// Optional. Example:
        /// //redis.googleapis.com/projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup}
        /// A shorter version (without the prefix) of the backup name is also
        /// supported, like
        /// projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup_id}
        /// In this case, it assumes the backup is under redis.googleapis.com.
        #[prost(string, tag = "1")]
        pub backup: ::prost::alloc::string::String,
    }
    /// Represents the different states of a Redis cluster.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Not set.
        Unspecified = 0,
        /// Redis cluster is being created.
        Creating = 1,
        /// Redis cluster has been created and is fully usable.
        Active = 2,
        /// Redis cluster configuration is being updated.
        Updating = 3,
        /// Redis cluster is being deleted.
        Deleting = 4,
    }
    impl State {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "STATE_UNSPECIFIED",
                Self::Creating => "CREATING",
                Self::Active => "ACTIVE",
                Self::Updating => "UPDATING",
                Self::Deleting => "DELETING",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "CREATING" => Some(Self::Creating),
                "ACTIVE" => Some(Self::Active),
                "UPDATING" => Some(Self::Updating),
                "DELETING" => Some(Self::Deleting),
                _ => None,
            }
        }
    }
    /// The source to import from.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum ImportSources {
        /// Optional. Backups stored in Cloud Storage buckets.
        /// The Cloud Storage buckets need to be the same region as the clusters.
        /// Read permission is required to import from the provided Cloud Storage
        /// objects.
        #[prost(message, tag = "34")]
        GcsSource(GcsBackupSource),
        /// Optional. Backups generated and managed by memorystore service.
        #[prost(message, tag = "35")]
        ManagedBackupSource(ManagedBackupSource),
    }
}
/// The automated backup config for a cluster.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AutomatedBackupConfig {
    /// Optional. The automated backup mode. If the mode is disabled, the other
    /// fields will be ignored.
    #[prost(enumeration = "automated_backup_config::AutomatedBackupMode", tag = "1")]
    pub automated_backup_mode: i32,
    /// Optional. How long to keep automated backups before the backups are
    /// deleted. The value should be between 1 day and 365 days. If not specified,
    /// the default value is 35 days.
    #[prost(message, optional, tag = "3")]
    pub retention: ::core::option::Option<::prost_types::Duration>,
    /// The schedule of automated backups.
    #[prost(oneof = "automated_backup_config::Schedule", tags = "2")]
    pub schedule: ::core::option::Option<automated_backup_config::Schedule>,
}
/// Nested message and enum types in `AutomatedBackupConfig`.
pub mod automated_backup_config {
    /// This schedule allows the backup to be triggered at a fixed frequency
    /// (currently only daily is supported).
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct FixedFrequencySchedule {
        /// Required. The start time of every automated backup in UTC. It must be set
        /// to the start of an hour. This field is required.
        #[prost(message, optional, tag = "2")]
        pub start_time: ::core::option::Option<
            super::super::super::super::super::r#type::TimeOfDay,
        >,
    }
    /// The automated backup mode.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum AutomatedBackupMode {
        /// Default value. Automated backup config is not specified.
        Unspecified = 0,
        /// Automated backup config disabled.
        Disabled = 1,
        /// Automated backup config enabled.
        Enabled = 2,
    }
    impl AutomatedBackupMode {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "AUTOMATED_BACKUP_MODE_UNSPECIFIED",
                Self::Disabled => "DISABLED",
                Self::Enabled => "ENABLED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "AUTOMATED_BACKUP_MODE_UNSPECIFIED" => Some(Self::Unspecified),
                "DISABLED" => Some(Self::Disabled),
                "ENABLED" => Some(Self::Enabled),
                _ => None,
            }
        }
    }
    /// The schedule of automated backups.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Schedule {
        /// Optional. Trigger automated backups at a fixed frequency.
        #[prost(message, tag = "2")]
        FixedFrequencySchedule(FixedFrequencySchedule),
    }
}
/// BackupCollection of a cluster.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BackupCollection {
    /// Identifier. Full resource path of the backup collection.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The cluster uid of the backup collection.
    #[prost(string, tag = "3")]
    pub cluster_uid: ::prost::alloc::string::String,
    /// Output only. The full resource path of the cluster the backup collection
    /// belongs to. Example:
    /// projects/{project}/locations/{location}/clusters/{cluster}
    #[prost(string, tag = "4")]
    pub cluster: ::prost::alloc::string::String,
    /// Output only. The KMS key used to encrypt the backups under this backup
    /// collection.
    #[prost(string, tag = "5")]
    pub kms_key: ::prost::alloc::string::String,
    /// Output only. System assigned unique identifier of the backup collection.
    #[prost(string, tag = "6")]
    pub uid: ::prost::alloc::string::String,
}
/// Backup of a cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Backup {
    /// Identifier. Full resource path of the backup. the last part of the name is
    /// the backup id with the following format: \[YYYYMMDDHHMMSS\]\_\[Shorted Cluster
    /// UID\] OR customer specified while backup cluster. Example:
    /// 20240515123000_1234
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The time when the backup was created.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Cluster resource path of this backup.
    #[prost(string, tag = "3")]
    pub cluster: ::prost::alloc::string::String,
    /// Output only. Cluster uid of this backup.
    #[prost(string, tag = "4")]
    pub cluster_uid: ::prost::alloc::string::String,
    /// Output only. Total size of the backup in bytes.
    #[prost(int64, tag = "5")]
    pub total_size_bytes: i64,
    /// Output only. The time when the backup will expire.
    #[prost(message, optional, tag = "6")]
    pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. redis-7.2, valkey-7.5
    #[prost(string, tag = "7")]
    pub engine_version: ::prost::alloc::string::String,
    /// Output only. List of backup files of the backup.
    #[prost(message, repeated, tag = "8")]
    pub backup_files: ::prost::alloc::vec::Vec<BackupFile>,
    /// Output only. Node type of the cluster.
    #[prost(enumeration = "NodeType", tag = "9")]
    pub node_type: i32,
    /// Output only. Number of replicas for the cluster.
    #[prost(int32, tag = "10")]
    pub replica_count: i32,
    /// Output only. Number of shards for the cluster.
    #[prost(int32, tag = "11")]
    pub shard_count: i32,
    /// Output only. Type of the backup.
    #[prost(enumeration = "backup::BackupType", tag = "12")]
    pub backup_type: i32,
    /// Output only. State of the backup.
    #[prost(enumeration = "backup::State", tag = "13")]
    pub state: i32,
    /// Output only. Encryption information of the backup.
    #[prost(message, optional, tag = "14")]
    pub encryption_info: ::core::option::Option<EncryptionInfo>,
    /// Output only. System assigned unique identifier of the backup.
    #[prost(string, tag = "15")]
    pub uid: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Backup`.
pub mod backup {
    /// Type of the backup.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum BackupType {
        /// The default value, not set.
        Unspecified = 0,
        /// On-demand backup.
        OnDemand = 1,
        /// Automated backup.
        Automated = 2,
    }
    impl BackupType {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "BACKUP_TYPE_UNSPECIFIED",
                Self::OnDemand => "ON_DEMAND",
                Self::Automated => "AUTOMATED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "BACKUP_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "ON_DEMAND" => Some(Self::OnDemand),
                "AUTOMATED" => Some(Self::Automated),
                _ => None,
            }
        }
    }
    /// State of the backup.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The default value, not set.
        Unspecified = 0,
        /// The backup is being created.
        Creating = 1,
        /// The backup is active to be used.
        Active = 2,
        /// The backup is being deleted.
        Deleting = 3,
        /// The backup is currently suspended due to reasons like project deletion,
        /// billing account closure, etc.
        Suspended = 4,
    }
    impl State {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "STATE_UNSPECIFIED",
                Self::Creating => "CREATING",
                Self::Active => "ACTIVE",
                Self::Deleting => "DELETING",
                Self::Suspended => "SUSPENDED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "CREATING" => Some(Self::Creating),
                "ACTIVE" => Some(Self::Active),
                "DELETING" => Some(Self::Deleting),
                "SUSPENDED" => Some(Self::Suspended),
                _ => None,
            }
        }
    }
}
/// Backup is consisted of multiple backup files.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BackupFile {
    /// Output only. e.g: <shard-id>.rdb
    #[prost(string, tag = "1")]
    pub file_name: ::prost::alloc::string::String,
    /// Output only. Size of the backup file in bytes.
    #[prost(int64, tag = "2")]
    pub size_bytes: i64,
    /// Output only. The time when the backup file was created.
    #[prost(message, optional, tag = "3")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Configuration of a service attachment of the cluster, for creating PSC
/// connections.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PscServiceAttachment {
    /// Output only. Service attachment URI which your self-created PscConnection
    /// should use as target
    #[prost(string, tag = "1")]
    pub service_attachment: ::prost::alloc::string::String,
    /// Output only. Type of a PSC connection targeting this service attachment.
    #[prost(enumeration = "ConnectionType", tag = "3")]
    pub connection_type: i32,
}
/// Cross cluster replication config.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossClusterReplicationConfig {
    /// The role of the cluster in cross cluster replication.
    #[prost(enumeration = "cross_cluster_replication_config::ClusterRole", tag = "1")]
    pub cluster_role: i32,
    /// Details of the primary cluster that is used as the replication source for
    /// this secondary cluster.
    ///
    /// This field is only set for a secondary cluster.
    #[prost(message, optional, tag = "2")]
    pub primary_cluster: ::core::option::Option<
        cross_cluster_replication_config::RemoteCluster,
    >,
    /// List of secondary clusters that are replicating from this primary cluster.
    ///
    /// This field is only set for a primary cluster.
    #[prost(message, repeated, tag = "3")]
    pub secondary_clusters: ::prost::alloc::vec::Vec<
        cross_cluster_replication_config::RemoteCluster,
    >,
    /// Output only. The last time cross cluster replication config was updated.
    #[prost(message, optional, tag = "4")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. An output only view of all the member clusters participating
    /// in the cross cluster replication. This view will be provided by every
    /// member cluster irrespective of its cluster role(primary or secondary).
    ///
    /// A primary cluster can provide information about all the secondary clusters
    /// replicating from it. However, a secondary cluster only knows about the
    /// primary cluster from which it is replicating. However, for scenarios, where
    /// the primary cluster is unavailable(e.g. regional outage), a GetCluster
    /// request can be sent to any other member cluster and this field will list
    /// all the member clusters participating in cross cluster replication.
    #[prost(message, optional, tag = "5")]
    pub membership: ::core::option::Option<cross_cluster_replication_config::Membership>,
}
/// Nested message and enum types in `CrossClusterReplicationConfig`.
pub mod cross_cluster_replication_config {
    /// Details of the remote cluster associated with this cluster in a cross
    /// cluster replication setup.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct RemoteCluster {
        /// The full resource path of the remote cluster in
        /// the format: projects/<project>/locations/<region>/clusters/<cluster-id>
        #[prost(string, tag = "1")]
        pub cluster: ::prost::alloc::string::String,
        /// Output only. The unique identifier of the remote cluster.
        #[prost(string, tag = "2")]
        pub uid: ::prost::alloc::string::String,
    }
    /// An output only view of all the member clusters participating in the cross
    /// cluster replication.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Membership {
        /// Output only. The primary cluster that acts as the source of replication
        /// for the secondary clusters.
        #[prost(message, optional, tag = "1")]
        pub primary_cluster: ::core::option::Option<RemoteCluster>,
        /// Output only. The list of secondary clusters replicating from the primary
        /// cluster.
        #[prost(message, repeated, tag = "2")]
        pub secondary_clusters: ::prost::alloc::vec::Vec<RemoteCluster>,
    }
    /// The role of the cluster in cross cluster replication.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum ClusterRole {
        /// Cluster role is not set.
        /// The behavior is equivalent to NONE.
        Unspecified = 0,
        /// This cluster does not participate in cross cluster replication. It is an
        /// independent cluster and does not replicate to or from any other clusters.
        None = 1,
        /// A cluster that allows both reads and writes. Any data written to this
        /// cluster is also replicated to the attached secondary clusters.
        Primary = 2,
        /// A cluster that allows only reads and replicates data from a primary
        /// cluster.
        Secondary = 3,
    }
    impl ClusterRole {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "CLUSTER_ROLE_UNSPECIFIED",
                Self::None => "NONE",
                Self::Primary => "PRIMARY",
                Self::Secondary => "SECONDARY",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CLUSTER_ROLE_UNSPECIFIED" => Some(Self::Unspecified),
                "NONE" => Some(Self::None),
                "PRIMARY" => Some(Self::Primary),
                "SECONDARY" => Some(Self::Secondary),
                _ => None,
            }
        }
    }
}
/// Maintenance policy per cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterMaintenancePolicy {
    /// Output only. The time when the policy was created i.e. Maintenance Window
    /// or Deny Period was assigned.
    #[prost(message, optional, tag = "1")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the policy was updated i.e. Maintenance Window
    /// or Deny Period was updated.
    #[prost(message, optional, tag = "2")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Maintenance window that is applied to resources covered by this
    /// policy. Minimum 1. For the current version, the maximum number of
    /// weekly_maintenance_window is expected to be one.
    #[prost(message, repeated, tag = "3")]
    pub weekly_maintenance_window: ::prost::alloc::vec::Vec<
        ClusterWeeklyMaintenanceWindow,
    >,
}
/// Time window specified for weekly operations.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ClusterWeeklyMaintenanceWindow {
    /// Allows to define schedule that runs specified day of the week.
    #[prost(enumeration = "super::super::super::super::r#type::DayOfWeek", tag = "1")]
    pub day: i32,
    /// Start time of the window in UTC.
    #[prost(message, optional, tag = "2")]
    pub start_time: ::core::option::Option<
        super::super::super::super::r#type::TimeOfDay,
    >,
}
/// Upcoming maitenance schedule.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ClusterMaintenanceSchedule {
    /// Output only. The start time of any upcoming scheduled maintenance for this
    /// instance.
    #[prost(message, optional, tag = "1")]
    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The end time of any upcoming scheduled maintenance for this
    /// instance.
    #[prost(message, optional, tag = "2")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PscConfig {
    /// Required. The network where the IP address of the discovery endpoint will
    /// be reserved, in the form of
    /// projects/{network_project}/global/networks/{network_id}.
    #[prost(string, tag = "2")]
    pub network: ::prost::alloc::string::String,
}
/// Endpoints on each network, for Redis clients to connect to the cluster.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DiscoveryEndpoint {
    /// Output only. Address of the exposed Redis endpoint used by clients to
    /// connect to the service. The address could be either IP or hostname.
    #[prost(string, tag = "1")]
    pub address: ::prost::alloc::string::String,
    /// Output only. The port number of the exposed Redis endpoint.
    #[prost(int32, tag = "2")]
    pub port: i32,
    /// Output only. Customer configuration for where the endpoint is created and
    /// accessed from.
    #[prost(message, optional, tag = "3")]
    pub psc_config: ::core::option::Option<PscConfig>,
}
/// Details of consumer resources in a PSC connection.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PscConnection {
    /// Required. The PSC connection id of the forwarding rule connected to the
    /// service attachment.
    #[prost(string, tag = "1")]
    pub psc_connection_id: ::prost::alloc::string::String,
    /// Required. The IP allocated on the consumer network for the PSC forwarding
    /// rule.
    #[prost(string, tag = "2")]
    pub address: ::prost::alloc::string::String,
    /// Required. The URI of the consumer side forwarding rule.
    /// Example:
    /// projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
    #[prost(string, tag = "3")]
    pub forwarding_rule: ::prost::alloc::string::String,
    /// Optional. Project ID of the consumer project where the forwarding rule is
    /// created in.
    #[prost(string, tag = "4")]
    pub project_id: ::prost::alloc::string::String,
    /// Required. The consumer network where the IP address resides, in the form of
    /// projects/{project_id}/global/networks/{network_id}.
    #[prost(string, tag = "5")]
    pub network: ::prost::alloc::string::String,
    /// Required. The service attachment which is the target of the PSC connection,
    /// in the form of
    /// projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.
    #[prost(string, tag = "6")]
    pub service_attachment: ::prost::alloc::string::String,
    /// Output only. The status of the PSC connection.
    /// Please note that this value is updated periodically.
    /// To get the latest status of a PSC connection, follow
    /// <https://cloud.google.com/vpc/docs/configure-private-service-connect-services#endpoint-details.>
    #[prost(enumeration = "PscConnectionStatus", tag = "8")]
    pub psc_connection_status: i32,
    /// Output only. Type of the PSC connection.
    #[prost(enumeration = "ConnectionType", tag = "10")]
    pub connection_type: i32,
}
/// ClusterEndpoint consists of PSC connections that are created
/// as a group in each VPC network for accessing the cluster. In each group,
/// there shall be one connection for each service attachment in the cluster.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterEndpoint {
    /// A group of PSC connections. They are created in the same VPC network, one
    /// for each service attachment in the cluster.
    #[prost(message, repeated, tag = "1")]
    pub connections: ::prost::alloc::vec::Vec<ConnectionDetail>,
}
/// Detailed information of each PSC connection.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConnectionDetail {
    /// A PSC connection to a cluster could either be created through Service
    /// Connectivity Automation (auto-registered connection) during the cluster
    /// creation, or it could be created by customer themselves (user-registered
    /// connection).
    #[prost(oneof = "connection_detail::Connection", tags = "1, 2")]
    pub connection: ::core::option::Option<connection_detail::Connection>,
}
/// Nested message and enum types in `ConnectionDetail`.
pub mod connection_detail {
    /// A PSC connection to a cluster could either be created through Service
    /// Connectivity Automation (auto-registered connection) during the cluster
    /// creation, or it could be created by customer themselves (user-registered
    /// connection).
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Connection {
        /// Detailed information of a PSC connection that is created through
        /// service connectivity automation.
        #[prost(message, tag = "1")]
        PscAutoConnection(super::PscAutoConnection),
        /// Detailed information of a PSC connection that is created by the customer
        /// who owns the cluster.
        #[prost(message, tag = "2")]
        PscConnection(super::PscConnection),
    }
}
/// Details of consumer resources in a PSC connection that is created through
/// Service Connectivity Automation.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PscAutoConnection {
    /// Output only. The PSC connection id of the forwarding rule connected to the
    /// service attachment.
    #[prost(string, tag = "1")]
    pub psc_connection_id: ::prost::alloc::string::String,
    /// Output only. The IP allocated on the consumer network for the PSC
    /// forwarding rule.
    #[prost(string, tag = "2")]
    pub address: ::prost::alloc::string::String,
    /// Output only. The URI of the consumer side forwarding rule.
    /// Example:
    /// projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.
    #[prost(string, tag = "3")]
    pub forwarding_rule: ::prost::alloc::string::String,
    /// Required. The consumer project_id where the forwarding rule is created
    /// from.
    #[prost(string, tag = "4")]
    pub project_id: ::prost::alloc::string::String,
    /// Required. The consumer network where the IP address resides, in the form of
    /// projects/{project_id}/global/networks/{network_id}.
    #[prost(string, tag = "5")]
    pub network: ::prost::alloc::string::String,
    /// Output only. The service attachment which is the target of the PSC
    /// connection, in the form of
    /// projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.
    #[prost(string, tag = "6")]
    pub service_attachment: ::prost::alloc::string::String,
    /// Output only. The status of the PSC connection.
    /// Please note that this value is updated periodically.
    /// Please use Private Service Connect APIs for the latest status.
    #[prost(enumeration = "PscConnectionStatus", tag = "8")]
    pub psc_connection_status: i32,
    /// Output only. Type of the PSC connection.
    #[prost(enumeration = "ConnectionType", tag = "9")]
    pub connection_type: i32,
}
/// Shared regional certificate authority
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SharedRegionalCertificateAuthority {
    /// Identifier. Unique name of the resource in this scope including project and
    /// location using the form:
    /// `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Server ca information.
    #[prost(oneof = "shared_regional_certificate_authority::ServerCa", tags = "2")]
    pub server_ca: ::core::option::Option<
        shared_regional_certificate_authority::ServerCa,
    >,
}
/// Nested message and enum types in `SharedRegionalCertificateAuthority`.
pub mod shared_regional_certificate_authority {
    /// CA certificate chains for redis managed server authentication.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RegionalManagedCertificateAuthority {
        /// The PEM encoded CA certificate chains for redis managed
        /// server authentication
        #[prost(message, repeated, tag = "1")]
        pub ca_certs: ::prost::alloc::vec::Vec<
            regional_managed_certificate_authority::RegionalCertChain,
        >,
    }
    /// Nested message and enum types in `RegionalManagedCertificateAuthority`.
    pub mod regional_managed_certificate_authority {
        /// The certificates that form the CA chain, from leaf to root order.
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct RegionalCertChain {
            /// The certificates that form the CA chain, from leaf to root order.
            #[prost(string, repeated, tag = "1")]
            pub certificates: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        }
    }
    /// Server ca information.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum ServerCa {
        /// CA certificate chains for redis managed server authentication.
        #[prost(message, tag = "2")]
        ManagedServerCa(RegionalManagedCertificateAuthority),
    }
}
/// Request for
/// \[GetSharedRegionalCertificateAuthority\]\[CloudRedis.GetSharedRegionalCertificateAuthority\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetSharedRegionalCertificateAuthorityRequest {
    /// Required. Regional certificate authority resource name using the form:
    /// `projects/{project_id}/locations/{location_id}/sharedRegionalCertificateAuthority`
    /// where `location_id` refers to a Google Cloud region.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Pre-defined metadata fields.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OperationMetadata {
    /// Output only. The time the operation was created.
    #[prost(message, optional, tag = "1")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time the operation finished running.
    #[prost(message, optional, tag = "2")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Server-defined resource path for the target of the operation.
    #[prost(string, tag = "3")]
    pub target: ::prost::alloc::string::String,
    /// Output only. Name of the verb executed by the operation.
    #[prost(string, tag = "4")]
    pub verb: ::prost::alloc::string::String,
    /// Output only. Human-readable status of the operation, if any.
    #[prost(string, tag = "5")]
    pub status_message: ::prost::alloc::string::String,
    /// Output only. Identifies whether the user has requested cancellation
    /// of the operation. Operations that have successfully been cancelled
    /// have \[Operation.error\]\[\] value with a
    /// \[google.rpc.Status.code\]\[google.rpc.Status.code\] of 1, corresponding to
    /// `Code.CANCELLED`.
    #[prost(bool, tag = "6")]
    pub requested_cancellation: bool,
    /// Output only. API version used to start the operation.
    #[prost(string, tag = "7")]
    pub api_version: ::prost::alloc::string::String,
}
/// Redis cluster certificate authority
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateAuthority {
    /// Identifier. Unique name of the resource in this scope including project,
    /// location and cluster using the form:
    /// `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    /// server ca information
    #[prost(oneof = "certificate_authority::ServerCa", tags = "1")]
    pub server_ca: ::core::option::Option<certificate_authority::ServerCa>,
}
/// Nested message and enum types in `CertificateAuthority`.
pub mod certificate_authority {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ManagedCertificateAuthority {
        /// The PEM encoded CA certificate chains for redis managed
        /// server authentication
        #[prost(message, repeated, tag = "1")]
        pub ca_certs: ::prost::alloc::vec::Vec<managed_certificate_authority::CertChain>,
    }
    /// Nested message and enum types in `ManagedCertificateAuthority`.
    pub mod managed_certificate_authority {
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct CertChain {
            /// The certificates that form the CA chain, from leaf to root order.
            #[prost(string, repeated, tag = "1")]
            pub certificates: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        }
    }
    /// server ca information
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum ServerCa {
        #[prost(message, tag = "1")]
        ManagedServerCa(ManagedCertificateAuthority),
    }
}
/// Configuration of the persistence functionality.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ClusterPersistenceConfig {
    /// Optional. The mode of persistence.
    #[prost(enumeration = "cluster_persistence_config::PersistenceMode", tag = "1")]
    pub mode: i32,
    /// Optional. RDB configuration. This field will be ignored if mode is not RDB.
    #[prost(message, optional, tag = "2")]
    pub rdb_config: ::core::option::Option<cluster_persistence_config::RdbConfig>,
    /// Optional. AOF configuration. This field will be ignored if mode is not AOF.
    #[prost(message, optional, tag = "3")]
    pub aof_config: ::core::option::Option<cluster_persistence_config::AofConfig>,
}
/// Nested message and enum types in `ClusterPersistenceConfig`.
pub mod cluster_persistence_config {
    /// Configuration of the RDB based persistence.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct RdbConfig {
        /// Optional. Period between RDB snapshots.
        #[prost(enumeration = "rdb_config::SnapshotPeriod", tag = "1")]
        pub rdb_snapshot_period: i32,
        /// Optional. The time that the first snapshot was/will be attempted, and to
        /// which future snapshots will be aligned. If not provided, the current time
        /// will be used.
        #[prost(message, optional, tag = "2")]
        pub rdb_snapshot_start_time: ::core::option::Option<::prost_types::Timestamp>,
    }
    /// Nested message and enum types in `RDBConfig`.
    pub mod rdb_config {
        /// Available snapshot periods.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum SnapshotPeriod {
            /// Not set.
            Unspecified = 0,
            /// One hour.
            OneHour = 1,
            /// Six hours.
            SixHours = 2,
            /// Twelve hours.
            TwelveHours = 3,
            /// Twenty four hours.
            TwentyFourHours = 4,
        }
        impl SnapshotPeriod {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    Self::Unspecified => "SNAPSHOT_PERIOD_UNSPECIFIED",
                    Self::OneHour => "ONE_HOUR",
                    Self::SixHours => "SIX_HOURS",
                    Self::TwelveHours => "TWELVE_HOURS",
                    Self::TwentyFourHours => "TWENTY_FOUR_HOURS",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "SNAPSHOT_PERIOD_UNSPECIFIED" => Some(Self::Unspecified),
                    "ONE_HOUR" => Some(Self::OneHour),
                    "SIX_HOURS" => Some(Self::SixHours),
                    "TWELVE_HOURS" => Some(Self::TwelveHours),
                    "TWENTY_FOUR_HOURS" => Some(Self::TwentyFourHours),
                    _ => None,
                }
            }
        }
    }
    /// Configuration of the AOF based persistence.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct AofConfig {
        /// Optional. fsync configuration.
        #[prost(enumeration = "aof_config::AppendFsync", tag = "1")]
        pub append_fsync: i32,
    }
    /// Nested message and enum types in `AOFConfig`.
    pub mod aof_config {
        /// Available fsync modes.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum AppendFsync {
            /// Not set. Default: EVERYSEC
            Unspecified = 0,
            /// Never fsync. Normally Linux will flush data every 30 seconds with this
            /// configuration, but it's up to the kernel's exact tuning.
            No = 1,
            /// fsync every second. Fast enough, and you may lose 1 second of data if
            /// there is a disaster
            Everysec = 2,
            /// fsync every time new write commands are appended to the AOF. It has the
            /// best data loss protection at the cost of performance
            Always = 3,
        }
        impl AppendFsync {
            /// String value of the enum field names used in the ProtoBuf definition.
            ///
            /// The values are not transformed in any way and thus are considered stable
            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
            pub fn as_str_name(&self) -> &'static str {
                match self {
                    Self::Unspecified => "APPEND_FSYNC_UNSPECIFIED",
                    Self::No => "NO",
                    Self::Everysec => "EVERYSEC",
                    Self::Always => "ALWAYS",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "APPEND_FSYNC_UNSPECIFIED" => Some(Self::Unspecified),
                    "NO" => Some(Self::No),
                    "EVERYSEC" => Some(Self::Everysec),
                    "ALWAYS" => Some(Self::Always),
                    _ => None,
                }
            }
        }
    }
    /// Available persistence modes.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum PersistenceMode {
        /// Not set.
        Unspecified = 0,
        /// Persistence is disabled, and any snapshot data is deleted.
        Disabled = 1,
        /// RDB based persistence is enabled.
        Rdb = 2,
        /// AOF based persistence is enabled.
        Aof = 3,
    }
    impl PersistenceMode {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "PERSISTENCE_MODE_UNSPECIFIED",
                Self::Disabled => "DISABLED",
                Self::Rdb => "RDB",
                Self::Aof => "AOF",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "PERSISTENCE_MODE_UNSPECIFIED" => Some(Self::Unspecified),
                "DISABLED" => Some(Self::Disabled),
                "RDB" => Some(Self::Rdb),
                "AOF" => Some(Self::Aof),
                _ => None,
            }
        }
    }
}
/// Zone distribution config for allocation of cluster resources.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ZoneDistributionConfig {
    /// Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not
    /// specified.
    #[prost(enumeration = "zone_distribution_config::ZoneDistributionMode", tag = "1")]
    pub mode: i32,
    /// Optional. When SINGLE ZONE distribution is selected, zone field would be
    /// used to allocate all resources in that zone. This is not applicable to
    /// MULTI_ZONE, and would be ignored for MULTI_ZONE clusters.
    #[prost(string, tag = "2")]
    pub zone: ::prost::alloc::string::String,
}
/// Nested message and enum types in `ZoneDistributionConfig`.
pub mod zone_distribution_config {
    /// Defines various modes of zone distribution.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum ZoneDistributionMode {
        /// Not Set. Default: MULTI_ZONE
        Unspecified = 0,
        /// Distribute all resources across 3 zones picked at random, within the
        /// region.
        MultiZone = 1,
        /// Distribute all resources in a single zone. The zone field must be
        /// specified, when this mode is selected.
        SingleZone = 2,
    }
    impl ZoneDistributionMode {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "ZONE_DISTRIBUTION_MODE_UNSPECIFIED",
                Self::MultiZone => "MULTI_ZONE",
                Self::SingleZone => "SINGLE_ZONE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "ZONE_DISTRIBUTION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
                "MULTI_ZONE" => Some(Self::MultiZone),
                "SINGLE_ZONE" => Some(Self::SingleZone),
                _ => None,
            }
        }
    }
}
/// Request for rescheduling a cluster maintenance.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RescheduleClusterMaintenanceRequest {
    /// Required. Redis Cluster instance resource name using the form:
    /// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
    /// where `location_id` refers to a GCP region.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
    /// well.
    #[prost(
        enumeration = "reschedule_cluster_maintenance_request::RescheduleType",
        tag = "2"
    )]
    pub reschedule_type: i32,
    /// Optional. Timestamp when the maintenance shall be rescheduled to if
    /// reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for
    /// example `2012-11-15T16:19:00.094Z`.
    #[prost(message, optional, tag = "3")]
    pub schedule_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Nested message and enum types in `RescheduleClusterMaintenanceRequest`.
pub mod reschedule_cluster_maintenance_request {
    /// Reschedule options.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum RescheduleType {
        /// Not set.
        Unspecified = 0,
        /// If the user wants to schedule the maintenance to happen now.
        Immediate = 1,
        /// If the user wants to reschedule the maintenance to a specific time.
        SpecificTime = 3,
    }
    impl RescheduleType {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "RESCHEDULE_TYPE_UNSPECIFIED",
                Self::Immediate => "IMMEDIATE",
                Self::SpecificTime => "SPECIFIC_TIME",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "RESCHEDULE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "IMMEDIATE" => Some(Self::Immediate),
                "SPECIFIC_TIME" => Some(Self::SpecificTime),
                _ => None,
            }
        }
    }
}
/// EncryptionInfo describes the encryption information of a cluster or a backup.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EncryptionInfo {
    /// Output only. Type of encryption.
    #[prost(enumeration = "encryption_info::Type", tag = "1")]
    pub encryption_type: i32,
    /// Output only. KMS key versions that are being used to protect the data
    /// at-rest.
    #[prost(string, repeated, tag = "2")]
    pub kms_key_versions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Output only. The state of the primary version of the KMS key perceived by
    /// the system. This field is not populated in backups.
    #[prost(enumeration = "encryption_info::KmsKeyState", tag = "3")]
    pub kms_key_primary_state: i32,
    /// Output only. The most recent time when the encryption info was updated.
    #[prost(message, optional, tag = "4")]
    pub last_update_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Nested message and enum types in `EncryptionInfo`.
pub mod encryption_info {
    /// Possible encryption types.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// Encryption type not specified. Defaults to GOOGLE_DEFAULT_ENCRYPTION.
        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.
        GoogleDefaultEncryption = 1,
        /// The data is encrypted at rest with a key that is managed by the customer.
        /// KMS key versions will be populated.
        CustomerManagedEncryption = 2,
    }
    impl Type {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "TYPE_UNSPECIFIED",
                Self::GoogleDefaultEncryption => "GOOGLE_DEFAULT_ENCRYPTION",
                Self::CustomerManagedEncryption => "CUSTOMER_MANAGED_ENCRYPTION",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "GOOGLE_DEFAULT_ENCRYPTION" => Some(Self::GoogleDefaultEncryption),
                "CUSTOMER_MANAGED_ENCRYPTION" => Some(Self::CustomerManagedEncryption),
                _ => None,
            }
        }
    }
    /// The state of the KMS key perceived by the system. Refer to the public
    /// documentation for the impact of each state.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum KmsKeyState {
        /// The default value. This value is unused.
        Unspecified = 0,
        /// The KMS key is enabled and correctly configured.
        Enabled = 1,
        /// Permission denied on the KMS key.
        PermissionDenied = 2,
        /// The KMS key is disabled.
        Disabled = 3,
        /// The KMS key is destroyed.
        Destroyed = 4,
        /// The KMS key is scheduled to be destroyed.
        DestroyScheduled = 5,
        /// The EKM key is unreachable.
        EkmKeyUnreachableDetected = 6,
        /// Billing is disabled for the project.
        BillingDisabled = 7,
        /// All other unknown failures.
        UnknownFailure = 8,
    }
    impl KmsKeyState {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "KMS_KEY_STATE_UNSPECIFIED",
                Self::Enabled => "ENABLED",
                Self::PermissionDenied => "PERMISSION_DENIED",
                Self::Disabled => "DISABLED",
                Self::Destroyed => "DESTROYED",
                Self::DestroyScheduled => "DESTROY_SCHEDULED",
                Self::EkmKeyUnreachableDetected => "EKM_KEY_UNREACHABLE_DETECTED",
                Self::BillingDisabled => "BILLING_DISABLED",
                Self::UnknownFailure => "UNKNOWN_FAILURE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "KMS_KEY_STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "ENABLED" => Some(Self::Enabled),
                "PERMISSION_DENIED" => Some(Self::PermissionDenied),
                "DISABLED" => Some(Self::Disabled),
                "DESTROYED" => Some(Self::Destroyed),
                "DESTROY_SCHEDULED" => Some(Self::DestroyScheduled),
                "EKM_KEY_UNREACHABLE_DETECTED" => Some(Self::EkmKeyUnreachableDetected),
                "BILLING_DISABLED" => Some(Self::BillingDisabled),
                "UNKNOWN_FAILURE" => Some(Self::UnknownFailure),
                _ => None,
            }
        }
    }
}
/// Status of the PSC connection.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PscConnectionStatus {
    /// PSC connection status is not specified.
    Unspecified = 0,
    /// The connection is active
    Active = 1,
    /// Connection not found
    NotFound = 2,
}
impl PscConnectionStatus {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "PSC_CONNECTION_STATUS_UNSPECIFIED",
            Self::Active => "PSC_CONNECTION_STATUS_ACTIVE",
            Self::NotFound => "PSC_CONNECTION_STATUS_NOT_FOUND",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PSC_CONNECTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "PSC_CONNECTION_STATUS_ACTIVE" => Some(Self::Active),
            "PSC_CONNECTION_STATUS_NOT_FOUND" => Some(Self::NotFound),
            _ => None,
        }
    }
}
/// Available authorization mode of a Redis cluster.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AuthorizationMode {
    /// Not set.
    AuthModeUnspecified = 0,
    /// IAM basic authorization mode
    AuthModeIamAuth = 1,
    /// Authorization disabled mode
    AuthModeDisabled = 2,
}
impl AuthorizationMode {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::AuthModeUnspecified => "AUTH_MODE_UNSPECIFIED",
            Self::AuthModeIamAuth => "AUTH_MODE_IAM_AUTH",
            Self::AuthModeDisabled => "AUTH_MODE_DISABLED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "AUTH_MODE_UNSPECIFIED" => Some(Self::AuthModeUnspecified),
            "AUTH_MODE_IAM_AUTH" => Some(Self::AuthModeIamAuth),
            "AUTH_MODE_DISABLED" => Some(Self::AuthModeDisabled),
            _ => None,
        }
    }
}
/// NodeType of a redis cluster node,
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NodeType {
    /// Node type unspecified
    Unspecified = 0,
    /// Redis shared core nano node_type.
    RedisSharedCoreNano = 1,
    /// Redis highmem medium node_type.
    RedisHighmemMedium = 2,
    /// Redis highmem xlarge node_type.
    RedisHighmemXlarge = 3,
    /// Redis standard small node_type.
    RedisStandardSmall = 4,
    /// Redis highcpu medium node_type.
    RedisHighcpuMedium = 7,
    /// Redis standard large node_type.
    RedisStandardLarge = 8,
    /// Redis highmem 2xlarge node_type.
    RedisHighmem2xlarge = 9,
}
impl NodeType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "NODE_TYPE_UNSPECIFIED",
            Self::RedisSharedCoreNano => "REDIS_SHARED_CORE_NANO",
            Self::RedisHighmemMedium => "REDIS_HIGHMEM_MEDIUM",
            Self::RedisHighmemXlarge => "REDIS_HIGHMEM_XLARGE",
            Self::RedisStandardSmall => "REDIS_STANDARD_SMALL",
            Self::RedisHighcpuMedium => "REDIS_HIGHCPU_MEDIUM",
            Self::RedisStandardLarge => "REDIS_STANDARD_LARGE",
            Self::RedisHighmem2xlarge => "REDIS_HIGHMEM_2XLARGE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "NODE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "REDIS_SHARED_CORE_NANO" => Some(Self::RedisSharedCoreNano),
            "REDIS_HIGHMEM_MEDIUM" => Some(Self::RedisHighmemMedium),
            "REDIS_HIGHMEM_XLARGE" => Some(Self::RedisHighmemXlarge),
            "REDIS_STANDARD_SMALL" => Some(Self::RedisStandardSmall),
            "REDIS_HIGHCPU_MEDIUM" => Some(Self::RedisHighcpuMedium),
            "REDIS_STANDARD_LARGE" => Some(Self::RedisStandardLarge),
            "REDIS_HIGHMEM_2XLARGE" => Some(Self::RedisHighmem2xlarge),
            _ => None,
        }
    }
}
/// Available mode of in-transit encryption.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TransitEncryptionMode {
    /// In-transit encryption not set.
    Unspecified = 0,
    /// In-transit encryption disabled.
    Disabled = 1,
    /// Use server managed encryption for in-transit encryption.
    ServerAuthentication = 2,
}
impl TransitEncryptionMode {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "TRANSIT_ENCRYPTION_MODE_UNSPECIFIED",
            Self::Disabled => "TRANSIT_ENCRYPTION_MODE_DISABLED",
            Self::ServerAuthentication => "TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TRANSIT_ENCRYPTION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
            "TRANSIT_ENCRYPTION_MODE_DISABLED" => Some(Self::Disabled),
            "TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION" => {
                Some(Self::ServerAuthentication)
            }
            _ => None,
        }
    }
}
/// Server CA mode for the cluster.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ServerCaMode {
    /// Server CA mode not specified.
    Unspecified = 0,
    /// Each cluster has its own Google managed CA.
    GoogleManagedPerInstanceCa = 1,
    /// The cluster uses Google managed shared CA in the region.
    GoogleManagedSharedCa = 2,
    /// The cluster uses customer managed CA from CAS.
    CustomerManagedCasCa = 3,
}
impl ServerCaMode {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "SERVER_CA_MODE_UNSPECIFIED",
            Self::GoogleManagedPerInstanceCa => {
                "SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA"
            }
            Self::GoogleManagedSharedCa => "SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA",
            Self::CustomerManagedCasCa => "SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SERVER_CA_MODE_UNSPECIFIED" => Some(Self::Unspecified),
            "SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA" => {
                Some(Self::GoogleManagedPerInstanceCa)
            }
            "SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA" => {
                Some(Self::GoogleManagedSharedCa)
            }
            "SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA" => Some(Self::CustomerManagedCasCa),
            _ => None,
        }
    }
}
/// Type of a PSC connection, for cluster access purpose.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConnectionType {
    /// Cluster endpoint Type is not set
    Unspecified = 0,
    /// Cluster endpoint that will be used as for cluster topology discovery.
    Discovery = 1,
    /// Cluster endpoint that will be used as primary endpoint to access primary.
    Primary = 2,
    /// Cluster endpoint that will be used as reader endpoint to access replicas.
    Reader = 3,
}
impl ConnectionType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "CONNECTION_TYPE_UNSPECIFIED",
            Self::Discovery => "CONNECTION_TYPE_DISCOVERY",
            Self::Primary => "CONNECTION_TYPE_PRIMARY",
            Self::Reader => "CONNECTION_TYPE_READER",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CONNECTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "CONNECTION_TYPE_DISCOVERY" => Some(Self::Discovery),
            "CONNECTION_TYPE_PRIMARY" => Some(Self::Primary),
            "CONNECTION_TYPE_READER" => Some(Self::Reader),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod cloud_redis_cluster_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Configures and manages Cloud Memorystore for Redis clusters
    ///
    /// Google Cloud Memorystore for Redis Cluster
    ///
    /// The `redis.googleapis.com` service implements the Google Cloud Memorystore
    /// for Redis API and defines the following resource model for managing Redis
    /// clusters:
    ///
    /// * The service works with a collection of cloud projects, named: `/projects/*`
    /// * Each project has a collection of available locations, named: `/locations/*`
    /// * Each location has a collection of Redis clusters, named: `/clusters/*`
    /// * As such, Redis clusters are resources of the form:
    ///  `/projects/{project_id}/locations/{location_id}/clusters/{instance_id}`
    ///
    /// Note that location_id must be a GCP `region`; for example:
    ///
    /// * `projects/redpepper-1290/locations/us-central1/clusters/my-redis`
    #[derive(Debug, Clone)]
    pub struct CloudRedisClusterClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl CloudRedisClusterClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> CloudRedisClusterClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> CloudRedisClusterClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            CloudRedisClusterClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Lists all Redis clusters owned by a project in either the specified
        /// location (region) or all locations.
        ///
        /// The location should have the following format:
        ///
        /// * `projects/{project_id}/locations/{location_id}`
        ///
        /// If `location_id` is specified as `-` (wildcard), then all regions
        /// available to the project are queried, and the results are aggregated.
        pub async fn list_clusters(
            &mut self,
            request: impl tonic::IntoRequest<super::ListClustersRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListClustersResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.redis.cluster.v1beta1.CloudRedisCluster/ListClusters",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.redis.cluster.v1beta1.CloudRedisCluster",
                        "ListClusters",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the details of a specific Redis cluster.
        pub async fn get_cluster(
            &mut self,
            request: impl tonic::IntoRequest<super::GetClusterRequest>,
        ) -> std::result::Result<tonic::Response<super::Cluster>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.redis.cluster.v1beta1.CloudRedisCluster/GetCluster",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.redis.cluster.v1beta1.CloudRedisCluster",
                        "GetCluster",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the metadata and configuration of a specific Redis cluster.
        ///
        /// Completed longrunning.Operation will contain the new cluster object
        /// in the response field. The returned operation is automatically deleted
        /// after a few hours, so there is no need to call DeleteOperation.
        pub async fn update_cluster(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateClusterRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.redis.cluster.v1beta1.CloudRedisCluster/UpdateCluster",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.redis.cluster.v1beta1.CloudRedisCluster",
                        "UpdateCluster",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a specific Redis cluster. Cluster stops serving and data is
        /// deleted.
        pub async fn delete_cluster(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteClusterRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.redis.cluster.v1beta1.CloudRedisCluster/DeleteCluster",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.redis.cluster.v1beta1.CloudRedisCluster",
                        "DeleteCluster",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a Redis cluster based on the specified properties.
        /// The creation is executed asynchronously and callers may check the returned
        /// operation to track its progress. Once the operation is completed the Redis
        /// cluster will be fully functional. The completed longrunning.Operation will
        /// contain the new cluster object in the response field.
        ///
        /// The returned operation is automatically deleted after a few hours, so there
        /// is no need to call DeleteOperation.
        pub async fn create_cluster(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateClusterRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.redis.cluster.v1beta1.CloudRedisCluster/CreateCluster",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.redis.cluster.v1beta1.CloudRedisCluster",
                        "CreateCluster",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the details of certificate authority information for Redis cluster.
        pub async fn get_cluster_certificate_authority(
            &mut self,
            request: impl tonic::IntoRequest<
                super::GetClusterCertificateAuthorityRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::CertificateAuthority>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.redis.cluster.v1beta1.CloudRedisCluster/GetClusterCertificateAuthority",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.redis.cluster.v1beta1.CloudRedisCluster",
                        "GetClusterCertificateAuthority",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the details of regional certificate authority information for Redis
        /// cluster.
        pub async fn get_shared_regional_certificate_authority(
            &mut self,
            request: impl tonic::IntoRequest<
                super::GetSharedRegionalCertificateAuthorityRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::SharedRegionalCertificateAuthority>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.redis.cluster.v1beta1.CloudRedisCluster/GetSharedRegionalCertificateAuthority",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.redis.cluster.v1beta1.CloudRedisCluster",
                        "GetSharedRegionalCertificateAuthority",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Reschedules upcoming maintenance event.
        pub async fn reschedule_cluster_maintenance(
            &mut self,
            request: impl tonic::IntoRequest<super::RescheduleClusterMaintenanceRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.redis.cluster.v1beta1.CloudRedisCluster/RescheduleClusterMaintenance",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.redis.cluster.v1beta1.CloudRedisCluster",
                        "RescheduleClusterMaintenance",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists all backup collections owned by a consumer project in either the
        /// specified location (region) or all locations.
        ///
        /// If `location_id` is specified as `-` (wildcard), then all regions
        /// available to the project are queried, and the results are aggregated.
        pub async fn list_backup_collections(
            &mut self,
            request: impl tonic::IntoRequest<super::ListBackupCollectionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListBackupCollectionsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.redis.cluster.v1beta1.CloudRedisCluster/ListBackupCollections",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.redis.cluster.v1beta1.CloudRedisCluster",
                        "ListBackupCollections",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get a backup collection.
        pub async fn get_backup_collection(
            &mut self,
            request: impl tonic::IntoRequest<super::GetBackupCollectionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::BackupCollection>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.redis.cluster.v1beta1.CloudRedisCluster/GetBackupCollection",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.redis.cluster.v1beta1.CloudRedisCluster",
                        "GetBackupCollection",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists all backups owned by a backup collection.
        pub async fn list_backups(
            &mut self,
            request: impl tonic::IntoRequest<super::ListBackupsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListBackupsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.redis.cluster.v1beta1.CloudRedisCluster/ListBackups",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.redis.cluster.v1beta1.CloudRedisCluster",
                        "ListBackups",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the details of a specific backup.
        pub async fn get_backup(
            &mut self,
            request: impl tonic::IntoRequest<super::GetBackupRequest>,
        ) -> std::result::Result<tonic::Response<super::Backup>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.redis.cluster.v1beta1.CloudRedisCluster/GetBackup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.redis.cluster.v1beta1.CloudRedisCluster",
                        "GetBackup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a specific backup.
        pub async fn delete_backup(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteBackupRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.redis.cluster.v1beta1.CloudRedisCluster/DeleteBackup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.redis.cluster.v1beta1.CloudRedisCluster",
                        "DeleteBackup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Exports a specific backup to a customer target Cloud Storage URI.
        pub async fn export_backup(
            &mut self,
            request: impl tonic::IntoRequest<super::ExportBackupRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.redis.cluster.v1beta1.CloudRedisCluster/ExportBackup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.redis.cluster.v1beta1.CloudRedisCluster",
                        "ExportBackup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Backup Redis Cluster.
        /// If this is the first time a backup is being created, a backup collection
        /// will be created at the backend, and this backup belongs to this collection.
        /// Both collection and backup will have a resource name. Backup will be
        /// executed for each shard. A replica (primary if nonHA) will be selected to
        /// perform the execution. Backup call will be rejected if there is an ongoing
        /// backup or update operation. Be aware that during preview, if the cluster's
        /// internal software version is too old, critical update will be performed
        /// before actual backup. Once the internal software version is updated to the
        /// minimum version required by the backup feature, subsequent backups will not
        /// require critical update. After preview, there will be no critical update
        /// needed for backup.
        pub async fn backup_cluster(
            &mut self,
            request: impl tonic::IntoRequest<super::BackupClusterRequest>,
        ) -> std::result::Result<
            tonic::Response<super::super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.redis.cluster.v1beta1.CloudRedisCluster/BackupCluster",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.redis.cluster.v1beta1.CloudRedisCluster",
                        "BackupCluster",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
