Skip to content

Commit 2e392e8

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit be5cf1ee of spec repo
1 parent fcf212f commit 2e392e8

14 files changed

+1052
-6
lines changed

.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-09-23 19:10:18.896643",
8-
"spec_repo_commit": "41592dc6"
7+
"regenerated": "2024-09-24 13:35:53.100951",
8+
"spec_repo_commit": "be5cf1ee"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-09-23 19:10:18.910900",
13-
"spec_repo_commit": "41592dc6"
12+
"regenerated": "2024-09-24 13:35:53.115300",
13+
"spec_repo_commit": "be5cf1ee"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+120
Original file line numberDiff line numberDiff line change
@@ -24635,16 +24635,36 @@ components:
2463524635
UserCreateAttributes:
2463624636
description: Attributes of the created user.
2463724637
properties:
24638+
created_at:
24639+
description: The `UserCreateAttributes` `created_at`.
24640+
format: date-time
24641+
type: string
24642+
disabled:
24643+
description: The `UserCreateAttributes` `disabled`.
24644+
type: boolean
2463824645
email:
2463924646
description: The email of the user.
2464024647
2464124648
type: string
24649+
handle:
24650+
description: The `UserCreateAttributes` `handle`.
24651+
type: string
24652+
modified_at:
24653+
description: The `UserCreateAttributes` `modified_at`.
24654+
format: date-time
24655+
type: string
2464224656
name:
2464324657
description: The name of the user.
2464424658
type: string
24659+
service_account:
24660+
description: The `UserCreateAttributes` `service_account`.
24661+
type: boolean
2464524662
title:
2464624663
description: The title of the user.
2464724664
type: string
24665+
verified:
24666+
description: The `UserCreateAttributes` `verified`.
24667+
type: boolean
2464824668
required:
2464924669
- email
2465024670
type: object
@@ -24694,6 +24714,10 @@ components:
2469424714
invite_type:
2469524715
description: Type of invitation.
2469624716
type: string
24717+
login_method:
24718+
description: The `UserInvitationDataAttributes` `login_method`.
24719+
nullable: true
24720+
type: string
2469724721
uuid:
2469824722
description: UUID of the user invitation.
2469924723
type: string
@@ -24755,6 +24779,79 @@ components:
2475524779
type: string
2475624780
x-enum-varnames:
2475724781
- USER_INVITATIONS
24782+
UserOrgsSerializable:
24783+
description: The definition of `UserOrgsSerializable` object.
24784+
properties:
24785+
attributes:
24786+
$ref: '#/components/schemas/UserOrgsSerializableAttributes'
24787+
id:
24788+
description: The `UserOrgsSerializable` `id`.
24789+
type: string
24790+
type:
24791+
$ref: '#/components/schemas/UserOrgsSerializableType'
24792+
required:
24793+
- type
24794+
type: object
24795+
UserOrgsSerializableAttributes:
24796+
description: The definition of `UserOrgsSerializableAttributes` object.
24797+
properties:
24798+
disabled:
24799+
description: The `UserOrgsSerializableAttributes` `disabled`.
24800+
type: boolean
24801+
email:
24802+
description: The `UserOrgsSerializableAttributes` `email`.
24803+
type: string
24804+
name:
24805+
description: The `UserOrgsSerializableAttributes` `name`.
24806+
type: string
24807+
org_id:
24808+
description: The `UserOrgsSerializableAttributes` `org_id`.
24809+
type: string
24810+
title:
24811+
description: The `UserOrgsSerializableAttributes` `title`.
24812+
type: string
24813+
verified:
24814+
description: The `UserOrgsSerializableAttributes` `verified`.
24815+
type: boolean
24816+
type: object
24817+
UserOrgsSerializableType:
24818+
default: users
24819+
description: The definition of `UserOrgsSerializableType` object.
24820+
enum:
24821+
- users
24822+
example: users
24823+
type: string
24824+
x-enum-varnames:
24825+
- USERS
24826+
UserOverrideIdentityProvider:
24827+
description: The definition of `UserOverrideIdentityProvider` object.
24828+
properties:
24829+
attributes:
24830+
$ref: '#/components/schemas/UserOverrideIdentityProviderAttributes'
24831+
id:
24832+
description: The `UserOverrideIdentityProvider` `id`.
24833+
type: string
24834+
type:
24835+
$ref: '#/components/schemas/UserOverrideIdentityProviderType'
24836+
required:
24837+
- type
24838+
type: object
24839+
UserOverrideIdentityProviderAttributes:
24840+
description: The definition of `UserOverrideIdentityProviderAttributes` object.
24841+
properties:
24842+
authentication_method:
24843+
description: The `UserOverrideIdentityProviderAttributes` `authentication_method`.
24844+
type: string
24845+
type: object
24846+
UserOverrideIdentityProviderType:
24847+
default: identity_providers
24848+
description: The definition of `UserOverrideIdentityProviderType` object.
24849+
enum:
24850+
- identity_providers
24851+
example: identity_providers
24852+
type: string
24853+
x-enum-varnames:
24854+
- IDENTITY_PROVIDERS
2475824855
UserRelationshipData:
2475924856
description: Relationship to user object.
2476024857
properties:
@@ -24800,6 +24897,8 @@ components:
2480024897
- $ref: '#/components/schemas/Organization'
2480124898
- $ref: '#/components/schemas/Permission'
2480224899
- $ref: '#/components/schemas/Role'
24900+
- $ref: '#/components/schemas/UserOverrideIdentityProvider'
24901+
- $ref: '#/components/schemas/UserOrgsSerializable'
2480324902
UserResponseRelationships:
2480424903
description: Relationships of the user object returned by the API.
2480524904
properties:
@@ -25038,15 +25137,36 @@ components:
2503825137
UserUpdateAttributes:
2503925138
description: Attributes of the edited user.
2504025139
properties:
25140+
created_at:
25141+
description: The `UserUpdateAttributes` `created_at`.
25142+
format: date-time
25143+
type: string
2504125144
disabled:
2504225145
description: If the user is enabled or disabled.
2504325146
type: boolean
2504425147
email:
2504525148
description: The email of the user.
2504625149
type: string
25150+
handle:
25151+
description: The `UserUpdateAttributes` `handle`.
25152+
type: string
25153+
modified_at:
25154+
description: The `UserUpdateAttributes` `modified_at`.
25155+
format: date-time
25156+
type: string
2504725157
name:
2504825158
description: The name of the user.
2504925159
type: string
25160+
service_account:
25161+
description: The `UserUpdateAttributes` `service_account`.
25162+
type: boolean
25163+
title:
25164+
description: The `UserUpdateAttributes` `title`.
25165+
nullable: true
25166+
type: string
25167+
verified:
25168+
description: The `UserUpdateAttributes` `verified`.
25169+
type: boolean
2505025170
type: object
2505125171
UserUpdateData:
2505225172
description: Object to update a user.

