Skip to content

Commit 4330dce

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 29c811a of spec repo
1 parent dffc362 commit 4330dce

File tree

5 files changed

+8
-119
lines changed

5 files changed

+8
-119
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -51735,7 +51735,9 @@ paths:
5173551735

5173651736

5173751737
Pipeline events can be submitted with a timestamp that is up to 18 hours in
51738-
the past.'
51738+
the past.
51739+
51740+
The duration between the event start and end times cannot exceed 1 year.'
5173951741
operationId: CreateCIAppPipelineEvent
5174051742
requestBody:
5174151743
content:
@@ -62417,39 +62419,6 @@ paths:
6241762419
get:
6241862420
description: Returns a list of org connections.
6241962421
operationId: ListOrgConnections
62420-
parameters:
62421-
- description: The Org ID of the sink org.
62422-
example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1
62423-
in: query
62424-
name: sink_org_id
62425-
required: false
62426-
schema:
62427-
type: string
62428-
- description: The Org ID of the source org.
62429-
example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1
62430-
in: query
62431-
name: source_org_id
62432-
required: false
62433-
schema:
62434-
type: string
62435-
- description: The limit of number of entries you want to return. Default is
62436-
1000.
62437-
example: 1000
62438-
in: query
62439-
name: limit
62440-
required: false
62441-
schema:
62442-
format: int64
62443-
type: integer
62444-
- description: The pagination offset which you want to query from. Default is
62445-
0.
62446-
example: 0
62447-
in: query
62448-
name: offset
62449-
required: false
62450-
schema:
62451-
format: int64
62452-
type: integer
6245362422
responses:
6245462423
'200':
6245562424
content:

examples/v2_org-connections_ListOrgConnections.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
// List Org Connections returns "OK" response
22
use datadog_api_client::datadog;
3-
use datadog_api_client::datadogV2::api_org_connections::ListOrgConnectionsOptionalParams;
43
use datadog_api_client::datadogV2::api_org_connections::OrgConnectionsAPI;
54

