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
26 changes: 24 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10910,6 +10910,10 @@ components:
description: Operating system name.
example: ubuntu
type: string
version:
description: Operating system version.
example: "24.04"
type: string
required:
- name
type: object
Expand Down Expand Up @@ -94632,8 +94636,11 @@ components:
description: The ID of the scanned asset metadata.
example: "Host|i-0fc7edef1ab26d7ef"
type: string
type:
$ref: "#/components/schemas/ScannedAssetMetadataType"
required:
- id
- type
- attributes
type: object
ScannedAssetMetadataAsset:
Expand Down Expand Up @@ -94688,6 +94695,14 @@ components:
required:
- timestamp
type: object
ScannedAssetMetadataType:
description: The JSON:API type.
enum:
- scanned-assets-metadata
example: scanned-assets-metadata
type: string
x-enum-varnames:
- SCANNED_ASSETS_METADATA
ScannedAssetsMetadata:
description: The expected response schema when listing scanned assets metadata.
properties:
Expand Down Expand Up @@ -107359,7 +107374,8 @@ components:
- "1.3"
- "1.4"
- "1.5"
example: "1.5"
- "1.6"
example: "1.6"
type: string
x-enum-varnames:
- ONE_ZERO
Expand All @@ -107368,6 +107384,7 @@ components:
- ONE_THREE
- ONE_FOUR
- ONE_FIVE
- ONE_SIX
SplitAPIKey:
description: The definition of the `SplitAPIKey` object.
properties:
Expand Down Expand Up @@ -121376,10 +121393,12 @@ components:
- ReflectionInjection
- RiskyLicense
- SessionRewriting
- SessionRewritting
- SessionTimeout
- SqlInjection
- Ssrf
- StackTraceLeak
- TemplateInjection
- TrustBoundaryViolation
- Unmaintained
- UntrustedDeserialization
Expand Down Expand Up @@ -121421,10 +121440,12 @@ components:
- REFLECTION_INJECTION
- RISKY_LICENSE
- SESSION_REWRITING
- SESSION_REWRITTING
- SESSION_TIMEOUT
- SQL_INJECTION
- SSRF
- STACK_TRACE_LEAK
- TEMPLATE_INJECTION
- TRUST_BOUNDARY_VIOLATION
- UNMAINTAINED
- UNTRUSTED_DESERIALIZATION
Expand Down Expand Up @@ -194101,7 +194122,7 @@ paths:
dependencies: []
metadata: {}
serialNumber: urn:uuid:abc-123
specVersion: "1.5"
specVersion: "1.6"
version: 1
id: "github.com/datadog/datadog-agent"
type: sboms
Expand Down Expand Up @@ -194247,6 +194268,7 @@ paths:
last_success:
env: prod
id: "Host|i-0fc7edef1ab26d7ef"
type: scanned-assets-metadata
schema:
$ref: "#/components/schemas/ScannedAssetsMetadata"
description: OK
Expand Down
7 changes: 7 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40646,6 +40646,13 @@ datadog\_api\_client.v2.model.scanned\_asset\_metadata\_last\_success module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.scanned\_asset\_metadata\_type module
-------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.scanned_asset_metadata_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.scanned\_assets\_metadata module
--------------------------------------------------------------

Expand Down
11 changes: 10 additions & 1 deletion src/datadog_api_client/v2/model/asset_operating_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@ def openapi_types(_):
return {
"description": (str,),
"name": (str,),
"version": (str,),
}

attribute_map = {
"description": "description",
"name": "name",
"version": "version",
}

def __init__(self_, name: str, description: Union[str, UnsetType] = unset, **kwargs):
def __init__(
self_, name: str, description: Union[str, UnsetType] = unset, version: Union[str, UnsetType] = unset, **kwargs
):
"""
Asset operating system.

Expand All @@ -35,9 +39,14 @@ def __init__(self_, name: str, description: Union[str, UnsetType] = unset, **kwa

:param name: Operating system name.
:type name: str

:param version: Operating system version.
:type version: str, optional
"""
if description is not unset:
kwargs["description"] = description
if version is not unset:
kwargs["version"] = version
super().__init__(kwargs)

self_.name = name
10 changes: 9 additions & 1 deletion src/datadog_api_client/v2/model/scanned_asset_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,28 @@

if TYPE_CHECKING:
from datadog_api_client.v2.model.scanned_asset_metadata_attributes import ScannedAssetMetadataAttributes
from datadog_api_client.v2.model.scanned_asset_metadata_type import ScannedAssetMetadataType


