pub struct ResourceCreate {
pub name: String,
pub collection: Option<String>,
pub enabled: Option<bool>,
pub description: Option<String>,
pub config: Value,
pub backup_config: Option<Value>,
}Expand description
One resource to create, POST .../resources/{module}/{type} (capture
C3a “POST create”; Decision D10: a create needs only name and
config, and assumption A9 holds, so there is no attributes field).
Absent options are not sent, never sent as null.
Fields§
§name: StringThe resource name.
collection: Option<String>Target collection; the gateway picks one when absent (core on the
capture). C-list created a production copy by sending it.
enabled: Option<bool>enabled.
description: Option<String>description.
config: ValueThe resource config.
backup_config: Option<Value>backupConfig.
Implementations§
Source§impl ResourceCreate
impl ResourceCreate
Sourcepub fn new(name: impl Into<String>, config: Value) -> Self
pub fn new(name: impl Into<String>, config: Value) -> Self
A create of name with config and nothing else.
Sourcepub fn with_collection(self, collection: impl Into<String>) -> Self
pub fn with_collection(self, collection: impl Into<String>) -> Self
Target a collection.
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Set enabled.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set description.
Sourcepub fn with_backup_config(self, backup_config: Value) -> Self
pub fn with_backup_config(self, backup_config: Value) -> Self
Set backupConfig.
Trait Implementations§
Source§impl Clone for ResourceCreate
impl Clone for ResourceCreate
Source§impl Debug for ResourceCreate
impl Debug for ResourceCreate
Source§impl PartialEq for ResourceCreate
impl PartialEq for ResourceCreate
Source§impl Serialize for ResourceCreate
impl Serialize for ResourceCreate
impl StructuralPartialEq for ResourceCreate
Auto Trait Implementations§
impl Freeze for ResourceCreate
impl RefUnwindSafe for ResourceCreate
impl Send for ResourceCreate
impl Sync for ResourceCreate
impl Unpin for ResourceCreate
impl UnsafeUnpin for ResourceCreate
impl UnwindSafe for ResourceCreate
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