gcloud-sdk 0.19.15

Async Google gRPC/REST APIs and the client implementation hiding complexity of GCP authentication based on Tonic middleware and Reqwest.
Documentation
/// A storage volume logical unit number (LUN).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Lun {
    /// Output only. The name of the LUN.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// An identifier for the LUN, generated by the backend.
    #[prost(string, tag = "10")]
    pub id: ::prost::alloc::string::String,
    /// The state of this storage volume.
    #[prost(enumeration = "lun::State", tag = "2")]
    pub state: i32,
    /// The size of this LUN, in gigabytes.
    #[prost(int64, tag = "3")]
    pub size_gb: i64,
    /// The LUN multiprotocol type ensures the characteristics of the LUN are
    /// optimized for each operating system.
    #[prost(enumeration = "lun::MultiprotocolType", tag = "4")]
    pub multiprotocol_type: i32,
    /// Display the storage volume for this LUN.
    #[prost(string, tag = "5")]
    pub storage_volume: ::prost::alloc::string::String,
    /// Display if this LUN can be shared between multiple physical servers.
    #[prost(bool, tag = "6")]
    pub shareable: bool,
    /// Display if this LUN is a boot LUN.
    #[prost(bool, tag = "7")]
    pub boot_lun: bool,
    /// The storage type for this LUN.
    #[prost(enumeration = "lun::StorageType", tag = "8")]
    pub storage_type: i32,
    /// The WWID for this LUN.
    #[prost(string, tag = "9")]
    pub wwid: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Lun`.
pub mod lun {
    /// The possible states for the LUN.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The LUN is in an unknown state.
        Unspecified = 0,
        /// The LUN is being created.
        Creating = 1,
        /// The LUN is being updated.
        Updating = 2,
        /// The LUN is ready for use.
        Ready = 3,
        /// The LUN has been requested to be 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 {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Creating => "CREATING",
                State::Updating => "UPDATING",
                State::Ready => "READY",
                State::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),
                "UPDATING" => Some(Self::Updating),
                "READY" => Some(Self::Ready),
                "DELETING" => Some(Self::Deleting),
                _ => None,
            }
        }
    }
    /// Display the operating systems present for the LUN multiprotocol type.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum MultiprotocolType {
        /// Server has no OS specified.
        Unspecified = 0,
        /// Server with Linux OS.
        Linux = 1,
    }
    impl MultiprotocolType {
        /// 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 {
                MultiprotocolType::Unspecified => "MULTIPROTOCOL_TYPE_UNSPECIFIED",
                MultiprotocolType::Linux => "LINUX",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "MULTIPROTOCOL_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "LINUX" => Some(Self::Linux),
                _ => None,
            }
        }
    }
    /// The storage types for a LUN.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum StorageType {
        /// The storage type for this LUN is unknown.
        Unspecified = 0,
        /// This storage type for this LUN is SSD.
        Ssd = 1,
        /// This storage type for this LUN is HDD.
        Hdd = 2,
    }
    impl StorageType {
        /// 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 {
                StorageType::Unspecified => "STORAGE_TYPE_UNSPECIFIED",
                StorageType::Ssd => "SSD",
                StorageType::Hdd => "HDD",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STORAGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "SSD" => Some(Self::Ssd),
                "HDD" => Some(Self::Hdd),
                _ => None,
            }
        }
    }
}
/// Message for requesting storage lun information.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLunRequest {
    /// Required. Name of the resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message for requesting a list of storage volume luns.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLunsRequest {
    /// Required. Parent value for ListLunsRequest.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Requested page size. The server might return fewer items than requested.
    /// If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A token identifying a page of results from the server.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response message containing the list of storage volume luns.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLunsResponse {
    /// The list of luns.
    #[prost(message, repeated, tag = "1")]
    pub luns: ::prost::alloc::vec::Vec<Lun>,
    /// A token identifying a page of results from the server.
    #[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>,
}
/// A Network.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Network {
    /// Output only. The resource name of this `Network`.
    /// Resource names are schemeless URIs that follow the conventions in
    /// <https://cloud.google.com/apis/design/resource_names.>
    /// Format:
    /// `projects/{project}/locations/{location}/networks/{network}`
    #[prost(string, tag = "5")]
    pub name: ::prost::alloc::string::String,
    /// An identifier for the `Network`, generated by the backend.
    #[prost(string, tag = "10")]
    pub id: ::prost::alloc::string::String,
    /// The type of this network.
    #[prost(enumeration = "network::Type", tag = "2")]
    pub r#type: i32,
    /// IP address configured.
    #[prost(string, tag = "3")]
    pub ip_address: ::prost::alloc::string::String,
    /// List of physical interfaces.
    #[prost(string, repeated, tag = "4")]
    pub mac_address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The Network state.
    #[prost(enumeration = "network::State", tag = "6")]
    pub state: i32,
    /// The vlan id of the Network.
    #[prost(string, tag = "7")]
    pub vlan_id: ::prost::alloc::string::String,
    /// The cidr of the Network.
    #[prost(string, tag = "8")]
    pub cidr: ::prost::alloc::string::String,
    /// The vrf for the Network.
    #[prost(message, optional, tag = "9")]
    pub vrf: ::core::option::Option<Vrf>,
    /// Labels as key value pairs.
    #[prost(map = "string, string", tag = "11")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// IP range for reserved for services (e.g. NFS).
    #[prost(string, tag = "12")]
    pub services_cidr: ::prost::alloc::string::String,
    /// List of IP address reservations in this network.
    /// When updating this field, an error will be generated if a reservation
    /// conflicts with an IP address already allocated to a physical server.
    #[prost(message, repeated, tag = "13")]
    pub reservations: ::prost::alloc::vec::Vec<NetworkAddressReservation>,
}
/// Nested message and enum types in `Network`.
pub mod network {
    /// Network type.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// Unspecified value.
        Unspecified = 0,
        /// Client network, a network peered to a Google Cloud VPC.
        Client = 1,
        /// Private network, a network local to the Bare Metal Solution environment.
        Private = 2,
    }
    impl Type {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Type::Unspecified => "TYPE_UNSPECIFIED",
                Type::Client => "CLIENT",
                Type::Private => "PRIVATE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "CLIENT" => Some(Self::Client),
                "PRIVATE" => Some(Self::Private),
                _ => None,
            }
        }
    }
    /// The possible states for this Network.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The Network is in an unknown state.
        Unspecified = 0,
        /// The Network is provisioning.
        Provisioning = 1,
        /// The Network has been provisioned.
        Provisioned = 2,
    }
    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 {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Provisioning => "PROVISIONING",
                State::Provisioned => "PROVISIONED",
            }
        }
        /// 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),
                "PROVISIONING" => Some(Self::Provisioning),
                "PROVISIONED" => Some(Self::Provisioned),
                _ => None,
            }
        }
    }
}
/// A reservation of one or more addresses in a network.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkAddressReservation {
    /// The first address of this reservation block.
    /// Must be specified as a single IPv4 address, e.g. 10.1.2.2.
    #[prost(string, tag = "1")]
    pub start_address: ::prost::alloc::string::String,
    /// The last address of this reservation block, inclusive. I.e., for cases when
    /// reservations are only single addresses, end_address and start_address will
    /// be the same.
    /// Must be specified as a single IPv4 address, e.g. 10.1.2.2.
    #[prost(string, tag = "2")]
    pub end_address: ::prost::alloc::string::String,
    /// A note about this reservation, intended for human consumption.
    #[prost(string, tag = "3")]
    pub note: ::prost::alloc::string::String,
}
/// A network VRF.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Vrf {
    /// The name of the VRF.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The possible state of VRF.
    #[prost(enumeration = "vrf::State", tag = "5")]
    pub state: i32,
    /// The QOS policy applied to this VRF.
    #[prost(message, optional, tag = "6")]
    pub qos_policy: ::core::option::Option<vrf::QosPolicy>,
    /// The list of VLAN attachments for the VRF.
    #[prost(message, repeated, tag = "7")]
    pub vlan_attachments: ::prost::alloc::vec::Vec<vrf::VlanAttachment>,
}
/// Nested message and enum types in `VRF`.
pub mod vrf {
    /// QOS policy parameters.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct QosPolicy {
        /// The bandwidth permitted by the QOS policy, in gbps.
        #[prost(double, tag = "1")]
        pub bandwidth_gbps: f64,
    }
    /// VLAN attachment details.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct VlanAttachment {
        /// The peer vlan ID of the attachment.
        #[prost(int64, tag = "1")]
        pub peer_vlan_id: i64,
        /// The peer IP of the attachment.
        #[prost(string, tag = "2")]
        pub peer_ip: ::prost::alloc::string::String,
        /// The router IP of the attachment.
        #[prost(string, tag = "3")]
        pub router_ip: ::prost::alloc::string::String,
    }
    /// The possible states for this VRF.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The unspecified state.
        Unspecified = 0,
        /// The vrf is provisioning.
        Provisioning = 1,
        /// The vrf is provisioned.
        Provisioned = 2,
    }
    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 {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Provisioning => "PROVISIONING",
                State::Provisioned => "PROVISIONED",
            }
        }
        /// 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),
                "PROVISIONING" => Some(Self::Provisioning),
                "PROVISIONED" => Some(Self::Provisioned),
                _ => None,
            }
        }
    }
}
/// Each logical interface represents a logical abstraction of the underlying
/// physical interface (for eg. bond, nic) of the instance. Each logical
/// interface can effectively map to multiple network-IP pairs and still be
/// mapped to one underlying physical interface.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogicalInterface {
    /// List of logical network interfaces within a logical interface.
    #[prost(message, repeated, tag = "1")]
    pub logical_network_interfaces: ::prost::alloc::vec::Vec<
        logical_interface::LogicalNetworkInterface,
    >,
    /// Interface name. This is of syntax <bond><bond_mode> or <nic> and
    /// forms part of the network template name.
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    /// The index of the logical interface mapping to the index of the hardware
    /// bond or nic on the chosen network template.
    #[prost(int32, tag = "3")]
    pub interface_index: i32,
}
/// Nested message and enum types in `LogicalInterface`.
pub mod logical_interface {
    /// Each logical network interface is effectively a network and IP pair.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct LogicalNetworkInterface {
        /// Name of the network
        #[prost(string, tag = "1")]
        pub network: ::prost::alloc::string::String,
        /// IP address in the network
        #[prost(string, tag = "2")]
        pub ip_address: ::prost::alloc::string::String,
        /// Whether this interface is the default gateway for the instance. Only
        /// one interface can be the default gateway for the instance.
        #[prost(bool, tag = "3")]
        pub default_gateway: bool,
        /// Type of network.
        #[prost(enumeration = "super::network::Type", tag = "4")]
        pub network_type: i32,
        /// An identifier for the `Network`, generated by the backend.
        #[prost(string, tag = "5")]
        pub id: ::prost::alloc::string::String,
    }
}
/// Message for requesting network information.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNetworkRequest {
    /// Required. Name of the resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message for requesting a list of networks.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNetworksRequest {
    /// Required. Parent value for ListNetworksRequest.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Requested page size. The server might return fewer items than requested.
    /// If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A token identifying a page of results from the server.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// List filter.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
}
/// Response message containing the list of networks.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNetworksResponse {
    /// The list of networks.
    #[prost(message, repeated, tag = "1")]
    pub networks: ::prost::alloc::vec::Vec<Network>,
    /// A token identifying a page of results from the server.
    #[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>,
}
/// Message requesting to updating a network.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateNetworkRequest {
    /// Required. The network to update.
    ///
    /// The `name` field is used to identify the instance to update.
    /// Format: projects/{project}/locations/{location}/networks/{network}
    #[prost(message, optional, tag = "1")]
    pub network: ::core::option::Option<Network>,
    /// The list of fields to update.
    /// The only currently supported fields are:
    ///    `labels`, `reservations`
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Network with all used IP addresses.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkUsage {
    /// Network.
    #[prost(message, optional, tag = "1")]
    pub network: ::core::option::Option<Network>,
    /// All used IP addresses in this network.
    #[prost(string, repeated, tag = "2")]
    pub used_ips: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request to get networks with IPs.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNetworkUsageRequest {
    /// Required. Parent value (project and location).
    #[prost(string, tag = "1")]
    pub location: ::prost::alloc::string::String,
}
/// Response with Networks with IPs
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNetworkUsageResponse {
    /// Networks with IPs.
    #[prost(message, repeated, tag = "1")]
    pub networks: ::prost::alloc::vec::Vec<NetworkUsage>,
}
/// A server.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Instance {
    /// Output only. The resource name of this `Instance`.
    /// Resource names are schemeless URIs that follow the conventions in
    /// <https://cloud.google.com/apis/design/resource_names.>
    /// Format:
    /// `projects/{project}/locations/{location}/instances/{instance}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// An identifier for the `Instance`, generated by the backend.
    #[prost(string, tag = "11")]
    pub id: ::prost::alloc::string::String,
    /// Output only. Create a time stamp.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Update a time stamp.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The server type.
    /// [Available server
    /// types](<https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations>)
    #[prost(string, tag = "4")]
    pub machine_type: ::prost::alloc::string::String,
    /// The state of the server.
    #[prost(enumeration = "instance::State", tag = "5")]
    pub state: i32,
    /// True if you enable hyperthreading for the server, otherwise false.
    /// The default value is false.
    #[prost(bool, tag = "6")]
    pub hyperthreading_enabled: bool,
    /// Labels as key value pairs.
    #[prost(map = "string, string", tag = "7")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// List of LUNs associated with this server.
    #[prost(message, repeated, tag = "8")]
    pub luns: ::prost::alloc::vec::Vec<Lun>,
    /// List of networks associated with this server.
    #[prost(message, repeated, tag = "9")]
    pub networks: ::prost::alloc::vec::Vec<Network>,
    /// True if the interactive serial console feature is enabled for the instance,
    /// false otherwise.
    /// The default value is false.
    #[prost(bool, tag = "10")]
    pub interactive_serial_console_enabled: bool,
    /// The OS image currently installed on the server.
    #[prost(string, tag = "12")]
    pub os_image: ::prost::alloc::string::String,
    /// Immutable. Pod name.
    /// Pod is an independent part of infrastructure.
    /// Instance can be connected to the assets (networks, volumes) allocated
    /// in the same pod only.
    #[prost(string, tag = "13")]
    pub pod: ::prost::alloc::string::String,
    /// Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
    /// Generally, the template name follows the syntax of
    /// "bond<bond_mode>" or "nic".
    #[prost(string, tag = "14")]
    pub network_template: ::prost::alloc::string::String,
    /// List of logical interfaces for the instance. The number of logical
    /// interfaces will be the same as number of hardware bond/nic on the chosen
    /// network template. For the non-multivlan configurations (for eg, existing
    /// servers) that use existing default network template (bondaa-bondaa), both
    /// the Instance.networks field and the Instance.logical_interfaces fields will
    /// be filled to ensure backward compatibility. For the others, only
    /// Instance.logical_interfaces will be filled.
    #[prost(message, repeated, tag = "15")]
    pub logical_interfaces: ::prost::alloc::vec::Vec<LogicalInterface>,
}
/// Nested message and enum types in `Instance`.
pub mod instance {
    /// The possible states for this server.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The server is in an unknown state.
        Unspecified = 0,
        /// The server is being provisioned.
        Provisioning = 1,
        /// The server is running.
        Running = 2,
        /// The server has been deleted.
        Deleted = 3,
    }
    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 {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Provisioning => "PROVISIONING",
                State::Running => "RUNNING",
                State::Deleted => "DELETED",
            }
        }
        /// 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),
                "PROVISIONING" => Some(Self::Provisioning),
                "RUNNING" => Some(Self::Running),
                "DELETED" => Some(Self::Deleted),
                _ => None,
            }
        }
    }
}
/// Message for requesting server information.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInstanceRequest {
    /// Required. Name of the resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message for requesting the list of servers.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInstancesRequest {
    /// Required. Parent value for ListInstancesRequest.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Requested page size. Server may return fewer items than requested.
    /// If unspecified, the server will pick an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A token identifying a page of results from the server.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// List filter.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
}
/// Response message for the list of servers.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInstancesResponse {
    /// The list of servers.
    #[prost(message, repeated, tag = "1")]
    pub instances: ::prost::alloc::vec::Vec<Instance>,
    /// A token identifying a page of results from the server.
    #[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>,
}
/// Message requesting to updating a server.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateInstanceRequest {
    /// Required. The server to update.
    ///
    /// The `name` field is used to identify the instance to update.
    /// Format: projects/{project}/locations/{location}/instances/{instance}
    #[prost(message, optional, tag = "1")]
    pub instance: ::core::option::Option<Instance>,
    /// The list of fields to update.
    /// The currently supported fields are:
    ///    `labels`
    ///    `hyperthreading_enabled`
    ///    `os_image`
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Message requesting to reset a server.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResetInstanceRequest {
    /// Required. Name of the resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message requesting to start a server.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartInstanceRequest {
    /// Required. Name of the resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message requesting to stop a server.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopInstanceRequest {
    /// Required. Name of the resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message for detach specific LUN from an Instance.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DetachLunRequest {
    /// Required. Name of the instance.
    #[prost(string, tag = "1")]
    pub instance: ::prost::alloc::string::String,
    /// Required. Name of the Lun to detach.
    #[prost(string, tag = "2")]
    pub lun: ::prost::alloc::string::String,
}
/// Network template.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerNetworkTemplate {
    /// Output only. Template's unique name. The full resource name follows the pattern:
    /// `projects/{project}/locations/{location}/serverNetworkTemplate/{server_network_template}`
    /// Generally, the {server_network_template} follows the syntax of
    /// "bond<interface_type_index><bond_mode>" or "nic<interface_type_index>".
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Instance types this template is applicable to.
    #[prost(string, repeated, tag = "2")]
    pub applicable_instance_types: ::prost::alloc::vec::Vec<
        ::prost::alloc::string::String,
    >,
    /// Logical interfaces.
    #[prost(message, repeated, tag = "3")]
    pub logical_interfaces: ::prost::alloc::vec::Vec<
        server_network_template::LogicalInterface,
    >,
}
/// Nested message and enum types in `ServerNetworkTemplate`.
pub mod server_network_template {
    /// Logical interface.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct LogicalInterface {
        /// Interface name.
        /// This is not a globally unique identifier.
        /// Name is unique only inside the ServerNetworkTemplate. This is of syntax
        /// <bond><interface_type_index><bond_mode> or <nic><interface_type_index>
        /// and forms part of the network template name.
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        /// Interface type.
        #[prost(enumeration = "logical_interface::InterfaceType", tag = "2")]
        pub r#type: i32,
        /// If true, interface must have network connected.
        #[prost(bool, tag = "3")]
        pub required: bool,
    }
    /// Nested message and enum types in `LogicalInterface`.
    pub mod logical_interface {
        /// Interface type.
        #[derive(
            Clone,
            Copy,
            Debug,
            PartialEq,
            Eq,
            Hash,
            PartialOrd,
            Ord,
            ::prost::Enumeration
        )]
        #[repr(i32)]
        pub enum InterfaceType {
            /// Unspecified value.
            Unspecified = 0,
            /// Bond interface type.
            Bond = 1,
            /// NIC interface type.
            Nic = 2,
        }
        impl InterfaceType {
            /// 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 {
                    InterfaceType::Unspecified => "INTERFACE_TYPE_UNSPECIFIED",
                    InterfaceType::Bond => "BOND",
                    InterfaceType::Nic => "NIC",
                }
            }
            /// Creates an enum from field names used in the ProtoBuf definition.
            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                match value {
                    "INTERFACE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                    "BOND" => Some(Self::Bond),
                    "NIC" => Some(Self::Nic),
                    _ => None,
                }
            }
        }
    }
}
/// Response message from starting a server.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartInstanceResponse {}
/// Response message from stopping a server.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopInstanceResponse {}
/// An NFS share.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NfsShare {
    /// Output only. The name of the NFS share.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. An identifier for the NFS share, generated by the backend.
    #[prost(string, tag = "2")]
    pub nfs_share_id: ::prost::alloc::string::String,
    /// The state of the NFS share.
    #[prost(enumeration = "nfs_share::State", tag = "3")]
    pub state: i32,
    /// The volume containing the share.
    #[prost(string, tag = "4")]
    pub volume: ::prost::alloc::string::String,
    /// List of allowed access points.
    #[prost(message, repeated, tag = "5")]
    pub allowed_clients: ::prost::alloc::vec::Vec<nfs_share::AllowedClient>,
    /// Labels as key value pairs.
    #[prost(map = "string, string", tag = "6")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// Nested message and enum types in `NfsShare`.
