Skip to content

Commit 7a3ee62

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 86b6adb of spec repo
1 parent eb81342 commit 7a3ee62

7 files changed

Lines changed: 83 additions & 74 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16201,6 +16201,30 @@ components:
1620116201
required:
1620216202
- data
1620316203
type: object
16204+
CaseInvestigationNotebookCreateData:
16205+
description: Case investigation notebook creation data.
16206+
properties:
16207+
type:
16208+
$ref: "#/components/schemas/CaseInvestigationNotebookResourceType"
16209+
required:
16210+
- type
16211+
type: object
16212+
CaseInvestigationNotebookCreateRequest:
16213+
description: Case investigation notebook creation request.
16214+
properties:
16215+
data:
16216+
$ref: "#/components/schemas/CaseInvestigationNotebookCreateData"
16217+
required:
16218+
- data
16219+
type: object
16220+
CaseInvestigationNotebookResourceType:
16221+
description: Case investigation notebook resource type.
16222+
enum:
16223+
- notebook
16224+
example: notebook
16225+
type: string
16226+
x-enum-varnames:
16227+
- NOTEBOOK
1620416228
CaseLink:
1620516229
description: "A directional link representing a relationship between two entities. At least one entity must be a case."
1620616230
properties:
@@ -65373,30 +65397,6 @@ components:
6537365397
type: string
6537465398
x-enum-varnames:
6537565399
- GET_NODE_TYPES_RESPONSE
65376-
NotebookCreateData:
65377-
description: Notebook creation data
65378-
properties:
65379-
type:
65380-
$ref: "#/components/schemas/NotebookResourceType"
65381-
required:
65382-
- type
65383-
type: object
65384-
NotebookCreateRequest:
65385-
description: Notebook creation request
65386-
properties:
65387-
data:
65388-
$ref: "#/components/schemas/NotebookCreateData"
65389-
required:
65390-
- data
65391-
type: object
65392-
NotebookResourceType:
65393-
description: Notebook resource type
65394-
enum:
65395-
- notebook
65396-
example: notebook
65397-
type: string
65398-
x-enum-varnames:
65399-
- NOTEBOOK
6540065400
NotebookTriggerWrapper:
6540165401
description: "Schema for a Notebook-based trigger."
6540265402
properties:
@@ -124493,7 +124493,7 @@ paths:
124493124493
- Case Management
124494124494
/api/v2/cases/{case_id}/relationships/notebook:
124495124495
post:
124496-
description: Create a new investigation notebook and link it to a case
124496+
description: Create a new investigation notebook and link it to a case.
124497124497
operationId: CreateCaseNotebook
124498124498
parameters:
124499124499
- $ref: "#/components/parameters/CaseIDPathParameter"
@@ -124506,8 +124506,8 @@ paths:
124506124506
data:
124507124507
type: notebook
124508124508
schema:
124509-
$ref: "#/components/schemas/NotebookCreateRequest"
124510-
description: Notebook creation request
124509+
$ref: "#/components/schemas/CaseInvestigationNotebookCreateRequest"
124510+
description: Case investigation notebook creation request.
124511124511
required: true
124512124512
responses:
124513124513
"204":

examples/v2_case-management_CreateCaseNotebook.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
// Create investigation notebook for case returns "No Content" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV2::api_case_management::CaseManagementAPI;
4-
use datadog_api_client::datadogV2::model::NotebookCreateData;
5-
use datadog_api_client::datadogV2::model::NotebookCreateRequest;
6-
use datadog_api_client::datadogV2::model::NotebookResourceType;
4+
use datadog_api_client::datadogV2::model::CaseInvestigationNotebookCreateData;
5+
use datadog_api_client::datadogV2::model::CaseInvestigationNotebookCreateRequest;
6+
use datadog_api_client::datadogV2::model::CaseInvestigationNotebookResourceType;
77

