#[non_exhaustive]pub struct CustomFrameworkControl {
pub name: String,
pub rules_id: Vec<String>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Framework Control.
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.name: String
Control Name.
rules_id: Vec<String>
Rule IDs.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl CustomFrameworkControl
impl CustomFrameworkControl
Sourcepub fn new(name: String, rules_id: Vec<String>) -> CustomFrameworkControl
pub fn new(name: String, rules_id: Vec<String>) -> CustomFrameworkControl
Examples found in repository?
examples/v2_security-monitoring_CreateCustomFramework.rs (lines 18-21)
12async fn main() {
13 let body = CreateCustomFrameworkRequest::new(CustomFrameworkData::new(
14 CustomFrameworkDataAttributes::new(
15 "create-framework-new".to_string(),
16 "name".to_string(),
17 vec![CustomFrameworkRequirement::new(
18 vec![CustomFrameworkControl::new(
19 "control".to_string(),
20 vec!["def-000-be9".to_string()],
21 )],
22 "requirement".to_string(),
23 )],
24 "10".to_string(),
25 )
26 .icon_url("test-url".to_string()),
27 CustomFrameworkType::CUSTOM_FRAMEWORK,
28 ));
29 let configuration = datadog::Configuration::new();
30 let api = SecurityMonitoringAPI::with_config(configuration);
31 let resp = api.create_custom_framework(body).await;
32 if let Ok(value) = resp {
33 println!("{:#?}", value);
34 } else {
35 println!("{:#?}", resp.unwrap_err());
36 }
37}
More examples
examples/v2_security-monitoring_UpdateCustomFramework.rs (lines 18-21)
12async fn main() {
13 let body = UpdateCustomFrameworkRequest::new(CustomFrameworkData::new(
14 CustomFrameworkDataAttributes::new(
15 "create-framework-new".to_string(),
16 "name".to_string(),
17 vec![CustomFrameworkRequirement::new(
18 vec![CustomFrameworkControl::new(
19 "control".to_string(),
20 vec!["def-000-be9".to_string()],
21 )],
22 "requirement".to_string(),
23 )],
24 "10".to_string(),
25 )
26 .icon_url("test-url".to_string()),
27 CustomFrameworkType::CUSTOM_FRAMEWORK,
28 ));
29 let configuration = datadog::Configuration::new();
30 let api = SecurityMonitoringAPI::with_config(configuration);
31 let resp = api
32 .update_custom_framework("create-framework-new".to_string(), "10".to_string(), body)
33 .await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for CustomFrameworkControl
impl Clone for CustomFrameworkControl
Source§fn clone(&self) -> CustomFrameworkControl
fn clone(&self) -> CustomFrameworkControl
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 CustomFrameworkControl
impl Debug for CustomFrameworkControl
Source§impl<'de> Deserialize<'de> for CustomFrameworkControl
impl<'de> Deserialize<'de> for CustomFrameworkControl
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 CustomFrameworkControl
impl PartialEq for CustomFrameworkControl
Source§impl Serialize for CustomFrameworkControl
impl Serialize for CustomFrameworkControl
impl StructuralPartialEq for CustomFrameworkControl
Auto Trait Implementations§
impl Freeze for CustomFrameworkControl
impl RefUnwindSafe for CustomFrameworkControl
impl Send for CustomFrameworkControl
impl Sync for CustomFrameworkControl
impl Unpin for CustomFrameworkControl
impl UnwindSafe for CustomFrameworkControl
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