Skip to content

trestle.oscal.mapping

trestle.oscal.mapping ¤

Attributes¤

Classes¤

ConfidenceScore ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.ConfidenceScore[ConfidenceScore]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.ConfidenceScore
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.ConfidenceScore href "" "trestle.oscal.mapping.ConfidenceScore"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            
Source code in trestle/oscal/mapping.py
177
178
class ConfidenceScore(OscalBaseModel):
    __root__: ConfidenceScore1 | ConfidenceScore2 = Field(..., description="This records either a string category or a decimal value from 0-1 representing a percentage. Both of these values describe an estimation of the author's confidence that this mapping is correct and accurate.", title='Confidence Score')
Attributes¤
__root__ = Field(..., description="This records either a string category or a decimal value from 0-1 representing a percentage. Both of these values describe an estimation of the author's confidence that this mapping is correct and accurate.", title='Confidence Score') class-attribute instance-attribute ¤

ConfidenceScore1 ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.ConfidenceScore1[ConfidenceScore1]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.ConfidenceScore1
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.ConfidenceScore1 href "" "trestle.oscal.mapping.ConfidenceScore1"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            

This records either a string category or a decimal value from 0-1 representing a percentage. Both of these values describe an estimation of the author's confidence that this mapping is correct and accurate.

Source code in trestle/oscal/mapping.py
43
44
45
46
47
48
49
50
51
class ConfidenceScore1(OscalBaseModel):
    """
    This records either a string category or a decimal value from 0-1 representing a percentage. Both of these values describe an estimation of the author's confidence that this mapping is correct and accurate.
    """

    class Config:
        extra = Extra.forbid

    category: constr(regex=r'^\S(.*\S)?$') | None = None
Attributes¤
category = None class-attribute instance-attribute ¤
Classes¤
Config ¤
Source code in trestle/oscal/mapping.py
48
49
class Config:
    extra = Extra.forbid
Attributes¤
extra = Extra.forbid class-attribute instance-attribute ¤

ConfidenceScore2 ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.ConfidenceScore2[ConfidenceScore2]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.ConfidenceScore2
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.ConfidenceScore2 href "" "trestle.oscal.mapping.ConfidenceScore2"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            

This records either a string category or a decimal value from 0-1 representing a percentage. Both of these values describe an estimation of the author's confidence that this mapping is correct and accurate.

Source code in trestle/oscal/mapping.py
166
167
168
169
170
171
172
173
174
class ConfidenceScore2(OscalBaseModel):
    """
    This records either a string category or a decimal value from 0-1 representing a percentage. Both of these values describe an estimation of the author's confidence that this mapping is correct and accurate.
    """

    class Config:
        extra = Extra.forbid

    percentage: Percentage | None = None
Attributes¤
percentage = None class-attribute instance-attribute ¤
Classes¤
Config ¤
Source code in trestle/oscal/mapping.py
171
172
class Config:
    extra = Extra.forbid
Attributes¤
extra = Extra.forbid class-attribute instance-attribute ¤

Coverage ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.Coverage[Coverage]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.Coverage
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.Coverage href "" "trestle.oscal.mapping.Coverage"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            

A decimal value from 0-1, representing the percentage coverage of the targets by the sources.

Source code in trestle/oscal/mapping.py
118
119
120
121
122
123
124
125
126
127
class Coverage(OscalBaseModel):
    """
    A decimal value from 0-1, representing the percentage coverage of the targets by the sources.
    """

    class Config:
        extra = Extra.forbid

    generation_method: constr(regex=r'^\S(.*\S)?$') | GenerationMethod | None = Field(None, alias='generation-method', description='The method used to determine the coverage value.', title='Coverage Generation Method')
    target_coverage: DecimalDatatype = Field(..., alias='target-coverage')
Attributes¤
generation_method = Field(None, alias='generation-method', description='The method used to determine the coverage value.', title='Coverage Generation Method') class-attribute instance-attribute ¤
target_coverage = Field(..., alias='target-coverage') class-attribute instance-attribute ¤
Classes¤
Config ¤
Source code in trestle/oscal/mapping.py
123
124
class Config:
    extra = Extra.forbid