pub mod nfs_share {
    /// Represents an 'access point' for the share.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct AllowedClient {
        /// The network the access point sits on.
        #[prost(string, tag = "1")]
        pub network: ::prost::alloc::string::String,
        /// The IP address of the share on this network.
        #[prost(string, tag = "2")]
        pub share_ip: ::prost::alloc::string::String,
        /// The subnet of IP addresses permitted to access the share.
        #[prost(string, tag = "3")]
        pub allowed_clients_cidr: ::prost::alloc::string::String,
        /// Mount permissions.
        #[prost(enumeration = "MountPermissions", tag = "4")]
        pub mount_permissions: i32,
        /// Allow dev flag.  Which controls whether to allow creation of devices.
        #[prost(bool, tag = "5")]
        pub allow_dev: bool,
        /// Allow the setuid flag.
        #[prost(bool, tag = "6")]
        pub allow_suid: bool,
        /// Disable root squashing, which is a feature of NFS.
        /// Root squash is a special mapping of the remote superuser (root) identity
        /// when using identity authentication.
        #[prost(bool, tag = "7")]
        pub no_root_squash: bool,
    }
    /// The possible states for this NFS share.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The share is in an unknown state.
        Unspecified = 0,
        /// The share has been provisioned.
        Provisioned = 1,
    }
    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 {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Provisioned => "PROVISIONED",
            }
        }
        /// 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),
                "PROVISIONED" => Some(Self::Provisioned),
                _ => None,
            }
        }
    }
    /// The possible mount permissions.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum MountPermissions {
        /// Permissions were not specified.
        Unspecified = 0,
        /// NFS share can be mount with read-only permissions.
        Read = 1,
        /// NFS share can be mount with read-write permissions.
        ReadWrite = 2,
    }
    impl MountPermissions {
        /// 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 {
                MountPermissions::Unspecified => "MOUNT_PERMISSIONS_UNSPECIFIED",
                MountPermissions::Read => "READ",
                MountPermissions::ReadWrite => "READ_WRITE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "MOUNT_PERMISSIONS_UNSPECIFIED" => Some(Self::Unspecified),
                "READ" => Some(Self::Read),
                "READ_WRITE" => Some(Self::ReadWrite),
                _ => None,
            }
        }
    }
}
/// Message for requesting NFS share information.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNfsShareRequest {
    /// Required. Name of the resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message for requesting a list of NFS shares.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNfsSharesRequest {
    /// Required. Parent value for ListNfsSharesRequest.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Requested page size. The server might return fewer items than requested.
    /// If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A token identifying a page of results from the server.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// List filter.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
}
/// Response message containing the list of NFS shares.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNfsSharesResponse {
    /// The list of NFS shares.
    #[prost(message, repeated, tag = "1")]
    pub nfs_shares: ::prost::alloc::vec::Vec<NfsShare>,
    /// A token identifying a page of results from the server.
    #[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>,
}
/// Message requesting to updating a NFS share.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateNfsShareRequest {
    /// Required. The NFS share to update.
    ///
    /// The `name` field is used to identify the NFS share to update.
    /// Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
    #[prost(message, optional, tag = "1")]
    pub nfs_share: ::core::option::Option<NfsShare>,
    /// The list of fields to update.
    /// The only currently supported fields are:
    ///    `labels`
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// A storage volume.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Volume {
    /// Output only. The resource name of this `Volume`.
    /// Resource names are schemeless URIs that follow the conventions in
    /// <https://cloud.google.com/apis/design/resource_names.>
    /// Format:
    /// `projects/{project}/locations/{location}/volumes/{volume}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// An identifier for the `Volume`, generated by the backend.
    #[prost(string, tag = "11")]
    pub id: ::prost::alloc::string::String,
    /// The storage type for this volume.
    #[prost(enumeration = "volume::StorageType", tag = "2")]
    pub storage_type: i32,
    /// The state of this storage volume.
    #[prost(enumeration = "volume::State", tag = "3")]
    pub state: i32,
    /// The requested size of this storage volume, in GiB.
    #[prost(int64, tag = "4")]
    pub requested_size_gib: i64,
    /// The current size of this storage volume, in GiB, including space reserved
    /// for snapshots. This size might be different than the requested size if the
    /// storage volume has been configured with auto grow or auto shrink.
    #[prost(int64, tag = "5")]
    pub current_size_gib: i64,
    /// Additional emergency size that was requested for this Volume, in GiB.
    /// current_size_gib includes this value.
    #[prost(int64, tag = "14")]
    pub emergency_size_gib: i64,
    /// The size, in GiB, that this storage volume has expanded as a result of an
    /// auto grow policy. In the absence of auto-grow, the value is 0.
    #[prost(int64, tag = "6")]
    pub auto_grown_size_gib: i64,
    /// The space remaining in the storage volume for new LUNs, in GiB, excluding
    /// space reserved for snapshots.
    #[prost(int64, tag = "7")]
    pub remaining_space_gib: i64,
    /// Details about snapshot space reservation and usage on the storage volume.
    #[prost(message, optional, tag = "8")]
    pub snapshot_reservation_detail: ::core::option::Option<
        volume::SnapshotReservationDetail,
    >,
    /// The behavior to use when snapshot reserved space is full.
    #[prost(enumeration = "volume::SnapshotAutoDeleteBehavior", tag = "9")]
    pub snapshot_auto_delete_behavior: i32,
    /// Labels as key value pairs.
    #[prost(map = "string, string", tag = "12")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Whether snapshots are enabled.
    #[prost(bool, tag = "13")]
    pub snapshot_enabled: bool,
    /// Immutable. Pod name.
    #[prost(string, tag = "15")]
    pub pod: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Volume`.
pub mod volume {
    /// Details about snapshot space reservation and usage on the storage volume.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SnapshotReservationDetail {
        /// The space on this storage volume reserved for snapshots, shown in GiB.
        #[prost(int64, tag = "1")]
        pub reserved_space_gib: i64,
        /// The percent of snapshot space on this storage volume actually being used
        /// by the snapshot copies. This value might be higher than 100% if the
        /// snapshot copies have overflowed into the data portion of the storage
        /// volume.
        #[prost(int32, tag = "2")]
        pub reserved_space_used_percent: i32,
        /// The amount, in GiB, of available space in this storage volume's reserved
        /// snapshot space.
        #[prost(int64, tag = "3")]
        pub reserved_space_remaining_gib: i64,
        /// Percent of the total Volume size reserved for snapshot copies.
        /// Enabling snapshots requires reserving 20% or more of
        /// the storage volume space for snapshots. Maximum reserved space for
        /// snapshots is 40%.
        /// Setting this field will effectively set snapshot_enabled to true.
        #[prost(int32, tag = "4")]
        pub reserved_space_percent: i32,
    }
    /// The storage type for a volume.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum StorageType {
        /// The storage type for this volume is unknown.
        Unspecified = 0,
        /// The storage type for this volume is SSD.
        Ssd = 1,
        /// This storage type for this volume is HDD.
        Hdd = 2,
    }
    impl StorageType {
        /// 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 {
                StorageType::Unspecified => "STORAGE_TYPE_UNSPECIFIED",
                StorageType::Ssd => "SSD",
                StorageType::Hdd => "HDD",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STORAGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "SSD" => Some(Self::Ssd),
                "HDD" => Some(Self::Hdd),
                _ => None,
            }
        }
    }
    /// The possible states for a storage volume.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// The storage volume is in an unknown state.
        Unspecified = 0,
        /// The storage volume is being created.
        Creating = 1,
        /// The storage volume is ready for use.
        Ready = 2,
        /// The storage volume has been requested to be deleted.
        Deleting = 3,
    }
    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 {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Creating => "CREATING",
                State::Ready => "READY",
                State::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),
                "READY" => Some(Self::Ready),
                "DELETING" => Some(Self::Deleting),
                _ => None,
            }
        }
    }
    /// The kinds of auto delete behavior to use when snapshot reserved space is
    /// full.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum SnapshotAutoDeleteBehavior {
        /// The unspecified behavior.
        Unspecified = 0,
        /// Don't delete any snapshots. This disables new snapshot creation, as
        /// long as the snapshot reserved space is full.
        Disabled = 1,
        /// Delete the oldest snapshots first.
        OldestFirst = 2,
        /// Delete the newest snapshots first.
        NewestFirst = 3,
    }
    impl SnapshotAutoDeleteBehavior {
        /// 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 {
                SnapshotAutoDeleteBehavior::Unspecified => {
                    "SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED"
                }
                SnapshotAutoDeleteBehavior::Disabled => "DISABLED",
                SnapshotAutoDeleteBehavior::OldestFirst => "OLDEST_FIRST",
                SnapshotAutoDeleteBehavior::NewestFirst => "NEWEST_FIRST",
            }
        }
        /// 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_AUTO_DELETE_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
                "DISABLED" => Some(Self::Disabled),
                "OLDEST_FIRST" => Some(Self::OldestFirst),
                "NEWEST_FIRST" => Some(Self::NewestFirst),
                _ => None,
            }
        }
    }
}
/// Message for requesting storage volume information.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVolumeRequest {
    /// Required. Name of the resource.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Message for requesting a list of storage volumes.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVolumesRequest {
    /// Required. Parent value for ListVolumesRequest.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Requested page size. The server might return fewer items than requested.
    /// If unspecified, server will pick an appropriate default.
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    /// A token identifying a page of results from the server.
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
    /// List filter.
    #[prost(string, tag = "4")]
    pub filter: ::prost::alloc::string::String,
}
/// Response message containing the list of storage volumes.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVolumesResponse {
    /// The list of storage volumes.
    #[prost(message, repeated, tag = "1")]
    pub volumes: ::prost::alloc::vec::Vec<Volume>,
    /// A token identifying a page of results from the server.
    #[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>,
}
/// Message for updating a volume.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateVolumeRequest {
    /// Required. The volume to update.
    ///
    /// The `name` field is used to identify the volume to update.
    /// Format: projects/{project}/locations/{location}/volumes/{volume}
    #[prost(message, optional, tag = "1")]
    pub volume: ::core::option::Option<Volume>,
    /// The list of fields to update.
    /// The only currently supported fields are:
    ///    `snapshot_auto_delete_behavior`
    ///    `snapshot_schedule_policy_name`
    ///    'labels'
    ///    'snapshot_enabled'
    ///    'snapshot_reservation_detail.reserved_space_percent'
    #[prost(message, optional, tag = "2")]
    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// Request for emergency resize Volume.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResizeVolumeRequest {
    /// Required. Volume to resize.
    #[prost(string, tag = "1")]
    pub volume: ::prost::alloc::string::String,
    /// New Volume size, in GiB.
    #[prost(int64, tag = "2")]
    pub size_gib: i64,
}
/// Represents the metadata from a long-running operation.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
    /// The time the operation was created.
    #[prost(message, optional, tag = "1")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The time the operation finished running.
    #[prost(message, optional, tag = "2")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Server-defined resource path for the target of the operation.
    #[prost(string, tag = "3")]
    pub target: ::prost::alloc::string::String,
    /// Name of the action executed by the operation.
    #[prost(string, tag = "4")]
    pub verb: ::prost::alloc::string::String,
    /// Human-readable status of the operation, if any.
    #[prost(string, tag = "5")]
    pub status_message: ::prost::alloc::string::String,
    /// Identifies whether the user requested the cancellation
    /// of the operation. Operations that have been successfully cancelled
    /// have \[Operation.error][\] value with a \[google.rpc.Status.code][\] of 1,
    /// corresponding to `Code.CANCELLED`.
    #[prost(bool, tag = "6")]
    pub requested_cancellation: bool,
    /// API version used with the operation.
    #[prost(string, tag = "7")]
    pub api_version: ::prost::alloc::string::String,
}
/// Response message from resetting a server.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResetInstanceResponse {}
/// Generated client implementations.
pub mod bare_metal_solution_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Performs management operations on Bare Metal Solution servers.
    ///
    /// The `baremetalsolution.googleapis.com` service provides management
    /// capabilities for Bare Metal Solution servers. To access the API methods, you
    /// must assign Bare Metal Solution IAM roles containing the desired permissions
    /// to your staff in your Google Cloud project. You must also enable the Bare
    /// Metal Solution API. Once enabled, the methods act
    /// upon specific servers in your Bare Metal Solution environment.
    #[derive(Debug, Clone)]
    pub struct BareMetalSolutionClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl BareMetalSolutionClient<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: std::convert::TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> BareMetalSolutionClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + 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,
        ) -> BareMetalSolutionClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            BareMetalSolutionClient::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
        }
        /// List servers in a given project and location.
        pub async fn list_instances(
            &mut self,
            request: impl tonic::IntoRequest<super::ListInstancesRequest>,
        ) -> Result<tonic::Response<super::ListInstancesResponse>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/ListInstances",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// Get details about a single server.
        pub async fn get_instance(
            &mut self,
            request: impl tonic::IntoRequest<super::GetInstanceRequest>,
        ) -> Result<tonic::Response<super::Instance>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/GetInstance",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// Update details of a single server.
        pub async fn update_instance(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateInstanceRequest>,
        ) -> Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/UpdateInstance",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// Perform an ungraceful, hard reset on a server. Equivalent to shutting the
        /// power off and then turning it back on.
        pub async fn reset_instance(
            &mut self,
            request: impl tonic::IntoRequest<super::ResetInstanceRequest>,
        ) -> Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/ResetInstance",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// Starts a server that was shutdown.
        pub async fn start_instance(
            &mut self,
            request: impl tonic::IntoRequest<super::StartInstanceRequest>,
        ) -> Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/StartInstance",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// Stop a running server.
        pub async fn stop_instance(
            &mut self,
            request: impl tonic::IntoRequest<super::StopInstanceRequest>,
        ) -> Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/StopInstance",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// Detach LUN from Instance.
        pub async fn detach_lun(
            &mut self,
            request: impl tonic::IntoRequest<super::DetachLunRequest>,
        ) -> Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/DetachLun",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// List storage volumes in a given project and location.
        pub async fn list_volumes(
            &mut self,
            request: impl tonic::IntoRequest<super::ListVolumesRequest>,
        ) -> Result<tonic::Response<super::ListVolumesResponse>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/ListVolumes",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// Get details of a single storage volume.
        pub async fn get_volume(
            &mut self,
            request: impl tonic::IntoRequest<super::GetVolumeRequest>,
        ) -> Result<tonic::Response<super::Volume>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/GetVolume",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// Update details of a single storage volume.
        pub async fn update_volume(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateVolumeRequest>,
        ) -> Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/UpdateVolume",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// Emergency Volume resize.
        pub async fn resize_volume(
            &mut self,
            request: impl tonic::IntoRequest<super::ResizeVolumeRequest>,
        ) -> Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/ResizeVolume",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// List network in a given project and location.
        pub async fn list_networks(
            &mut self,
            request: impl tonic::IntoRequest<super::ListNetworksRequest>,
        ) -> Result<tonic::Response<super::ListNetworksResponse>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/ListNetworks",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// List all Networks (and used IPs for each Network) in the vendor account
        /// associated with the specified project.
        pub async fn list_network_usage(
            &mut self,
            request: impl tonic::IntoRequest<super::ListNetworkUsageRequest>,
        ) -> Result<tonic::Response<super::ListNetworkUsageResponse>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/ListNetworkUsage",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// Get details of a single network.
        pub async fn get_network(
            &mut self,
            request: impl tonic::IntoRequest<super::GetNetworkRequest>,
        ) -> Result<tonic::Response<super::Network>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/GetNetwork",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// Update details of a single network.
        pub async fn update_network(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateNetworkRequest>,
        ) -> Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/UpdateNetwork",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// Get details of a single storage logical unit number(LUN).
        pub async fn get_lun(
            &mut self,
            request: impl tonic::IntoRequest<super::GetLunRequest>,
        ) -> Result<tonic::Response<super::Lun>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/GetLun",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// List storage volume luns for given storage volume.
        pub async fn list_luns(
            &mut self,
            request: impl tonic::IntoRequest<super::ListLunsRequest>,
        ) -> Result<tonic::Response<super::ListLunsResponse>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/ListLuns",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// Get details of a single NFS share.
        pub async fn get_nfs_share(
            &mut self,
            request: impl tonic::IntoRequest<super::GetNfsShareRequest>,
        ) -> Result<tonic::Response<super::NfsShare>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/GetNfsShare",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// List NFS shares.
        pub async fn list_nfs_shares(
            &mut self,
            request: impl tonic::IntoRequest<super::ListNfsSharesRequest>,
        ) -> Result<tonic::Response<super::ListNfsSharesResponse>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/ListNfsShares",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
        /// Update details of a single NFS share.
        pub async fn update_nfs_share(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateNfsShareRequest>,
        ) -> Result<
            tonic::Response<super::super::super::super::longrunning::Operation>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.baremetalsolution.v2.BareMetalSolution/UpdateNfsShare",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
    }
}