88
#[tokio::main]
99
async fn main() {
10-
let body = NotebookCreateRequest::new(NotebookCreateData::new(NotebookResourceType::NOTEBOOK));
10+
let body = CaseInvestigationNotebookCreateRequest::new(
11+
CaseInvestigationNotebookCreateData::new(CaseInvestigationNotebookResourceType::NOTEBOOK),
12+
);
1113
let configuration = datadog::Configuration::new();
1214
let api = CaseManagementAPI::with_config(configuration);
1315
let resp = api.create_case_notebook("case_id".to_string(), body).await;

src/datadogV2/api/api_case_management.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2363,11 +2363,11 @@ impl CaseManagementAPI {
23632363
}
23642364
}
23652365

2366-
/// Create a new investigation notebook and link it to a case
2366+
/// Create a new investigation notebook and link it to a case.
23672367
pub async fn create_case_notebook(
23682368
&self,
23692369
case_id: String,
2370-
body: crate::datadogV2::model::NotebookCreateRequest,
2370+
body: crate::datadogV2::model::CaseInvestigationNotebookCreateRequest,
23712371
) -> Result<(), datadog::Error<CreateCaseNotebookError>> {
23722372
match self
23732373
.create_case_notebook_with_http_info(case_id, body)
@@ -2378,11 +2378,11 @@ impl CaseManagementAPI {
23782378
}
23792379
}
23802380