Attributes¤
extra = Extra.forbid class-attribute instance-attribute ¤

DecimalDatatype ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.DecimalDatatype[DecimalDatatype]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.DecimalDatatype
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.DecimalDatatype href "" "trestle.oscal.mapping.DecimalDatatype"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            
Source code in trestle/oscal/mapping.py
54
55
class DecimalDatatype(OscalBaseModel):
    __root__: float = Field(..., description='A real number expressed using a whole and optional fractional part separated by a period.')
Attributes¤
__root__ = Field(..., description='A real number expressed using a whole and optional fractional part separated by a period.') class-attribute instance-attribute ¤

GapSummary ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.GapSummary[GapSummary]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.GapSummary
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.GapSummary href "" "trestle.oscal.mapping.GapSummary"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            

A by-id collection of all controls that were not mapped at all in this mapping-collection. If a control is partially mapped, the parts of the control are not mappable, the gap and discrepancies should be documented in the relationship-gal.

Source code in trestle/oscal/mapping.py
130
131
132
133
134
135
136
137
138
139
140
141
142
143
class GapSummary(OscalBaseModel):
    """
    A by-id collection of all controls that were not mapped at all in this mapping-collection. If a control is partially mapped, the parts of the control are not mappable, the gap and discrepancies should be documented in the relationship-gal.
    """

    class Config:
        extra = Extra.forbid

    uuid: constr(regex=r'^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[45][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$') = Field(
        ...,
        description='A machine-oriented, globally unique identifier with cross-instance scope that can be used to reference this mapping gap summary elsewhere in this or other OSCAL instances. The locally defined UUID of the SSP can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance).This UUID should be assigned per-subject, which means it should be consistently used to identify the same subject across revisions of the document.',
        title='Gap Summary Universally Unique Identifier',
    )
    unmapped_controls: list[SelectControlByIdForMapping] = Field(..., alias='unmapped-controls')
Attributes¤
unmapped_controls = Field(..., alias='unmapped-controls') class-attribute instance-attribute ¤
uuid = Field(..., description='A machine-oriented, globally unique identifier with cross-instance scope that can be used to reference this mapping gap summary elsewhere in this or other OSCAL instances. The locally defined UUID of the SSP can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance).This UUID should be assigned per-subject, which means it should be consistently used to identify the same subject across revisions of the document.', title='Gap Summary Universally Unique Identifier') class-attribute instance-attribute ¤
Classes¤
Config ¤
Source code in trestle/oscal/mapping.py
135
136
class Config:
    extra = Extra.forbid
Attributes¤
extra = Extra.forbid class-attribute instance-attribute ¤

GenerationMethod ¤

Bases: Enum


              flowchart TD
              trestle.oscal.mapping.GenerationMethod[GenerationMethod]

              

              click trestle.oscal.mapping.GenerationMethod href "" "trestle.oscal.mapping.GenerationMethod"
            

The method used to determine the coverage value.

Source code in trestle/oscal/mapping.py
58
59
60
61
62
63
class GenerationMethod(Enum):
    """
    The method used to determine the coverage value.
    """

    arbitrary = 'arbitrary'
Attributes¤
arbitrary = 'arbitrary' class-attribute instance-attribute ¤

Map ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.Map[Map]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.Map
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.Map href "" "trestle.oscal.mapping.Map"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            

A relationship-based mapping between a source and target set consisting of members (i.e., controls, control statements) from the respective source and target.

