Instance

Struct Instance 

Source
#[non_exhaustive]
pub struct Instance {
Show 40 fields pub name: String, pub create_time: Option<Timestamp>, pub update_time: Option<Timestamp>, pub labels: HashMap<String, String>, pub state: State, pub state_info: Option<StateInfo>, pub uid: String, pub replica_count: Option<i32>, pub authorization_mode: AuthorizationMode, pub transit_encryption_mode: TransitEncryptionMode, pub shard_count: i32, pub discovery_endpoints: Vec<DiscoveryEndpoint>, pub node_type: NodeType, pub persistence_config: Option<PersistenceConfig>, pub engine_version: String, pub engine_configs: HashMap<String, String>, pub node_config: Option<NodeConfig>, pub zone_distribution_config: Option<ZoneDistributionConfig>, pub deletion_protection_enabled: Option<bool>, pub psc_auto_connections: Vec<PscAutoConnection>, pub psc_attachment_details: Vec<PscAttachmentDetail>, pub endpoints: Vec<InstanceEndpoint>, pub mode: Mode, pub simulate_maintenance_event: Option<bool>, pub ondemand_maintenance: Option<bool>, pub satisfies_pzs: Option<bool>, pub satisfies_pzi: Option<bool>, pub maintenance_policy: Option<MaintenancePolicy>, pub maintenance_schedule: Option<MaintenanceSchedule>, pub cross_instance_replication_config: Option<CrossInstanceReplicationConfig>, pub async_instance_endpoints_deletion_enabled: Option<bool>, pub kms_key: Option<String>, pub encryption_info: Option<EncryptionInfo>, pub backup_collection: Option<String>, pub automated_backup_config: Option<AutomatedBackupConfig>, pub maintenance_version: Option<String>, pub effective_maintenance_version: Option<String>, pub available_maintenance_versions: Vec<String>, pub allow_fewer_zones_deployment: bool, pub import_sources: Option<ImportSources>, /* private fields */
}
Expand description

A Memorystore instance.

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. Unique name of the instance. Format: projects/{project}/locations/{location}/instances/{instance}

§create_time: Option<Timestamp>

Output only. Creation timestamp of the instance.

§update_time: Option<Timestamp>

Output only. Latest update timestamp of the instance.

§labels: HashMap<String, String>

Optional. Labels to represent user-provided metadata.

§state: State

Output only. Current state of the instance.

§state_info: Option<StateInfo>

Output only. Additional information about the state of the instance.

§uid: String

Output only. System assigned, unique identifier for the instance.

§replica_count: Option<i32>

Optional. Number of replica nodes per shard. If omitted the default is 0 replicas.

§authorization_mode: AuthorizationMode

Optional. Immutable. Authorization mode of the instance.

§transit_encryption_mode: TransitEncryptionMode

Optional. Immutable. In-transit encryption mode of the instance.

§shard_count: i32

Optional. Number of shards for the instance.

§discovery_endpoints: Vec<DiscoveryEndpoint>
👎Deprecated

Output only. Deprecated: The discovery_endpoints parameter is deprecated. As a result, it will not be populated if the connections are created using endpoints parameter. Instead of this parameter, for discovery, use endpoints.connections.pscConnection and endpoints.connections.pscAutoConnection with connectionType CONNECTION_TYPE_DISCOVERY.

§node_type: NodeType

Optional. Machine type for individual nodes of the instance.

§persistence_config: Option<PersistenceConfig>

Optional. Persistence configuration of the instance.

§engine_version: String

Optional. Engine version of the instance.

§engine_configs: HashMap<String, String>

Optional. User-provided engine configurations for the instance.

§node_config: Option<NodeConfig>

Output only. Configuration of individual nodes of the instance.

§zone_distribution_config: Option<ZoneDistributionConfig>

Optional. Immutable. Zone distribution configuration of the instance for node allocation.

§deletion_protection_enabled: Option<bool>

Optional. If set to true deletion of the instance will fail.

§psc_auto_connections: Vec<PscAutoConnection>
👎Deprecated

Optional. Immutable. Deprecated: Use the endpoints.connections.psc_auto_connection value instead.

§psc_attachment_details: Vec<PscAttachmentDetail>

Output only. Service attachment details to configure PSC connections.

§endpoints: Vec<InstanceEndpoint>

Optional. Endpoints for the instance.

§mode: Mode

Optional. The mode config for the instance.

§simulate_maintenance_event: Option<bool>

Optional. Input only. Simulate a maintenance event.

