#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Lun {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
pub id: ::prost::alloc::string::String,
#[prost(enumeration = "lun::State", tag = "2")]
pub state: i32,
#[prost(int64, tag = "3")]
pub size_gb: i64,
#[prost(enumeration = "lun::MultiprotocolType", tag = "4")]
pub multiprotocol_type: i32,
#[prost(string, tag = "5")]
pub storage_volume: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub shareable: bool,
#[prost(bool, tag = "7")]
pub boot_lun: bool,
#[prost(enumeration = "lun::StorageType", tag = "8")]
pub storage_type: i32,
#[prost(string, tag = "9")]
pub wwid: ::prost::alloc::string::String,
}
pub mod lun {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Creating = 1,
Updating = 2,
Ready = 3,
Deleting = 4,
}
impl State {
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",
}
}
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,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum MultiprotocolType {
Unspecified = 0,
Linux = 1,
}
impl MultiprotocolType {
pub fn as_str_name(&self) -> &'static str {
match self {
MultiprotocolType::Unspecified => "MULTIPROTOCOL_TYPE_UNSPECIFIED",
MultiprotocolType::Linux => "LINUX",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MULTIPROTOCOL_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"LINUX" => Some(Self::Linux),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum StorageType {
Unspecified = 0,
Ssd = 1,
Hdd = 2,
}
impl StorageType {
pub fn as_str_name(&self) -> &'static str {
match self {
StorageType::Unspecified => "STORAGE_TYPE_UNSPECIFIED",
StorageType::Ssd => "SSD",
StorageType::Hdd => "HDD",
}
}
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,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLunRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLunsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLunsResponse {
#[prost(message, repeated, tag = "1")]
pub luns: ::prost::alloc::vec::Vec<Lun>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Network {
#[prost(string, tag = "5")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
pub id: ::prost::alloc::string::String,
#[prost(enumeration = "network::Type", tag = "2")]
pub r#type: i32,
#[prost(string, tag = "3")]
pub ip_address: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "4")]
pub mac_address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "network::State", tag = "6")]
pub state: i32,
#[prost(string, tag = "7")]
pub vlan_id: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub cidr: ::prost::alloc::string::String,
#[prost(message, optional, tag = "9")]
pub vrf: ::core::option::Option<Vrf>,
#[prost(map = "string, string", tag = "11")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, tag = "12")]
pub services_cidr: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "13")]
pub reservations: ::prost::alloc::vec::Vec<NetworkAddressReservation>,
}
pub mod network {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Client = 1,
Private = 2,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Client => "CLIENT",
Type::Private => "PRIVATE",
}
}
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,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Provisioning = 1,
Provisioned = 2,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Provisioning => "PROVISIONING",
State::Provisioned => "PROVISIONED",
}
}
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,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkAddressReservation {
#[prost(string, tag = "1")]
pub start_address: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub end_address: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub note: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Vrf {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "vrf::State", tag = "5")]
pub state: i32,
#[prost(message, optional, tag = "6")]
pub qos_policy: ::core::option::Option<vrf::QosPolicy>,
#[prost(message, repeated, tag = "7")]
pub vlan_attachments: ::prost::alloc::vec::Vec<vrf::VlanAttachment>,
}
pub mod vrf {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QosPolicy {
#[prost(double, tag = "1")]
pub bandwidth_gbps: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VlanAttachment {
#[prost(int64, tag = "1")]
pub peer_vlan_id: i64,
#[prost(string, tag = "2")]
pub peer_ip: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub router_ip: ::prost::alloc::string::String,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Provisioning = 1,
Provisioned = 2,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Provisioning => "PROVISIONING",
State::Provisioned => "PROVISIONED",
}
}
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,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogicalInterface {
#[prost(message, repeated, tag = "1")]
pub logical_network_interfaces: ::prost::alloc::vec::Vec<
logical_interface::LogicalNetworkInterface,
>,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub interface_index: i32,
}
pub mod logical_interface {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogicalNetworkInterface {
#[prost(string, tag = "1")]
pub network: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub ip_address: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub default_gateway: bool,
#[prost(enumeration = "super::network::Type", tag = "4")]
pub network_type: i32,
#[prost(string, tag = "5")]
pub id: ::prost::alloc::string::String,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNetworkRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNetworksRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNetworksResponse {
#[prost(message, repeated, tag = "1")]
pub networks: ::prost::alloc::vec::Vec<Network>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateNetworkRequest {
#[prost(message, optional, tag = "1")]
pub network: ::core::option::Option<Network>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkUsage {
#[prost(message, optional, tag = "1")]
pub network: ::core::option::Option<Network>,
#[prost(string, repeated, tag = "2")]
pub used_ips: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNetworkUsageRequest {
#[prost(string, tag = "1")]
pub location: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNetworkUsageResponse {
#[prost(message, repeated, tag = "1")]
pub networks: ::prost::alloc::vec::Vec<NetworkUsage>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Instance {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "4")]
pub machine_type: ::prost::alloc::string::String,
#[prost(enumeration = "instance::State", tag = "5")]
pub state: i32,
#[prost(bool, tag = "6")]
pub hyperthreading_enabled: bool,
#[prost(map = "string, string", tag = "7")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, repeated, tag = "8")]
pub luns: ::prost::alloc::vec::Vec<Lun>,
#[prost(message, repeated, tag = "9")]
pub networks: ::prost::alloc::vec::Vec<Network>,
#[prost(bool, tag = "10")]
pub interactive_serial_console_enabled: bool,
#[prost(string, tag = "12")]
pub os_image: ::prost::alloc::string::String,
#[prost(string, tag = "13")]
pub pod: ::prost::alloc::string::String,
#[prost(string, tag = "14")]
pub network_template: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "15")]
pub logical_interfaces: ::prost::alloc::vec::Vec<LogicalInterface>,
}
pub mod instance {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Provisioning = 1,
Running = 2,
Deleted = 3,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Provisioning => "PROVISIONING",
State::Running => "RUNNING",
State::Deleted => "DELETED",
}
}
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,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInstanceRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInstancesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInstancesResponse {
#[prost(message, repeated, tag = "1")]
pub instances: ::prost::alloc::vec::Vec<Instance>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateInstanceRequest {
#[prost(message, optional, tag = "1")]
pub instance: ::core::option::Option<Instance>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResetInstanceRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartInstanceRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopInstanceRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DetachLunRequest {
#[prost(string, tag = "1")]
pub instance: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub lun: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerNetworkTemplate {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub applicable_instance_types: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(message, repeated, tag = "3")]
pub logical_interfaces: ::prost::alloc::vec::Vec<
server_network_template::LogicalInterface,
>,
}
pub mod server_network_template {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogicalInterface {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "logical_interface::InterfaceType", tag = "2")]
pub r#type: i32,
#[prost(bool, tag = "3")]
pub required: bool,
}
pub mod logical_interface {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum InterfaceType {
Unspecified = 0,
Bond = 1,
Nic = 2,
}
impl InterfaceType {
pub fn as_str_name(&self) -> &'static str {
match self {
InterfaceType::Unspecified => "INTERFACE_TYPE_UNSPECIFIED",
InterfaceType::Bond => "BOND",
InterfaceType::Nic => "NIC",
}
}
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,
}
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartInstanceResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopInstanceResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NfsShare {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub nfs_share_id: ::prost::alloc::string::String,
#[prost(enumeration = "nfs_share::State", tag = "3")]
pub state: i32,
#[prost(string, tag = "4")]
pub volume: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "5")]
pub allowed_clients: ::prost::alloc::vec::Vec<nfs_share::AllowedClient>,
#[prost(map = "string, string", tag = "6")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
pub mod nfs_share {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllowedClient {
#[prost(string, tag = "1")]
pub network: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub share_ip: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub allowed_clients_cidr: ::prost::alloc::string::String,
#[prost(enumeration = "MountPermissions", tag = "4")]
pub mount_permissions: i32,
#[prost(bool, tag = "5")]
pub allow_dev: bool,
#[prost(bool, tag = "6")]
pub allow_suid: bool,
#[prost(bool, tag = "7")]
pub no_root_squash: bool,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Provisioned = 1,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Provisioned => "PROVISIONED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"PROVISIONED" => Some(Self::Provisioned),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum MountPermissions {
Unspecified = 0,
Read = 1,
ReadWrite = 2,
}
impl MountPermissions {
pub fn as_str_name(&self) -> &'static str {
match self {
MountPermissions::Unspecified => "MOUNT_PERMISSIONS_UNSPECIFIED",
MountPermissions::Read => "READ",
MountPermissions::ReadWrite => "READ_WRITE",
}
}
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,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNfsShareRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNfsSharesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNfsSharesResponse {
#[prost(message, repeated, tag = "1")]
pub nfs_shares: ::prost::alloc::vec::Vec<NfsShare>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateNfsShareRequest {
#[prost(message, optional, tag = "1")]
pub nfs_share: ::core::option::Option<NfsShare>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Volume {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub id: ::prost::alloc::string::String,
#[prost(enumeration = "volume::StorageType", tag = "2")]
pub storage_type: i32,
#[prost(enumeration = "volume::State", tag = "3")]
pub state: i32,
#[prost(int64, tag = "4")]
pub requested_size_gib: i64,
#[prost(int64, tag = "5")]
pub current_size_gib: i64,
#[prost(int64, tag = "14")]
pub emergency_size_gib: i64,
#[prost(int64, tag = "6")]
pub auto_grown_size_gib: i64,
#[prost(int64, tag = "7")]
pub remaining_space_gib: i64,
#[prost(message, optional, tag = "8")]
pub snapshot_reservation_detail: ::core::option::Option<
volume::SnapshotReservationDetail,
>,
#[prost(enumeration = "volume::SnapshotAutoDeleteBehavior", tag = "9")]
pub snapshot_auto_delete_behavior: i32,
#[prost(map = "string, string", tag = "12")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(bool, tag = "13")]
pub snapshot_enabled: bool,
#[prost(string, tag = "15")]
pub pod: ::prost::alloc::string::String,
}
pub mod volume {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SnapshotReservationDetail {
#[prost(int64, tag = "1")]
pub reserved_space_gib: i64,
#[prost(int32, tag = "2")]
pub reserved_space_used_percent: i32,
#[prost(int64, tag = "3")]
pub reserved_space_remaining_gib: i64,
#[prost(int32, tag = "4")]
pub reserved_space_percent: i32,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum StorageType {
Unspecified = 0,
Ssd = 1,
Hdd = 2,
}
impl StorageType {
pub fn as_str_name(&self) -> &'static str {
match self {
StorageType::Unspecified => "STORAGE_TYPE_UNSPECIFIED",
StorageType::Ssd => "SSD",
StorageType::Hdd => "HDD",
}
}
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,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Creating = 1,
Ready = 2,
Deleting = 3,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Creating => "CREATING",
State::Ready => "READY",
State::Deleting => "DELETING",
}
}
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,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SnapshotAutoDeleteBehavior {
Unspecified = 0,
Disabled = 1,
OldestFirst = 2,
NewestFirst = 3,
}
impl SnapshotAutoDeleteBehavior {
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",
}
}
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,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVolumeRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVolumesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVolumesResponse {
#[prost(message, repeated, tag = "1")]
pub volumes: ::prost::alloc::vec::Vec<Volume>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateVolumeRequest {
#[prost(message, optional, tag = "1")]
pub volume: ::core::option::Option<Volume>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResizeVolumeRequest {
#[prost(string, tag = "1")]
pub volume: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub size_gib: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
#[prost(message, optional, tag = "1")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "3")]
pub target: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub verb: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub status_message: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub requested_cancellation: bool,
#[prost(string, tag = "7")]
pub api_version: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResetInstanceResponse {}
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;
#[derive(Debug, Clone)]
pub struct BareMetalSolutionClient<T> {
inner: tonic::client::Grpc<T>,
}
impl BareMetalSolutionClient<tonic::transport::Channel> {
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))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
}
}