src/datadogV2/model/mod.rs

+12
Original file line numberDiff line numberDiff line change
@@ -2168,6 +2168,18 @@ pub mod model_organization;
21682168
pub use self::model_organization::Organization;
21692169
pub mod model_organization_attributes;
21702170
pub use self::model_organization_attributes::OrganizationAttributes;
2171+
pub mod model_user_override_identity_provider;
2172+
pub use self::model_user_override_identity_provider::UserOverrideIdentityProvider;
2173+
pub mod model_user_override_identity_provider_attributes;
2174+
pub use self::model_user_override_identity_provider_attributes::UserOverrideIdentityProviderAttributes;
2175+
pub mod model_user_override_identity_provider_type;
2176+
pub use self::model_user_override_identity_provider_type::UserOverrideIdentityProviderType;
2177+
pub mod model_user_orgs_serializable;
2178+
pub use self::model_user_orgs_serializable::UserOrgsSerializable;
2179+
pub mod model_user_orgs_serializable_attributes;
2180+
pub use self::model_user_orgs_serializable_attributes::UserOrgsSerializableAttributes;
2181+
pub mod model_user_orgs_serializable_type;
2182+
pub use self::model_user_orgs_serializable_type::UserOrgsSerializableType;
21712183
pub mod model_user_response_included_item;
21722184
pub use self::model_user_response_included_item::UserResponseIncludedItem;
21732185
pub mod model_rum_aggregate_request;

src/datadogV2/model/model_user_create_attributes.rs

