#[non_exhaustive]pub struct UpdateRulesetRequestDataAttributes {
pub enabled: bool,
pub last_version: Option<i64>,
pub rules: Vec<UpdateRulesetRequestDataAttributesRulesItems>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The definition of UpdateRulesetRequestDataAttributes
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.enabled: bool
The attributes
enabled
.
last_version: Option<i64>
The attributes
last_version
.
rules: Vec<UpdateRulesetRequestDataAttributesRulesItems>
The attributes
rules
.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl UpdateRulesetRequestDataAttributes
impl UpdateRulesetRequestDataAttributes
Sourcepub fn new(
enabled: bool,
rules: Vec<UpdateRulesetRequestDataAttributesRulesItems>,
) -> UpdateRulesetRequestDataAttributes
pub fn new( enabled: bool, rules: Vec<UpdateRulesetRequestDataAttributesRulesItems>, ) -> UpdateRulesetRequestDataAttributes
Examples found in repository?
examples/v2_cloud-cost-management_UpdateRuleset.rs (lines 15-30)
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 last_version(self, value: i64) -> Self
pub fn last_version(self, value: i64) -> Self
Examples found in repository?
examples/v2_cloud-cost-management_UpdateRuleset.rs (line 31)
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 additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for UpdateRulesetRequestDataAttributes
impl Clone for UpdateRulesetRequestDataAttributes
Source§fn clone(&self) -> UpdateRulesetRequestDataAttributes
fn clone(&self) -> UpdateRulesetRequestDataAttributes
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 UpdateRulesetRequestDataAttributes
impl<'de> Deserialize<'de> for UpdateRulesetRequestDataAttributes
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 UpdateRulesetRequestDataAttributes
impl PartialEq for UpdateRulesetRequestDataAttributes
Source§fn eq(&self, other: &UpdateRulesetRequestDataAttributes) -> bool
fn eq(&self, other: &UpdateRulesetRequestDataAttributes) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for UpdateRulesetRequestDataAttributes
Auto Trait Implementations§
impl Freeze for UpdateRulesetRequestDataAttributes
impl RefUnwindSafe for UpdateRulesetRequestDataAttributes
impl Send for UpdateRulesetRequestDataAttributes
impl Sync for UpdateRulesetRequestDataAttributes
impl Unpin for UpdateRulesetRequestDataAttributes
impl UnwindSafe for UpdateRulesetRequestDataAttributes
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