§ondemand_maintenance: Option<bool>
👎Deprecated

Optional. Input only. Ondemand maintenance for the instance.

§satisfies_pzs: Option<bool>

Optional. Output only. Reserved for future use.

§satisfies_pzi: Option<bool>

Optional. Output only. Reserved for future use.

§maintenance_policy: Option<MaintenancePolicy>

Optional. The maintenance policy for the instance. If not provided, the maintenance event will be performed based on Memorystore internal rollout schedule.

§maintenance_schedule: Option<MaintenanceSchedule>

Output only. Published maintenance schedule.

§cross_instance_replication_config: Option<CrossInstanceReplicationConfig>

Optional. The config for cross instance replication.

§async_instance_endpoints_deletion_enabled: Option<bool>

Optional. If true, instance endpoints that are created and registered by customers can be deleted asynchronously. That is, such an instance endpoint can be de-registered before the forwarding rules in the instance endpoint are deleted.

§kms_key: Option<String>

Optional. The KMS key used to encrypt the at-rest data of the cluster.

§encryption_info: Option<EncryptionInfo>

Output only. Encryption information of the data at rest of the cluster.

§backup_collection: Option<String>

Output only. The backup collection full resource name. Example: projects/{project}/locations/{location}/backupCollections/{collection}

§automated_backup_config: Option<AutomatedBackupConfig>

Optional. The automated backup config for the instance.

§maintenance_version: Option<String>

Optional. This field can be used to trigger self service update to indicate the desired maintenance version. The input to this field can be determined by the available_maintenance_versions field.

§effective_maintenance_version: Option<String>

Output only. This field represents the actual maintenance version of the instance.

§available_maintenance_versions: Vec<String>

Output only. This field is used to determine the available maintenance versions for the self service update.

§allow_fewer_zones_deployment: bool
👎Deprecated

Optional. Immutable. Deprecated, do not use.

§import_sources: Option<ImportSources>

The source to import from.

Implementations§

Source§