Source code in trestle/oscal/mapping.py
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
class Map(OscalBaseModel):
    """
    A relationship-based mapping between a source and target set consisting of members (i.e., controls, control statements) from the respective source and target.
    """

    class Config:
        extra = Extra.forbid

    uuid: constr(regex=r'^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[45][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$') = Field(..., description='The unique identifier for the mapping entry.', title='Mapping Entry Identifier')
    ns: URIDatatype | None = Field(None, description="A namespace qualifying the relationship's value. This allows different organizations to associate distinct semantics for relationships with the same name.", title='Relationship Value Namespace')
    matching_rationale: constr(regex=r'^\S(.*\S)?$') | None = Field(None, alias='matching-rationale', description='The method used for relating controls within the mapping. The supported methods are aligned with the NIST Interagency Report (IR) 8477, Section 4.3 Set Theory Relationship Mapping.', title='Matching')
    relationship: constr(regex=r'^[_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-\.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$') = Field(
        ..., description='The relationship type for the mapping entry, which describes the relationship between the effective requirements of the specified source and target sets in the context of the matching-rationale method globaly defined in the provenance unless overwritten locally in the map. The relationship type and the matching-rationale must be used together. However, more than one matching-rationale method may apply to a source and target pair.', title='Mapping Entry Relationship'
    )
    sources: list[MappingItem] = Field(...)
    targets: list[MappingItem] = Field(...)
    qualifiers: list[QualifierItem] | None = Field(None)
    confidence_score: ConfidenceScore | None = Field(None, alias='confidence-score')
    coverage: Coverage | None = None
    props: list[common.Property] | None = Field(None)
    links: list[common.Link] | None = Field(None)
    remarks: str | None = None
Attributes¤
confidence_score = Field(None, alias='confidence-score') class-attribute instance-attribute ¤
coverage = None class-attribute instance-attribute ¤
matching_rationale = Field(None, alias='matching-rationale', description='The method used for relating controls within the mapping. The supported methods are aligned with the NIST Interagency Report (IR) 8477, Section 4.3 Set Theory Relationship Mapping.', title='Matching') class-attribute instance-attribute ¤
ns = Field(None, description="A namespace qualifying the relationship's value. This allows different organizations to associate distinct semantics for relationships with the same name.", title='Relationship Value Namespace') class-attribute instance-attribute ¤
props = Field(None) class-attribute instance-attribute ¤
qualifiers = Field(None) class-attribute instance-attribute ¤
relationship = Field(..., description='The relationship type for the mapping entry, which describes the relationship between the effective requirements of the specified source and target sets in the context of the matching-rationale method globaly defined in the provenance unless overwritten locally in the map. The relationship type and the matching-rationale must be used together. However, more than one matching-rationale method may apply to a source and target pair.', title='Mapping Entry Relationship') class-attribute instance-attribute ¤
remarks = None class-attribute instance-attribute ¤
sources = Field(...) class-attribute instance-attribute ¤
targets = Field(...) class-attribute instance-attribute ¤
uuid = Field(..., description='The unique identifier for the mapping entry.', title='Mapping Entry Identifier') class-attribute instance-attribute ¤
Classes¤
Config ¤
Source code in trestle/oscal/mapping.py
206
207
class Config:
    extra = Extra.forbid
Attributes¤
extra = Extra.forbid class-attribute instance-attribute ¤

Mapping ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.Mapping[Mapping]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.Mapping
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.Mapping href "" "trestle.oscal.mapping.Mapping"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            

A mapping between two target resources.

Source code in trestle/oscal/mapping.py
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
class Mapping(OscalBaseModel):
    """
    A mapping between two target resources.
    """

    class Config:
        extra = Extra.forbid

    uuid: constr(regex=r'^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[45][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$') = Field(
        ...,
        description='A machine-oriented, globally unique identifier with cross-instance scope that can be used to reference this mapping definition elsewhere in this or other OSCAL instances. The locally defined UUID of the mapping can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned per-subject, which means it should be consistently used to identify the same mapping across revisions of the document.',
        title='Mapping Universally Unique Identifier',
    )
    method: constr(regex=r'^\S(.*\S)?$') | None = Field(None, description='The method used to complete the overall mapping.', title='Method')
    matching_rationale: constr(regex=r'^\S(.*\S)?$') | None = Field(None, alias='matching-rationale', description='The method used for relating controls within the mapping. The supported methods are aligned with the NIST Interagency Report (IR) 8477, Section 4.3 Set Theory Relationship Mapping.', title='Matching')
    status: constr(regex=r'^\S(.*\S)?$') | None = Field(None, description='The current status of this mapping document.', title='Status')
    source_resource: MappingResourceReference = Field(..., alias='source-resource')
    target_resource: MappingResourceReference = Field(..., alias='target-resource')
    maps: list[Map] = Field(...)
    props: list[common.Property] | None = Field(None)
    links: list[common.Link] | None = Field(None)
    remarks: str | None = None
    mapping_description: MappingDescription | None = Field(None, alias='mapping-description')
    source_gap_summary: GapSummary | None = Field(None, alias='source-gap-summary')
    target_gap_summary: GapSummary | None = Field(None, alias='target-gap-summary')
    confidence_score: ConfidenceScore | None = Field(None, alias='confidence-score')
    coverage: Coverage | None = None
