#[non_exhaustive]pub struct Dataset {
pub attributes: DatasetAttributes,
pub id: Option<String>,
pub type_: String,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Dataset 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.attributes: DatasetAttributes
Dataset metadata and configuration(s).
id: Option<String>
Unique identifier for the dataset.
type_: String
Resource type, always “dataset”.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl Dataset
impl Dataset
Sourcepub fn new(attributes: DatasetAttributes, type_: String) -> Dataset
pub fn new(attributes: DatasetAttributes, type_: String) -> Dataset
Examples found in repository?
examples/v2_datasets_CreateDataset.rs (lines 12-23)
10async fn main() {
11 let body = DatasetCreateRequest::new(
12 Dataset::new(
13 DatasetAttributes::new(
14 "Security Audit Dataset".to_string(),
15 vec!["role:86245fce-0a4e-11f0-92bd-da7ad0900002".to_string()],
16 vec![FiltersPerProduct::new(
17 vec!["@application.id:ABCD".to_string()],
18 "logs".to_string(),
19 )],
20 )
21 .created_at(None),
22 "dataset".to_string(),
23 )
24 .id("123e4567-e89b-12d3-a456-426614174000".to_string()),
25 );
26 let configuration = datadog::Configuration::new();
27 let api = DatasetsAPI::with_config(configuration);
28 let resp = api.create_dataset(body).await;
29 if let Ok(value) = resp {
30 println!("{:#?}", value);
31 } else {
32 println!("{:#?}", resp.unwrap_err());
33 }
34}
Sourcepub fn id(self, value: String) -> Self
pub fn id(self, value: String) -> Self
Examples found in repository?
examples/v2_datasets_CreateDataset.rs (line 24)
10async fn main() {
11 let body = DatasetCreateRequest::new(
12 Dataset::new(
13 DatasetAttributes::new(
14 "Security Audit Dataset".to_string(),
15 vec!["role:86245fce-0a4e-11f0-92bd-da7ad0900002".to_string()],
16 vec![FiltersPerProduct::new(
17 vec!["@application.id:ABCD".to_string()],
18 "logs".to_string(),
19 )],
20 )
21 .created_at(None),
22 "dataset".to_string(),
23 )
24 .id("123e4567-e89b-12d3-a456-426614174000".to_string()),
25 );
26 let configuration = datadog::Configuration::new();
27 let api = DatasetsAPI::with_config(configuration);
28 let resp = api.create_dataset(body).await;
29 if let Ok(value) = resp {
30 println!("{:#?}", value);
31 } else {
32 println!("{:#?}", resp.unwrap_err());
33 }
34}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Dataset
impl<'de> Deserialize<'de> for Dataset
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
impl StructuralPartialEq for Dataset
Auto Trait Implementations§
impl Freeze for Dataset
impl RefUnwindSafe for Dataset
impl Send for Dataset
impl Sync for Dataset
impl Unpin for Dataset
impl UnwindSafe for Dataset
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