#[non_exhaustive]pub struct CustomAttributeConfigAttributesCreate {
pub description: Option<String>,
pub display_name: String,
pub is_multi: bool,
pub key: String,
pub type_: CustomAttributeType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}Expand description
Custom attribute config resource attributes
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.description: Option<String>Custom attribute description.
display_name: StringCustom attribute name.
is_multi: boolWhether multiple values can be set
key: StringCustom attribute key. This will be the value use to search on this custom attribute
type_: CustomAttributeTypeCustom attributes type
additional_properties: BTreeMap<String, Value>Implementations§
Source§impl CustomAttributeConfigAttributesCreate
impl CustomAttributeConfigAttributesCreate
Sourcepub fn new(
display_name: String,
is_multi: bool,
key: String,
type_: CustomAttributeType,
) -> CustomAttributeConfigAttributesCreate
pub fn new( display_name: String, is_multi: bool, key: String, type_: CustomAttributeType, ) -> CustomAttributeConfigAttributesCreate
Examples found in repository?
examples/v2_case-management-attribute_CreateCustomAttributeConfig.rs (lines 15-20)
11async fn main() {
12 // there is a valid "case_type" in the system
13 let case_type_id = std::env::var("CASE_TYPE_ID").unwrap();
14 let body = CustomAttributeConfigCreateRequest::new(CustomAttributeConfigCreate::new(
15 CustomAttributeConfigAttributesCreate::new(
16 "AWS Region ".to_string(),
17 true,
18 "region_d9fe56bc9274fbb6".to_string(),
19 CustomAttributeType::NUMBER,
20 ),
21 CustomAttributeConfigResourceType::CUSTOM_ATTRIBUTE,
22 ));
23 let configuration = datadog::Configuration::new();
24 let api = CaseManagementAttributeAPI::with_config(configuration);
25 let resp = api
26 .create_custom_attribute_config(case_type_id.clone(), body)
27 .await;
28 if let Ok(value) = resp {
29 println!("{:#?}", value);
30 } else {
31 println!("{:#?}", resp.unwrap_err());
32 }
33}pub fn description(self, value: String) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for CustomAttributeConfigAttributesCreate
impl Clone for CustomAttributeConfigAttributesCreate
Source§fn clone(&self) -> CustomAttributeConfigAttributesCreate
fn clone(&self) -> CustomAttributeConfigAttributesCreate
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<'de> Deserialize<'de> for CustomAttributeConfigAttributesCreate
impl<'de> Deserialize<'de> for CustomAttributeConfigAttributesCreate
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 CustomAttributeConfigAttributesCreate
impl PartialEq for CustomAttributeConfigAttributesCreate
Source§fn eq(&self, other: &CustomAttributeConfigAttributesCreate) -> bool
fn eq(&self, other: &CustomAttributeConfigAttributesCreate) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CustomAttributeConfigAttributesCreate
Auto Trait Implementations§
impl Freeze for CustomAttributeConfigAttributesCreate
impl RefUnwindSafe for CustomAttributeConfigAttributesCreate
impl Send for CustomAttributeConfigAttributesCreate
impl Sync for CustomAttributeConfigAttributesCreate
impl Unpin for CustomAttributeConfigAttributesCreate
impl UnwindSafe for CustomAttributeConfigAttributesCreate
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