impl Instance

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 = Instance::new().set_name("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 = Instance::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 = Instance::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Instance::new().set_or_clear_create_time(None::<Timestamp>);
Source

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

Sets the value of update_time.

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

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

Sets or clears the value of update_time.

§Example
use wkt::Timestamp;
let x = Instance::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Instance::new().set_or_clear_update_time(None::<Timestamp>);
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 = Instance::new().set_labels([
    ("key0", "abc"),
    ("key1", "xyz"),
]);
Source

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

Sets the value of state.

§Example
use google_cloud_memorystore_v1::model::instance::State;
let x0 = Instance::new().set_state(State::Creating);
let x1 = Instance::new().set_state(State::Active);
let x2 = Instance::new().set_state(State::Updating);
Source

pub fn set_state_info<T>(self, v: T) -> Self
where T: Into<StateInfo>,

Sets the value of state_info.

§Example
use google_cloud_memorystore_v1::model::instance::StateInfo;
let x = Instance::new().set_state_info(StateInfo::default()/* use setters */);
Source

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

Sets or clears the value of state_info.

§Example
use google_cloud_memorystore_v1::model::instance::StateInfo;
let x = Instance::new().set_or_clear_state_info(Some(StateInfo::default()/* use setters */));
let x = Instance::new().set_or_clear_state_info(None::<StateInfo>);
Source

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

Sets the value of uid.

§Example
let x = Instance::new().set_uid("example");
Source

pub fn set_replica_count<T>(self, v: T) -> Self
where T: Into<i32>,

Sets the value of replica_count.

§Example
let x = Instance::new().set_replica_count(42);
Source

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

Sets or clears the value of replica_count.

§Example
let x = Instance::new().set_or_clear_replica_count(Some(42));
let x = Instance::new().set_or_clear_replica_count(None::<i32>);
Source

pub fn set_authorization_mode<T: Into<AuthorizationMode>>(self, v: T) -> Self

Sets the value of authorization_mode.

§Example
use google_cloud_memorystore_v1::model::instance::AuthorizationMode;
let x0 = Instance::new().set_authorization_mode(AuthorizationMode::AuthDisabled);
let x1 = Instance::new().set_authorization_mode(AuthorizationMode::IamAuth);
Source

pub fn set_transit_encryption_mode<T: Into<TransitEncryptionMode>>( self, v: T, ) -> Self

Sets the value of transit_encryption_mode.

§Example
use google_cloud_memorystore_v1::model::instance::TransitEncryptionMode;
let x0 = Instance::new().set_transit_encryption_mode(TransitEncryptionMode::TransitEncryptionDisabled);
let x1 = Instance::new().set_transit_encryption_mode(TransitEncryptionMode::ServerAuthentication);
Source

pub fn set_shard_count<T: Into<i32>>(self, v: T) -> Self

Sets the value of shard_count.

§Example
let x = Instance::new().set_shard_count(42);
Source

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

👎Deprecated

Sets the value of discovery_endpoints.

§Example
use google_cloud_memorystore_v1::model::DiscoveryEndpoint;
let x = Instance::new()
    .set_discovery_endpoints([
        DiscoveryEndpoint::default()/* use setters */,
        DiscoveryEndpoint::default()/* use (different) setters */,
    ]);
Source

pub fn set_node_type<T: Into<NodeType>>(self, v: T) -> Self

Sets the value of node_type.

§Example
use google_cloud_memorystore_v1::model::instance::NodeType;
let x0 = Instance::new().set_node_type(NodeType::SharedCoreNano);
let x1 = Instance::new().set_node_type(NodeType::HighmemMedium);
let x2 = Instance::new().set_node_type(NodeType::HighmemXlarge);
Source

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

Sets the value of persistence_config.

§Example
use google_cloud_memorystore_v1::model::PersistenceConfig;
let x = Instance::new().set_persistence_config(PersistenceConfig::default()/* use setters */);
Source

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

Sets or clears the value of persistence_config.

§Example
use google_cloud_memorystore_v1::model::PersistenceConfig;
let x = Instance::new().set_or_clear_persistence_config(Some(PersistenceConfig::default()/* use setters */));
let x = Instance::new().set_or_clear_persistence_config(None::<PersistenceConfig>);
Source

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

Sets the value of engine_version.

§Example
let x = Instance::new().set_engine_version("example");
Source

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

Sets the value of engine_configs.

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

pub fn set_node_config<T>(self, v: T) -> Self
where T: Into<NodeConfig>,

Sets the value of node_config.

§Example
use google_cloud_memorystore_v1::model::NodeConfig;
let x = Instance::new().set_node_config(NodeConfig::default()/* use setters */);
Source

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

Sets or clears the value of node_config.

§Example
use google_cloud_memorystore_v1::model::NodeConfig;
let x = Instance::new().set_or_clear_node_config(Some(NodeConfig::default()/* use setters */));
let x = Instance::new().set_or_clear_node_config(None::<NodeConfig>);
Source

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

Sets the value of zone_distribution_config.

§Example
use google_cloud_memorystore_v1::model::ZoneDistributionConfig;
let x = Instance::new().set_zone_distribution_config(ZoneDistributionConfig::default()/* use setters */);
Source

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

Sets or clears the value of zone_distribution_config.

§Example
use google_cloud_memorystore_v1::model::ZoneDistributionConfig;
let x = Instance::new().set_or_clear_zone_distribution_config(Some(ZoneDistributionConfig::default()/* use setters */));
let x = Instance::new().set_or_clear_zone_distribution_config(None::<ZoneDistributionConfig>);
Source

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

Sets the value of deletion_protection_enabled.

§Example
let x = Instance::new().set_deletion_protection_enabled(true);
Source

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

Sets or clears the value of deletion_protection_enabled.

§Example
let x = Instance::new().set_or_clear_deletion_protection_enabled(Some(false));
let x = Instance::new().set_or_clear_deletion_protection_enabled(None::<bool>);
Source

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

👎Deprecated

Sets the value of psc_auto_connections.

§Example
use google_cloud_memorystore_v1::model::PscAutoConnection;
let x = Instance::new()
    .set_psc_auto_connections([
        PscAutoConnection::default()/* use setters */,
        PscAutoConnection::default()/* use (different) setters */,
    ]);
Source

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

Sets the value of psc_attachment_details.

§Example
use google_cloud_memorystore_v1::model::PscAttachmentDetail;
let x = Instance::new()
    .set_psc_attachment_details([
        PscAttachmentDetail::default()/* use setters */,
        PscAttachmentDetail::default()/* use (different) setters */,
    ]);
Source

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

Sets the value of endpoints.

§Example
use google_cloud_memorystore_v1::model::instance::InstanceEndpoint;
let x = Instance::new()
    .set_endpoints([
        InstanceEndpoint::default()/* use setters */,
        InstanceEndpoint::default()/* use (different) setters */,
    ]);
Source

pub fn set_mode<T: Into<Mode>>(self, v: T) -> Self

Sets the value of mode.

§Example
use google_cloud_memorystore_v1::model::instance::Mode;
let x0 = Instance::new().set_mode(Mode::Cluster);
let x1 = Instance::new().set_mode(Mode::ClusterDisabled);
Source

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

Sets the value of simulate_maintenance_event.

§Example
let x = Instance::new().set_simulate_maintenance_event(true);
Source

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

Sets or clears the value of simulate_maintenance_event.

§Example
let x = Instance::new().set_or_clear_simulate_maintenance_event(Some(false));
let x = Instance::new().set_or_clear_simulate_maintenance_event(None::<bool>);
Source

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

👎Deprecated

Sets the value of ondemand_maintenance.

§Example
let x = Instance::new().set_ondemand_maintenance(true);
Source

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

👎Deprecated

Sets or clears the value of ondemand_maintenance.

§Example
let x = Instance::new().set_or_clear_ondemand_maintenance(Some(false));
let x = Instance::new().set_or_clear_ondemand_maintenance(None::<bool>);
Source

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

Sets the value of satisfies_pzs.

§Example
let x = Instance::new().set_satisfies_pzs(true);
Source

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

Sets or clears the value of satisfies_pzs.

§Example
let x = Instance::new().set_or_clear_satisfies_pzs(Some(false));
let x = Instance::new().set_or_clear_satisfies_pzs(None::<bool>);
Source

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

Sets the value of satisfies_pzi.

§Example
let x = Instance::new().set_satisfies_pzi(true);
Source

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

Sets or clears the value of satisfies_pzi.

§Example
let x = Instance::new().set_or_clear_satisfies_pzi(Some(false));
let x = Instance::new().set_or_clear_satisfies_pzi(None::<bool>);
Source

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

Sets the value of maintenance_policy.

§Example
use google_cloud_memorystore_v1::model::MaintenancePolicy;
let x = Instance::new().set_maintenance_policy(MaintenancePolicy::default()/* use setters */);
Source

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

Sets or clears the value of maintenance_policy.

§Example
use google_cloud_memorystore_v1::model::MaintenancePolicy;
let x = Instance::new().set_or_clear_maintenance_policy(Some(MaintenancePolicy::default()/* use setters */));
let x = Instance::new().set_or_clear_maintenance_policy(None::<MaintenancePolicy>);
Source

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

Sets the value of maintenance_schedule.

§Example
use google_cloud_memorystore_v1::model::MaintenanceSchedule;
let x = Instance::new().set_maintenance_schedule(MaintenanceSchedule::default()/* use setters */);
Source

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

Sets or clears the value of maintenance_schedule.

§Example
use google_cloud_memorystore_v1::model::MaintenanceSchedule;
let x = Instance::new().set_or_clear_maintenance_schedule(Some(MaintenanceSchedule::default()/* use setters */));
let x = Instance::new().set_or_clear_maintenance_schedule(None::<MaintenanceSchedule>);
Source

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

Sets the value of cross_instance_replication_config.

§Example
use google_cloud_memorystore_v1::model::CrossInstanceReplicationConfig;
let x = Instance::new().set_cross_instance_replication_config(CrossInstanceReplicationConfig::default()/* use setters */);
Source

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

Sets or clears the value of cross_instance_replication_config.

§Example
use google_cloud_memorystore_v1::model::CrossInstanceReplicationConfig;
let x = Instance::new().set_or_clear_cross_instance_replication_config(Some(CrossInstanceReplicationConfig::default()/* use setters */));
let x = Instance::new().set_or_clear_cross_instance_replication_config(None::<CrossInstanceReplicationConfig>);
Source

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

Sets the value of async_instance_endpoints_deletion_enabled.

§Example
let x = Instance::new().set_async_instance_endpoints_deletion_enabled(true);
Source

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

Sets or clears the value of async_instance_endpoints_deletion_enabled.

§Example
let x = Instance::new().set_or_clear_async_instance_endpoints_deletion_enabled(Some(false));
let x = Instance::new().set_or_clear_async_instance_endpoints_deletion_enabled(None::<bool>);
Source

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

Sets the value of kms_key.

§Example
let x = Instance::new().set_kms_key("example");
Source

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

Sets or clears the value of kms_key.

§Example
let x = Instance::new().set_or_clear_kms_key(Some("example"));
let x = Instance::new().set_or_clear_kms_key(None::<String>);
Source

pub fn set_encryption_info<T>(self, v: T) -> Self
where T: Into<EncryptionInfo>,

Sets the value of encryption_info.

§Example
use google_cloud_memorystore_v1::model::EncryptionInfo;
let x = Instance::new().set_encryption_info(EncryptionInfo::default()/* use setters */);
Source

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

Sets or clears the value of encryption_info.

§Example
use google_cloud_memorystore_v1::model::EncryptionInfo;
let x = Instance::new().set_or_clear_encryption_info(Some(EncryptionInfo::default()/* use setters */));
let x = Instance::new().set_or_clear_encryption_info(None::<EncryptionInfo>);
Source

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

Sets the value of backup_collection.

§Example
let x = Instance::new().set_backup_collection("example");
Source

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

Sets or clears the value of backup_collection.

§Example
let x = Instance::new().set_or_clear_backup_collection(Some("example"));
let x = Instance::new().set_or_clear_backup_collection(None::<String>);
Source

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

Sets the value of automated_backup_config.

§Example
use google_cloud_memorystore_v1::model::AutomatedBackupConfig;
let x = Instance::new().set_automated_backup_config(AutomatedBackupConfig::default()/* use setters */);
Source

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

Sets or clears the value of automated_backup_config.

§Example
use google_cloud_memorystore_v1::model::AutomatedBackupConfig;
let x = Instance::new().set_or_clear_automated_backup_config(Some(AutomatedBackupConfig::default()/* use setters */));
let x = Instance::new().set_or_clear_automated_backup_config(None::<AutomatedBackupConfig>);
Source

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

Sets the value of maintenance_version.

§Example
let x = Instance::new().set_maintenance_version("example");
Source

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

Sets or clears the value of maintenance_version.

§Example
let x = Instance::new().set_or_clear_maintenance_version(Some("example"));
let x = Instance::new().set_or_clear_maintenance_version(None::<String>);
Source

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

Sets the value of effective_maintenance_version.

§Example
let x = Instance::new().set_effective_maintenance_version("example");
Source

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

Sets or clears the value of effective_maintenance_version.

§Example
let x = Instance::new().set_or_clear_effective_maintenance_version(Some("example"));
let x = Instance::new().set_or_clear_effective_maintenance_version(None::<String>);
Source

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

Sets the value of available_maintenance_versions.

§Example
let x = Instance::new().set_available_maintenance_versions(["a", "b", "c"]);
Source

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

👎Deprecated

Sets the value of allow_fewer_zones_deployment.

§Example
let x = Instance::new().set_allow_fewer_zones_deployment(true);
Source

pub fn set_import_sources<T: Into<Option<ImportSources>>>(self, v: T) -> Self

Sets the value of import_sources.

Note that all the setters affecting import_sources are mutually exclusive.

§Example
use google_cloud_memorystore_v1::model::instance::GcsBackupSource;
let x = Instance::new().set_import_sources(Some(
    google_cloud_memorystore_v1::model::instance::ImportSources::GcsSource(GcsBackupSource::default().into())));
Source

pub fn gcs_source(&self) -> Option<&Box<GcsBackupSource>>

The value of import_sources if it holds a GcsSource, None if the field is not set or holds a different branch.

Source

pub fn set_gcs_source<T: Into<Box<GcsBackupSource>>>(self, v: T) -> Self

Sets the value of import_sources to hold a GcsSource.

Note that all the setters affecting import_sources are mutually exclusive.

§Example
use google_cloud_memorystore_v1::model::instance::GcsBackupSource;
let x = Instance::new().set_gcs_source(GcsBackupSource::default()/* use setters */);
assert!(x.gcs_source().is_some());
assert!(x.managed_backup_source().is_none());
Source

pub fn managed_backup_source(&self) -> Option<&Box<ManagedBackupSource>>

The value of import_sources if it holds a ManagedBackupSource, None if the field is not set or holds a different branch.

Source

pub fn set_managed_backup_source<T: Into<Box<ManagedBackupSource>>>( self, v: T, ) -> Self

Sets the value of import_sources to hold a ManagedBackupSource.

Note that all the setters affecting import_sources are mutually exclusive.

§Example
use google_cloud_memorystore_v1::model::instance::ManagedBackupSource;
let x = Instance::new().set_managed_backup_source(ManagedBackupSource::default()/* use setters */);
assert!(x.managed_backup_source().is_some());
assert!(x.gcs_source().is_none());

Trait Implementations§

Source§

impl Clone for Instance

Source§

fn clone(&self) -> Instance

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 Instance

Source§

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

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

impl Default for Instance

Source§

fn default() -> Instance

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

impl Message for Instance

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for Instance

Source§

fn eq(&self, other: &Instance) -> 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 Instance

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> 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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>,