#[non_exhaustive]pub struct CustomFrameworkData {
pub attributes: CustomFrameworkDataAttributes,
pub type_: CustomFrameworkType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Contains type and attributes for custom frameworks.
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: CustomFrameworkDataAttributes
Framework Data Attributes.
type_: CustomFrameworkType
The type of the resource. The value must be custom_framework
.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl CustomFrameworkData
impl CustomFrameworkData
Sourcepub fn new(
attributes: CustomFrameworkDataAttributes,
type_: CustomFrameworkType,
) -> CustomFrameworkData
pub fn new( attributes: CustomFrameworkDataAttributes, type_: CustomFrameworkType, ) -> CustomFrameworkData
Examples found in repository?
examples/v2_security-monitoring_CreateCustomFramework.rs (lines 13-28)
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 13-28)
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 CustomFrameworkData
impl Clone for CustomFrameworkData
Source§fn clone(&self) -> CustomFrameworkData
fn clone(&self) -> CustomFrameworkData
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 CustomFrameworkData
impl Debug for CustomFrameworkData
Source§impl<'de> Deserialize<'de> for CustomFrameworkData
impl<'de> Deserialize<'de> for CustomFrameworkData
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 CustomFrameworkData
impl PartialEq for CustomFrameworkData
Source§impl Serialize for CustomFrameworkData
impl Serialize for CustomFrameworkData
impl StructuralPartialEq for CustomFrameworkData
Auto Trait Implementations§
impl Freeze for CustomFrameworkData
impl RefUnwindSafe for CustomFrameworkData
impl Send for CustomFrameworkData
impl Sync for CustomFrameworkData
impl Unpin for CustomFrameworkData
impl UnwindSafe for CustomFrameworkData
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