Skip to main content

Volume

Struct Volume 

Source
#[non_exhaustive]
pub struct Volume {
Show 42 fields pub name: String, pub state: State, pub state_details: String, pub create_time: Option<Timestamp>, pub share_name: String, pub psa_range: String, pub storage_pool: String, pub network: String, pub service_level: ServiceLevel, pub capacity_gib: i64, pub export_policy: Option<ExportPolicy>, pub protocols: Vec<Protocols>, pub smb_settings: Vec<SMBSettings>, pub mount_options: Vec<MountOption>, pub unix_permissions: String, pub labels: HashMap<String, String>, pub description: String, pub snapshot_policy: Option<SnapshotPolicy>, pub snap_reserve: f64, pub snapshot_directory: bool, pub used_gib: i64, pub security_style: SecurityStyle, pub kerberos_enabled: bool, pub ldap_enabled: bool, pub active_directory: String, pub restore_parameters: Option<RestoreParameters>, pub kms_config: String, pub encryption_type: EncryptionType, pub has_replication: bool, pub backup_config: Option<BackupConfig>, pub restricted_actions: Vec<RestrictedAction>, pub large_capacity: bool, pub multiple_endpoints: bool, pub tiering_policy: Option<TieringPolicy>, pub replica_zone: String, pub zone: String, pub cold_tier_size_gib: i64, pub hybrid_replication_parameters: Option<HybridReplicationParameters>, pub throughput_mibps: f64, pub cache_parameters: Option<CacheParameters>, pub hot_tier_size_used_gib: i64, pub block_devices: Vec<BlockDevice>, /* private fields */
}
Expand description

Volume provides a filesystem that you can mount.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: String

Identifier. Name of the volume

§state: State

Output only. State of the volume

§state_details: String

Output only. State details of the volume

§create_time: Option<Timestamp>

Output only. Create time of the volume

§share_name: String

Required. Share name of the volume

§psa_range: String

Output only. This field is not implemented. The values provided in this field are ignored.

§storage_pool: String

Required. StoragePool name of the volume

§network: String

Output only. VPC Network name. Format: projects/{project}/global/networks/{network}

§service_level: ServiceLevel

Output only. Service level of the volume

§capacity_gib: i64

Required. Capacity in GIB of the volume

§export_policy: Option<ExportPolicy>

Optional. Export policy of the volume

§protocols: Vec<Protocols>

Required. Protocols required for the volume

§smb_settings: Vec<SMBSettings>

Optional. SMB share settings for the volume.

§mount_options: Vec<MountOption>

Output only. Mount options of this volume

§unix_permissions: String

Optional. Default unix style permission (e.g. 777) the mount point will be created with. Applicable for NFS protocol types only.

§labels: HashMap<String, String>

Optional. Labels as key value pairs

§description: String

Optional. Description of the volume

§snapshot_policy: Option<SnapshotPolicy>

Optional. SnapshotPolicy for a volume.

§snap_reserve: f64

Optional. Snap_reserve specifies percentage of volume storage reserved for snapshot storage. Default is 0 percent.

§snapshot_directory: bool

Optional. Snapshot_directory if enabled (true) the volume will contain a read-only .snapshot directory which provides access to each of the volume’s snapshots.

§used_gib: i64

Output only. Used capacity in GIB of the volume. This is computed periodically and it does not represent the realtime usage.

§security_style: SecurityStyle

Optional. Security Style of the Volume

§kerberos_enabled: bool

Optional. Flag indicating if the volume is a kerberos volume or not, export policy rules control kerberos security modes (krb5, krb5i, krb5p).

§ldap_enabled: bool

Output only. Flag indicating if the volume is NFS LDAP enabled or not.

§active_directory: String

Output only. Specifies the ActiveDirectory name of a SMB volume.

§restore_parameters: Option<RestoreParameters>

Optional. Specifies the source of the volume to be created from.

§kms_config: String

Output only. Specifies the KMS config to be used for volume encryption.

§encryption_type: EncryptionType

Output only. Specified the current volume encryption key source.

§has_replication: bool

Output only. Indicates whether the volume is part of a replication relationship.

§backup_config: Option<BackupConfig>

BackupConfig of the volume.

§restricted_actions: Vec<RestrictedAction>

Optional. List of actions that are restricted on this volume.

§large_capacity: bool

Optional. Flag indicating if the volume will be a large capacity volume or a regular volume.

§multiple_endpoints: bool

Optional. Flag indicating if the volume will have an IP address per node for volumes supporting multiple IP endpoints. Only the volume with large_capacity will be allowed to have multiple endpoints.

§tiering_policy: Option<TieringPolicy>

Tiering policy for the volume.

§replica_zone: String

Output only. Specifies the replica zone for regional volume.

