#[non_exhaustive]pub struct UpdateRulesetRequest {
pub data: Option<UpdateRulesetRequestData>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The definition of UpdateRulesetRequest
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.data: Option<UpdateRulesetRequestData>
The definition of UpdateRulesetRequestData
object.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl UpdateRulesetRequest
impl UpdateRulesetRequest
Sourcepub fn new() -> UpdateRulesetRequest
pub fn new() -> UpdateRulesetRequest
Examples found in repository?
examples/v2_cloud-cost-management_UpdateRuleset.rs (line 13)
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 data(self, value: UpdateRulesetRequestData) -> Self
pub fn data(self, value: UpdateRulesetRequestData) -> Self
Examples found in repository?
examples/v2_cloud-cost-management_UpdateRuleset.rs (lines 13-33)
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 UpdateRulesetRequest
impl Clone for UpdateRulesetRequest
Source§fn clone(&self) -> UpdateRulesetRequest
fn clone(&self) -> UpdateRulesetRequest
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 UpdateRulesetRequest
impl Debug for UpdateRulesetRequest
Source§impl Default for UpdateRulesetRequest
impl Default for UpdateRulesetRequest
Source§impl<'de> Deserialize<'de> for UpdateRulesetRequest
impl<'de> Deserialize<'de> for UpdateRulesetRequest
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 UpdateRulesetRequest
impl PartialEq for UpdateRulesetRequest
Source§impl Serialize for UpdateRulesetRequest
impl Serialize for UpdateRulesetRequest
impl StructuralPartialEq for UpdateRulesetRequest
Auto Trait Implementations§
impl Freeze for UpdateRulesetRequest
impl RefUnwindSafe for UpdateRulesetRequest
impl Send for UpdateRulesetRequest
impl Sync for UpdateRulesetRequest
impl Unpin for UpdateRulesetRequest
impl UnwindSafe for UpdateRulesetRequest
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