#[non_exhaustive]pub struct SignalStateUpdateRequest {
pub archive_comment: Option<String>,
pub archive_reason: Option<SignalArchiveReason>,
pub state: SignalTriageState,
pub version: Option<i64>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Attributes describing the change of state for a given state.
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.archive_comment: Option<String>
Optional comment to explain why a signal is being archived.
archive_reason: Option<SignalArchiveReason>
Reason why a signal has been archived.
state: SignalTriageState
The new triage state of the signal.
version: Option<i64>
Version of the updated signal. If server side version is higher, update will be rejected.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl SignalStateUpdateRequest
impl SignalStateUpdateRequest
Sourcepub fn new(state: SignalTriageState) -> SignalStateUpdateRequest
pub fn new(state: SignalTriageState) -> SignalStateUpdateRequest
Examples found in repository?
examples/v1_security-monitoring_EditSecurityMonitoringSignalState.rs (line 10)
9async fn main() {
10 let body = SignalStateUpdateRequest::new(SignalTriageState::OPEN)
11 .archive_reason(SignalArchiveReason::NONE);
12 let configuration = datadog::Configuration::new();
13 let api = SecurityMonitoringAPI::with_config(configuration);
14 let resp = api
15 .edit_security_monitoring_signal_state(
16 "AQAAAYDiB_Ol8PbzFAAAAABBWURpQl9PbEFBQU0yeXhGTG9ZV2JnQUE".to_string(),
17 body,
18 )
19 .await;
20 if let Ok(value) = resp {
21 println!("{:#?}", value);
22 } else {
23 println!("{:#?}", resp.unwrap_err());
24 }
25}
pub fn archive_comment(self, value: String) -> Self
Sourcepub fn archive_reason(self, value: SignalArchiveReason) -> Self
pub fn archive_reason(self, value: SignalArchiveReason) -> Self
Examples found in repository?
examples/v1_security-monitoring_EditSecurityMonitoringSignalState.rs (line 11)
9async fn main() {
10 let body = SignalStateUpdateRequest::new(SignalTriageState::OPEN)
11 .archive_reason(SignalArchiveReason::NONE);
12 let configuration = datadog::Configuration::new();
13 let api = SecurityMonitoringAPI::with_config(configuration);
14 let resp = api
15 .edit_security_monitoring_signal_state(
16 "AQAAAYDiB_Ol8PbzFAAAAABBWURpQl9PbEFBQU0yeXhGTG9ZV2JnQUE".to_string(),
17 body,
18 )
19 .await;
20 if let Ok(value) = resp {
21 println!("{:#?}", value);
22 } else {
23 println!("{:#?}", resp.unwrap_err());
24 }
25}
pub fn version(self, value: i64) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for SignalStateUpdateRequest
impl Clone for SignalStateUpdateRequest
Source§fn clone(&self) -> SignalStateUpdateRequest
fn clone(&self) -> SignalStateUpdateRequest
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 SignalStateUpdateRequest
impl Debug for SignalStateUpdateRequest
Source§impl<'de> Deserialize<'de> for SignalStateUpdateRequest
impl<'de> Deserialize<'de> for SignalStateUpdateRequest
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 SignalStateUpdateRequest
impl PartialEq for SignalStateUpdateRequest
Source§impl Serialize for SignalStateUpdateRequest
impl Serialize for SignalStateUpdateRequest
impl StructuralPartialEq for SignalStateUpdateRequest
Auto Trait Implementations§
impl Freeze for SignalStateUpdateRequest
impl RefUnwindSafe for SignalStateUpdateRequest
impl Send for SignalStateUpdateRequest
impl Sync for SignalStateUpdateRequest
impl Unpin for SignalStateUpdateRequest
impl UnwindSafe for SignalStateUpdateRequest
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