// This file is @generated by prost-build.
/// A Memorystore instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Instance {
    /// Identifier. Unique name of the instance.
    /// Format: projects/{project}/locations/{location}/instances/{instance}
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. Creation timestamp of the instance.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Latest update timestamp of the instance.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Labels to represent user-provided metadata.
    #[prost(map = "string, string", tag = "4")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Output only. Current state of the instance.
    #[prost(enumeration = "instance::State", tag = "5")]
    pub state: i32,
    /// Output only. Additional information about the state of the instance.
    #[prost(message, optional, tag = "6")]
    pub state_info: ::core::option::Option<instance::StateInfo>,
    /// Output only. System assigned, unique identifier for the instance.
    #[prost(string, tag = "7")]
    pub uid: ::prost::alloc::string::String,
    /// Optional. Number of replica nodes per shard. If omitted the default is 0
    /// replicas.
    #[prost(int32, optional, tag = "8")]
    pub replica_count: ::core::option::Option<i32>,
    /// Optional. Immutable. Authorization mode of the instance.
    #[prost(enumeration = "instance::AuthorizationMode", tag = "9")]
    pub authorization_mode: i32,
    /// Optional. Immutable. In-transit encryption mode of the instance.
    #[prost(enumeration = "instance::TransitEncryptionMode", tag = "10")]
    pub transit_encryption_mode: i32,
    /// Optional. Number of shards for the instance.
    #[prost(int32, tag = "11")]
    pub shard_count: i32,
    /// Output only. Deprecated: Use the endpoints.connections.psc_auto_connection
    /// or endpoints.connections.psc_connection values instead.
    #[deprecated]
    #[prost(message, repeated, tag = "12")]
    pub discovery_endpoints: ::prost::alloc::vec::Vec<DiscoveryEndpoint>,
    /// Optional. Machine type for individual nodes of the instance.
    #[prost(enumeration = "instance::NodeType", tag = "13")]
    pub node_type: i32,
    /// Optional. Persistence configuration of the instance.
    #[prost(message, optional, tag = "14")]
    pub persistence_config: ::core::option::Option<PersistenceConfig>,
    /// Optional. Engine version of the instance.
    #[prost(string, tag = "15")]
    pub engine_version: ::prost::alloc::string::String,
    /// Optional. User-provided engine configurations for the instance.
    #[prost(map = "string, string", tag = "16")]
    pub engine_configs: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Output only. Configuration of individual nodes of the instance.
    #[prost(message, optional, tag = "17")]
    pub node_config: ::core::option::Option<NodeConfig>,
    /// Optional. Immutable. Zone distribution configuration of the instance for
    /// node allocation.
    #[prost(message, optional, tag = "18")]
    pub zone_distribution_config: ::core::option::Option<ZoneDistributionConfig>,
    /// Optional. If set to true deletion of the instance will fail.
    #[prost(bool, optional, tag = "19")]
    pub deletion_protection_enabled: ::core::option::Option<bool>,
    /// Optional. Immutable. Deprecated: Use the
    /// endpoints.connections.psc_auto_connection value instead.
    #[deprecated]
    #[prost(message, repeated, tag = "20")]
    pub psc_auto_connections: ::prost::alloc::vec::Vec<PscAutoConnection>,
    /// Output only. Service attachment details to configure PSC connections.
    #[prost(message, repeated, tag = "21")]
    pub psc_attachment_details: ::prost::alloc::vec::Vec<PscAttachmentDetail>,
    /// Optional. Endpoints for the instance.
    #[prost(message, repeated, tag = "25")]
    pub endpoints: ::prost::alloc::vec::Vec<instance::InstanceEndpoint>,
    /// Optional. The mode config for the instance.
    #[prost(enumeration = "instance::Mode", tag = "26")]
    pub mode: i32,
    /// Optional. Input only. Ondemand maintenance for the instance.
    #[prost(bool, optional, tag = "28")]
    pub ondemand_maintenance: ::core::option::Option<bool>,
    /// Optional. The maintenance policy for the instance. If not provided,
    /// the maintenance event will be performed based on Memorystore
    /// internal rollout schedule.
    #[prost(message, optional, tag = "31")]
    pub maintenance_policy: ::core::option::Option<MaintenancePolicy>,
    /// Output only. Published maintenance schedule.
    #[prost(message, optional, tag = "32")]
    pub maintenance_schedule: ::core::option::Option<MaintenanceSchedule>,
    /// Optional. The config for cross instance replication.
    #[prost(message, optional, tag = "33")]
    pub cross_instance_replication_config: ::core::option::Option<
        CrossInstanceReplicationConfig,
    >,
    /// Optional. If true, instance endpoints that are created and registered by
    /// customers can be deleted asynchronously. That is, such an instance endpoint
    /// can be de-registered before the forwarding rules in the instance endpoint
    /// are deleted.
    #[prost(bool, optional, tag = "44")]
    pub async_instance_endpoints_deletion_enabled: ::core::option::Option<bool>,
    /// Output only. The backup collection full resource name. Example:
    /// projects/{project}/locations/{location}/backupCollections/{collection}
    #[prost(string, optional, tag = "47")]
    pub backup_collection: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. The automated backup config for the instance.
    #[prost(message, optional, tag = "48")]
    pub automated_backup_config: ::core::option::Option<AutomatedBackupConfig>,
    /// The source to import from.
    #[prost(oneof = "instance::ImportSources", tags = "23, 24")]
    pub import_sources: ::core::option::Option<instance::ImportSources>,
}
/// Nested message and enum types in `Instance`.
pub mod instance {
    /// Additional information about the state of the instance.
    #[derive(Clone, 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 instance with state UPDATING.
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct UpdateInfo {
            /// Output only. Target number of shards for the instance.
            #[prost(int32, optional, tag = "1")]
            pub target_shard_count: ::core::option::Option<i32>,
            /// Output only. Target number of replica nodes per shard for the instance.
            #[prost(int32, optional, tag = "2")]
            pub target_replica_count: ::core::option::Option<i32>,
            /// Output only. Target engine version for the instance.
            #[prost(string, optional, tag = "3")]
            pub target_engine_version: ::core::option::Option<
                ::prost::alloc::string::String,
            >,
            /// Output only. Target node type for the instance.
            #[prost(enumeration = "super::NodeType", optional, tag = "4")]
            pub target_node_type: ::core::option::Option<i32>,
        }
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum Info {
            /// Output only. Describes ongoing update when instance state is UPDATING.
            #[prost(message, tag = "1")]
            UpdateInfo(UpdateInfo),
        }
    }
    /// Backups that stored in Cloud Storage buckets.
    /// The Cloud Storage buckets need to be the same region as the instances.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct GcsBackupSource {
        /// Optional. 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:
        /// //memorystore.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 memorystore.googleapis.com.
        #[prost(string, tag = "1")]
        pub backup: ::prost::alloc::string::String,
    }
    /// InstanceEndpoint consists of PSC connections that are created
    /// as a group in each VPC network for accessing the instance. In each group,
    /// there shall be one connection for each service attachment in the cluster.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct InstanceEndpoint {
        /// Optional. 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>,
    }
    /// Information of each PSC connection.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct ConnectionDetail {
        /// A PSC connection to an instance could either be created through Service
        /// Connectivity Automation (auto connection) during the cluster creation,
        /// or it could be created by customer themeslves (user-created 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 an instance could either be created through Service
        /// Connectivity Automation (auto connection) during the cluster creation,
        /// or it could be created by customer themeslves (user-created connection).
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum Connection {
            /// Immutable. Detailed information of a PSC connection that is created
            /// through service connectivity automation.
            #[prost(message, tag = "1")]
            PscAutoConnection(super::super::PscAutoConnection),
            /// Detailed information of a PSC connection that is created by the user.
            #[prost(message, tag = "2")]
            PscConnection(super::super::PscConnection),
        }
    }
    /// Possible states of the instance.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Not set.
        Unspecified = 0,
        /// Instance is being created.
        Creating = 1,
        /// Instance has been created and is usable.
        Active = 2,
        /// Instance is being updated.
        Updating = 3,
        /// Instance 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,
            }
        }
    }
    /// Possible authorization modes of the instance.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum AuthorizationMode {
        /// Not set.
        Unspecified = 0,
        /// Authorization disabled.
        AuthDisabled = 1,
        /// IAM basic authorization.
        IamAuth = 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::Unspecified => "AUTHORIZATION_MODE_UNSPECIFIED",
                Self::AuthDisabled => "AUTH_DISABLED",
                Self::IamAuth => "IAM_AUTH",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "AUTHORIZATION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
                "AUTH_DISABLED" => Some(Self::AuthDisabled),
                "IAM_AUTH" => Some(Self::IamAuth),
                _ => None,
            }
        }
    }
    /// Possible in-transit encryption modes of the instance.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum TransitEncryptionMode {
        /// Not set.
        Unspecified = 0,
        /// In-transit encryption is disabled.
        TransitEncryptionDisabled = 1,
        /// Server-managed encryption is used 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::TransitEncryptionDisabled => "TRANSIT_ENCRYPTION_DISABLED",
                Self::ServerAuthentication => "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_DISABLED" => Some(Self::TransitEncryptionDisabled),
                "SERVER_AUTHENTICATION" => Some(Self::ServerAuthentication),
                _ => None,
            }
        }
    }
    /// Possible node types of the instance. See
    /// <https://cloud.google.com/memorystore/docs/valkey/instance-node-specification>
    /// for more information.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum NodeType {
        /// Not set.
        Unspecified = 0,
        /// Shared core nano.
        SharedCoreNano = 1,
        /// High memory medium.
        HighmemMedium = 2,
        /// High memory extra large.
        HighmemXlarge = 3,
        /// Standard small.
        StandardSmall = 4,
    }
    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::SharedCoreNano => "SHARED_CORE_NANO",
                Self::HighmemMedium => "HIGHMEM_MEDIUM",
                Self::HighmemXlarge => "HIGHMEM_XLARGE",
                Self::StandardSmall => "STANDARD_SMALL",
            }
        }
        /// 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),
                "SHARED_CORE_NANO" => Some(Self::SharedCoreNano),
                "HIGHMEM_MEDIUM" => Some(Self::HighmemMedium),
                "HIGHMEM_XLARGE" => Some(Self::HighmemXlarge),
                "STANDARD_SMALL" => Some(Self::StandardSmall),
                _ => None,
            }
        }
    }
    /// The mode config, which is used to enable/disable cluster mode.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Mode {
        /// Mode is not specified.
        Unspecified = 0,
        /// Deprecated: Use CLUSTER_DISABLED instead.
        Standalone = 1,
        /// Instance is in cluster mode.
        Cluster = 2,
        /// Cluster mode is disabled for the instance.
        ClusterDisabled = 4,
    }
    impl Mode {
        /// 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 => "MODE_UNSPECIFIED",
                Self::Standalone => "STANDALONE",
                Self::Cluster => "CLUSTER",
                Self::ClusterDisabled => "CLUSTER_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 {
                "MODE_UNSPECIFIED" => Some(Self::Unspecified),
                "STANDALONE" => Some(Self::Standalone),
                "CLUSTER" => Some(Self::Cluster),
                "CLUSTER_DISABLED" => Some(Self::ClusterDisabled),
                _ => None,
            }
        }
    }
    /// The source to import from.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum ImportSources {
        /// Optional. Immutable. Backups that stored in Cloud Storage buckets.
        /// The Cloud Storage buckets need to be the same region as the instances.
        /// Read permission is required to import from the provided Cloud Storage
        /// Objects.
        #[prost(message, tag = "23")]
        GcsSource(GcsBackupSource),
        /// Optional. Immutable. Backups that generated and managed by memorystore
        /// service.
        #[prost(message, tag = "24")]
        ManagedBackupSource(ManagedBackupSource),
    }
}
/// The automated backup config for an instance.
#[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::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 an instance.
#[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 instance uid of the backup collection.
    #[prost(string, tag = "3")]
    pub instance_uid: ::prost::alloc::string::String,
    /// Output only. The full resource path of the instance the backup collection
    /// belongs to. Example:
    /// projects/{project}/locations/{location}/instances/{instance}
    #[prost(string, tag = "4")]
    pub instance: ::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,
    /// Output only. The time when the backup collection was created.
    #[prost(message, optional, tag = "7")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Backup of an instance.
