gcloud-sdk 0.30.0

Async Google gRPC/REST APIs and the client implementation hiding complexity of GCP authentication based on Tonic middleware and Reqwest.
Documentation
use serde::{Deserialize, Serialize}; /*
                                      * Google Cloud Managed Lustre API
                                      *
                                      * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::lustre_v1::models;

/// Instance : A Managed Lustre instance.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Instance {
    /// Required. The storage capacity of the instance in gibibytes (GiB). Allowed values are from `18000` to `936000`, in increments of 9000.
    #[serde(rename = "capacityGib", skip_serializing_if = "Option::is_none")]
    pub capacity_gib: Option<String>,
    /// Output only. Timestamp when the instance was created.
    #[serde(rename = "createTime", skip_serializing_if = "Option::is_none")]
    pub create_time: Option<String>,
    /// Optional. A user-readable description of the instance.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// Required. Immutable. The filesystem name for this instance. This name is used by client-side tools, including when mounting the instance. Must be eight characters or less and can only contain letters and numbers.
    #[serde(rename = "filesystem", skip_serializing_if = "Option::is_none")]
    pub filesystem: Option<String>,
    /// Optional. Indicates whether you want to enable support for GKE clients. By default, GKE clients are not supported.
    #[serde(rename = "gkeSupportEnabled", skip_serializing_if = "Option::is_none")]
    pub gke_support_enabled: Option<bool>,
    /// Optional. Labels as key value pairs.
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
    pub labels: Option<std::collections::HashMap<String, String>>,
    /// Output only. Mount point of the instance in the format `IP_ADDRESS@tcp:/FILESYSTEM`.
    #[serde(rename = "mountPoint", skip_serializing_if = "Option::is_none")]
    pub mount_point: Option<String>,
    /// Identifier. The name of the instance.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Required. Immutable. The full name of the VPC network to which the instance is connected. Must be in the format `projects/{project_id}/global/networks/{network_name}`.
    #[serde(rename = "network", skip_serializing_if = "Option::is_none")]
    pub network: Option<String>,
    /// Output only. The state of the instance.
    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
    pub state: Option<State>,
    /// Output only. Timestamp when the instance was last updated.
    #[serde(rename = "updateTime", skip_serializing_if = "Option::is_none")]
    pub update_time: Option<String>,
}

impl Instance {
    /// A Managed Lustre instance.
    pub fn new() -> Instance {
        Instance {
            capacity_gib: None,
            create_time: None,
            description: None,
            filesystem: None,
            gke_support_enabled: None,
            labels: None,
            mount_point: None,
            name: None,
            network: None,
            state: None,
            update_time: None,
        }
    }
}
/// Output only. The state of the instance.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum State {
    #[serde(rename = "STATE_UNSPECIFIED")]
    StateUnspecified,
    #[serde(rename = "ACTIVE")]
    Active,
    #[serde(rename = "CREATING")]
    Creating,
    #[serde(rename = "DELETING")]
    Deleting,
    #[serde(rename = "UPGRADING")]
    Upgrading,
    #[serde(rename = "REPAIRING")]
    Repairing,
    #[serde(rename = "STOPPED")]
    Stopped,
}

impl Default for State {
    fn default() -> State {
        Self::StateUnspecified
    }
}