§zone: String

Output only. Specifies the active zone for regional volume.

§cold_tier_size_gib: i64

Output only. Size of the volume cold tier data rounded down to the nearest GiB.

§hybrid_replication_parameters: Option<HybridReplicationParameters>

Optional. The Hybrid Replication parameters for the volume.

§throughput_mibps: f64

Optional. Throughput of the volume (in MiB/s)

§cache_parameters: Option<CacheParameters>

Optional. Cache parameters for the volume.

§hot_tier_size_used_gib: i64

Output only. Total hot tier data rounded down to the nearest GiB used by the Volume. This field is only used for flex Service Level

§block_devices: Vec<BlockDevice>

Optional. Block devices for the volume. Currently, only one block device is permitted per Volume.

Implementations§

Source§

impl Volume

Source

pub fn new() -> Self

Source

pub fn set_name<T: Into<String>>(self, v: T) -> Self

Sets the value of name.

§Example
let x = Volume::new().set_name("example");
Source

pub fn set_state<T: Into<State>>(self, v: T) -> Self

Sets the value of state.

§Example
use google_cloud_netapp_v1::model::volume::State;
let x0 = Volume::new().set_state(State::Ready);
let x1 = Volume::new().set_state(State::Creating);
let x2 = Volume::new().set_state(State::Deleting);
Source

pub fn set_state_details<T: Into<String>>(self, v: T) -> Self

Sets the value of state_details.

§Example
let x = Volume::new().set_state_details("example");
Source

pub fn set_create_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of create_time.

