#[non_exhaustive]pub struct UpdateRulesetRequestData {
pub attributes: Option<UpdateRulesetRequestDataAttributes>,
pub id: Option<String>,
pub type_: UpdateRulesetRequestDataType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The definition of UpdateRulesetRequestData
object.
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.attributes: Option<UpdateRulesetRequestDataAttributes>
The definition of UpdateRulesetRequestDataAttributes
object.
id: Option<String>
The UpdateRulesetRequestData
id
.
type_: UpdateRulesetRequestDataType
Update ruleset resource type.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl UpdateRulesetRequestData
impl UpdateRulesetRequestData
Sourcepub fn new(type_: UpdateRulesetRequestDataType) -> UpdateRulesetRequestData
pub fn new(type_: UpdateRulesetRequestDataType) -> UpdateRulesetRequestData
Examples found in repository?
examples/v2_cloud-cost-management_UpdateRuleset.rs (line 14)
12async fn main() {
13 let body = UpdateRulesetRequest::new().data(
14 UpdateRulesetRequestData::new(UpdateRulesetRequestDataType::UPDATE_RULESET).attributes(
15 UpdateRulesetRequestDataAttributes::new(
16 true,
17 vec![UpdateRulesetRequestDataAttributesRulesItems::new(
18 true,
19 "Account Name Mapping".to_string(),
20 )
21 .mapping(Some(
22 UpdateRulesetRequestDataAttributesRulesItemsMapping::new(
23 "team_owner".to_string(),
24 true,
25 vec!["account_name".to_string(), "account_id".to_string()],
26 ),
27 ))
28 .query(None)
29 .reference_table(None)],
30 )
31 .last_version(3601919),
32 ),
33 );
34 let configuration = datadog::Configuration::new();
35 let api = CloudCostManagementAPI::with_config(configuration);
36 let resp = api
37 .update_ruleset("1c5dae14-237d-4b9a-a515-aa55b3939142".to_string(), body)
38 .await;
39 if let Ok(value) = resp {
40 println!("{:#?}", value);
41 } else {
42 println!("{:#?}", resp.unwrap_err());
43 }
44}
Sourcepub fn attributes(self, value: UpdateRulesetRequestDataAttributes) -> Self
pub fn attributes(self, value: UpdateRulesetRequestDataAttributes) -> Self
Examples found in repository?
examples/v2_cloud-cost-management_UpdateRuleset.rs (lines 14-32)
12async fn main() {
13 let body = UpdateRulesetRequest::new().data(
14 UpdateRulesetRequestData::new(UpdateRulesetRequestDataType::UPDATE_RULESET).attributes(
15 UpdateRulesetRequestDataAttributes::new(
16 true,
17 vec![UpdateRulesetRequestDataAttributesRulesItems::new(
18 true,
19 "Account Name Mapping".to_string(),
20 )
21 .mapping(Some(
22 UpdateRulesetRequestDataAttributesRulesItemsMapping::new(
23 "team_owner".to_string(),
24 true,
25 vec!["account_name".to_string(), "account_id".to_string()],
26 ),
27 ))
28 .query(None)
29 .reference_table(None)],
30 )
31 .last_version(3601919),
32 ),
33 );
34 let configuration = datadog::Configuration::new();
35 let api = CloudCostManagementAPI::with_config(configuration);
36 let resp = api
37 .update_ruleset("1c5dae14-237d-4b9a-a515-aa55b3939142".to_string(), body)
38 .await;
39 if let Ok(value) = resp {
40 println!("{:#?}", value);
41 } else {
42 println!("{:#?}", resp.unwrap_err());
43 }
44}
pub fn id(self, value: String) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for UpdateRulesetRequestData
impl Clone for UpdateRulesetRequestData
Source§fn clone(&self) -> UpdateRulesetRequestData
fn clone(&self) -> UpdateRulesetRequestData
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 UpdateRulesetRequestData
impl Debug for UpdateRulesetRequestData
Source§impl<'de> Deserialize<'de> for UpdateRulesetRequestData
impl<'de> Deserialize<'de> for UpdateRulesetRequestData
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 UpdateRulesetRequestData
impl PartialEq for UpdateRulesetRequestData
Source§impl Serialize for UpdateRulesetRequestData
impl Serialize for UpdateRulesetRequestData
impl StructuralPartialEq for UpdateRulesetRequestData
Auto Trait Implementations§
impl Freeze for UpdateRulesetRequestData
impl RefUnwindSafe for UpdateRulesetRequestData
impl Send for UpdateRulesetRequestData
impl Sync for UpdateRulesetRequestData
impl Unpin for UpdateRulesetRequestData
impl UnwindSafe for UpdateRulesetRequestData
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