Attributes¤
confidence_score = Field(None, alias='confidence-score') class-attribute instance-attribute ¤
coverage = None class-attribute instance-attribute ¤
mapping_description = Field(None, alias='mapping-description') class-attribute instance-attribute ¤
maps = Field(...) class-attribute instance-attribute ¤
matching_rationale = Field(None, alias='matching-rationale', description='The method used for relating controls within the mapping. The supported methods are aligned with the NIST Interagency Report (IR) 8477, Section 4.3 Set Theory Relationship Mapping.', title='Matching') class-attribute instance-attribute ¤
method = Field(None, description='The method used to complete the overall mapping.', title='Method') class-attribute instance-attribute ¤
props = Field(None) class-attribute instance-attribute ¤
remarks = None class-attribute instance-attribute ¤
source_gap_summary = Field(None, alias='source-gap-summary') class-attribute instance-attribute ¤
source_resource = Field(..., alias='source-resource') class-attribute instance-attribute ¤
status = Field(None, description='The current status of this mapping document.', title='Status') class-attribute instance-attribute ¤
target_gap_summary = Field(None, alias='target-gap-summary') class-attribute instance-attribute ¤
target_resource = Field(..., alias='target-resource') class-attribute instance-attribute ¤
uuid = Field(..., description='A machine-oriented, globally unique identifier with cross-instance scope that can be used to reference this mapping definition elsewhere in this or other OSCAL instances. The locally defined UUID of the mapping can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned per-subject, which means it should be consistently used to identify the same mapping across revisions of the document.', title='Mapping Universally Unique Identifier') class-attribute instance-attribute ¤
Classes¤
Config ¤
Source code in trestle/oscal/mapping.py
230
231
class Config:
    extra = Extra.forbid
Attributes¤
extra = Extra.forbid class-attribute instance-attribute ¤

MappingCollection ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.MappingCollection[MappingCollection]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.MappingCollection
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.MappingCollection href "" "trestle.oscal.mapping.MappingCollection"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            

A collection of relationship-based control and/or control statement mappings.

Source code in trestle/oscal/mapping.py
254
255
256
257
258
259
260
261
262
263
264
265
266
class MappingCollection(OscalBaseModel):
    """
    A collection of relationship-based control and/or control statement mappings.
    """

    class Config:
        extra = Extra.forbid

    uuid: constr(regex=r'^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[45][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$') = Field(..., description='A globally unique identifier with cross-instance scope for this catalog instance. This UUID should be changed when this document is revised.', title='Mapping Collection Universally Unique Identifier')
    metadata: common.Metadata
    provenance: MappingProvenance
    mappings: Mapping | list[Mapping]
    back_matter: common.BackMatter | None = Field(None, alias='back-matter')
Attributes¤
back_matter = Field(None, alias='back-matter') class-attribute instance-attribute ¤
mappings instance-attribute ¤
metadata instance-attribute ¤
provenance instance-attribute ¤
uuid = Field(..., description='A globally unique identifier with cross-instance scope for this catalog instance. This UUID should be changed when this document is revised.', title='Mapping Collection Universally Unique Identifier') class-attribute instance-attribute ¤
Classes¤
Config ¤
Source code in trestle/oscal/mapping.py
259
260
class Config:
    extra = Extra.forbid
Attributes¤
extra = Extra.forbid class-attribute instance-attribute ¤

