Skip to content

Commit

Permalink
Regenerate client from commit a3013d0c of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Nov 18, 2024
1 parent 018c9f3 commit 87be8fc
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 185 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-15 19:35:10.102953",
"spec_repo_commit": "ad80112e"
"regenerated": "2024-11-18 10:00:04.401283",
"spec_repo_commit": "a3013d0c"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-15 19:35:10.121640",
"spec_repo_commit": "ad80112e"
"regenerated": "2024-11-18 10:00:04.420742",
"spec_repo_commit": "a3013d0c"
}
}
}
34 changes: 2 additions & 32 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15178,34 +15178,8 @@ components:
type: object
SyntheticsDeviceID:
description: The device ID.
enum:
- laptop_large
- tablet
- mobile_small
- chrome.laptop_large
- chrome.tablet
- chrome.mobile_small
- firefox.laptop_large
- firefox.tablet
- firefox.mobile_small
- edge.laptop_large
- edge.tablet
- edge.mobile_small
example: chrome.laptop_large
type: string
x-enum-varnames:
- LAPTOP_LARGE
- TABLET
- MOBILE_SMALL
- CHROME_LAPTOP_LARGE
- CHROME_TABLET
- CHROME_MOBILE_SMALL
- FIREFOX_LAPTOP_LARGE
- FIREFOX_TABLET
- FIREFOX_MOBILE_SMALL
- EDGE_LAPTOP_LARGE
- EDGE_TABLET
- EDGE_MOBILE_SMALL
SyntheticsFetchUptimesPayload:
description: Object containing IDs of Synthetic tests and a timeframe.
properties:
Expand Down Expand Up @@ -15508,10 +15482,6 @@ components:
$ref: '#/components/schemas/SyntheticsLocation'
type: array
type: object
SyntheticsMobileDeviceID:
description: The device ID.
example: synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16
type: string
SyntheticsMobileStep:
description: The steps used in a Synthetic mobile test.
properties:
Expand Down Expand Up @@ -15787,7 +15757,7 @@ components:
device_ids:
description: Array with the different device IDs used to run the test.
items:
$ref: '#/components/schemas/SyntheticsMobileDeviceID'
$ref: '#/components/schemas/SyntheticsDeviceID'
type: array
message:
description: Notification message associated with the test.
Expand Down Expand Up @@ -15876,7 +15846,7 @@ components:
example:
- synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16
items:
$ref: '#/components/schemas/SyntheticsMobileDeviceID'
$ref: '#/components/schemas/SyntheticsDeviceID'
type: array
disableAutoAcceptAlert:
description: A boolean to disable auto accepting alerts.
Expand Down
3 changes: 1 addition & 2 deletions examples/v1_synthetics_CreateSyntheticsAPITest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use datadog_api_client::datadogV1::model::SyntheticsAssertionOperator;
use datadog_api_client::datadogV1::model::SyntheticsAssertionTarget;
use datadog_api_client::datadogV1::model::SyntheticsAssertionType;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTestRumSettings;
use datadog_api_client::datadogV1::model::SyntheticsDeviceID;
use datadog_api_client::datadogV1::model::SyntheticsTestCiOptions;
use datadog_api_client::datadogV1::model::SyntheticsTestDetailsSubType;
use datadog_api_client::datadogV1::model::SyntheticsTestExecutionRule;
Expand Down Expand Up @@ -47,7 +46,7 @@ async fn main() {
.ci(SyntheticsTestCiOptions::new(
SyntheticsTestExecutionRule::BLOCKING,
))
.device_ids(vec![SyntheticsDeviceID::CHROME_LAPTOP_LARGE])
.device_ids(vec!["chrome.laptop_large".to_string()])
.http_version(SyntheticsTestOptionsHTTPVersion::HTTP1)
.monitor_options(
SyntheticsTestOptionsMonitorOptions::new().notification_preset_name(
Expand Down
3 changes: 1 addition & 2 deletions examples/v1_synthetics_CreateSyntheticsBrowserTest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use datadog_api_client::datadogV1::model::SyntheticsBrowserVariable;
use datadog_api_client::datadogV1::model::SyntheticsBrowserVariableType;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariable;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariableType;
use datadog_api_client::datadogV1::model::SyntheticsDeviceID;
use datadog_api_client::datadogV1::model::SyntheticsStep;
use datadog_api_client::datadogV1::model::SyntheticsStepType;
use datadog_api_client::datadogV1::model::SyntheticsTestOptions;
Expand Down Expand Up @@ -46,7 +45,7 @@ async fn main() {
SyntheticsTestOptions::new()
.accept_self_signed(false)
.allow_insecure(true)
.device_ids(vec![SyntheticsDeviceID::CHROME_LAPTOP_LARGE])
.device_ids(vec!["chrome.laptop_large".to_string()])
.disable_cors(true)
.enable_profiling(true)
.enable_security_testing(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use datadog_api_client::datadogV1::model::SyntheticsBrowserTestRumSettings;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTestType;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariable;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariableType;
use datadog_api_client::datadogV1::model::SyntheticsDeviceID;
use datadog_api_client::datadogV1::model::SyntheticsStep;
use datadog_api_client::datadogV1::model::SyntheticsStepType;
use datadog_api_client::datadogV1::model::SyntheticsTestCiOptions;
Expand Down Expand Up @@ -43,7 +42,7 @@ async fn main() {
.ci(SyntheticsTestCiOptions::new(
SyntheticsTestExecutionRule::SKIPPED,
))
.device_ids(vec![SyntheticsDeviceID::TABLET])
.device_ids(vec!["tablet".to_string()])
.disable_cors(true)
.disable_csp(true)
.follow_redirects(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use datadog_api_client::datadogV1::model::SyntheticsBrowserTestConfig;
use datadog_api_client::datadogV1::model::SyntheticsBrowserTestType;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariable;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariableType;
use datadog_api_client::datadogV1::model::SyntheticsDeviceID;
use datadog_api_client::datadogV1::model::SyntheticsStep;
use datadog_api_client::datadogV1::model::SyntheticsStepType;
use datadog_api_client::datadogV1::model::SyntheticsTestOptions;
Expand Down Expand Up @@ -39,7 +38,7 @@ async fn main() {
SyntheticsTestOptions::new()
.accept_self_signed(false)
.allow_insecure(true)
.device_ids(vec![SyntheticsDeviceID::TABLET])
.device_ids(vec!["tablet".to_string()])
.disable_cors(true)
.follow_redirects(true)
.min_failure_duration(10)
Expand Down
3 changes: 1 addition & 2 deletions examples/v1_synthetics_TriggerCITests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use datadog_api_client::datadogV1::model::SyntheticsCIBatchMetadataPipeline;
use datadog_api_client::datadogV1::model::SyntheticsCIBatchMetadataProvider;
use datadog_api_client::datadogV1::model::SyntheticsCITest;
use datadog_api_client::datadogV1::model::SyntheticsCITestBody;
use datadog_api_client::datadogV1::model::SyntheticsDeviceID;
use datadog_api_client::datadogV1::model::SyntheticsTestOptionsRetry;

#[tokio::main]
Expand All @@ -22,7 +21,7 @@ async fn main() {
SyntheticsBasicAuthWeb::new("PaSSw0RD!".to_string(), "my_username".to_string())
.type_(SyntheticsBasicAuthWebType::WEB),
)))
.device_ids(vec![SyntheticsDeviceID::CHROME_LAPTOP_LARGE])
.device_ids(vec!["chrome.laptop_large".to_string()])
.locations(vec!["aws:eu-west-3".to_string()])
.metadata(
SyntheticsCIBatchMetadata::new()
Expand Down
3 changes: 1 addition & 2 deletions examples/v1_synthetics_UpdateBrowserTest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use datadog_api_client::datadogV1::model::SyntheticsBrowserVariable;
use datadog_api_client::datadogV1::model::SyntheticsBrowserVariableType;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariable;
use datadog_api_client::datadogV1::model::SyntheticsConfigVariableType;
use datadog_api_client::datadogV1::model::SyntheticsDeviceID;
use datadog_api_client::datadogV1::model::SyntheticsStep;
use datadog_api_client::datadogV1::model::SyntheticsStepType;
use datadog_api_client::datadogV1::model::SyntheticsTestCallType;
Expand Down Expand Up @@ -75,7 +74,7 @@ async fn main() {
.ci(SyntheticsTestCiOptions::new(
SyntheticsTestExecutionRule::BLOCKING,
))
.device_ids(vec![SyntheticsDeviceID::CHROME_LAPTOP_LARGE])
.device_ids(vec!["chrome.laptop_large".to_string()])
.http_version(SyntheticsTestOptionsHTTPVersion::HTTP1)
.monitor_options(
SyntheticsTestOptionsMonitorOptions::new().notification_preset_name(
Expand Down
2 changes: 0 additions & 2 deletions src/datadogV1/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1270,8 +1270,6 @@ pub mod model_synthetics_ci_batch_metadata_git;
pub use self::model_synthetics_ci_batch_metadata_git::SyntheticsCIBatchMetadataGit;
pub mod model_synthetics_batch_result;
pub use self::model_synthetics_batch_result::SyntheticsBatchResult;
pub mod model_synthetics_device_id;
pub use self::model_synthetics_device_id::SyntheticsDeviceID;
pub mod model_synthetics_test_execution_rule;
pub use self::model_synthetics_test_execution_rule::SyntheticsTestExecutionRule;
pub mod model_synthetics_batch_status;
Expand Down
16 changes: 3 additions & 13 deletions src/datadogV1/model/model_synthetics_batch_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::fmt::{self, Formatter};
pub struct SyntheticsBatchResult {
/// The device ID.
#[serde(rename = "device")]
pub device: Option<crate::datadogV1::model::SyntheticsDeviceID>,
pub device: Option<String>,
/// Total duration in millisecond of the test.
#[serde(rename = "duration")]
pub duration: Option<f64>,
Expand Down Expand Up @@ -66,7 +66,7 @@ impl SyntheticsBatchResult {
}
}

pub fn device(mut self, value: crate::datadogV1::model::SyntheticsDeviceID) -> Self {
pub fn device(mut self, value: String) -> Self {
self.device = Some(value);
self
}
Expand Down Expand Up @@ -151,7 +151,7 @@ impl<'de> Deserialize<'de> for SyntheticsBatchResult {
where
M: MapAccess<'a>,
{
let mut device: Option<crate::datadogV1::model::SyntheticsDeviceID> = None;
let mut device: Option<String> = None;
let mut duration: Option<f64> = None;
let mut execution_rule: Option<
crate::datadogV1::model::SyntheticsTestExecutionRule,
Expand All @@ -177,16 +177,6 @@ impl<'de> Deserialize<'de> for SyntheticsBatchResult {
continue;
}
device = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
if let Some(ref _device) = device {
match _device {
crate::datadogV1::model::SyntheticsDeviceID::UnparsedObject(
_device,
) => {
_unparsed = true;
}
_ => {}
}
}
}
"duration" => {
if v.is_null() {
Expand Down
6 changes: 3 additions & 3 deletions src/datadogV1/model/model_synthetics_ci_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub struct SyntheticsCITest {
pub cookies: Option<String>,
/// For browser test, array with the different device IDs used to run the test.
#[serde(rename = "deviceIds")]
pub device_ids: Option<Vec<crate::datadogV1::model::SyntheticsDeviceID>>,
pub device_ids: Option<Vec<String>>,
/// For API HTTP test, whether or not the test should follow redirects.
#[serde(rename = "followRedirects")]
pub follow_redirects: Option<bool>,
Expand Down Expand Up @@ -107,7 +107,7 @@ impl SyntheticsCITest {
self
}

pub fn device_ids(mut self, value: Vec<crate::datadogV1::model::SyntheticsDeviceID>) -> Self {
pub fn device_ids(mut self, value: Vec<String>) -> Self {
self.device_ids = Some(value);
self
}
Expand Down Expand Up @@ -178,7 +178,7 @@ impl<'de> Deserialize<'de> for SyntheticsCITest {
let mut body: Option<String> = None;
let mut body_type: Option<String> = None;
let mut cookies: Option<String> = None;
let mut device_ids: Option<Vec<crate::datadogV1::model::SyntheticsDeviceID>> = None;
let mut device_ids: Option<Vec<String>> = None;
let mut follow_redirects: Option<bool> = None;
let mut headers: Option<std::collections::BTreeMap<String, String>> = None;
let mut locations: Option<Vec<String>> = None;
Expand Down
21 changes: 3 additions & 18 deletions src/datadogV1/model/model_synthetics_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct SyntheticsDevice {
pub height: i64,
/// The device ID.
#[serde(rename = "id")]
pub id: crate::datadogV1::model::SyntheticsDeviceID,
pub id: String,
/// Whether or not the device is a mobile.
#[serde(rename = "isMobile")]
pub is_mobile: Option<bool>,
Expand All @@ -34,12 +34,7 @@ pub struct SyntheticsDevice {
}

impl SyntheticsDevice {
pub fn new(
height: i64,
id: crate::datadogV1::model::SyntheticsDeviceID,
name: String,
width: i64,
) -> SyntheticsDevice {
pub fn new(height: i64, id: String, name: String, width: i64) -> SyntheticsDevice {
SyntheticsDevice {
height,
id,
Expand Down Expand Up @@ -83,7 +78,7 @@ impl<'de> Deserialize<'de> for SyntheticsDevice {
M: MapAccess<'a>,
{
let mut height: Option<i64> = None;
let mut id: Option<crate::datadogV1::model::SyntheticsDeviceID> = None;
let mut id: Option<String> = None;
let mut is_mobile: Option<bool> = None;
let mut name: Option<String> = None;
let mut width: Option<i64> = None;
Expand All @@ -100,16 +95,6 @@ impl<'de> Deserialize<'de> for SyntheticsDevice {
}
"id" => {
id = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
if let Some(ref _id) = id {
match _id {
crate::datadogV1::model::SyntheticsDeviceID::UnparsedObject(
_id,
) => {
_unparsed = true;
}
_ => {}
}
}
}
"isMobile" => {
if v.is_null() {
Expand Down
81 changes: 0 additions & 81 deletions src/datadogV1/model/model_synthetics_device_id.rs

This file was deleted.

Loading

0 comments on commit 87be8fc

Please sign in to comment.