<s> import stix <EOL> import stix . bindings . incident as incident_binding <EOL> from stix . common import vocabs , VocabString <EOL> from . direct_impact_summary import DirectImpactSummary <EOL> from . indirect_impact_summary import IndirectImpactSummary <EOL> from . total_loss_estimation import TotalLossEstimation <EOL> class ImpactAssessment ( stix . Entity ) : <EOL> _namespace = "<STR_LIT>" <EOL> _binding = incident_binding <EOL> _binding_class = incident_binding . ImpactAssessmentType <EOL> def __init__ ( self ) : <EOL> super ( ImpactAssessment , self ) . __init__ ( ) <EOL> self . direct_impact_summary = None <EOL> self . indirect_impact_summary = None <EOL> self . total_loss_estimation = None <EOL> self . impact_qualification = None <EOL> self . effects = None <EOL> @ property <EOL> def effects ( self ) : <EOL> return self . _effects <EOL> @ effects . setter <EOL> def effects ( self , value ) : <EOL> self . _effects = Effects ( value ) <EOL> def add_effect ( self , value ) : <EOL> self . effects . append ( value ) <EOL> @ property <EOL> def direct_impact_summary ( self ) : <EOL> return self . _direct_impact_summary <EOL> @ direct_impact_summary . setter <EOL> def direct_impact_summary ( self , value ) : <EOL> self . _set_var ( DirectImpactSummary , try_cast = False , direct_impact_summary = value ) <EOL> @ property <EOL> def indirect_impact_summary ( self ) : <EOL> return self . _indirect_impact_summary <EOL> @ indirect_impact_summary . setter <EOL> def indirect_impact_summary ( self , value ) : <EOL> self . _set_var ( IndirectImpactSummary , try_cast = False , indirect_impact_summary = value ) <EOL> @ property <EOL> def total_loss_estimation ( self ) : <EOL> return self . _total_loss_estimation <EOL> @ total_loss_estimation . setter <EOL> def total_loss_estimation ( self , value ) : <EOL> self . _set_var ( TotalLossEstimation , try_cast = False , total_loss_estimation = value ) <EOL> @ property <EOL> def impact_qualification ( self ) : <EOL> return self . _impact_qualification <EOL> @ impact_qualification . setter <EOL> def impact_qualification ( self , value ) : <EOL> self . _set_vocab ( vocabs . ImpactQualification , impact_qualification = value ) <EOL> def to_obj ( self , return_obj = None , ns_info = None ) : <EOL> super ( ImpactAssessment , self ) . to_obj ( return_obj = return_obj , ns_info = ns_info ) <EOL> obj = self . _binding_class ( ) <EOL> if self . direct_impact_summary : <EOL> obj . Direct_Impact_Summary = self . direct_impact_summary . to_obj ( ns_info = ns_info ) <EOL> if self . indirect_impact_summary : <EOL> obj . Indirect_Impact_Summary = self . indirect_impact_summary . to_obj ( ns_info = ns_info ) <EOL> if self . total_loss_estimation : <EOL> obj . Total_Loss_Estimation = self . total_loss_estimation . to_obj ( ns_info = ns_info ) <EOL> if self . impact_qualification : <EOL> obj . Impact_Qualification = self . impact_qualification . to_obj ( ns_info = ns_info ) <EOL> if self . effects : <EOL> obj . Effects = self . effects . to_obj ( ns_info = ns_info ) <EOL> return obj <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 . direct_impact_summary = DirectImpactSummary . from_obj ( obj . Direct_Impact_Summary ) <EOL> return_obj . indirect_impact_summary = IndirectImpactSummary . from_obj ( obj . Indirect_Impact_Summary ) <EOL> return_obj . total_loss_estimation = TotalLossEstimation . from_obj ( obj . Total_Loss_Estimation ) <EOL> return_obj . impact_qualification = VocabString . from_obj ( obj . Impact_Qualification ) <EOL> return_obj . effects = Effects . from_obj ( obj . Effects ) <EOL> return return_obj <EOL> def to_dict ( self ) : <EOL> return super ( ImpactAssessment , self ) . to_dict ( ) <EOL> @ classmethod <EOL> def from_dict ( cls , dict_repr , return_obj = None ) : <EOL> if not dict_repr : <EOL> return None <EOL> if not return_obj : <EOL> return_obj = cls ( ) <EOL> get = dict_repr . get <EOL> return_obj . direct_impact_summary = DirectImpactSummary . from_dict ( get ( '<STR_LIT>' ) ) <EOL> return_obj . indirect_impact_summary = IndirectImpactSummary . from_dict ( get ( '<STR_LIT>' ) ) <EOL> return_obj . total_loss_estimation = TotalLossEstimation . from_dict ( get ( '<STR_LIT>' ) ) <EOL> return_obj . impact_qualification = VocabString . from_dict ( get ( '<STR_LIT>' ) ) <EOL> return_obj . effects = Effects . from_dict ( get ( '<STR_LIT>' ) ) <EOL> return return_obj <EOL> class Effects ( stix . EntityList ) : <EOL> _namespace = "<STR_LIT>" <EOL> _contained_type = VocabString <EOL> _binding = incident_binding <EOL> _binding_class = _binding . EffectsType <EOL> _inner_name = "<STR_LIT>" <EOL> _binding_var = "<STR_LIT>" <EOL> _dict_as_list = True <EOL> def _fix_value ( self , value ) : <EOL> return vocabs . IncidentEffect ( value = value ) </s>
