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
6 changes: 6 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35837,6 +35837,12 @@ components:
RUMApplicationAttributes:
description: RUM application attributes.
properties:
api_key_id:
description: ID of the API key associated with the application.
example: 123456789
format: int32
maximum: 2147483647
type: integer
application_id:
description: ID of the RUM application.
example: abcd1234-0000-0000-abcd-1234abcd5678
Expand Down
17 changes: 17 additions & 0 deletions src/datadogV2/model/model_rum_application_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ use std::fmt::{self, Formatter};
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
pub struct RUMApplicationAttributes {
/// ID of the API key associated with the application.
#[serde(rename = "api_key_id")]
pub api_key_id: Option<i32>,
/// ID of the RUM application.
#[serde(rename = "application_id")]
pub application_id: String,
Expand Down Expand Up @@ -67,6 +70,7 @@ impl RUMApplicationAttributes {
updated_by_handle: String,
) -> RUMApplicationAttributes {
RUMApplicationAttributes {
api_key_id: None,
application_id,
client_token,
created_at,
Expand All @@ -84,6 +88,11 @@ impl RUMApplicationAttributes {
}
}

pub fn api_key_id(mut self, value: i32) -> Self {
self.api_key_id = Some(value);
self
}

pub fn hash(mut self, value: String) -> Self {
self.hash = Some(value);
self
Expand Down Expand Up @@ -125,6 +134,7 @@ impl<'de> Deserialize<'de> for RUMApplicationAttributes {
where
M: MapAccess<'a>,
{
let mut api_key_id: Option<i32> = None;
let mut application_id: Option<String> = None;
let mut client_token: Option<String> = None;
let mut created_at: Option<i64> = None;
Expand All @@ -145,6 +155,12 @@ impl<'de> Deserialize<'de> for RUMApplicationAttributes {

while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
match k.as_str() {
"api_key_id" => {
if v.is_null() {
continue;
}
api_key_id = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"application_id" => {
application_id =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
Expand Down Expand Up @@ -217,6 +233,7 @@ impl<'de> Deserialize<'de> for RUMApplicationAttributes {
.ok_or_else(|| M::Error::missing_field("updated_by_handle"))?;

let content = RUMApplicationAttributes {
api_key_id,
application_id,
client_token,
created_at,
Expand Down