#[non_exhaustive]pub struct ConfigVariable {
pub key: String,
pub value: Option<Value>,
/* private fields */
}Expand description
ConfigVariable represents a additional configuration variable present in a PluginInstance Config or AuthConfig, based on a ConfigVariableTemplate.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.key: StringOutput only. Key will be the id to uniquely identify the config variable.
value: Option<Value>The values associated with the config variable.
Implementations§
Source§impl ConfigVariable
impl ConfigVariable
pub fn new() -> Self
Sourcepub fn string_value(&self) -> Option<&String>
pub fn string_value(&self) -> Option<&String>
The value of value
if it holds a StringValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_string_value<T: Into<String>>(self, v: T) -> Self
pub fn set_string_value<T: Into<String>>(self, v: T) -> Self
Sets the value of value
to hold a StringValue.
Note that all the setters affecting value are
mutually exclusive.
§Example
let x = ConfigVariable::new().set_string_value("example");
assert!(x.string_value().is_some());
assert!(x.int_value().is_none());
assert!(x.bool_value().is_none());
assert!(x.secret_value().is_none());
assert!(x.enum_value().is_none());
assert!(x.multi_select_values().is_none());
assert!(x.multi_string_values().is_none());
assert!(x.multi_int_values().is_none());Sourcepub fn int_value(&self) -> Option<&i64>
pub fn int_value(&self) -> Option<&i64>
The value of value
if it holds a IntValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_int_value<T: Into<i64>>(self, v: T) -> Self
pub fn set_int_value<T: Into<i64>>(self, v: T) -> Self
Sets the value of value
to hold a IntValue.
Note that all the setters affecting value are
mutually exclusive.
§Example
let x = ConfigVariable::new().set_int_value(42);
assert!(x.int_value().is_some());
assert!(x.string_value().is_none());
assert!(x.bool_value().is_none());
assert!(x.secret_value().is_none());
assert!(x.enum_value().is_none());
assert!(x.multi_select_values().is_none());
assert!(x.multi_string_values().is_none());
assert!(x.multi_int_values().is_none());Sourcepub fn bool_value(&self) -> Option<&bool>
pub fn bool_value(&self) -> Option<&bool>
The value of value
if it holds a BoolValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_bool_value<T: Into<bool>>(self, v: T) -> Self
pub fn set_bool_value<T: Into<bool>>(self, v: T) -> Self
Sets the value of value
to hold a BoolValue.
Note that all the setters affecting value are
mutually exclusive.
§Example
let x = ConfigVariable::new().set_bool_value(true);
assert!(x.bool_value().is_some());
assert!(x.string_value().is_none());
assert!(x.int_value().is_none());
assert!(x.secret_value().is_none());
assert!(x.enum_value().is_none());
assert!(x.multi_select_values().is_none());
assert!(x.multi_string_values().is_none());
assert!(x.multi_int_values().is_none());Sourcepub fn secret_value(&self) -> Option<&Box<Secret>>
pub fn secret_value(&self) -> Option<&Box<Secret>>
The value of value
if it holds a SecretValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_secret_value<T: Into<Box<Secret>>>(self, v: T) -> Self
pub fn set_secret_value<T: Into<Box<Secret>>>(self, v: T) -> Self
Sets the value of value
to hold a SecretValue.
Note that all the setters affecting value are
mutually exclusive.
§Example
use google_cloud_apihub_v1::model::Secret;
let x = ConfigVariable::new().set_secret_value(Secret::default()/* use setters */);
assert!(x.secret_value().is_some());
assert!(x.string_value().is_none());
assert!(x.int_value().is_none());
assert!(x.bool_value().is_none());
assert!(x.enum_value().is_none());
assert!(x.multi_select_values().is_none());
assert!(x.multi_string_values().is_none());
assert!(x.multi_int_values().is_none());Sourcepub fn enum_value(&self) -> Option<&Box<ConfigValueOption>>
pub fn enum_value(&self) -> Option<&Box<ConfigValueOption>>
The value of value
if it holds a EnumValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_enum_value<T: Into<Box<ConfigValueOption>>>(self, v: T) -> Self
pub fn set_enum_value<T: Into<Box<ConfigValueOption>>>(self, v: T) -> Self
Sets the value of value
to hold a EnumValue.
Note that all the setters affecting value are
mutually exclusive.
§Example
use google_cloud_apihub_v1::model::ConfigValueOption;
let x = ConfigVariable::new().set_enum_value(ConfigValueOption::default()/* use setters */);
assert!(x.enum_value().is_some());
assert!(x.string_value().is_none());
assert!(x.int_value().is_none());
assert!(x.bool_value().is_none());
assert!(x.secret_value().is_none());
assert!(x.multi_select_values().is_none());
assert!(x.multi_string_values().is_none());
assert!(x.multi_int_values().is_none());Sourcepub fn multi_select_values(&self) -> Option<&Box<MultiSelectValues>>
pub fn multi_select_values(&self) -> Option<&Box<MultiSelectValues>>
The value of value
if it holds a MultiSelectValues, None if the field is not set or
holds a different branch.
Sourcepub fn set_multi_select_values<T: Into<Box<MultiSelectValues>>>(
self,
v: T,
) -> Self
pub fn set_multi_select_values<T: Into<Box<MultiSelectValues>>>( self, v: T, ) -> Self
Sets the value of value
to hold a MultiSelectValues.
Note that all the setters affecting value are
mutually exclusive.
§Example
use google_cloud_apihub_v1::model::config_variable::MultiSelectValues;
let x = ConfigVariable::new().set_multi_select_values(MultiSelectValues::default()/* use setters */);
assert!(x.multi_select_values().is_some());
assert!(x.string_value().is_none());
assert!(x.int_value().is_none());
assert!(x.bool_value().is_none());
assert!(x.secret_value().is_none());
assert!(x.enum_value().is_none());
assert!(x.multi_string_values().is_none());
assert!(x.multi_int_values().is_none());Sourcepub fn multi_string_values(&self) -> Option<&Box<MultiStringValues>>
pub fn multi_string_values(&self) -> Option<&Box<MultiStringValues>>
The value of value
if it holds a MultiStringValues, None if the field is not set or
holds a different branch.
Sourcepub fn set_multi_string_values<T: Into<Box<MultiStringValues>>>(
self,
v: T,
) -> Self
pub fn set_multi_string_values<T: Into<Box<MultiStringValues>>>( self, v: T, ) -> Self
Sets the value of value
to hold a MultiStringValues.
Note that all the setters affecting value are
mutually exclusive.
§Example
use google_cloud_apihub_v1::model::config_variable::MultiStringValues;
let x = ConfigVariable::new().set_multi_string_values(MultiStringValues::default()/* use setters */);
assert!(x.multi_string_values().is_some());
assert!(x.string_value().is_none());
assert!(x.int_value().is_none());
assert!(x.bool_value().is_none());
assert!(x.secret_value().is_none());
assert!(x.enum_value().is_none());
assert!(x.multi_select_values().is_none());
assert!(x.multi_int_values().is_none());Sourcepub fn multi_int_values(&self) -> Option<&Box<MultiIntValues>>
pub fn multi_int_values(&self) -> Option<&Box<MultiIntValues>>
The value of value
if it holds a MultiIntValues, None if the field is not set or
holds a different branch.
Sourcepub fn set_multi_int_values<T: Into<Box<MultiIntValues>>>(self, v: T) -> Self
pub fn set_multi_int_values<T: Into<Box<MultiIntValues>>>(self, v: T) -> Self
Sets the value of value
to hold a MultiIntValues.
Note that all the setters affecting value are
mutually exclusive.
§Example
use google_cloud_apihub_v1::model::config_variable::MultiIntValues;
let x = ConfigVariable::new().set_multi_int_values(MultiIntValues::default()/* use setters */);
assert!(x.multi_int_values().is_some());
assert!(x.string_value().is_none());
assert!(x.int_value().is_none());
assert!(x.bool_value().is_none());
assert!(x.secret_value().is_none());
assert!(x.enum_value().is_none());
assert!(x.multi_select_values().is_none());
assert!(x.multi_string_values().is_none());Trait Implementations§
Source§impl Clone for ConfigVariable
impl Clone for ConfigVariable
Source§fn clone(&self) -> ConfigVariable
fn clone(&self) -> ConfigVariable
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more