#[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 Instance
    /// UID\] OR customer specified while backup instance. 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. Instance resource path of this backup.
    #[prost(string, tag = "3")]
    pub instance: ::prost::alloc::string::String,
    /// Output only. Instance uid of this backup.
    #[prost(string, tag = "4")]
    pub instance_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. valkey-7.5/valkey-8.0, etc.
    #[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 instance.
    #[prost(enumeration = "instance::NodeType", tag = "9")]
    pub node_type: i32,
    /// Output only. Number of replicas for the instance.
    #[prost(int32, tag = "10")]
    pub replica_count: i32,
    /// Output only. Number of shards for the instance.
    #[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. 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>,
}
/// Cross instance replication config.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CrossInstanceReplicationConfig {
    /// Required. The role of the instance in cross instance replication.
    #[prost(enumeration = "cross_instance_replication_config::InstanceRole", tag = "1")]
    pub instance_role: i32,
    /// Optional. Details of the primary instance that is used as the replication
    /// source for this secondary instance.
    ///
    /// This field is only set for a secondary instance.
    #[prost(message, optional, tag = "2")]
    pub primary_instance: ::core::option::Option<
        cross_instance_replication_config::RemoteInstance,
    >,
    /// Optional. List of secondary instances that are replicating from this
    /// primary instance.
    ///
    /// This field is only set for a primary instance.
    #[prost(message, repeated, tag = "3")]
    pub secondary_instances: ::prost::alloc::vec::Vec<
        cross_instance_replication_config::RemoteInstance,
    >,
    /// Output only. The last time cross instance 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 instances participating
    /// in the cross instance replication. This view will be provided by every
    /// member instance irrespective of its instance role(primary or secondary).
    ///
    /// A primary instance can provide information about all the secondary
    /// instances replicating from it. However, a secondary instance only knows
    /// about the primary instance from which it is replicating. However, for
    /// scenarios, where the primary instance is unavailable(e.g. regional outage),
    /// a Getinstance request can be sent to any other member instance and this
    /// field will list all the member instances participating in cross instance
    /// replication.
    #[prost(message, optional, tag = "5")]
    pub membership: ::core::option::Option<
        cross_instance_replication_config::Membership,
    >,
}
/// Nested message and enum types in `CrossInstanceReplicationConfig`.
pub mod cross_instance_replication_config {
    /// Details of the remote instance associated with this instance in a cross
    /// instance replication setup.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct RemoteInstance {
        /// Optional. The full resource path of the remote instance in
        /// the format: projects/<project>/locations/<region>/instances/<instance-id>
        #[prost(string, tag = "1")]
        pub instance: ::prost::alloc::string::String,
        /// Output only. The unique identifier of the remote instance.
        #[prost(string, tag = "2")]
        pub uid: ::prost::alloc::string::String,
    }
    /// An output only view of all the member instances participating in the cross
    /// instance replication.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Membership {
        /// Output only. The primary instance that acts as the source of replication
        /// for the secondary instances.
        #[prost(message, optional, tag = "1")]
        pub primary_instance: ::core::option::Option<RemoteInstance>,
        /// Output only. The list of secondary instances replicating from the primary
        /// instance.
        #[prost(message, repeated, tag = "2")]
        pub secondary_instances: ::prost::alloc::vec::Vec<RemoteInstance>,
    }
    /// The role of the instance in cross instance replication.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum InstanceRole {
        /// instance role is not set.
        /// The behavior is equivalent to NONE.
        Unspecified = 0,
        /// This instance does not participate in cross instance replication. It is
        /// an independent instance and does not replicate to or from any other
        /// instances.
        None = 1,
        /// A instance that allows both reads and writes. Any data written to this
        /// instance is also replicated to the attached secondary instances.
        Primary = 2,
        /// A instance that allows only reads and replicates data from a primary
        /// instance.
        Secondary = 3,
    }
    impl InstanceRole {
        /// 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 => "INSTANCE_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 {
                "INSTANCE_ROLE_UNSPECIFIED" => Some(Self::Unspecified),
                "NONE" => Some(Self::None),
                "PRIMARY" => Some(Self::Primary),
                "SECONDARY" => Some(Self::Secondary),
                _ => None,
            }
        }
    }
}
/// Maintenance policy per instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenancePolicy {
    /// Output only. The time when the policy was created.
    #[prost(message, optional, tag = "1")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the policy 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_window is expected to be one.
    #[prost(message, repeated, tag = "3")]
    pub weekly_maintenance_window: ::prost::alloc::vec::Vec<WeeklyMaintenanceWindow>,
}
/// Time window specified for weekly operations.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WeeklyMaintenanceWindow {
    /// Optional. Allows to define schedule that runs specified day of the week.
    #[prost(enumeration = "super::super::super::r#type::DayOfWeek", tag = "1")]
    pub day: i32,
    /// Optional. Start time of the window in UTC.
    #[prost(message, optional, tag = "2")]
    pub start_time: ::core::option::Option<super::super::super::r#type::TimeOfDay>,
}
/// Upcoming maintenance schedule.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MaintenanceSchedule {
    /// 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>,
}
/// Configuration of a service attachment of the cluster, for creating PSC
/// connections.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PscAttachmentDetail {
    /// 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 Psc endpoint.
    #[prost(enumeration = "ConnectionType", tag = "4")]
    pub connection_type: i32,
}
/// Details of consumer resources in a PSC connection.
#[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 ip_address: ::prost::alloc::string::String,
    /// Output only. The URI of the consumer side forwarding rule.
    /// Format:
    /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}
    #[prost(string, tag = "3")]
    pub forwarding_rule: ::prost::alloc::string::String,
    /// Required. The consumer project_id where PSC connections are established.
    /// This should be the same project_id that the instance is being created in.
    #[prost(string, tag = "4")]
    pub project_id: ::prost::alloc::string::String,
    /// Required. The network where the PSC endpoints are created, 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: whether a connection exists
    /// and ACTIVE or it no longer exists. Please note that this value is updated
    /// periodically. Please use Private Service Connect APIs for the latest
    /// status.
    #[prost(enumeration = "PscConnectionStatus", tag = "7")]
    pub psc_connection_status: i32,
    /// Output only. Type of the PSC connection.
    #[prost(enumeration = "ConnectionType", tag = "8")]
    pub connection_type: i32,
    /// Ports of the exposed endpoint.
    #[prost(oneof = "psc_auto_connection::Ports", tags = "9")]
    pub ports: ::core::option::Option<psc_auto_connection::Ports>,
}
/// Nested message and enum types in `PscAutoConnection`.
pub mod psc_auto_connection {
    /// Ports of the exposed endpoint.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Ports {
        /// Optional. port will only be set for Primary/Reader or Discovery endpoint.
        #[prost(int32, tag = "9")]
        Port(i32),
    }
}
/// User created Psc connection configuration.
#[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 ip_address: ::prost::alloc::string::String,
    /// Required. The URI of the consumer side forwarding rule.
    /// Format:
    /// projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}
    #[prost(string, tag = "3")]
    pub forwarding_rule: ::prost::alloc::string::String,
    /// Output only. 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,
    /// 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: whether a connection exists
    /// and ACTIVE or it no longer exists. Please note that this value is updated
    /// periodically. Please use Private Service Connect APIs for the latest
    /// status.
    #[prost(enumeration = "PscConnectionStatus", tag = "7")]
    pub psc_connection_status: i32,
    /// Output only. Type of the PSC connection.
    #[prost(enumeration = "ConnectionType", tag = "8")]
    pub connection_type: i32,
    /// Ports of the exposed endpoint.
    #[prost(oneof = "psc_connection::Ports", tags = "9")]
    pub ports: ::core::option::Option<psc_connection::Ports>,
}
/// Nested message and enum types in `PscConnection`.
pub mod psc_connection {
    /// Ports of the exposed endpoint.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Ports {
        /// Optional. port will only be set for Primary/Reader or Discovery endpoint.
        #[prost(int32, tag = "9")]
        Port(i32),
    }
}
/// Represents an endpoint for clients to connect to the instance.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DiscoveryEndpoint {
    /// Output only. IP address of the exposed endpoint clients connect to.
    #[prost(string, tag = "1")]
    pub address: ::prost::alloc::string::String,
    /// Output only. The port number of the exposed endpoint.
    #[prost(int32, tag = "2")]
    pub port: i32,
    /// Output only. 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 = "4")]
    pub network: ::prost::alloc::string::String,
}
/// Represents persistence configuration for a instance.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PersistenceConfig {
    /// Optional. Current persistence mode.
    #[prost(enumeration = "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<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<persistence_config::AofConfig>,
}
/// Nested message and enum types in `PersistenceConfig`.
pub mod persistence_config {
    /// Configuration for 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. 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 {
        /// Possible 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 for AOF based persistence.
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct AofConfig {
        /// Optional. The fsync mode.
        #[prost(enumeration = "aof_config::AppendFsync", tag = "1")]
        pub append_fsync: i32,
    }
    /// Nested message and enum types in `AOFConfig`.
    pub mod aof_config {
        /// Possible fsync modes.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum AppendFsync {
            /// Not set. Default: EVERY_SEC
            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.
            Never = 1,
            /// Fsync every second. 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. 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::Never => "NEVER",
                    Self::EverySec => "EVERY_SEC",
                    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),
                    "NEVER" => Some(Self::Never),
                    "EVERY_SEC" => Some(Self::EverySec),
                    "ALWAYS" => Some(Self::Always),
                    _ => None,
                }
            }
        }
    }
    /// Possible 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,
            }
        }
    }
}
/// Represents configuration for nodes of the instance.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NodeConfig {
    /// Output only. Memory size in GB of the node.
    #[prost(double, tag = "1")]
    pub size_gb: f64,
}
/// Zone distribution configuration for allocation of instance resources.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ZoneDistributionConfig {
    /// Optional. Defines zone where all resources will be allocated with
    /// SINGLE_ZONE mode. Ignored for MULTI_ZONE mode.
    #[prost(string, tag = "2")]
    pub zone: ::prost::alloc::string::String,
    /// Optional. Current zone distribution mode. Defaults to MULTI_ZONE.
    #[prost(enumeration = "zone_distribution_config::ZoneDistributionMode", tag = "1")]
    pub mode: i32,
}
/// Nested message and enum types in `ZoneDistributionConfig`.
pub mod zone_distribution_config {
    /// Possible zone distribution modes.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum ZoneDistributionMode {
        /// Not Set. Default: MULTI_ZONE
        Unspecified = 0,
        /// Distribute resources across 3 zones picked at random within the
        /// region.
        MultiZone = 1,
        /// Provision resources in a single zone. Zone field must be specified.
        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 instance maintenance.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RescheduleMaintenanceRequest {
    /// Required. Name of the instance to reschedule maintenance for:
    /// `projects/{project}/locations/{location_id}/instances/{instance}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set.
    #[prost(enumeration = "reschedule_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.
    /// 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 `RescheduleMaintenanceRequest`.
pub mod reschedule_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,
            }
        }
    }
}
/// Request message for \[ListInstances\]\[\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListInstancesRequest {
    /// Required. The parent to list instances from.
    /// Format: projects/{project}/locations/{location}
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Requested page size. Server may return fewer items than
    /// requested. If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// Optional. A token identifying a page of results the server should return.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. Expression for filtering results.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
    /// Optional. Sort results by a defined order. Supported values: "name",
    /// "create_time".
    #[prost(string, tag = "5")]
    pub order_by: ::prost::alloc::string::String,
}
/// Response message for \[ListInstances\]\[\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInstancesResponse {
    /// If the {location} requested was "-" the response contains a list of
    /// instances from all locations. Instances in unreachable locations will be
    /// omitted.
    #[prost(message, repeated, tag = "1")]
    pub instances: ::prost::alloc::vec::Vec<Instance>,
    /// A token, which can be sent as `page_token` to retrieve the next page.
    /// If this field is omitted, there are no subsequent pages.
    #[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 message for \[GetInstance\]\[\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetInstanceRequest {
    /// Required. The name of the instance to retrieve.
    /// Format: projects/{project}/locations/{location}/instances/{instance}
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for \[CreateInstance\]\[\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateInstanceRequest {
    /// Required. The parent resource where this instance will be created.
    /// Format: projects/{project}/locations/{location}
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The ID to use for the instance, which will become the final
    /// component of the instance's resource name.
    ///
    /// This value is subject to the following restrictions:
    ///
    /// * Must be 4-63 characters in length
    /// * Must begin with a letter or digit
    /// * Must contain only lowercase letters, digits, and hyphens
    /// * Must not end with a hyphen
    /// * Must be unique within a location
    #[prost(string, tag = "2")]
    pub instance_id: ::prost::alloc::string::String,
    /// Required. The instance to create.
    #[prost(message, optional, tag = "3")]
    pub instance: ::core::option::Option<Instance>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and the
    /// request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for \[UpdateInstance\]\[\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateInstanceRequest {
    /// Optional. The list of fields to be updated on the instance. At least one
    /// field must be specified.
    #[prost(message, optional, tag = "1")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
    /// Required. The instance to update.
    #[prost(message, optional, tag = "2")]
    pub instance: ::core::option::Option<Instance>,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes since the first request.
    ///
    /// For example, consider a situation where you make an initial request and the
    /// request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Request message for \[DeleteInstance\]\[\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteInstanceRequest {
    /// Required. The name of the instance to delete.
    /// Format: projects/{project}/locations/{location}/instances/{instance}
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Optional. An optional request ID to identify requests. Specify a unique
    /// request ID so that if you must retry your request, the server will know to
    /// ignore the request if it has already been completed. The server will
    /// guarantee that for at least 60 minutes after the first request.
    ///
    /// For example, consider a situation where you make an initial request and the
    /// request times out. If you make the request again with the same request
    /// ID, the server can check if original operation with the same request ID
    /// was received, and if so, will ignore the second request. This prevents
    /// clients from accidentally creating duplicate commitments.
    ///
    /// The request ID must be a valid UUID with the exception that zero UUID is
    /// not supported (00000000-0000-0000-0000-000000000000).
    #[prost(string, tag = "2")]
    pub request_id: ::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 Google Cloud 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.memorystore.v1.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. Instance backupCollection resource name using the form:
    /// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
    /// where `location_id` refers to a Google Cloud 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.memorystore.v1.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. Instance 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. Instance 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. Instance 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 = "2")]
    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 = "2")]
        GcsBucket(::prost::alloc::string::String),
    }
}
/// Request for \[BackupInstance\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BackupInstanceRequest {
    /// Required. Instance resource name using the form:
    /// `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
    /// where `location_id` refers to a Google Cloud 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 Instance UID\] is used.
    #[prost(string, optional, tag = "3")]
    pub backup_id: ::core::option::Option<::prost::alloc::string::String>,
}
/// Request message for \[GetCertificateAuthority\]\[\].
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetCertificateAuthorityRequest {
    /// Required. The name of the certificate authority.
    /// Format:
    /// projects/{project}/locations/{location}/instances/{instance}/certificateAuthority
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// A certificate authority for an instance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CertificateAuthority {
    /// Identifier. Unique name of the certificate authority.
    /// Format:
    /// projects/{project}/locations/{location}/instances/{instance}
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Information about the server certificate authority.
    #[prost(oneof = "certificate_authority::ServerCa", tags = "2")]
    pub server_ca: ::core::option::Option<certificate_authority::ServerCa>,
}
/// Nested message and enum types in `CertificateAuthority`.
pub mod certificate_authority {
    /// A managed certificate authority.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ManagedCertificateAuthority {
        /// PEM encoded CA certificate chains for 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 {
        /// A certificate chain.
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct CertChain {
            /// The certificates that form the CA chain in order of leaf to root.
            #[prost(string, repeated, tag = "1")]
            pub certificates: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        }
    }
    /// Information about the server certificate authority.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum ServerCa {
        /// A managed server certificate authority.
        #[prost(message, tag = "2")]
        ManagedServerCa(ManagedCertificateAuthority),
    }
}
/// Represents the metadata of a long-running operation.
#[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 been cancelled successfully
    /// 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,
}
/// 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 => "ACTIVE",
            Self::NotFound => "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),
            "ACTIVE" => Some(Self::Active),
            "NOT_FOUND" => Some(Self::NotFound),
            _ => None,
        }
    }
}
/// Type of a PSC connection
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConnectionType {
    /// Connection Type is not set
    Unspecified = 0,
    /// Connection that will be used for topology discovery.
    Discovery = 1,
    /// Connection that will be used as primary endpoint to access primary.
    Primary = 2,
    /// Connection 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 memorystore_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Service describing handlers for resources
    #[derive(Debug, Clone)]
    pub struct MemorystoreClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl MemorystoreClient<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> MemorystoreClient<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,
        ) -> MemorystoreClient<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,
        {
            MemorystoreClient::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 Instances in a given project and location.
        pub async fn list_instances(
            &mut self,
            request: impl tonic::IntoRequest<super::ListInstancesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListInstancesResponse>,
            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.memorystore.v1.Memorystore/ListInstances",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.memorystore.v1.Memorystore",
                        "ListInstances",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details of a single Instance.
        pub async fn get_instance(
            &mut self,
            request: impl tonic::IntoRequest<super::GetInstanceRequest>,
        ) -> std::result::Result<tonic::Response<super::Instance>, 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.memorystore.v1.Memorystore/GetInstance",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.memorystore.v1.Memorystore",
                        "GetInstance",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Creates a new Instance in a given project and location.
        pub async fn create_instance(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateInstanceRequest>,
        ) -> std::result::Result<
            tonic::Response<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.memorystore.v1.Memorystore/CreateInstance",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.memorystore.v1.Memorystore",
                        "CreateInstance",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates the parameters of a single Instance.
        pub async fn update_instance(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateInstanceRequest>,
        ) -> std::result::Result<
            tonic::Response<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.memorystore.v1.Memorystore/UpdateInstance",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.memorystore.v1.Memorystore",
                        "UpdateInstance",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a single Instance.
        pub async fn delete_instance(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteInstanceRequest>,
        ) -> std::result::Result<
            tonic::Response<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.memorystore.v1.Memorystore/DeleteInstance",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.memorystore.v1.Memorystore",
                        "DeleteInstance",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets details about the certificate authority for an Instance.
        pub async fn get_certificate_authority(
            &mut self,
            request: impl tonic::IntoRequest<super::GetCertificateAuthorityRequest>,
        ) -> 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.memorystore.v1.Memorystore/GetCertificateAuthority",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.memorystore.v1.Memorystore",
                        "GetCertificateAuthority",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Reschedules upcoming maintenance event.
        pub async fn reschedule_maintenance(
            &mut self,
            request: impl tonic::IntoRequest<super::RescheduleMaintenanceRequest>,
        ) -> std::result::Result<
            tonic::Response<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.memorystore.v1.Memorystore/RescheduleMaintenance",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.memorystore.v1.Memorystore",
                        "RescheduleMaintenance",
                    ),
                );
            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.memorystore.v1.Memorystore/ListBackupCollections",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.memorystore.v1.Memorystore",
                        "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.memorystore.v1.Memorystore/GetBackupCollection",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.memorystore.v1.Memorystore",
                        "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.memorystore.v1.Memorystore/ListBackups",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.memorystore.v1.Memorystore",
                        "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.memorystore.v1.Memorystore/GetBackup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.memorystore.v1.Memorystore",
                        "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::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.memorystore.v1.Memorystore/DeleteBackup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.memorystore.v1.Memorystore",
                        "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::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.memorystore.v1.Memorystore/ExportBackup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.memorystore.v1.Memorystore",
                        "ExportBackup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Backup Instance.
        /// 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 instance'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_instance(
            &mut self,
            request: impl tonic::IntoRequest<super::BackupInstanceRequest>,
        ) -> std::result::Result<
            tonic::Response<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.memorystore.v1.Memorystore/BackupInstance",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.memorystore.v1.Memorystore",
                        "BackupInstance",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
