spdx_tools.spdx.model.external_document_ref

 1# SPDX-FileCopyrightText: 2022 spdx contributors
 2#
 3# SPDX-License-Identifier: Apache-2.0
 4
 5from spdx_tools.common.typing.dataclass_with_properties import dataclass_with_properties
 6from spdx_tools.common.typing.type_checks import check_types_and_set_values
 7from spdx_tools.spdx.model import Checksum
 8
 9
10@dataclass_with_properties
11class ExternalDocumentRef:
12    document_ref_id: str  # of the form "DocumentRef-[idstring]"
13    document_uri: str
14    checksum: Checksum
15
16    def __init__(self, document_ref_id: str, document_uri: str, checksum: Checksum):
17        check_types_and_set_values(self, locals())
@dataclass_with_properties
class ExternalDocumentRef:
11@dataclass_with_properties
12class ExternalDocumentRef:
13    document_ref_id: str  # of the form "DocumentRef-[idstring]"
14    document_uri: str
15    checksum: Checksum
16
17    def __init__(self, document_ref_id: str, document_uri: str, checksum: Checksum):
18        check_types_and_set_values(self, locals())
ExternalDocumentRef( document_ref_id: str, document_uri: str, checksum: spdx_tools.spdx.model.checksum.Checksum)
17    def __init__(self, document_ref_id: str, document_uri: str, checksum: Checksum):
18        check_types_and_set_values(self, locals())
document_ref_id: str
47    def get_field(self) -> field_type:
48        return getattr(self, f"_{field_name}")
document_uri: str
47    def get_field(self) -> field_type:
48        return getattr(self, f"_{field_name}")
47    def get_field(self) -> field_type:
48        return getattr(self, f"_{field_name}")