#[non_exhaustive]pub struct ResourceSettings {
pub resource_id: String,
pub resource_type: ResourceType,
pub display_name: String,
/* private fields */
}Expand description
Represent the custom settings for the resources to be created.
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.resource_id: StringResource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail. For KeyRing, this represents the keyring_id. For a folder, don’t set this value as folder_id is assigned by Google.
resource_type: ResourceTypeIndicates the type of resource. This field should be specified to correspond the id to the right resource type (CONSUMER_FOLDER or ENCRYPTION_KEYS_PROJECT)
display_name: StringUser-assigned resource display name. If not empty it will be used to create a resource with the specified name.
Implementations§
Source§impl ResourceSettings
impl ResourceSettings
pub fn new() -> Self
Sourcepub fn set_resource_id<T: Into<String>>(self, v: T) -> Self
pub fn set_resource_id<T: Into<String>>(self, v: T) -> Self
Sets the value of resource_id.
§Example
ⓘ
let x = ResourceSettings::new().set_resource_id("example");Sourcepub fn set_resource_type<T: Into<ResourceType>>(self, v: T) -> Self
pub fn set_resource_type<T: Into<ResourceType>>(self, v: T) -> Self
Sets the value of resource_type.
§Example
ⓘ
use google_cloud_assuredworkloads_v1::model::workload::resource_info::ResourceType;
let x0 = ResourceSettings::new().set_resource_type(ResourceType::ConsumerFolder);
let x1 = ResourceSettings::new().set_resource_type(ResourceType::EncryptionKeysProject);
let x2 = ResourceSettings::new().set_resource_type(ResourceType::Keyring);Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of display_name.
§Example
ⓘ
let x = ResourceSettings::new().set_display_name("example");Trait Implementations§
Source§impl Clone for ResourceSettings
impl Clone for ResourceSettings
Source§fn clone(&self) -> ResourceSettings
fn clone(&self) -> ResourceSettings
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceSettings
impl Debug for ResourceSettings
Source§impl Default for ResourceSettings
impl Default for ResourceSettings
Source§fn default() -> ResourceSettings
fn default() -> ResourceSettings
Returns the “default value” for a type. Read more
Source§impl Message for ResourceSettings
impl Message for ResourceSettings
Source§impl PartialEq for ResourceSettings
impl PartialEq for ResourceSettings
impl StructuralPartialEq for ResourceSettings
Auto Trait Implementations§
impl Freeze for ResourceSettings
impl RefUnwindSafe for ResourceSettings
impl Send for ResourceSettings
impl Sync for ResourceSettings
impl Unpin for ResourceSettings
impl UnsafeUnpin for ResourceSettings
impl UnwindSafe for ResourceSettings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more