MappingDescription ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.MappingDescription[MappingDescription]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.MappingDescription
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.MappingDescription href "" "trestle.oscal.mapping.MappingDescription"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            
Source code in trestle/oscal/mapping.py
66
67
class MappingDescription(OscalBaseModel):
    __root__: str = Field(..., description='Description of the context and intended use of the mapping set.', title='Mapping Description')
Attributes¤
__root__ = Field(..., description='Description of the context and intended use of the mapping set.', title='Mapping Description') class-attribute instance-attribute ¤

MappingItem ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.MappingItem[MappingItem]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.MappingItem
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.MappingItem href "" "trestle.oscal.mapping.MappingItem"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            

A specific edge within a source or target that is the subject of a mapping.

Source code in trestle/oscal/mapping.py
70
71
72
73
74
75
76
77
78
79
80
81
82
class MappingItem(OscalBaseModel):
    """
    A specific edge within a source or target that is the subject of a mapping.
    """

    class Config:
        extra = Extra.forbid

    type: constr(regex=r'^[_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-\.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$') = Field(..., description='The semantic type of the subject.', title='Subject Type')
    id_ref: constr(regex=r'^\S(.*\S)?$') = Field(..., alias='id-ref', description='A reference to an identified subject that is of the specified type .', title='Subject Identifier Reference')
    props: list[common.Property] | None = Field(None)
    links: list[common.Link] | None = Field(None)
    remarks: str | None = None
Attributes¤
id_ref = Field(..., alias='id-ref', description='A reference to an identified subject that is of the specified type .', title='Subject Identifier Reference') class-attribute instance-attribute ¤
props = Field(None) class-attribute instance-attribute ¤
remarks = None class-attribute instance-attribute ¤
type = Field(..., description='The semantic type of the subject.', title='Subject Type') class-attribute instance-attribute ¤
Classes¤
Config ¤
Source code in trestle/oscal/mapping.py
75
76
class Config:
    extra = Extra.forbid
Attributes¤
extra = Extra.forbid class-attribute instance-attribute ¤

MappingProvenance ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.MappingProvenance[MappingProvenance]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.MappingProvenance
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.MappingProvenance href "" "trestle.oscal.mapping.MappingProvenance"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            

Describes requirements, incompatibilities and gaps that are identified between a target and source in a mapping item.

Source code in trestle/oscal/mapping.py
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
class MappingProvenance(OscalBaseModel):
    """
    Describes requirements, incompatibilities and gaps that are identified between a target and source in a mapping item.
    """

    class Config:
        extra = Extra.forbid

    method: constr(regex=r'^\S(.*\S)?$') = Field(..., description='The method used to complete the overall mapping.', title='Method')
    matching_rationale: constr(regex=r'^\S(.*\S)?$') = Field(..., alias='matching-rationale', description='The method used for relating controls within the mapping. The supported methods are aligned with the NIST Interagency Report (IR) 8477, Section 4.3 Set Theory Relationship Mapping.', title='Matching')
    status: constr(regex=r'^\S(.*\S)?$') = Field(..., description='The current status of this mapping document.', title='Status')
    confidence_score: ConfidenceScore | None = Field(None, alias='confidence-score')
    coverage: Coverage | None = None
    mapping_description: MappingDescription = Field(..., alias='mapping-description')
    responsible_parties: list[common.ResponsibleParty] | None = Field(None, alias='responsible-parties')
    props: list[common.Property] | None = Field(None)
    links: list[common.Link] | None = Field(None)
    remarks: str | None = None
Attributes¤
confidence_score = Field(None, alias='confidence-score') class-attribute instance-attribute ¤
coverage = None class-attribute instance-attribute ¤
mapping_description = Field(..., alias='mapping-description') class-attribute instance-attribute ¤
matching_rationale = Field(..., alias='matching-rationale', description='The method used for relating controls within the mapping. The supported methods are aligned with the NIST Interagency Report (IR) 8477, Section 4.3 Set Theory Relationship Mapping.', title='Matching') class-attribute instance-attribute ¤
method = Field(..., description='The method used to complete the overall mapping.', title='Method') class-attribute instance-attribute ¤
props = Field(None) class-attribute instance-attribute ¤
remarks = None class-attribute instance-attribute ¤
responsible_parties = Field(None, alias='responsible-parties') class-attribute instance-attribute ¤
status = Field(..., description='The current status of this mapping document.', title='Status') class-attribute instance-attribute ¤
Classes¤
Config ¤
Source code in trestle/oscal/mapping.py
186
187
class Config:
    extra = Extra.forbid