65
#[tokio::main]
76
async fn main() {
87
let configuration = datadog::Configuration::new();
98
let api = OrgConnectionsAPI::with_config(configuration);
10-
let resp = api
11-
.list_org_connections(ListOrgConnectionsOptionalParams::default())
12-
.await;
9+
let resp = api.list_org_connections().await;
1310
if let Ok(value) = resp {
1411
println!("{:#?}", value);
1512
} else {

src/datadogV2/api/api_ci_visibility_pipelines.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ impl CIVisibilityPipelinesAPI {
337337
/// Multiple events can be sent in an array (up to 1000).
338338
///
339339
/// Pipeline events can be submitted with a timestamp that is up to 18 hours in the past.
340+
/// The duration between the event start and end times cannot exceed 1 year.
340341
pub async fn create_ci_app_pipeline_event(
341342
&self,
342343
body: crate::datadogV2::model::CIAppCreatePipelineEventRequest,
@@ -363,6 +364,7 @@ impl CIVisibilityPipelinesAPI {
363364
/// Multiple events can be sent in an array (up to 1000).
364365
///
365366
/// Pipeline events can be submitted with a timestamp that is up to 18 hours in the past.
367+
/// The duration between the event start and end times cannot exceed 1 year.
366368
pub async fn create_ci_app_pipeline_event_with_http_info(
367369
&self,
368370
body: crate::datadogV2::model::CIAppCreatePipelineEventRequest,

src/datadogV2/api/api_org_connections.rs

Lines changed: 1 addition & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,6 @@ use reqwest::header::{HeaderMap, HeaderValue};
1010
use serde::{Deserialize, Serialize};
1111
use std::io::Write;
1212

13-
/// ListOrgConnectionsOptionalParams is a struct for passing parameters to the method [`OrgConnectionsAPI::list_org_connections`]
14-
#[non_exhaustive]
15-
#[derive(Clone, Default, Debug)]
16-
pub struct ListOrgConnectionsOptionalParams {
17-
/// The Org ID of the sink org.
18-
pub sink_org_id: Option<String>,
19-
/// The Org ID of the source org.
20-
pub source_org_id: Option<String>,
21-
/// The limit of number of entries you want to return. Default is 1000.
22-
pub limit: Option<i64>,
23-
/// The pagination offset which you want to query from. Default is 0.
24-
pub offset: Option<i64>,
25-
}
26-
27-
impl ListOrgConnectionsOptionalParams {
28-
/// The Org ID of the sink org.
29-
pub fn sink_org_id(mut self, value: String) -> Self {
30-
self.sink_org_id = Some(value);
31-
self
32-
}
33-
/// The Org ID of the source org.
34-
pub fn source_org_id(mut self, value: String) -> Self {
35-
self.source_org_id = Some(value);
36-
self
37-
}
38-
/// The limit of number of entries you want to return. Default is 1000.
39-
pub fn limit(mut self, value: i64) -> Self {
40-
self.limit = Some(value);
41-
self
42-
}
43-
/// The pagination offset which you want to query from. Default is 0.
44-
pub fn offset(mut self, value: i64) -> Self {
45-
self.offset = Some(value);
46-
self
47-
}
48-
}
49-
5013
/// CreateOrgConnectionsError is a struct for typed errors of method [`OrgConnectionsAPI::create_org_connections`]
5114
#[derive(Debug, Clone, Serialize, Deserialize)]
5215
#[serde(untagged)]
@@ -392,12 +355,11 @@ impl OrgConnectionsAPI {
392355
/// Returns a list of org connections.
393356
pub async fn list_org_connections(
394357
&self,
395-
params: ListOrgConnectionsOptionalParams,
396358
) -> Result<
397359
crate::datadogV2::model::OrgConnectionListResponse,
398360
datadog::Error<ListOrgConnectionsError>,
399361
> {
400-
match self.list_org_connections_with_http_info(params).await {
362+
match self.list_org_connections_with_http_info().await {
401363
Ok(response_content) => {
402364
if let Some(e) = response_content.entity {
403365
Ok(e)
@@ -414,20 +376,13 @@ impl OrgConnectionsAPI {
414376
/// Returns a list of org connections.
415377
pub async fn list_org_connections_with_http_info(
416378
&self,
417-
params: ListOrgConnectionsOptionalParams,
418379
) -> Result<
419380
datadog::ResponseContent<crate::datadogV2::model::OrgConnectionListResponse>,
420381
datadog::Error<ListOrgConnectionsError>,
421382
> {
422383
let local_configuration = &self.config;
423384
let operation_id = "v2.list_org_connections";
424385

425-
// unbox and build optional parameters
426-
let sink_org_id = params.sink_org_id;
427-
let source_org_id = params.source_org_id;
428-
let limit = params.limit;
429-
let offset = params.offset;
430-
431386
let local_client = &self.client;
432387

433388
let local_uri_str = format!(
@@ -437,23 +392,6 @@ impl OrgConnectionsAPI {
437392
let mut local_req_builder =
438393
local_client.request(reqwest::Method::GET, local_uri_str.as_str());
439394

440-
if let Some(ref local_query_param) = sink_org_id {
441-
local_req_builder =
442-
local_req_builder.query(&[("sink_org_id", &local_query_param.to_string())]);
443-
};
444-
if let Some(ref local_query_param) = source_org_id {
445-
local_req_builder =
446-
local_req_builder.query(&[("source_org_id", &local_query_param.to_string())]);
447-
};
448-
if let Some(ref local_query_param) = limit {
449-
local_req_builder =
450-
local_req_builder.query(&[("limit", &local_query_param.to_string())]);
451-
};
452-
if let Some(ref local_query_param) = offset {
453-
local_req_builder =
454-
local_req_builder.query(&[("offset", &local_query_param.to_string())]);
455-
};
456-
457395
// build headers
458396
let mut headers = HeaderMap::new();
459397
headers.insert("Accept", HeaderValue::from_static("application/json"));

tests/scenarios/function_mappings.rs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25488,24 +25488,7 @@ fn test_v2_list_org_connections(world: &mut DatadogWorld, _parameters: &HashMap<
2548825488
.v2_api_org_connections
2548925489
.as_ref()
2549025490
.expect("api instance not found");
25491-
let sink_org_id = _parameters
25492-
.get("sink_org_id")
25493-
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
25494-
let source_org_id = _parameters
25495-
.get("source_org_id")
25496-
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
25497-
let limit = _parameters
25498-
.get("limit")
25499-
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
25500-
let offset = _parameters
25501-
.get("offset")
25502-
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
25503-
let mut params = datadogV2::api_org_connections::ListOrgConnectionsOptionalParams::default();
25504-
params.sink_org_id = sink_org_id;
25505-
params.source_org_id = source_org_id;
25506-
params.limit = limit;
25507-
params.offset = offset;
25508-
let response = match block_on(api.list_org_connections_with_http_info(params)) {
25491+
let response = match block_on(api.list_org_connections_with_http_info()) {
2550925492
Ok(response) => response,
2551025493
Err(error) => {
2551125494
return match error {

0 commit comments

Comments
 (0)