+104
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,33 @@ use std::fmt::{self, Formatter};
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
1313
pub struct UserCreateAttributes {
14+
/// The `UserCreateAttributes` `created_at`.
15+
#[serde(rename = "created_at")]
16+
pub created_at: Option<chrono::DateTime<chrono::Utc>>,
17+
/// The `UserCreateAttributes` `disabled`.
18+
#[serde(rename = "disabled")]
19+
pub disabled: Option<bool>,
1420
/// The email of the user.
1521
#[serde(rename = "email")]
1622
pub email: String,
23+
/// The `UserCreateAttributes` `handle`.
24+
#[serde(rename = "handle")]
25+
pub handle: Option<String>,
26+
/// The `UserCreateAttributes` `modified_at`.
27+
#[serde(rename = "modified_at")]
28+
pub modified_at: Option<chrono::DateTime<chrono::Utc>>,
1729
/// The name of the user.
1830
#[serde(rename = "name")]
1931
pub name: Option<String>,
32+
/// The `UserCreateAttributes` `service_account`.
33+
#[serde(rename = "service_account")]
34+
pub service_account: Option<bool>,
2035
/// The title of the user.
2136
#[serde(rename = "title")]
2237
pub title: Option<String>,
38+
/// The `UserCreateAttributes` `verified`.
39+
#[serde(rename = "verified")]
40+
pub verified: Option<bool>,
2341
#[serde(flatten)]
2442
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
2543
#[serde(skip)]
@@ -30,24 +48,60 @@ pub struct UserCreateAttributes {
3048
impl UserCreateAttributes {
3149
pub fn new(email: String) -> UserCreateAttributes {
3250
UserCreateAttributes {
51+
created_at: None,
52+
disabled: None,
3353
email,
54+
handle: None,
55+
modified_at: None,
3456
name: None,
57+
service_account: None,
3558
title: None,
59+
verified: None,
3660
additional_properties: std::collections::BTreeMap::new(),
3761
_unparsed: false,
3862
}
3963
}
4064

65+
pub fn created_at(mut self, value: chrono::DateTime<chrono::Utc>) -> Self {
66+
self.created_at = Some(value);
67+
self
68+
}
69+
70+
pub fn disabled(mut self, value: bool) -> Self {
71+
self.disabled = Some(value);
72+
self
73+
}
74+
75+
pub fn handle(mut self, value: String) -> Self {
76+
self.handle = Some(value);
77+
self
78+
}
79+
80+
pub fn modified_at(mut self, value: chrono::DateTime<chrono::Utc>) -> Self {
81+
self.modified_at = Some(value);
82+
self
83+
}
84+
4185
pub fn name(mut self, value: String) -> Self {
4286
self.name = Some(value);
4387
self
4488
}
4589

90+
pub fn service_account(mut self, value: bool) -> Self {
91+
self.service_account = Some(value);
92+
self
93+
}
94+
4695
pub fn title(mut self, value: String) -> Self {
4796
self.title = Some(value);
4897
self
4998
}
5099

100+
pub fn verified(mut self, value: bool) -> Self {
101+
self.verified = Some(value);
102+
self
103+
}
104+
51105
pub fn additional_properties(
52106
mut self,
53107
value: std::collections::BTreeMap<String, serde_json::Value>,
@@ -74,9 +128,15 @@ impl<'de> Deserialize<'de> for UserCreateAttributes {
74128
where
75129
M: MapAccess<'a>,
76130
{
131+
let mut created_at: Option<chrono::DateTime<chrono::Utc>> = None;
132+
let mut disabled: Option<bool> = None;
77133
let mut email: Option<String> = None;
134+
let mut handle: Option<String> = None;
135+
let mut modified_at: Option<chrono::DateTime<chrono::Utc>> = None;
78136
let mut name: Option<String> = None;
137+
let mut service_account: Option<bool> = None;
79138
let mut title: Option<String> = None;
139+
let mut verified: Option<bool> = None;
80140
let mut additional_properties: std::collections::BTreeMap<
81141
String,
82142
serde_json::Value,
@@ -85,21 +145,59 @@ impl<'de> Deserialize<'de> for UserCreateAttributes {
85145

86146
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
87147
match k.as_str() {
148+
"created_at" => {
149+
if v.is_null() {
150+
continue;
151+
}
152+
created_at = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
153+
}
154+
"disabled" => {
155+
if v.is_null() {
156+
continue;
157+
}
158+
disabled = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
159+
}
88160
"email" => {
89161
email = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
90162
}
163+
"handle" => {
164+
if v.is_null() {
165+
continue;
166+
}
167+
handle = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
168+
}
169+
"modified_at" => {
170+
if v.is_null() {
171+
continue;
172+
}
173+
modified_at =
174+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
175+
}
91176
"name" => {
92177
if v.is_null() {
93178
continue;
94179
}
95180
name = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
96181
}
182+
"service_account" => {
183+
if v.is_null() {
184+
continue;
185+
}
186+
service_account =
187+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
188+
}
97189
"title" => {
98190
if v.is_null() {
99191
continue;
100192
}
101193
title = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
102194
}
195+
"verified" => {
196+
if v.is_null() {
197+
continue;
198+
}
199+
verified = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
200+
}
103201
&_ => {
104202
if let Ok(value) = serde_json::from_value(v.clone()) {
105203
additional_properties.insert(k, value);
@@ -110,9 +208,15 @@ impl<'de> Deserialize<'de> for UserCreateAttributes {
110208
let email = email.ok_or_else(|| M::Error::missing_field("email"))?;
111209

112210
let content = UserCreateAttributes {
211+
created_at,
212+
disabled,
113213
email,
214+
handle,
215+
modified_at,
114216
name,
217+
service_account,
115218
title,
219+
verified,
116220
additional_properties,
117221
_unparsed,
118222
};

0 commit comments

Comments
 (0)