<s> import stix <EOL> from stix . common import vocabs , VocabString , StructuredTextList <EOL> import stix . bindings . incident as incident_binding <EOL> class NonPublicDataCompromised ( VocabString ) : <EOL> _namespace = "<STR_LIT>" <EOL> _binding = incident_binding <EOL> _binding_class = incident_binding . NonPublicDataCompromisedType <EOL> def __init__ ( self , value = None , data_encrypted = None ) : <EOL> self . data_encrypted = data_encrypted <EOL> super ( NonPublicDataCompromised , self ) . __init__ ( value ) <EOL> @ classmethod <EOL> def from_obj ( cls , obj , return_obj = None ) : <EOL> if not obj : <EOL> return None <EOL> if not return_obj : <EOL> return_obj = cls ( ) <EOL> super ( NonPublicDataCompromised , cls ) . from_obj ( obj , return_obj = return_obj ) <EOL> return_obj . data_encrypted = obj . data_encrypted <EOL> return return_obj <EOL> def to_obj ( self , return_obj = None , ns_info = None ) : <EOL> if not return_obj : <EOL> return_obj = self . _binding_class ( ) <EOL> super ( NonPublicDataCompromised , self ) . to_obj ( return_obj = return_obj , ns_info = ns_info ) <EOL> return_obj . data_encrypted = self . data_encrypted <EOL> return return_obj <EOL> @ classmethod <EOL> def from_dict ( cls , d , return_obj = None ) : <EOL> if not d : <EOL> return None <EOL> if not return_obj : <EOL> return_obj = cls ( ) <EOL> super ( NonPublicDataCompromised , cls ) . from_dict ( d , return_obj = return_obj ) <EOL> return_obj . data_encrypted = d . get ( '<STR_LIT>' ) <EOL> return return_obj <EOL> def is_plain ( self ) : <EOL> return False <EOL> def to_dict ( self ) : <EOL> d = super ( NonPublicDataCompromised , self ) . to_dict ( ) <EOL> if self . data_encrypted : <EOL> d [ '<STR_LIT>' ] = self . data_encrypted <EOL> return d <EOL> class PropertyAffected ( stix . Entity ) : <EOL> _namespace = "<STR_LIT>" <EOL> _binding = incident_binding <EOL> _binding_class = incident_binding . PropertyAffectedType <EOL> def __init__ ( self ) : <EOL> self . property_ = None <EOL> self . description_of_effect = None <EOL> self . type_of_availability_loss = None <EOL> self . duration_of_availability_loss = None <EOL> self . non_public_data_compromised = None <EOL> @ property <EOL> def property_ ( self ) : <EOL> return self . _property <EOL> @ property_ . setter <EOL> def property_ ( self , value ) : <EOL> self . _set_vocab ( vocabs . LossProperty , property = value ) <EOL> @ property <EOL> def description_of_effect ( self ) : <EOL> """<STR_LIT>""" <EOL> return next ( iter ( self . descriptions_of_effect ) , None ) <EOL> @ description_of_effect . setter <EOL> def description_of_effect ( self , value ) : <EOL> self . descriptions_of_effect = value <EOL> @ property <EOL> def descriptions_of_effect ( self ) : <EOL> return self . _description_of_effect <EOL> @ descriptions_of_effect . setter <EOL> def descriptions_of_effect ( self , value ) : <EOL> self . _description_of_effect = StructuredTextList ( value ) <EOL> @ property <EOL> def type_of_availability_loss ( self ) : <EOL> return self . _type_of_availability_loss <EOL> @ type_of_availability_loss . setter <EOL> def type_of_availability_loss ( self , value ) : <EOL> self . _set_vocab ( vocabs . AvailabilityLossType , type_of_availability_loss = value ) <EOL> @ property <EOL> def duration_of_availability_loss ( self ) : <EOL> return self . _duration_of_availability_loss <EOL> @ duration_of_availability_loss . setter <EOL> def duration_of_availability_loss ( self , value ) : <EOL> self . _set_vocab ( vocabs . LossDuration , duration_of_availability_loss = value ) <EOL> @ property <EOL> def non_public_data_compromised ( self ) : <EOL> return self . _non_public_data_compromised <EOL> @ non_public_data_compromised . setter <EOL> def non_public_data_compromised ( self , value ) : <EOL> self . _set_var ( NonPublicDataCompromised , non_public_data_compromised = value ) <EOL> @ classmethod <EOL> def from_obj ( cls , obj , return_obj = None ) : <EOL> if not obj : <EOL> return None <EOL> if not return_obj : <EOL> return_obj = cls ( ) <EOL> return_obj . property_ = VocabString . from_obj ( obj . Property ) <EOL> return_obj . descriptions_of_effect = StructuredTextList . from_obj ( obj . Description_Of_Effect ) <EOL> return_obj . type_of_availability_loss = VocabString . from_obj ( obj . Type_Of_Availability_Loss ) <EOL> return_obj . duration_of_availability_loss = VocabString . from_obj ( obj . Duration_Of_Availability_Loss ) <EOL> return_obj . non_public_data_compromised = NonPublicDataCompromised . from_obj ( obj . Non_Public_Data_Compromised ) <EOL> return return_obj <EOL> def to_obj ( self , return_obj = None , ns_info = None ) : <EOL> super ( PropertyAffected , self ) . to_obj ( return_obj = return_obj , ns_info = ns_info ) <EOL> if not return_obj : <EOL> return_obj = self . _binding_class ( ) <EOL> if self . property_ : <EOL> return_obj . Property = self . property_ . to_obj ( ns_info = ns_info ) <EOL> if self . descriptions_of_effect : <EOL> return_obj . Description_Of_Effect = self . descriptions_of_effect . to_obj ( ns_info = ns_info ) <EOL> if self . type_of_availability_loss : <EOL> return_obj . Type_Of_Availability_Loss = self . type_of_availability_loss . to_obj ( ns_info = ns_info ) <EOL> if self . duration_of_availability_loss : <EOL> return_obj . Duration_Of_Availability_Loss = self . duration_of_availability_loss . to_obj ( ns_info = ns_info ) <EOL> if self . non_public_data_compromised : <EOL> return_obj . Non_Public_Data_Compromised = self . non_public_data_compromised . to_obj ( ns_info = ns_info ) <EOL> return return_obj <EOL> @ classmethod <EOL> def from_dict ( cls , d , return_obj = None ) : <EOL> if not d : <EOL> return None <EOL> if not return_obj : <EOL> return_obj = cls ( ) <EOL> return_obj . property_ = VocabString . from_dict ( d . get ( '<STR_LIT>' ) ) <EOL> return_obj . descriptions_of_effect = StructuredTextList . from_dict ( d . get ( '<STR_LIT>' ) ) <EOL> return_obj . type_of_availability_loss = VocabString . from_dict ( d . get ( '<STR_LIT>' ) ) <EOL> return_obj . duration_of_availability_loss = VocabString . from_dict ( d . get ( '<STR_LIT>' ) ) <EOL> return_obj . non_public_data_compromised = NonPublicDataCompromised . from_dict ( d . get ( '<STR_LIT>' ) ) <EOL> return return_obj <EOL> def to_dict ( self ) : <EOL> return super ( PropertyAffected , self ) . to_dict ( ) </s>
