pub struct WritableInventoryItemRequest {Show 16 fields
pub device: Box<BriefInterfaceRequestDevice>,
pub parent: Option<Option<i32>>,
pub name: String,
pub label: Option<String>,
pub status: Option<Status>,
pub role: Option<Option<Box<InventoryItemRequestRole>>>,
pub manufacturer: Option<Option<Box<InventoryItemRequestManufacturer>>>,
pub part_id: Option<String>,
pub serial: Option<String>,
pub asset_tag: Option<Option<String>>,
pub discovered: Option<bool>,
pub description: Option<String>,
pub component_type: Option<Option<String>>,
pub component_id: Option<Option<i64>>,
pub tags: Option<Vec<NestedTagRequest>>,
pub custom_fields: Option<HashMap<String, Value>>,
}Expand description
WritableInventoryItemRequest : Adds support for custom fields and tags.
Fields§
§device: Box<BriefInterfaceRequestDevice>§parent: Option<Option<i32>>§name: String§label: Option<String>Physical label
status: Option<Status>offline- Offline *active- Active *planned- Planned *staged- Staged *failed- Failed *decommissioning- Decommissioning
role: Option<Option<Box<InventoryItemRequestRole>>>§manufacturer: Option<Option<Box<InventoryItemRequestManufacturer>>>§part_id: Option<String>Manufacturer-assigned part identifier
serial: Option<String>§asset_tag: Option<Option<String>>A unique tag used to identify this item
discovered: Option<bool>This item was automatically discovered
description: Option<String>§component_type: Option<Option<String>>§component_id: Option<Option<i64>>§custom_fields: Option<HashMap<String, Value>>Implementations§
Source§impl WritableInventoryItemRequest
impl WritableInventoryItemRequest
Sourcepub fn new(
device: BriefInterfaceRequestDevice,
name: String,
) -> WritableInventoryItemRequest
pub fn new( device: BriefInterfaceRequestDevice, name: String, ) -> WritableInventoryItemRequest
Adds support for custom fields and tags.
Trait Implementations§
Source§impl Clone for WritableInventoryItemRequest
impl Clone for WritableInventoryItemRequest
Source§fn clone(&self) -> WritableInventoryItemRequest
fn clone(&self) -> WritableInventoryItemRequest
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 WritableInventoryItemRequest
impl Debug for WritableInventoryItemRequest
Source§impl Default for WritableInventoryItemRequest
impl Default for WritableInventoryItemRequest
Source§fn default() -> WritableInventoryItemRequest
fn default() -> WritableInventoryItemRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WritableInventoryItemRequest
impl<'de> Deserialize<'de> for WritableInventoryItemRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WritableInventoryItemRequest
impl PartialEq for WritableInventoryItemRequest
Source§fn eq(&self, other: &WritableInventoryItemRequest) -> bool
fn eq(&self, other: &WritableInventoryItemRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WritableInventoryItemRequest
Auto Trait Implementations§
impl Freeze for WritableInventoryItemRequest
impl RefUnwindSafe for WritableInventoryItemRequest
impl Send for WritableInventoryItemRequest
impl Sync for WritableInventoryItemRequest
impl Unpin for WritableInventoryItemRequest
impl UnwindSafe for WritableInventoryItemRequest
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