Attributes¤
extra = Extra.forbid class-attribute instance-attribute ¤

MappingResourceReference ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.MappingResourceReference[MappingResourceReference]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.MappingResourceReference
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.MappingResourceReference href "" "trestle.oscal.mapping.MappingResourceReference"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            

A reference to a resource that is either the source or the target of a mapping.

Source code in trestle/oscal/mapping.py
146
147
148
149
150
151
152
153
154
155
156
157
158
159
class MappingResourceReference(OscalBaseModel):
    """
    A reference to a resource that is either the source or the target of a mapping.
    """

    class Config:
        extra = Extra.forbid

    ns: AnyUrl | None = Field(None, description="An optional namespace qualifying the resource's type.", title='Resource Type Namespace')
    type: TokenDatatype | ResourceTypeValidValues = Field(..., description='The semantic type of the resource.', title='Resource Type')
    href: str = Field(..., description='A resolvable URL reference to the base catalog or profile that this profile is tailoring.', title='Catalog or Profile Reference')
    props: list[common.Property] | None = Field(None)
    links: list[common.Link] | None = Field(None)
    remarks: str | None = None
Attributes¤
href = Field(..., description='A resolvable URL reference to the base catalog or profile that this profile is tailoring.', title='Catalog or Profile Reference') class-attribute instance-attribute ¤
ns = Field(None, description="An optional namespace qualifying the resource's type.", title='Resource Type Namespace') class-attribute instance-attribute ¤
props = Field(None) class-attribute instance-attribute ¤
remarks = None class-attribute instance-attribute ¤
type = Field(..., description='The semantic type of the resource.', title='Resource Type') class-attribute instance-attribute ¤
Classes¤
Config ¤
Source code in trestle/oscal/mapping.py
151
152
class Config:
    extra = Extra.forbid
Attributes¤
extra = Extra.forbid class-attribute instance-attribute ¤

Model ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.Model[Model]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.Model
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.Model href "" "trestle.oscal.mapping.Model"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            
Source code in trestle/oscal/mapping.py
269
270
class Model(OscalBaseModel):
    mapping_collection: MappingCollection = Field(..., alias='mapping-collection')
Attributes¤
mapping_collection = Field(..., alias='mapping-collection') class-attribute instance-attribute ¤

Percentage ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.Percentage[Percentage]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.Percentage
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.Percentage href "" "trestle.oscal.mapping.Percentage"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            
Source code in trestle/oscal/mapping.py
162
163
class Percentage(OscalBaseModel):
    __root__: DecimalDatatype = Field(..., description='A decimal value from 0-1, representing a percentage.', title='Percentage')
Attributes¤
__root__ = Field(..., description='A decimal value from 0-1, representing a percentage.', title='Percentage') class-attribute instance-attribute ¤

QualifierItem ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.QualifierItem[QualifierItem]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.QualifierItem
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.QualifierItem href "" "trestle.oscal.mapping.QualifierItem"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            

Describes requirements, incompatibilities and gaps that are identified between a target and source in a mapping item.

Source code in trestle/oscal/mapping.py
85
86
87
88
89
90
91
92
93
94
95
96
97
class QualifierItem(OscalBaseModel):
    """
    Describes requirements, incompatibilities and gaps that are identified between a target and source in a mapping item.
    """

    class Config:
        extra = Extra.forbid

    subject: constr(regex=r'^\S(.*\S)?$') = Field(..., description='The focus of the qualifier.', title='Subject')
    predicate: constr(regex=r'^\S(.*\S)?$') = Field(..., description='The predicate describes how the qualifer applies to the subject.', title='Predicate')
    category: constr(regex=r'^\S(.*\S)?$') = Field(..., description='The category expresses the resolvable nature of the predicate.', title='Category')
    description: str = Field(..., description='Details that outline what requirements must be met, or cannot be met. If the qualifier identifies a gap, this should idenfity the gap, and any incompatibilities.', title='Description of the qualifier')
    remarks: str | None = None