2381-
/// Create a new investigation notebook and link it to a case
2381+
/// Create a new investigation notebook and link it to a case.
23822382
pub async fn create_case_notebook_with_http_info(
23832383
&self,
23842384
case_id: String,
2385-
body: crate::datadogV2::model::NotebookCreateRequest,
2385+
body: crate::datadogV2::model::CaseInvestigationNotebookCreateRequest,
23862386
) -> Result<datadog::ResponseContent<()>, datadog::Error<CreateCaseNotebookError>> {
23872387
let local_configuration = &self.config;
23882388
let operation_id = "v2.create_case_notebook";

src/datadogV2/model/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1876,12 +1876,12 @@ pub mod model_jira_issue_create_data;
18761876
pub use self::model_jira_issue_create_data::JiraIssueCreateData;
18771877
pub mod model_jira_issue_create_attributes;
18781878
pub use self::model_jira_issue_create_attributes::JiraIssueCreateAttributes;
1879-
pub mod model_notebook_create_request;
1880-
pub use self::model_notebook_create_request::NotebookCreateRequest;
1881-
pub mod model_notebook_create_data;
1882-
pub use self::model_notebook_create_data::NotebookCreateData;
1883-
pub mod model_notebook_resource_type;
1884-
pub use self::model_notebook_resource_type::NotebookResourceType;
1879+
pub mod model_case_investigation_notebook_create_request;
1880+
pub use self::model_case_investigation_notebook_create_request::CaseInvestigationNotebookCreateRequest;
1881+
pub mod model_case_investigation_notebook_create_data;
1882+
pub use self::model_case_investigation_notebook_create_data::CaseInvestigationNotebookCreateData;
1883+
pub mod model_case_investigation_notebook_resource_type;
1884+
pub use self::model_case_investigation_notebook_resource_type::CaseInvestigationNotebookResourceType;
18851885
pub mod model_service_now_ticket_create_request;
18861886
pub use self::model_service_now_ticket_create_request::ServiceNowTicketCreateRequest;
18871887
pub mod model_service_now_ticket_create_data;

src/datadogV2/model/model_notebook_create_data.rs renamed to src/datadogV2/model/model_case_investigation_notebook_create_data.rs

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,26 @@ use serde::{Deserialize, Deserializer, Serialize};
66
use serde_with::skip_serializing_none;
77
use std::fmt::{self, Formatter};
88

9-
/// Notebook creation data
9+
/// Case investigation notebook creation data.
1010
#[non_exhaustive]
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
13-
pub struct NotebookCreateData {
14-
/// Notebook resource type
13+
pub struct CaseInvestigationNotebookCreateData {
14+
/// Case investigation notebook resource type.
1515
#[serde(rename = "type")]
16-
pub type_: crate::datadogV2::model::NotebookResourceType,
16+
pub type_: crate::datadogV2::model::CaseInvestigationNotebookResourceType,
1717
#[serde(flatten)]
1818
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
1919
#[serde(skip)]
2020
#[serde(default)]
2121
pub(crate) _unparsed: bool,
2222
}
2323

24-
impl NotebookCreateData {
25-
pub fn new(type_: crate::datadogV2::model::NotebookResourceType) -> NotebookCreateData {
26-
NotebookCreateData {
24+
impl CaseInvestigationNotebookCreateData {
25+
pub fn new(
26+
type_: crate::datadogV2::model::CaseInvestigationNotebookResourceType,
27+
) -> CaseInvestigationNotebookCreateData {
28+
CaseInvestigationNotebookCreateData {
2729
type_,
2830
additional_properties: std::collections::BTreeMap::new(),
2931
_unparsed: false,
@@ -39,14 +41,14 @@ impl NotebookCreateData {
3941
}
4042
}
4143

42-
impl<'de> Deserialize<'de> for NotebookCreateData {
44+
impl<'de> Deserialize<'de> for CaseInvestigationNotebookCreateData {
4345
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
4446
where
4547
D: Deserializer<'de>,
4648
{
47-
struct NotebookCreateDataVisitor;
48-
impl<'a> Visitor<'a> for NotebookCreateDataVisitor {
49-
type Value = NotebookCreateData;
49+
struct CaseInvestigationNotebookCreateDataVisitor;
50+
impl<'a> Visitor<'a> for CaseInvestigationNotebookCreateDataVisitor {
51+
type Value = CaseInvestigationNotebookCreateData;
5052

5153
fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result {
5254
f.write_str("a mapping")
@@ -56,7 +58,9 @@ impl<'de> Deserialize<'de> for NotebookCreateData {
5658
where
5759
M: MapAccess<'a>,
5860
{
59-
let mut type_: Option<crate::datadogV2::model::NotebookResourceType> = None;
61+
let mut type_: Option<
62+
crate::datadogV2::model::CaseInvestigationNotebookResourceType,
63+
> = None;
6064
let mut additional_properties: std::collections::BTreeMap<
6165
String,
6266
serde_json::Value,
@@ -69,7 +73,7 @@ impl<'de> Deserialize<'de> for NotebookCreateData {
6973
type_ = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
7074
if let Some(ref _type_) = type_ {
7175
match _type_ {
72-
crate::datadogV2::model::NotebookResourceType::UnparsedObject(_type_) => {
76+
crate::datadogV2::model::CaseInvestigationNotebookResourceType::UnparsedObject(_type_) => {
7377
_unparsed = true;
7478
},
7579
_ => {}
@@ -85,7 +89,7 @@ impl<'de> Deserialize<'de> for NotebookCreateData {
8589
}
8690
let type_ = type_.ok_or_else(|| M::Error::missing_field("type_"))?;
8791

88-
let content = NotebookCreateData {
92+
let content = CaseInvestigationNotebookCreateData {
8993
type_,
9094
additional_properties,
9195
_unparsed,
@@ -95,6 +99,6 @@ impl<'de> Deserialize<'de> for NotebookCreateData {
9599
}
96100
}
97101

98-
deserializer.deserialize_any(NotebookCreateDataVisitor)
102+
deserializer.deserialize_any(CaseInvestigationNotebookCreateDataVisitor)
99103
}
100104
}

src/datadogV2/model/model_notebook_create_request.rs renamed to src/datadogV2/model/model_case_investigation_notebook_create_request.rs

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,26 @@ use serde::{Deserialize, Deserializer, Serialize};
66
use serde_with::skip_serializing_none;
77
use std::fmt::{self, Formatter};
88

9-
/// Notebook creation request
9+
/// Case investigation notebook creation request.
1010
#[non_exhaustive]
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
13-
pub struct NotebookCreateRequest {
14-
/// Notebook creation data
13+
pub struct CaseInvestigationNotebookCreateRequest {
14+
/// Case investigation notebook creation data.
1515
#[serde(rename = "data")]
16-
pub data: crate::datadogV2::model::NotebookCreateData,
16+
pub data: crate::datadogV2::model::CaseInvestigationNotebookCreateData,
1717
#[serde(flatten)]
1818
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
1919
#[serde(skip)]
2020
#[serde(default)]
2121
pub(crate) _unparsed: bool,
2222
}
2323

24-
impl NotebookCreateRequest {
25-
pub fn new(data: crate::datadogV2::model::NotebookCreateData) -> NotebookCreateRequest {
26-
NotebookCreateRequest {
24+
impl CaseInvestigationNotebookCreateRequest {
25+
pub fn new(
26+
data: crate::datadogV2::model::CaseInvestigationNotebookCreateData,
27+
) -> CaseInvestigationNotebookCreateRequest {
28+
CaseInvestigationNotebookCreateRequest {
2729
data,
2830
additional_properties: std::collections::BTreeMap::new(),
2931
_unparsed: false,
@@ -39,14 +41,14 @@ impl NotebookCreateRequest {
3941
}
4042
}
4143

42-
impl<'de> Deserialize<'de> for NotebookCreateRequest {
44+
impl<'de> Deserialize<'de> for CaseInvestigationNotebookCreateRequest {
4345
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
4446
where
4547
D: Deserializer<'de>,
4648
{
47-
struct NotebookCreateRequestVisitor;
48-
impl<'a> Visitor<'a> for NotebookCreateRequestVisitor {
49-
type Value = NotebookCreateRequest;
49+
struct CaseInvestigationNotebookCreateRequestVisitor;
50+
impl<'a> Visitor<'a> for CaseInvestigationNotebookCreateRequestVisitor {
51+
type Value = CaseInvestigationNotebookCreateRequest;
5052

5153
fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result {
5254
f.write_str("a mapping")
@@ -56,7 +58,8 @@ impl<'de> Deserialize<'de> for NotebookCreateRequest {
5658
where
5759
M: MapAccess<'a>,
5860
{
59-
let mut data: Option<crate::datadogV2::model::NotebookCreateData> = None;
61+
let mut data: Option<crate::datadogV2::model::CaseInvestigationNotebookCreateData> =
62+
None;
6063
let mut additional_properties: std::collections::BTreeMap<
6164
String,
6265
serde_json::Value,
@@ -77,7 +80,7 @@ impl<'de> Deserialize<'de> for NotebookCreateRequest {
7780
}
7881
let data = data.ok_or_else(|| M::Error::missing_field("data"))?;
7982

80-
let content = NotebookCreateRequest {
83+
let content = CaseInvestigationNotebookCreateRequest {
8184
data,
8285
additional_properties,
8386
_unparsed,
@@ -87,6 +90,6 @@ impl<'de> Deserialize<'de> for NotebookCreateRequest {
8790
}
8891
}
8992

90-
deserializer.deserialize_any(NotebookCreateRequestVisitor)
93+
deserializer.deserialize_any(CaseInvestigationNotebookCreateRequestVisitor)
9194
}
9295
}

src/datadogV2/model/model_notebook_resource_type.rs renamed to src/datadogV2/model/model_case_investigation_notebook_resource_type.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};
66

77
#[non_exhaustive]
88
#[derive(Clone, Debug, Eq, PartialEq)]
9-
pub enum NotebookResourceType {
9+
pub enum CaseInvestigationNotebookResourceType {
1010
NOTEBOOK,
1111
UnparsedObject(crate::datadog::UnparsedObject),
1212
}
1313

14-
impl ToString for NotebookResourceType {
14+
impl ToString for CaseInvestigationNotebookResourceType {
1515
fn to_string(&self) -> String {
1616
match self {
1717
Self::NOTEBOOK => String::from("notebook"),
@@ -20,7 +20,7 @@ impl ToString for NotebookResourceType {
2020
}
2121
}
2222

23-
impl Serialize for NotebookResourceType {
23+
impl Serialize for CaseInvestigationNotebookResourceType {
2424
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2525
where
2626
S: Serializer,
@@ -32,7 +32,7 @@ impl Serialize for NotebookResourceType {
3232
}
3333
}
3434

35-
impl<'de> Deserialize<'de> for NotebookResourceType {
35+
impl<'de> Deserialize<'de> for CaseInvestigationNotebookResourceType {
3636
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
3737
where
3838
D: Deserializer<'de>,

0 commit comments

Comments
 (0)