Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7731,6 +7731,10 @@ components:
AwsScanOptionsAttributes:
description: Attributes for the AWS scan options.
properties:
compliance_host:
description: Indicates whether host compliance scanning is enabled.
example: false
type: boolean
lambda:
description: Indicates if scanning of Lambda functions is enabled.
example: true
Expand All @@ -7751,6 +7755,10 @@ components:
AwsScanOptionsCreateAttributes:
description: Attributes for the AWS scan options to create.
properties:
compliance_host:
description: Indicates whether host compliance scanning is enabled.
example: false
type: boolean
lambda:
description: Indicates if scanning of Lambda functions is enabled.
example: true
Expand All @@ -7768,6 +7776,7 @@ components:
example: true
type: boolean
required:
- compliance_host
- lambda
- sensitive_data
- vuln_containers_os
Expand Down Expand Up @@ -7833,6 +7842,10 @@ components:
AwsScanOptionsUpdateAttributes:
description: Attributes for the AWS scan options to update.
properties:
compliance_host:
description: Indicates whether host compliance scanning is enabled.
example: false
type: boolean
lambda:
description: Indicates if scanning of Lambda functions is enabled.
example: true
Expand Down Expand Up @@ -7914,6 +7927,7 @@ components:
example:
data:
attributes:
compliance_host: false
vuln_containers_os: true
vuln_host_os: true
id: 12345678-90ab-cdef-1234-567890abcdef
Expand All @@ -7927,6 +7941,7 @@ components:
example:
data:
- attributes:
compliance_host: false
vuln_containers_os: true
vuln_host_os: true
id: 12345678-90ab-cdef-1234-567890abcdef
Expand Down Expand Up @@ -7958,6 +7973,9 @@ components:
AzureScanOptionsDataAttributes:
description: Attributes for Azure scan options configuration.
properties:
compliance_host:
description: Indicates whether host compliance scanning is enabled.
type: boolean
vuln_containers_os:
description: Indicates if scanning for vulnerabilities in containers is enabled.
type: boolean
Expand Down Expand Up @@ -8002,6 +8020,9 @@ components:
AzureScanOptionsInputUpdateDataAttributes:
description: Attributes for updating Azure scan options configuration.
properties:
compliance_host:
description: Indicates whether host compliance scanning is enabled.
type: boolean
vuln_containers_os:
description: Indicates if scanning for vulnerabilities in containers is enabled.
type: boolean
Expand Down Expand Up @@ -30081,6 +30102,7 @@ components:
example:
data:
attributes:
compliance_host: false
vuln_containers_os: true
vuln_host_os: true
id: company-project-id
Expand All @@ -30094,6 +30116,7 @@ components:
example:
data:
- attributes:
compliance_host: false
vuln_containers_os: true
vuln_host_os: true
id: company-project-id
Expand Down Expand Up @@ -30125,6 +30148,9 @@ components:
GcpScanOptionsDataAttributes:
description: Attributes for GCP scan options configuration.
properties:
compliance_host:
description: Indicates whether host compliance scanning is enabled.
type: boolean
vuln_containers_os:
description: Indicates if scanning for vulnerabilities in containers is enabled.
type: boolean
Expand Down Expand Up @@ -30169,6 +30195,9 @@ components:
GcpScanOptionsInputUpdateDataAttributes:
description: Attributes for updating GCP scan options configuration.
properties:
compliance_host:
description: Indicates whether host compliance scanning is enabled.
type: boolean
vuln_containers_os:
description: Indicates if scanning for vulnerabilities in containers is enabled.
type: boolean
Expand Down Expand Up @@ -85870,6 +85899,7 @@ paths:
value:
data:
attributes:
compliance_host: false
lambda: true
sensitive_data: false
vuln_containers_os: true
Expand Down Expand Up @@ -85967,6 +85997,7 @@ paths:
value:
data:
attributes:
compliance_host: false
lambda: true
sensitive_data: false
vuln_containers_os: true
Expand Down Expand Up @@ -86028,6 +86059,7 @@ paths:
value:
data:
attributes:
compliance_host: false
vuln_containers_os: true
vuln_host_os: true
id: 12345678-90ab-cdef-1234-567890abcdef
Expand Down Expand Up @@ -86186,6 +86218,7 @@ paths:
value:
data:
attributes:
compliance_host: false
vuln_containers_os: true
vuln_host_os: true
id: company-project-id
Expand Down
2 changes: 1 addition & 1 deletion examples/v2_agentless-scanning_CreateAwsScanOptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use datadog_api_client::datadogV2::model::AwsScanOptionsType;
#[tokio::main]
async fn main() {
let body = AwsScanOptionsCreateRequest::new(AwsScanOptionsCreateData::new(
AwsScanOptionsCreateAttributes::new(true, false, true, true),
AwsScanOptionsCreateAttributes::new(true, true, false, true, true),
"000000000003".to_string(),
AwsScanOptionsType::AWS_SCAN_OPTIONS,
));
Expand Down
18 changes: 18 additions & 0 deletions src/datadogV2/model/model_aws_scan_options_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ use std::fmt::{self, Formatter};
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
pub struct AwsScanOptionsAttributes {
/// Indicates whether host compliance scanning is enabled.
#[serde(rename = "compliance_host")]
pub compliance_host: Option<bool>,
/// Indicates if scanning of Lambda functions is enabled.
#[serde(rename = "lambda")]
pub lambda: Option<bool>,
Expand All @@ -33,6 +36,7 @@ pub struct AwsScanOptionsAttributes {
impl AwsScanOptionsAttributes {
pub fn new() -> AwsScanOptionsAttributes {
AwsScanOptionsAttributes {
compliance_host: None,
lambda: None,
sensitive_data: None,
vuln_containers_os: None,
Expand All @@ -42,6 +46,11 @@ impl AwsScanOptionsAttributes {
}
}

pub fn compliance_host(mut self, value: bool) -> Self {
self.compliance_host = Some(value);
self
}

pub fn lambda(mut self, value: bool) -> Self {
self.lambda = Some(value);
self
Expand Down Expand Up @@ -94,6 +103,7 @@ impl<'de> Deserialize<'de> for AwsScanOptionsAttributes {
where
M: MapAccess<'a>,
{
let mut compliance_host: Option<bool> = None;
let mut lambda: Option<bool> = None;
let mut sensitive_data: Option<bool> = None;
let mut vuln_containers_os: Option<bool> = None;
Expand All @@ -106,6 +116,13 @@ impl<'de> Deserialize<'de> for AwsScanOptionsAttributes {

while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
match k.as_str() {
"compliance_host" => {
if v.is_null() {
continue;
}
compliance_host =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"lambda" => {
if v.is_null() {
continue;
Expand Down Expand Up @@ -142,6 +159,7 @@ impl<'de> Deserialize<'de> for AwsScanOptionsAttributes {
}

let content = AwsScanOptionsAttributes {
compliance_host,
lambda,
sensitive_data,
vuln_containers_os,
Expand Down
13 changes: 13 additions & 0 deletions src/datadogV2/model/model_aws_scan_options_create_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ use std::fmt::{self, Formatter};
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
pub struct AwsScanOptionsCreateAttributes {
/// Indicates whether host compliance scanning is enabled.
#[serde(rename = "compliance_host")]
pub compliance_host: bool,
/// Indicates if scanning of Lambda functions is enabled.
#[serde(rename = "lambda")]
pub lambda: bool,
Expand All @@ -32,12 +35,14 @@ pub struct AwsScanOptionsCreateAttributes {

impl AwsScanOptionsCreateAttributes {
pub fn new(
compliance_host: bool,
lambda: bool,
sensitive_data: bool,
vuln_containers_os: bool,
vuln_host_os: bool,
) -> AwsScanOptionsCreateAttributes {
AwsScanOptionsCreateAttributes {
compliance_host,
lambda,
sensitive_data,
vuln_containers_os,
Expand Down Expand Up @@ -73,6 +78,7 @@ impl<'de> Deserialize<'de> for AwsScanOptionsCreateAttributes {
where
M: MapAccess<'a>,
{
let mut compliance_host: Option<bool> = None;
let mut lambda: Option<bool> = None;
let mut sensitive_data: Option<bool> = None;
let mut vuln_containers_os: Option<bool> = None;
Expand All @@ -85,6 +91,10 @@ impl<'de> Deserialize<'de> for AwsScanOptionsCreateAttributes {

while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
match k.as_str() {
"compliance_host" => {
compliance_host =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"lambda" => {
lambda = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
Expand All @@ -107,6 +117,8 @@ impl<'de> Deserialize<'de> for AwsScanOptionsCreateAttributes {
}
}
}
let compliance_host =
compliance_host.ok_or_else(|| M::Error::missing_field("compliance_host"))?;
let lambda = lambda.ok_or_else(|| M::Error::missing_field("lambda"))?;
let sensitive_data =
sensitive_data.ok_or_else(|| M::Error::missing_field("sensitive_data"))?;
Expand All @@ -116,6 +128,7 @@ impl<'de> Deserialize<'de> for AwsScanOptionsCreateAttributes {
vuln_host_os.ok_or_else(|| M::Error::missing_field("vuln_host_os"))?;

let content = AwsScanOptionsCreateAttributes {
compliance_host,
lambda,
sensitive_data,
vuln_containers_os,
Expand Down
18 changes: 18 additions & 0 deletions src/datadogV2/model/model_aws_scan_options_update_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ use std::fmt::{self, Formatter};
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
pub struct AwsScanOptionsUpdateAttributes {
/// Indicates whether host compliance scanning is enabled.
#[serde(rename = "compliance_host")]
pub compliance_host: Option<bool>,
/// Indicates if scanning of Lambda functions is enabled.
#[serde(rename = "lambda")]
pub lambda: Option<bool>,
Expand All @@ -33,6 +36,7 @@ pub struct AwsScanOptionsUpdateAttributes {
impl AwsScanOptionsUpdateAttributes {
pub fn new() -> AwsScanOptionsUpdateAttributes {
AwsScanOptionsUpdateAttributes {
compliance_host: None,
lambda: None,
sensitive_data: None,
vuln_containers_os: None,
Expand All @@ -42,6 +46,11 @@ impl AwsScanOptionsUpdateAttributes {
}
}

pub fn compliance_host(mut self, value: bool) -> Self {
self.compliance_host = Some(value);
self
}

pub fn lambda(mut self, value: bool) -> Self {
self.lambda = Some(value);
self
Expand Down Expand Up @@ -94,6 +103,7 @@ impl<'de> Deserialize<'de> for AwsScanOptionsUpdateAttributes {
where
M: MapAccess<'a>,
{
let mut compliance_host: Option<bool> = None;
let mut lambda: Option<bool> = None;
let mut sensitive_data: Option<bool> = None;
let mut vuln_containers_os: Option<bool> = None;
Expand All @@ -106,6 +116,13 @@ impl<'de> Deserialize<'de> for AwsScanOptionsUpdateAttributes {

while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
match k.as_str() {
"compliance_host" => {
if v.is_null() {
continue;
}
compliance_host =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"lambda" => {
if v.is_null() {
continue;
Expand Down Expand Up @@ -142,6 +159,7 @@ impl<'de> Deserialize<'de> for AwsScanOptionsUpdateAttributes {
}

let content = AwsScanOptionsUpdateAttributes {
compliance_host,
lambda,
sensitive_data,
vuln_containers_os,
Expand Down
18 changes: 18 additions & 0 deletions src/datadogV2/model/model_azure_scan_options_data_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ use std::fmt::{self, Formatter};
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
pub struct AzureScanOptionsDataAttributes {
/// Indicates whether host compliance scanning is enabled.
#[serde(rename = "compliance_host")]
pub compliance_host: Option<bool>,
/// Indicates if scanning for vulnerabilities in containers is enabled.
#[serde(rename = "vuln_containers_os")]
pub vuln_containers_os: Option<bool>,
Expand All @@ -27,13 +30,19 @@ pub struct AzureScanOptionsDataAttributes {
impl AzureScanOptionsDataAttributes {
pub fn new() -> AzureScanOptionsDataAttributes {
AzureScanOptionsDataAttributes {
compliance_host: None,
vuln_containers_os: None,
vuln_host_os: None,
additional_properties: std::collections::BTreeMap::new(),
_unparsed: false,
}
}

pub fn compliance_host(mut self, value: bool) -> Self {
self.compliance_host = Some(value);
self
}

pub fn vuln_containers_os(mut self, value: bool) -> Self {
self.vuln_containers_os = Some(value);
self
Expand Down Expand Up @@ -76,6 +85,7 @@ impl<'de> Deserialize<'de> for AzureScanOptionsDataAttributes {
where
M: MapAccess<'a>,
{
let mut compliance_host: Option<bool> = None;
let mut vuln_containers_os: Option<bool> = None;
let mut vuln_host_os: Option<bool> = None;
let mut additional_properties: std::collections::BTreeMap<
Expand All @@ -86,6 +96,13 @@ impl<'de> Deserialize<'de> for AzureScanOptionsDataAttributes {

while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
match k.as_str() {
"compliance_host" => {
if v.is_null() {
continue;
}
compliance_host =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"vuln_containers_os" => {
if v.is_null() {
continue;
Expand All @@ -109,6 +126,7 @@ impl<'de> Deserialize<'de> for AzureScanOptionsDataAttributes {
}

let content = AzureScanOptionsDataAttributes {
compliance_host,
vuln_containers_os,
vuln_host_os,
additional_properties,
Expand Down
Loading
Loading