The Report Header. Args: handling: The data marking section of the Header. information_source: The :class:`.InformationSource` section of the Header. intents: A collection of :class:`.VocabString` defining the intent of the parent :class:`.Report`
| 11 | |
| 12 | |
| 13 | class Header(stix.Entity): |
| 14 | """The Report Header. |
| 15 | |
| 16 | Args: |
| 17 | handling: The data marking section of the Header. |
| 18 | information_source: The :class:`.InformationSource` section of the |
| 19 | Header. |
| 20 | intents: A collection of :class:`.VocabString` defining the intent |
| 21 | of the parent :class:`.Report`. |
| 22 | description: A description of the intent or purpose of the parent |
| 23 | :class:`.Report`. |
| 24 | short_description: A short description of the intent or purpose of |
| 25 | the parent :class:`.Report`. |
| 26 | title: The title of the :class:`.Report`. |
| 27 | |
| 28 | Attributes: |
| 29 | title: The title of the parent :class:`.Report`. |
| 30 | |
| 31 | """ |
| 32 | _binding = report_binding |
| 33 | _binding_class = _binding.HeaderType |
| 34 | _namespace = 'http://docs.oasis-open.org/cti/ns/stix/report-1' |
| 35 | |
| 36 | title = fields.TypedField("Title") |
| 37 | descriptions = fields.TypedField("Description", type_=StructuredTextList) |
| 38 | short_descriptions = fields.TypedField("Short_Description", type_=StructuredTextList) |
| 39 | intents = VocabField("Intent", ReportIntent, multiple=True, key_name="intents") |
| 40 | handling = fields.TypedField("Handling", Marking) |
| 41 | information_source = fields.TypedField("Information_Source", InformationSource) |
| 42 | |
| 43 | def __init__(self, title=None, description=None, short_description=None, |
| 44 | handling=None, intents=None, information_source=None): |
| 45 | |
| 46 | super(Header, self).__init__() |
| 47 | |
| 48 | self.intents = intents |
| 49 | self.title = title |
| 50 | self.description = StructuredTextList(description) |
| 51 | self.short_description = StructuredTextList(short_description) |
| 52 | self.handling = handling |
| 53 | self.information_source = information_source |
| 54 | |
| 55 | @property |
| 56 | def description(self): |
| 57 | """A single description about the contents or purpose of this object. |
| 58 | |
| 59 | Default Value: ``None`` |
| 60 | |
| 61 | Note: |
| 62 | If this object has more than one description set, this will return |
| 63 | the description with the lowest ordinality value. |
| 64 | |
| 65 | Returns: |
| 66 | An instance of |
| 67 | :class:`.StructuredText` |
| 68 | |
| 69 | """ |
| 70 | return next(iter(self.descriptions or []), None) |