Attributes¤
category = Field(..., description='The category expresses the resolvable nature of the predicate.', title='Category') class-attribute instance-attribute ¤
description = Field(..., description='Details that outline what requirements must be met, or cannot be met. If the qualifier identifies a gap, this should idenfity the gap, and any incompatibilities.', title='Description of the qualifier') class-attribute instance-attribute ¤
predicate = Field(..., description='The predicate describes how the qualifer applies to the subject.', title='Predicate') class-attribute instance-attribute ¤
remarks = None class-attribute instance-attribute ¤
subject = Field(..., description='The focus of the qualifier.', title='Subject') class-attribute instance-attribute ¤
Classes¤
Config ¤
Source code in trestle/oscal/mapping.py
90
91
class Config:
    extra = Extra.forbid
Attributes¤
extra = Extra.forbid class-attribute instance-attribute ¤

ResourceTypeValidValues ¤

Bases: Enum


              flowchart TD
              trestle.oscal.mapping.ResourceTypeValidValues[ResourceTypeValidValues]

              

              click trestle.oscal.mapping.ResourceTypeValidValues href "" "trestle.oscal.mapping.ResourceTypeValidValues"
            
Source code in trestle/oscal/mapping.py
100
101
102
class ResourceTypeValidValues(Enum):
    catalog = 'catalog'
    profile = 'profile'
Attributes¤
catalog = 'catalog' class-attribute instance-attribute ¤
profile = 'profile' class-attribute instance-attribute ¤

SelectControlByIdForMapping ¤

Bases: OscalBaseModel


              flowchart TD
              trestle.oscal.mapping.SelectControlByIdForMapping[SelectControlByIdForMapping]
              trestle.core.base_model.OscalBaseModel[OscalBaseModel]
              trestle.core.trestle_base_model.TrestleBaseModel[TrestleBaseModel]

                              trestle.core.base_model.OscalBaseModel --> trestle.oscal.mapping.SelectControlByIdForMapping
                                trestle.core.trestle_base_model.TrestleBaseModel --> trestle.core.base_model.OscalBaseModel
                



              click trestle.oscal.mapping.SelectControlByIdForMapping href "" "trestle.oscal.mapping.SelectControlByIdForMapping"
              click trestle.core.base_model.OscalBaseModel href "" "trestle.core.base_model.OscalBaseModel"
              click trestle.core.trestle_base_model.TrestleBaseModel href "" "trestle.core.trestle_base_model.TrestleBaseModel"
            

Select a control or controls from an imported control set.

Source code in trestle/oscal/mapping.py
105
106
107
108
109
110
111
112
113
114
115
class SelectControlByIdForMapping(OscalBaseModel):
    """
    Select a control or controls from an imported control set.
    """

    class Config:
        extra = Extra.forbid

    with_child_controls: constr(regex=r'^[_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-\.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$') | None = Field(None, alias='with-child-controls', description='When a control is included, whether its child (dependent) controls are also included.', title='Include Contained Controls with Control')
    with_ids: list[constr(regex=r'^[_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-\.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$')] | None = Field(None, alias='with-ids')
    matching: list[common.Matching] | None = Field(None)
Attributes¤
matching = Field(None) class-attribute instance-attribute ¤
with_child_controls = Field(None, alias='with-child-controls', description='When a control is included, whether its child (dependent) controls are also included.', title='Include Contained Controls with Control') class-attribute instance-attribute ¤
with_ids = Field(None, alias='with-ids') class-attribute instance-attribute ¤
Classes¤
Config ¤
Source code in trestle/oscal/mapping.py
110
111
class Config:
    extra = Extra.forbid
Attributes¤
extra = Extra.forbid class-attribute instance-attribute ¤

handler: python