| 65 | |
| 66 | |
| 67 | class Sightings(stix.EntityList): |
| 68 | _namespace = "http://docs.oasis-open.org/cti/ns/stix/indicator-1" |
| 69 | _binding = indicator_binding |
| 70 | _binding_class = _binding.SightingsType |
| 71 | |
| 72 | sightings_count = fields.TypedField("sightings_count") |
| 73 | sighting = fields.TypedField("Sighting", Sighting, multiple=True, key_name="sightings") |
| 74 | |
| 75 | def __init__(self, sightings_count=None, *args): |
| 76 | super(Sightings, self).__init__(*args) |
| 77 | self.sightings_count = sightings_count |
| 78 | |
| 79 | def __nonzero__(self): |
| 80 | return super(Sightings, self).__nonzero__() or (self.sightings_count is not None) |
| 81 | |
| 82 | |
| 83 | class RelatedObservables(GenericRelationshipList): |