Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50997,6 +50997,7 @@ components:
- $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataCloudStorage'
- $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataLocalFile'
TableResultV2DataAttributesFileMetadataCloudStorage:
additionalProperties: false
description: File metadata for reference tables created by cloud storage.
properties:
access_details:
Expand Down Expand Up @@ -51043,6 +51044,7 @@ components:
- OPERATION_ERROR
- SYSTEM_ERROR
TableResultV2DataAttributesFileMetadataLocalFile:
additionalProperties: false
description: File metadata for reference tables created by upload. Note that
upload_id is only returned in the immediate create/replace response and is
not available in subsequent GET requests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ pub struct TableResultV2DataAttributesFileMetadataCloudStorage {
/// Whether this table is synced automatically.
#[serde(rename = "sync_enabled")]
pub sync_enabled: Option<bool>,
#[serde(flatten)]
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
#[serde(skip)]
#[serde(default)]
pub(crate) _unparsed: bool,
Expand All @@ -46,7 +44,6 @@ impl TableResultV2DataAttributesFileMetadataCloudStorage {
error_row_count: None,
error_type: None,
sync_enabled: None,
additional_properties: std::collections::BTreeMap::new(),
_unparsed: false,
}
}
Expand All @@ -73,14 +70,6 @@ impl TableResultV2DataAttributesFileMetadataCloudStorage {
self.sync_enabled = Some(value);
self
}

pub fn additional_properties(
mut self,
value: std::collections::BTreeMap<String, serde_json::Value>,
) -> Self {
self.additional_properties = value;
self
}
}

impl<'de> Deserialize<'de> for TableResultV2DataAttributesFileMetadataCloudStorage {
Expand All @@ -105,10 +94,6 @@ impl<'de> Deserialize<'de> for TableResultV2DataAttributesFileMetadataCloudStora
let mut error_row_count: Option<i64> = None;
let mut error_type: Option<crate::datadogV2::model::TableResultV2DataAttributesFileMetadataCloudStorageErrorType> = None;
let mut sync_enabled: Option<bool> = None;
let mut additional_properties: std::collections::BTreeMap<
String,
serde_json::Value,
> = std::collections::BTreeMap::new();
let mut _unparsed = false;

while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
Expand Down Expand Up @@ -153,9 +138,9 @@ impl<'de> Deserialize<'de> for TableResultV2DataAttributesFileMetadataCloudStora
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
&_ => {
if let Ok(value) = serde_json::from_value(v.clone()) {
additional_properties.insert(k, value);
}
return Err(serde::de::Error::custom(
"Additional properties not allowed",
));
}
}
}
Expand All @@ -168,7 +153,6 @@ impl<'de> Deserialize<'de> for TableResultV2DataAttributesFileMetadataCloudStora
error_row_count,
error_type,
sync_enabled,
additional_properties,
_unparsed,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ pub struct TableResultV2DataAttributesFileMetadataLocalFile {
/// The number of rows that failed to create/update.
#[serde(rename = "error_row_count")]
pub error_row_count: Option<i64>,
#[serde(flatten)]
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
#[serde(skip)]
#[serde(default)]
pub(crate) _unparsed: bool,
Expand All @@ -29,7 +27,6 @@ impl TableResultV2DataAttributesFileMetadataLocalFile {
TableResultV2DataAttributesFileMetadataLocalFile {
error_message: None,
error_row_count: None,
additional_properties: std::collections::BTreeMap::new(),
_unparsed: false,
}
}
Expand All @@ -43,14 +40,6 @@ impl TableResultV2DataAttributesFileMetadataLocalFile {
self.error_row_count = Some(value);
self
}

pub fn additional_properties(
mut self,
value: std::collections::BTreeMap<String, serde_json::Value>,
) -> Self {
self.additional_properties = value;
self
}
}

impl Default for TableResultV2DataAttributesFileMetadataLocalFile {
Expand Down Expand Up @@ -78,10 +67,6 @@ impl<'de> Deserialize<'de> for TableResultV2DataAttributesFileMetadataLocalFile
{
let mut error_message: Option<String> = None;
let mut error_row_count: Option<i64> = None;
let mut additional_properties: std::collections::BTreeMap<
String,
serde_json::Value,
> = std::collections::BTreeMap::new();
let mut _unparsed = false;

while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
Expand All @@ -101,17 +86,16 @@ impl<'de> Deserialize<'de> for TableResultV2DataAttributesFileMetadataLocalFile
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
&_ => {
if let Ok(value) = serde_json::from_value(v.clone()) {
additional_properties.insert(k, value);
}
return Err(serde::de::Error::custom(
"Additional properties not allowed",
));
}
}
}

let content = TableResultV2DataAttributesFileMetadataLocalFile {
error_message,
error_row_count,
additional_properties,
_unparsed,
};

Expand Down
Loading