forked from spdx/tools-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagent.py
More file actions
29 lines (26 loc) · 1.24 KB
/
agent.py
File metadata and controls
29 lines (26 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# SPDX-FileCopyrightText: 2023 spdx contributors
#
# SPDX-License-Identifier: Apache-2.0
from beartype.typing import List, Optional
from spdx_tools.common.typing.dataclass_with_properties import dataclass_with_properties
from spdx_tools.common.typing.type_checks import check_types_and_set_values
from spdx_tools.spdx3.model import CreationInfo, Element, ExternalIdentifier, ExternalReference, IntegrityMethod
@dataclass_with_properties
class Agent(Element):
def __init__(
self,
spdx_id: str,
creation_info: Optional[CreationInfo] = None,
name: Optional[str] = None,
summary: Optional[str] = None,
description: Optional[str] = None,
comment: Optional[str] = None,
verified_using: List[IntegrityMethod] | None = None,
external_reference: List[ExternalReference] | None = None,
external_identifier: List[ExternalIdentifier] | None = None,
extension: Optional[str] = None,
):
verified_using = [] if verified_using is None else verified_using
external_reference = [] if external_reference is None else external_reference
external_identifier = [] if external_identifier is None else external_identifier
check_types_and_set_values(self, locals())