Skip to content

Commit 99327e5

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
add mfa_enabled field and change created_at type to datetime (#228)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 01cad14 commit 99327e5

File tree

4 files changed

+30
-7
lines changed

4 files changed

+30
-7
lines changed

Diff for: .apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-08-09 16:10:39.384236",
8-
"spec_repo_commit": "4a0f9e08"
7+
"regenerated": "2024-08-12 13:34:59.726807",
8+
"spec_repo_commit": "0360f6c8"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-08-09 16:10:39.402460",
13-
"spec_repo_commit": "4a0f9e08"
12+
"regenerated": "2024-08-12 13:34:59.745539",
13+
"spec_repo_commit": "0360f6c8"
1414
}
1515
}
1616
}

Diff for: .generator/schemas/v2/openapi.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -8496,6 +8496,7 @@ components:
84968496
created_at:
84978497
description: Creation date of the application key.
84988498
example: '2020-11-23T10:00:00.000Z'
8499+
format: date-time
84998500
readOnly: true
85008501
type: string
85018502
key:
@@ -23415,6 +23416,10 @@ components:
2341523416
icon:
2341623417
description: URL of the user's icon.
2341723418
type: string
23419+
mfa_enabled:
23420+
description: If user has MFA enabled.
23421+
readOnly: true
23422+
type: boolean
2341823423
modified_at:
2341923424
description: Time that the user was last modified.
2342023425
format: date-time

Diff for: src/datadogV2/model/model_full_application_key_attributes.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::fmt::{self, Formatter};
1313
pub struct FullApplicationKeyAttributes {
1414
/// Creation date of the application key.
1515
#[serde(rename = "created_at")]
16-
pub created_at: Option<String>,
16+
pub created_at: Option<chrono::DateTime<chrono::Utc>>,
1717
/// The application key.
1818
#[serde(rename = "key")]
1919
pub key: Option<String>,
@@ -43,7 +43,7 @@ impl FullApplicationKeyAttributes {
4343
}
4444
}
4545

46-
pub fn created_at(mut self, value: String) -> Self {
46+
pub fn created_at(mut self, value: chrono::DateTime<chrono::Utc>) -> Self {
4747
self.created_at = Some(value);
4848
self
4949
}
@@ -92,7 +92,7 @@ impl<'de> Deserialize<'de> for FullApplicationKeyAttributes {
9292
where
9393
M: MapAccess<'a>,
9494
{
95-
let mut created_at: Option<String> = None;
95+
let mut created_at: Option<chrono::DateTime<chrono::Utc>> = None;
9696
let mut key: Option<String> = None;
9797
let mut last4: Option<String> = None;
9898
let mut name: Option<String> = None;

Diff for: src/datadogV2/model/model_user_attributes.rs

+18
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ pub struct UserAttributes {
2626
/// URL of the user's icon.
2727
#[serde(rename = "icon")]
2828
pub icon: Option<String>,
29+
/// If user has MFA enabled.
30+
#[serde(rename = "mfa_enabled")]
31+
pub mfa_enabled: Option<bool>,
2932
/// Time that the user was last modified.
3033
#[serde(rename = "modified_at")]
3134
pub modified_at: Option<chrono::DateTime<chrono::Utc>>,
@@ -57,6 +60,7 @@ impl UserAttributes {
5760
email: None,
5861
handle: None,
5962
icon: None,
63+
mfa_enabled: None,
6064
modified_at: None,
6165
name: None,
6266
service_account: None,
@@ -92,6 +96,11 @@ impl UserAttributes {
9296
self
9397
}
9498

99+
pub fn mfa_enabled(mut self, value: bool) -> Self {
100+
self.mfa_enabled = Some(value);
101+
self
102+
}
103+
95104
pub fn modified_at(mut self, value: chrono::DateTime<chrono::Utc>) -> Self {
96105
self.modified_at = Some(value);
97106
self
@@ -151,6 +160,7 @@ impl<'de> Deserialize<'de> for UserAttributes {
151160
let mut email: Option<String> = None;
152161
let mut handle: Option<String> = None;
153162
let mut icon: Option<String> = None;
163+
let mut mfa_enabled: Option<bool> = None;
154164
let mut modified_at: Option<chrono::DateTime<chrono::Utc>> = None;
155165
let mut name: Option<Option<String>> = None;
156166
let mut service_account: Option<bool> = None;
@@ -191,6 +201,13 @@ impl<'de> Deserialize<'de> for UserAttributes {
191201
}
192202
icon = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
193203
}
204+
"mfa_enabled" => {
205+
if v.is_null() {
206+
continue;
207+
}
208+
mfa_enabled =
209+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
210+
}
194211
"modified_at" => {
195212
if v.is_null() {
196213
continue;
@@ -233,6 +250,7 @@ impl<'de> Deserialize<'de> for UserAttributes {
233250
email,
234251
handle,
235252
icon,
253+
mfa_enabled,
236254
modified_at,
237255
name,
238256
service_account,

0 commit comments

Comments
 (0)