Skip to content
Open
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
171 changes: 138 additions & 33 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40450,6 +40450,13 @@ datadog\_api\_client.v2.model.sca\_request\_data\_attributes\_dependencies\_item
:members:
:show-inheritance:

datadog\_api\_client.v2.model.sca\_request\_data\_attributes\_dependencies\_items\_locations\_items\_nullable\_file\_position module
------------------------------------------------------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.sca\_request\_data\_attributes\_dependencies\_items\_locations\_items\_position module
--------------------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -40485,6 +40492,34 @@ datadog\_api\_client.v2.model.sca\_request\_data\_attributes\_repository module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.sca\_request\_data\_attributes\_scan\_start\_timestamp module
-------------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.sca\_request\_data\_attributes\_tags module
-------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.sca\_request\_data\_attributes\_tags\_tool module
-------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.sca\_request\_data\_attributes\_tags\_tool\_generator module
------------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.sca\_request\_data\_attributes\_vulnerabilities\_items module
-------------------------------------------------------------------------------------------

Expand Down
27 changes: 24 additions & 3 deletions examples/v2/static-analysis/CreateSCAResult.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
from datadog_api_client.v2.model.sca_request_data_attributes_dependencies_items_locations_items_file_position import (
ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition,
)
from datadog_api_client.v2.model.sca_request_data_attributes_dependencies_items_locations_items_nullable_file_position import (
ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition,
)
from datadog_api_client.v2.model.sca_request_data_attributes_dependencies_items_locations_items_position import (
ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition,
)
Expand All @@ -28,6 +31,14 @@
ScaRequestDataAttributesRelationsItems,
)
from datadog_api_client.v2.model.sca_request_data_attributes_repository import ScaRequestDataAttributesRepository
from datadog_api_client.v2.model.sca_request_data_attributes_scan_start_timestamp import (
ScaRequestDataAttributesScanStartTimestamp,
)
from datadog_api_client.v2.model.sca_request_data_attributes_tags import ScaRequestDataAttributesTags
from datadog_api_client.v2.model.sca_request_data_attributes_tags_tool import ScaRequestDataAttributesTagsTool
from datadog_api_client.v2.model.sca_request_data_attributes_tags_tool_generator import (
ScaRequestDataAttributesTagsToolGenerator,
)
from datadog_api_client.v2.model.sca_request_data_attributes_vulnerabilities_items import (
ScaRequestDataAttributesVulnerabilitiesItems,
)
Expand All @@ -43,21 +54,23 @@
dependencies=[
ScaRequestDataAttributesDependenciesItems(
exclusions=[],
group=None,
is_direct=None,
locations=[
ScaRequestDataAttributesDependenciesItemsLocationsItems(
block=ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition(
end=ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition(),
start=ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition(),
),
name=ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition(
name=ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition(
end=ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition(),
start=ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition(),
),
namespace=ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition(
namespace=ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition(
end=ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition(),
start=ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition(),
),
version=ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition(
version=ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition(
end=ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition(),
start=ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition(),
),
Expand All @@ -66,6 +79,8 @@
reachable_symbol_properties=[
ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems(),
],
target_frameworks=[],
version=None,
),
],
files=[
Expand All @@ -77,6 +92,12 @@
),
],
repository=ScaRequestDataAttributesRepository(),
scan_start_timestamp=ScaRequestDataAttributesScanStartTimestamp(),
tags=ScaRequestDataAttributesTags(
tool=ScaRequestDataAttributesTagsTool(
generator=ScaRequestDataAttributesTagsToolGenerator(),
),
),
vulnerabilities=[
ScaRequestDataAttributesVulnerabilitiesItems(
affects=[
Expand Down
27 changes: 22 additions & 5 deletions src/datadog_api_client/v2/model/sca_request_data_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Dict, List, Union, TYPE_CHECKING
from typing import List, Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
none_type,
unset,
UnsetType,
)
Expand All @@ -23,6 +24,10 @@
ScaRequestDataAttributesRelationsItems,
)
from datadog_api_client.v2.model.sca_request_data_attributes_repository import ScaRequestDataAttributesRepository
from datadog_api_client.v2.model.sca_request_data_attributes_scan_start_timestamp import (
ScaRequestDataAttributesScanStartTimestamp,
)
from datadog_api_client.v2.model.sca_request_data_attributes_tags import ScaRequestDataAttributesTags
from datadog_api_client.v2.model.sca_request_data_attributes_vulnerabilities_items import (
ScaRequestDataAttributesVulnerabilitiesItems,
)
Expand All @@ -44,6 +49,10 @@ def openapi_types(_):
from datadog_api_client.v2.model.sca_request_data_attributes_repository import (
ScaRequestDataAttributesRepository,
)
from datadog_api_client.v2.model.sca_request_data_attributes_scan_start_timestamp import (
ScaRequestDataAttributesScanStartTimestamp,
)
from datadog_api_client.v2.model.sca_request_data_attributes_tags import ScaRequestDataAttributesTags
from datadog_api_client.v2.model.sca_request_data_attributes_vulnerabilities_items import (
ScaRequestDataAttributesVulnerabilitiesItems,
)
Expand All @@ -55,8 +64,9 @@ def openapi_types(_):
"files": ([ScaRequestDataAttributesFilesItems],),
"relations": ([ScaRequestDataAttributesRelationsItems],),
"repository": (ScaRequestDataAttributesRepository,),
"scan_start_timestamp": (ScaRequestDataAttributesScanStartTimestamp,),
"service": (str,),
"tags": ({str: (str,)},),
"tags": (ScaRequestDataAttributesTags,),
"vulnerabilities": ([ScaRequestDataAttributesVulnerabilitiesItems],),
}

Expand All @@ -67,6 +77,7 @@ def openapi_types(_):
"files": "files",
"relations": "relations",
"repository": "repository",
"scan_start_timestamp": "scan_start_timestamp",
"service": "service",
"tags": "tags",
"vulnerabilities": "vulnerabilities",
Expand All @@ -80,8 +91,9 @@ def __init__(
files: Union[List[ScaRequestDataAttributesFilesItems], UnsetType] = unset,
relations: Union[List[ScaRequestDataAttributesRelationsItems], UnsetType] = unset,
repository: Union[ScaRequestDataAttributesRepository, UnsetType] = unset,
scan_start_timestamp: Union[ScaRequestDataAttributesScanStartTimestamp, none_type, UnsetType] = unset,
service: Union[str, UnsetType] = unset,
tags: Union[Dict[str, str], UnsetType] = unset,
tags: Union[ScaRequestDataAttributesTags, UnsetType] = unset,
vulnerabilities: Union[List[ScaRequestDataAttributesVulnerabilitiesItems], UnsetType] = unset,
**kwargs,
):
Expand All @@ -106,11 +118,14 @@ def __init__(
:param repository: Information about the source code repository being analyzed.
:type repository: ScaRequestDataAttributesRepository, optional

:param scan_start_timestamp: The time when the SCA scan started.
:type scan_start_timestamp: ScaRequestDataAttributesScanStartTimestamp, none_type, optional

:param service: The name of the service or application being analyzed.
:type service: str, optional

:param tags: A map of key-value tags providing additional metadata for the SCA scan.
:type tags: {str: (str,)}, optional
:param tags: A map of tags providing additional metadata for the SCA scan.
:type tags: ScaRequestDataAttributesTags, optional

:param vulnerabilities: The list of vulnerabilities identified in the dependency graph.
:type vulnerabilities: [ScaRequestDataAttributesVulnerabilitiesItems], optional
Expand All @@ -127,6 +142,8 @@ def __init__(
kwargs["relations"] = relations
if repository is not unset:
kwargs["repository"] = repository
if scan_start_timestamp is not unset:
kwargs["scan_start_timestamp"] = scan_start_timestamp
if service is not unset:
kwargs["service"] = service
if tags is not unset:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
none_type,
unset,
UnsetType,
)
Expand All @@ -34,16 +35,21 @@ def openapi_types(_):

return {
"exclusions": ([str],),
"group": (str,),
"group": (str, none_type),
"is_dev": (bool,),
"is_direct": (bool,),
"is_direct": (bool, none_type),
"language": (str,),
"locations": ([ScaRequestDataAttributesDependenciesItemsLocationsItems],),
"name": (str,),
"opaque": (bool,),
"package_manager": (str,),
"purl": (str,),
"reachable_symbol_properties": ([ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems],),
"version": (str,),
"requires_transitive_enrichment": (bool,),
"target_frameworks": ([str],),
"version": (str, none_type),
"version_constraint": (bool,),
"version_range": (str,),
}

attribute_map = {
Expand All @@ -54,27 +60,37 @@ def openapi_types(_):
"language": "language",
"locations": "locations",
"name": "name",
"opaque": "opaque",
"package_manager": "package_manager",
"purl": "purl",
"reachable_symbol_properties": "reachable_symbol_properties",
"requires_transitive_enrichment": "requires_transitive_enrichment",
"target_frameworks": "target_frameworks",
"version": "version",
"version_constraint": "version_constraint",
"version_range": "version_range",
}

def __init__(
self_,
exclusions: Union[List[str], UnsetType] = unset,
group: Union[str, UnsetType] = unset,
group: Union[str, none_type, UnsetType] = unset,
is_dev: Union[bool, UnsetType] = unset,
is_direct: Union[bool, UnsetType] = unset,
is_direct: Union[bool, none_type, UnsetType] = unset,
language: Union[str, UnsetType] = unset,
locations: Union[List[ScaRequestDataAttributesDependenciesItemsLocationsItems], UnsetType] = unset,
locations: Union[List[ScaRequestDataAttributesDependenciesItemsLocationsItems], none_type, UnsetType] = unset,
name: Union[str, UnsetType] = unset,
opaque: Union[bool, UnsetType] = unset,
package_manager: Union[str, UnsetType] = unset,
purl: Union[str, UnsetType] = unset,
reachable_symbol_properties: Union[
List[ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems], UnsetType
] = unset,
version: Union[str, UnsetType] = unset,
requires_transitive_enrichment: Union[bool, UnsetType] = unset,
target_frameworks: Union[List[str], UnsetType] = unset,
version: Union[str, none_type, UnsetType] = unset,
version_constraint: Union[bool, UnsetType] = unset,
version_range: Union[str, UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -84,23 +100,26 @@ def __init__(
:type exclusions: [str], optional

:param group: The group or organization namespace of the dependency (e.g., Maven group ID).
:type group: str, optional
:type group: str, none_type, optional

:param is_dev: Indicates whether this is a development-only dependency not used in production.
:type is_dev: bool, optional

:param is_direct: Indicates whether this is a direct dependency (as opposed to a transitive one).
:type is_direct: bool, optional
:type is_direct: bool, none_type, optional

:param language: The programming language ecosystem of this dependency (e.g., java, python, javascript).
:type language: str, optional

:param locations: The list of source file locations where this dependency is declared.
:type locations: [ScaRequestDataAttributesDependenciesItemsLocationsItems], optional
:type locations: [ScaRequestDataAttributesDependenciesItemsLocationsItems], none_type, optional

:param name: The name of the dependency package.
:type name: str, optional

:param opaque: Indicates whether dependency details are intentionally opaque.
:type opaque: bool, optional

:param package_manager: The package manager responsible for this dependency (e.g., maven, pip, npm).
:type package_manager: str, optional

Expand All @@ -110,8 +129,20 @@ def __init__(
:param reachable_symbol_properties: Properties describing symbols from this dependency that are reachable in the application code.
:type reachable_symbol_properties: [ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems], optional

:param requires_transitive_enrichment: Indicates whether this dependency requires transitive dependency enrichment.
:type requires_transitive_enrichment: bool, optional

:param target_frameworks: The target framework identifiers associated with this dependency.
:type target_frameworks: [str], optional

:param version: The version of the dependency.
:type version: str, optional
:type version: str, none_type, optional

:param version_constraint: Indicates whether the version value represents a version constraint.
:type version_constraint: bool, optional

:param version_range: The version range associated with this dependency when a manifest declares a range.
:type version_range: str, optional
"""
if exclusions is not unset:
kwargs["exclusions"] = exclusions
Expand All @@ -127,12 +158,22 @@ def __init__(
kwargs["locations"] = locations
if name is not unset:
kwargs["name"] = name
if opaque is not unset:
kwargs["opaque"] = opaque
if package_manager is not unset:
kwargs["package_manager"] = package_manager
if purl is not unset:
kwargs["purl"] = purl
if reachable_symbol_properties is not unset:
kwargs["reachable_symbol_properties"] = reachable_symbol_properties
if requires_transitive_enrichment is not unset:
kwargs["requires_transitive_enrichment"] = requires_transitive_enrichment
if target_frameworks is not unset:
kwargs["target_frameworks"] = target_frameworks
if version is not unset:
kwargs["version"] = version
if version_constraint is not unset:
kwargs["version_constraint"] = version_constraint
if version_range is not unset:
kwargs["version_range"] = version_range
super().__init__(kwargs)
Loading
Loading