§Example
use wkt::Timestamp;
let x = Volume::new().set_create_time(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of create_time.

§Example
use wkt::Timestamp;
let x = Volume::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Volume::new().set_or_clear_create_time(None::<Timestamp>);
Source

pub fn set_share_name<T: Into<String>>(self, v: T) -> Self

Sets the value of share_name.

§Example
let x = Volume::new().set_share_name("example");
Source

pub fn set_psa_range<T: Into<String>>(self, v: T) -> Self

Sets the value of psa_range.

§Example
let x = Volume::new().set_psa_range("example");
Source

pub fn set_storage_pool<T: Into<String>>(self, v: T) -> Self

Sets the value of storage_pool.

§Example
let x = Volume::new().set_storage_pool("example");
Source

pub fn set_network<T: Into<String>>(self, v: T) -> Self

Sets the value of network.

§Example
let x = Volume::new().set_network("example");
Source

pub fn set_service_level<T: Into<ServiceLevel>>(self, v: T) -> Self

Sets the value of service_level.

§Example
use google_cloud_netapp_v1::model::ServiceLevel;
let x0 = Volume::new().set_service_level(ServiceLevel::Premium);
let x1 = Volume::new().set_service_level(ServiceLevel::Extreme);
let x2 = Volume::new().set_service_level(ServiceLevel::Standard);
Source

pub fn set_capacity_gib<T: Into<i64>>(self, v: T) -> Self

Sets the value of capacity_gib.

§Example
let x = Volume::new().set_capacity_gib(42);
Source

pub fn set_export_policy<T>(self, v: T) -> Self
where T: Into<ExportPolicy>,

Sets the value of export_policy.

§Example
use google_cloud_netapp_v1::model::ExportPolicy;
let x = Volume::new().set_export_policy(ExportPolicy::default()/* use setters */);
Source

pub fn set_or_clear_export_policy<T>(self, v: Option<T>) -> Self
where T: Into<ExportPolicy>,

Sets or clears the value of export_policy.

§Example
use google_cloud_netapp_v1::model::ExportPolicy;
let x = Volume::new().set_or_clear_export_policy(Some(ExportPolicy::default()/* use setters */));
let x = Volume::new().set_or_clear_export_policy(None::<ExportPolicy>);
Source

pub fn set_protocols<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<Protocols>,

Sets the value of protocols.

§Example
use google_cloud_netapp_v1::model::Protocols;
let x = Volume::new().set_protocols([
    Protocols::Nfsv3,
    Protocols::Nfsv4,
    Protocols::Smb,
]);
Source

pub fn set_smb_settings<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<SMBSettings>,

Sets the value of smb_settings.

§Example
use google_cloud_netapp_v1::model::SMBSettings;
let x = Volume::new().set_smb_settings([
    SMBSettings::EncryptData,
    SMBSettings::Browsable,
    SMBSettings::ChangeNotify,
]);
Source

pub fn set_mount_options<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<MountOption>,

Sets the value of mount_options.

§Example
use google_cloud_netapp_v1::model::MountOption;
let x = Volume::new()
    .set_mount_options([
        MountOption::default()/* use setters */,
        MountOption::default()/* use (different) setters */,
    ]);
Source

pub fn set_unix_permissions<T: Into<String>>(self, v: T) -> Self

Sets the value of unix_permissions.

§Example
let x = Volume::new().set_unix_permissions("example");
Source

pub fn set_labels<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of labels.

§Example
let x = Volume::new().set_labels([
    ("key0", "abc"),
    ("key1", "xyz"),
]);
Source

pub fn set_description<T: Into<String>>(self, v: T) -> Self

Sets the value of description.

§Example
let x = Volume::new().set_description("example");
Source

pub fn set_snapshot_policy<T>(self, v: T) -> Self
where T: Into<SnapshotPolicy>,

Sets the value of snapshot_policy.

§Example
use google_cloud_netapp_v1::model::SnapshotPolicy;
let x = Volume::new().set_snapshot_policy(SnapshotPolicy::default()/* use setters */);
Source

pub fn set_or_clear_snapshot_policy<T>(self, v: Option<T>) -> Self
where T: Into<SnapshotPolicy>,

Sets or clears the value of snapshot_policy.

§Example
use google_cloud_netapp_v1::model::SnapshotPolicy;
let x = Volume::new().set_or_clear_snapshot_policy(Some(SnapshotPolicy::default()/* use setters */));
let x = Volume::new().set_or_clear_snapshot_policy(None::<SnapshotPolicy>);
Source

pub fn set_snap_reserve<T: Into<f64>>(self, v: T) -> Self

Sets the value of snap_reserve.

§Example
let x = Volume::new().set_snap_reserve(42.0);
Source

pub fn set_snapshot_directory<T: Into<bool>>(self, v: T) -> Self

Sets the value of snapshot_directory.

§Example
let x = Volume::new().set_snapshot_directory(true);
Source

pub fn set_used_gib<T: Into<i64>>(self, v: T) -> Self

Sets the value of used_gib.

§Example
let x = Volume::new().set_used_gib(42);
Source

pub fn set_security_style<T: Into<SecurityStyle>>(self, v: T) -> Self

Sets the value of security_style.

§Example
use google_cloud_netapp_v1::model::SecurityStyle;
let x0 = Volume::new().set_security_style(SecurityStyle::Ntfs);
let x1 = Volume::new().set_security_style(SecurityStyle::Unix);
Source

pub fn set_kerberos_enabled<T: Into<bool>>(self, v: T) -> Self

Sets the value of kerberos_enabled.

§Example
let x = Volume::new().set_kerberos_enabled(true);
Source

pub fn set_ldap_enabled<T: Into<bool>>(self, v: T) -> Self

Sets the value of ldap_enabled.

§Example
let x = Volume::new().set_ldap_enabled(true);
Source

pub fn set_active_directory<T: Into<String>>(self, v: T) -> Self

Sets the value of active_directory.

§Example
let x = Volume::new().set_active_directory("example");
Source

pub fn set_restore_parameters<T>(self, v: T) -> Self

Sets the value of restore_parameters.

§Example
use google_cloud_netapp_v1::model::RestoreParameters;
let x = Volume::new().set_restore_parameters(RestoreParameters::default()/* use setters */);
Source

pub fn set_or_clear_restore_parameters<T>(self, v: Option<T>) -> Self

Sets or clears the value of restore_parameters.

§Example
use google_cloud_netapp_v1::model::RestoreParameters;
let x = Volume::new().set_or_clear_restore_parameters(Some(RestoreParameters::default()/* use setters */));
let x = Volume::new().set_or_clear_restore_parameters(None::<RestoreParameters>);
Source

pub fn set_kms_config<T: Into<String>>(self, v: T) -> Self

Sets the value of kms_config.

§Example
let x = Volume::new().set_kms_config("example");
Source

pub fn set_encryption_type<T: Into<EncryptionType>>(self, v: T) -> Self

Sets the value of encryption_type.

§Example
use google_cloud_netapp_v1::model::EncryptionType;
let x0 = Volume::new().set_encryption_type(EncryptionType::ServiceManaged);
let x1 = Volume::new().set_encryption_type(EncryptionType::CloudKms);
Source

pub fn set_has_replication<T: Into<bool>>(self, v: T) -> Self

Sets the value of has_replication.

§Example
let x = Volume::new().set_has_replication(true);
Source

pub fn set_backup_config<T>(self, v: T) -> Self
where T: Into<BackupConfig>,

Sets the value of backup_config.

§Example
use google_cloud_netapp_v1::model::BackupConfig;
let x = Volume::new().set_backup_config(BackupConfig::default()/* use setters */);
Source

pub fn set_or_clear_backup_config<T>(self, v: Option<T>) -> Self
where T: Into<BackupConfig>,

Sets or clears the value of backup_config.

§Example
use google_cloud_netapp_v1::model::BackupConfig;
let x = Volume::new().set_or_clear_backup_config(Some(BackupConfig::default()/* use setters */));
let x = Volume::new().set_or_clear_backup_config(None::<BackupConfig>);
Source

pub fn set_restricted_actions<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<RestrictedAction>,

Sets the value of restricted_actions.

§Example
use google_cloud_netapp_v1::model::RestrictedAction;
let x = Volume::new().set_restricted_actions([
    RestrictedAction::Delete,
]);
Source

pub fn set_large_capacity<T: Into<bool>>(self, v: T) -> Self

Sets the value of large_capacity.

§Example
let x = Volume::new().set_large_capacity(true);
Source

pub fn set_multiple_endpoints<T: Into<bool>>(self, v: T) -> Self

Sets the value of multiple_endpoints.

§Example
let x = Volume::new().set_multiple_endpoints(true);
Source

pub fn set_tiering_policy<T>(self, v: T) -> Self
where T: Into<TieringPolicy>,

Sets the value of tiering_policy.

§Example
use google_cloud_netapp_v1::model::TieringPolicy;
let x = Volume::new().set_tiering_policy(TieringPolicy::default()/* use setters */);
Source

pub fn set_or_clear_tiering_policy<T>(self, v: Option<T>) -> Self
where T: Into<TieringPolicy>,

Sets or clears the value of tiering_policy.

§Example
use google_cloud_netapp_v1::model::TieringPolicy;
let x = Volume::new().set_or_clear_tiering_policy(Some(TieringPolicy::default()/* use setters */));
let x = Volume::new().set_or_clear_tiering_policy(None::<TieringPolicy>);
Source

pub fn set_replica_zone<T: Into<String>>(self, v: T) -> Self

Sets the value of replica_zone.

§Example
let x = Volume::new().set_replica_zone("example");
Source

pub fn set_zone<T: Into<String>>(self, v: T) -> Self

Sets the value of zone.

§Example
let x = Volume::new().set_zone("example");
Source

pub fn set_cold_tier_size_gib<T: Into<i64>>(self, v: T) -> Self

Sets the value of cold_tier_size_gib.

§Example
let x = Volume::new().set_cold_tier_size_gib(42);
Source

pub fn set_hybrid_replication_parameters<T>(self, v: T) -> Self

Sets the value of hybrid_replication_parameters.

§Example
use google_cloud_netapp_v1::model::HybridReplicationParameters;
let x = Volume::new().set_hybrid_replication_parameters(HybridReplicationParameters::default()/* use setters */);
Source

pub fn set_or_clear_hybrid_replication_parameters<T>(self, v: Option<T>) -> Self

Sets or clears the value of hybrid_replication_parameters.

§Example
use google_cloud_netapp_v1::model::HybridReplicationParameters;
let x = Volume::new().set_or_clear_hybrid_replication_parameters(Some(HybridReplicationParameters::default()/* use setters */));
let x = Volume::new().set_or_clear_hybrid_replication_parameters(None::<HybridReplicationParameters>);
Source

pub fn set_throughput_mibps<T: Into<f64>>(self, v: T) -> Self

Sets the value of throughput_mibps.

§Example
let x = Volume::new().set_throughput_mibps(42.0);
Source

pub fn set_cache_parameters<T>(self, v: T) -> Self

Sets the value of cache_parameters.

§Example
use google_cloud_netapp_v1::model::CacheParameters;
let x = Volume::new().set_cache_parameters(CacheParameters::default()/* use setters */);
Source

pub fn set_or_clear_cache_parameters<T>(self, v: Option<T>) -> Self

Sets or clears the value of cache_parameters.

§Example
use google_cloud_netapp_v1::model::CacheParameters;
let x = Volume::new().set_or_clear_cache_parameters(Some(CacheParameters::default()/* use setters */));
let x = Volume::new().set_or_clear_cache_parameters(None::<CacheParameters>);
Source

pub fn set_hot_tier_size_used_gib<T: Into<i64>>(self, v: T) -> Self

Sets the value of hot_tier_size_used_gib.

§Example
let x = Volume::new().set_hot_tier_size_used_gib(42);
Source

pub fn set_block_devices<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<BlockDevice>,

Sets the value of block_devices.

§Example
use google_cloud_netapp_v1::model::BlockDevice;
let x = Volume::new()
    .set_block_devices([
        BlockDevice::default()/* use setters */,
        BlockDevice::default()/* use (different) setters */,
    ]);

Trait Implementations§

Source§

impl Clone for Volume

Source§

fn clone(&self) -> Volume

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Volume

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Volume

Source§

fn default() -> Volume

Returns the “default value” for a type. Read more
Source§

impl Message for Volume

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for Volume

Source§

fn eq(&self, other: &Volume) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Volume

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,