class ScannedAssetMetadata(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.scanned_asset_metadata_attributes import ScannedAssetMetadataAttributes
from datadog_api_client.v2.model.scanned_asset_metadata_type import ScannedAssetMetadataType

return {
"attributes": (ScannedAssetMetadataAttributes,),
"id": (str,),
"type": (ScannedAssetMetadataType,),
}

attribute_map = {
"attributes": "attributes",
"id": "id",
"type": "type",
}

def __init__(self_, attributes: ScannedAssetMetadataAttributes, id: str, **kwargs):
def __init__(self_, attributes: ScannedAssetMetadataAttributes, id: str, type: ScannedAssetMetadataType, **kwargs):
"""
The metadata of a scanned asset.

Expand All @@ -39,8 +43,12 @@ def __init__(self_, attributes: ScannedAssetMetadataAttributes, id: str, **kwarg

:param id: The ID of the scanned asset metadata.
:type id: str

:param type: The JSON:API type.
:type type: ScannedAssetMetadataType
"""
super().__init__(kwargs)

self_.attributes = attributes
self_.id = id
self_.type = type
35 changes: 35 additions & 0 deletions src/datadog_api_client/v2/model/scanned_asset_metadata_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations


from datadog_api_client.model_utils import (
ModelSimple,
cached_property,
)

from typing import ClassVar


class ScannedAssetMetadataType(ModelSimple):
"""
The JSON:API type.

:param value: If omitted defaults to "scanned-assets-metadata". Must be one of ["scanned-assets-metadata"].
:type value: str
"""

allowed_values = {
"scanned-assets-metadata",
}
SCANNED_ASSETS_METADATA: ClassVar["ScannedAssetMetadataType"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


ScannedAssetMetadataType.SCANNED_ASSETS_METADATA = ScannedAssetMetadataType("scanned-assets-metadata")
5 changes: 4 additions & 1 deletion src/datadog_api_client/v2/model/spec_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SpecVersion(ModelSimple):
"""
The version of the CycloneDX specification a BOM conforms to.

:param value: Must be one of ["1.0", "1.1", "1.2", "1.3", "1.4", "1.5"].
:param value: Must be one of ["1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6"].
:type value: str
"""

Expand All @@ -27,13 +27,15 @@ class SpecVersion(ModelSimple):
"1.3",
"1.4",
"1.5",
"1.6",
}
ONE_ZERO: ClassVar["SpecVersion"]
ONE_ONE: ClassVar["SpecVersion"]
ONE_TWO: ClassVar["SpecVersion"]
ONE_THREE: ClassVar["SpecVersion"]
ONE_FOUR: ClassVar["SpecVersion"]
ONE_FIVE: ClassVar["SpecVersion"]
ONE_SIX: ClassVar["SpecVersion"]

@cached_property
def openapi_types(_):
Expand All @@ -48,3 +50,4 @@ def openapi_types(_):
SpecVersion.ONE_THREE = SpecVersion("1.3")
SpecVersion.ONE_FOUR = SpecVersion("1.4")
SpecVersion.ONE_FIVE = SpecVersion("1.5")
SpecVersion.ONE_SIX = SpecVersion("1.6")
8 changes: 7 additions & 1 deletion src/datadog_api_client/v2/model/vulnerability_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class VulnerabilityType(ModelSimple):
"""
The vulnerability type.

:param value: Must be one of ["AdminConsoleActive", "CodeInjection", "CommandInjection", "ComponentWithKnownVulnerability", "DangerousWorkflows", "DefaultAppDeployed", "DefaultHtmlEscapeInvalid", "DirectoryListingLeak", "EmailHtmlInjection", "EndOfLife", "HardcodedPassword", "HardcodedSecret", "HeaderInjection", "HstsHeaderMissing", "InsecureAuthProtocol", "InsecureCookie", "InsecureJspLayout", "LdapInjection", "MaliciousPackage", "MandatoryRemediation", "NoHttpOnlyCookie", "NoSameSiteCookie", "NoSqlMongoDbInjection", "PathTraversal", "ReflectionInjection", "RiskyLicense", "SessionRewriting", "SessionTimeout", "SqlInjection", "Ssrf", "StackTraceLeak", "TrustBoundaryViolation", "Unmaintained", "UntrustedDeserialization", "UnvalidatedRedirect", "VerbTampering", "WeakCipher", "WeakHash", "WeakRandomness", "XContentTypeHeaderMissing", "XPathInjection", "Xss"].
:param value: Must be one of ["AdminConsoleActive", "CodeInjection", "CommandInjection", "ComponentWithKnownVulnerability", "DangerousWorkflows", "DefaultAppDeployed", "DefaultHtmlEscapeInvalid", "DirectoryListingLeak", "EmailHtmlInjection", "EndOfLife", "HardcodedPassword", "HardcodedSecret", "HeaderInjection", "HstsHeaderMissing", "InsecureAuthProtocol", "InsecureCookie", "InsecureJspLayout", "LdapInjection", "MaliciousPackage", "MandatoryRemediation", "NoHttpOnlyCookie", "NoSameSiteCookie", "NoSqlMongoDbInjection", "PathTraversal", "ReflectionInjection", "RiskyLicense", "SessionRewriting", "SessionRewritting", "SessionTimeout", "SqlInjection", "Ssrf", "StackTraceLeak", "TemplateInjection", "TrustBoundaryViolation", "Unmaintained", "UntrustedDeserialization", "UnvalidatedRedirect", "VerbTampering", "WeakCipher", "WeakHash", "WeakRandomness", "XContentTypeHeaderMissing", "XPathInjection", "Xss"].
:type value: str
"""

Expand Down Expand Up @@ -48,10 +48,12 @@ class VulnerabilityType(ModelSimple):
"ReflectionInjection",
"RiskyLicense",
"SessionRewriting",
"SessionRewritting",
"SessionTimeout",
"SqlInjection",
"Ssrf",
"StackTraceLeak",
"TemplateInjection",
"TrustBoundaryViolation",
"Unmaintained",
"UntrustedDeserialization",
Expand Down Expand Up @@ -91,10 +93,12 @@ class VulnerabilityType(ModelSimple):
REFLECTION_INJECTION: ClassVar["VulnerabilityType"]
RISKY_LICENSE: ClassVar["VulnerabilityType"]
SESSION_REWRITING: ClassVar["VulnerabilityType"]
SESSION_REWRITTING: ClassVar["VulnerabilityType"]
SESSION_TIMEOUT: ClassVar["VulnerabilityType"]
SQL_INJECTION: ClassVar["VulnerabilityType"]
SSRF: ClassVar["VulnerabilityType"]
STACK_TRACE_LEAK: ClassVar["VulnerabilityType"]
TEMPLATE_INJECTION: ClassVar["VulnerabilityType"]
TRUST_BOUNDARY_VIOLATION: ClassVar["VulnerabilityType"]
UNMAINTAINED: ClassVar["VulnerabilityType"]
UNTRUSTED_DESERIALIZATION: ClassVar["VulnerabilityType"]
Expand Down Expand Up @@ -141,10 +145,12 @@ def openapi_types(_):
VulnerabilityType.REFLECTION_INJECTION = VulnerabilityType("ReflectionInjection")
VulnerabilityType.RISKY_LICENSE = VulnerabilityType("RiskyLicense")
VulnerabilityType.SESSION_REWRITING = VulnerabilityType("SessionRewriting")
VulnerabilityType.SESSION_REWRITTING = VulnerabilityType("SessionRewritting")
VulnerabilityType.SESSION_TIMEOUT = VulnerabilityType("SessionTimeout")
VulnerabilityType.SQL_INJECTION = VulnerabilityType("SqlInjection")
VulnerabilityType.SSRF = VulnerabilityType("Ssrf")
VulnerabilityType.STACK_TRACE_LEAK = VulnerabilityType("StackTraceLeak")
VulnerabilityType.TEMPLATE_INJECTION = VulnerabilityType("TemplateInjection")
VulnerabilityType.TRUST_BOUNDARY_VIOLATION = VulnerabilityType("TrustBoundaryViolation")
VulnerabilityType.UNMAINTAINED = VulnerabilityType("Unmaintained")
VulnerabilityType.UNTRUSTED_DESERIALIZATION = VulnerabilityType("UntrustedDeserialization")
Expand Down
2 changes: 2 additions & 0 deletions src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8285,6 +8285,7 @@
from datadog_api_client.v2.model.scanned_asset_metadata_asset import ScannedAssetMetadataAsset
from datadog_api_client.v2.model.scanned_asset_metadata_attributes import ScannedAssetMetadataAttributes
from datadog_api_client.v2.model.scanned_asset_metadata_last_success import ScannedAssetMetadataLastSuccess
from datadog_api_client.v2.model.scanned_asset_metadata_type import ScannedAssetMetadataType
from datadog_api_client.v2.model.scanned_assets_metadata import ScannedAssetsMetadata
from datadog_api_client.v2.model.schedule import Schedule
from datadog_api_client.v2.model.schedule_create_request import ScheduleCreateRequest
Expand Down Expand Up @@ -16774,6 +16775,7 @@
"ScannedAssetMetadataAsset",
"ScannedAssetMetadataAttributes",
"ScannedAssetMetadataLastSuccess",
"ScannedAssetMetadataType",
"ScannedAssetsMetadata",
"Schedule",
"ScheduleCreateRequest",
Expand Down
Loading