#[non_exhaustive]pub struct LogsArchiveOrder {
pub data: Option<LogsArchiveOrderDefinition>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
A ordered list of archive IDs.
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<LogsArchiveOrderDefinition>
The definition of an archive order.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl LogsArchiveOrder
impl LogsArchiveOrder
Sourcepub fn new() -> LogsArchiveOrder
pub fn new() -> LogsArchiveOrder
Examples found in repository?
examples/v2_logs-archives_UpdateLogsArchiveOrder.rs (line 11)
10async fn main() {
11 let body = LogsArchiveOrder::new().data(LogsArchiveOrderDefinition::new(
12 LogsArchiveOrderAttributes::new(vec![
13 "a2zcMylnM4OCHpYusxIi1g".to_string(),
14 "a2zcMylnM4OCHpYusxIi2g".to_string(),
15 "a2zcMylnM4OCHpYusxIi3g".to_string(),
16 ]),
17 LogsArchiveOrderDefinitionType::ARCHIVE_ORDER,
18 ));
19 let configuration = datadog::Configuration::new();
20 let api = LogsArchivesAPI::with_config(configuration);
21 let resp = api.update_logs_archive_order(body).await;
22 if let Ok(value) = resp {
23 println!("{:#?}", value);
24 } else {
25 println!("{:#?}", resp.unwrap_err());
26 }
27}
Sourcepub fn data(self, value: LogsArchiveOrderDefinition) -> Self
pub fn data(self, value: LogsArchiveOrderDefinition) -> Self
Examples found in repository?
examples/v2_logs-archives_UpdateLogsArchiveOrder.rs (lines 11-18)
10async fn main() {
11 let body = LogsArchiveOrder::new().data(LogsArchiveOrderDefinition::new(
12 LogsArchiveOrderAttributes::new(vec![
13 "a2zcMylnM4OCHpYusxIi1g".to_string(),
14 "a2zcMylnM4OCHpYusxIi2g".to_string(),
15 "a2zcMylnM4OCHpYusxIi3g".to_string(),
16 ]),
17 LogsArchiveOrderDefinitionType::ARCHIVE_ORDER,
18 ));
19 let configuration = datadog::Configuration::new();
20 let api = LogsArchivesAPI::with_config(configuration);
21 let resp = api.update_logs_archive_order(body).await;
22 if let Ok(value) = resp {
23 println!("{:#?}", value);
24 } else {
25 println!("{:#?}", resp.unwrap_err());
26 }
27}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for LogsArchiveOrder
impl Clone for LogsArchiveOrder
Source§fn clone(&self) -> LogsArchiveOrder
fn clone(&self) -> LogsArchiveOrder
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 LogsArchiveOrder
impl Debug for LogsArchiveOrder
Source§impl Default for LogsArchiveOrder
impl Default for LogsArchiveOrder
Source§impl<'de> Deserialize<'de> for LogsArchiveOrder
impl<'de> Deserialize<'de> for LogsArchiveOrder
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 LogsArchiveOrder
impl PartialEq for LogsArchiveOrder
Source§impl Serialize for LogsArchiveOrder
impl Serialize for LogsArchiveOrder
impl StructuralPartialEq for LogsArchiveOrder
Auto Trait Implementations§
impl Freeze for LogsArchiveOrder
impl RefUnwindSafe for LogsArchiveOrder
impl Send for LogsArchiveOrder
impl Sync for LogsArchiveOrder
impl Unpin for LogsArchiveOrder
impl UnwindSafe for LogsArchiveOrder
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