def __init__(self, action_id, bart_id, id, org_id, result, runbook_instance_id, *args, **kwargs): # noqa: E501 """ActionMetadata - a model defined in OpenAPI Args: action_id (str): bart_id (str): id (str): org_id (str): result (str): runbook_instance_id (str): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. Defaults to True _path_to_item (tuple/list): This is a list of keys or values to drill down to the model in received_data when deserializing a response _spec_property_naming (bool): True if the variable names in the input data are serialized names, as specified in the OpenAPI document. False if the variable names in the input data are pythonic names, e.g. snake case (default) _configuration (Configuration): the instance to use when deserializing a file_type parameter. If passed, type conversion is attempted If omitted no type conversion is done. _visited_composed_classes (tuple): This stores a tuple of classes that we have traveled through so that if we see that class again we will not use its discriminator again. When traveling through a discriminator, the composed schema that is is traveled through is added to this set. For example if Animal has a discriminator petType and we pass in "Dog", and the class Dog allOf includes Animal, we move through Animal once using the discriminator, and pick Dog. Then in Dog, we will make an instance of the Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) artifacts_status (str, none_type): [optional] # noqa: E501 completed (datetime, none_type): [optional] # noqa: E501 config_hash (str, none_type): [optional] # noqa: E501 created (datetime, none_type): [optional] # noqa: E501 deleted (bool, none_type): [optional] # noqa: E501 description (str, none_type): [optional] # noqa: E501 description_id (str, none_type): [optional] # noqa: E501 display_name (str, none_type): [optional] # noqa: E501 dst_email ([str], none_type): [optional] # noqa: E501 dst_host ([str], none_type): [optional] # noqa: E501 dst_ip ([str], none_type): [optional] # noqa: E501 dst_mac ([str], none_type): [optional] # noqa: E501 dst_misc ([str], none_type): [optional] # noqa: E501 dst_network ([str], none_type): [optional] # noqa: E501 dst_path ([str], none_type): [optional] # noqa: E501 dst_port ([int], none_type): [optional] # noqa: E501 implant_id (str, none_type): [optional] # noqa: E501 implant_nick (str, none_type): [optional] # noqa: E501 implant_uid (str, none_type): [optional] # noqa: E501 mitre_techniques ([str], none_type): [optional] # noqa: E501 name (str, none_type): [optional] # noqa: E501 perspective_metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 randori_notes (str, none_type): [optional] # noqa: E501 result_hash (str, none_type): [optional] # noqa: E501 src_email ([str], none_type): [optional] # noqa: E501 src_host ([str], none_type): [optional] # noqa: E501 src_ip ([str], none_type): [optional] # noqa: E501 src_mac ([str], none_type): [optional] # noqa: E501 src_misc ([str], none_type): [optional] # noqa: E501 stability (int, none_type): [optional] # noqa: E501 started (datetime, none_type): [optional] # noqa: E501 stealth (int, none_type): [optional] # noqa: E501 summary_sha (str, none_type): [optional] # noqa: E501 template (str, none_type): [optional] # noqa: E501 trigger ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 updated (datetime, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: for arg in args: if isinstance(arg, dict): kwargs.update(arg) else: raise ApiTypeError( "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), path_to_item=_path_to_item, valid_classes=(self.__class__, ), ) self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming self._path_to_item = _path_to_item self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + ( self.__class__, ) self.action_id = action_id self.bart_id = bart_id self.id = id self.org_id = org_id self.result = result self.runbook_instance_id = runbook_instance_id for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: raise ApiAttributeError( f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " f"class with read only attributes.")
def _from_openapi_data(cls, tt_max, tt_min, tt_range_name, *args, **kwargs): # noqa: E501 """TargetTemptationRange - a model defined in OpenAPI Args: tt_max (int): Inclusive of provided value tt_min (int): Inclusive of provided value tt_range_name (str): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. Defaults to True _path_to_item (tuple/list): This is a list of keys or values to drill down to the model in received_data when deserializing a response _spec_property_naming (bool): True if the variable names in the input data are serialized names, as specified in the OpenAPI document. False if the variable names in the input data are pythonic names, e.g. snake case (default) _configuration (Configuration): the instance to use when deserializing a file_type parameter. If passed, type conversion is attempted If omitted no type conversion is done. _visited_composed_classes (tuple): This stores a tuple of classes that we have traveled through so that if we see that class again we will not use its discriminator again. When traveling through a discriminator, the composed schema that is is traveled through is added to this set. For example if Animal has a discriminator petType and we pass in "Dog", and the class Dog allOf includes Animal, we move through Animal once using the discriminator, and pick Dog. Then in Dog, we will make an instance of the Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) """ _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', True) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: for arg in args: if isinstance(arg, dict): kwargs.update(arg) else: raise ApiTypeError( "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), path_to_item=_path_to_item, valid_classes=(self.__class__,), ) self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming self._path_to_item = _path_to_item self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.tt_max = tt_max self.tt_min = tt_min self.tt_range_name = tt_range_name for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self
def __init__(self, *args, **kwargs): # noqa: E501 """NetworkPatchInputData - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. Defaults to True _path_to_item (tuple/list): This is a list of keys or values to drill down to the model in received_data when deserializing a response _spec_property_naming (bool): True if the variable names in the input data are serialized names, as specified in the OpenAPI document. False if the variable names in the input data are pythonic names, e.g. snake case (default) _configuration (Configuration): the instance to use when deserializing a file_type parameter. If passed, type conversion is attempted If omitted no type conversion is done. _visited_composed_classes (tuple): This stores a tuple of classes that we have traveled through so that if we see that class again we will not use its discriminator again. When traveling through a discriminator, the composed schema that is is traveled through is added to this set. For example if Animal has a discriminator petType and we pass in "Dog", and the class Dog allOf includes Animal, we move through Animal once using the discriminator, and pick Dog. Then in Dog, we will make an instance of the Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) affiliation_state (str): [optional] # noqa: E501 impact_score (str): [optional] # noqa: E501 status (str): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: for arg in args: if isinstance(arg, dict): kwargs.update(arg) else: raise ApiTypeError( "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), path_to_item=_path_to_item, valid_classes=(self.__class__, ), ) self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming self._path_to_item = _path_to_item self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + ( self.__class__, ) constant_args = { '_check_type': _check_type, '_path_to_item': _path_to_item, '_spec_property_naming': _spec_property_naming, '_configuration': _configuration, '_visited_composed_classes': self._visited_composed_classes, } composed_info = validate_get_composed_info(constant_args, kwargs, self) self._composed_instances = composed_info[0] self._var_name_to_model_instances = composed_info[1] self._additional_properties_model_instances = composed_info[2] discarded_args = composed_info[3] for var_name, var_value in kwargs.items(): if var_name in discarded_args and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ self._additional_properties_model_instances: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: raise ApiAttributeError( f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " f"class with read only attributes.")
def __init__(self, id, org_id, *args, **kwargs): # noqa: E501 """Target - a model defined in OpenAPI Args: id (str): org_id (str): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. Defaults to True _path_to_item (tuple/list): This is a list of keys or values to drill down to the model in received_data when deserializing a response _spec_property_naming (bool): True if the variable names in the input data are serialized names, as specified in the OpenAPI document. False if the variable names in the input data are pythonic names, e.g. snake case (default) _configuration (Configuration): the instance to use when deserializing a file_type parameter. If passed, type conversion is attempted If omitted no type conversion is done. _visited_composed_classes (tuple): This stores a tuple of classes that we have traveled through so that if we see that class again we will not use its discriminator again. When traveling through a discriminator, the composed schema that is is traveled through is added to this set. For example if Animal has a discriminator petType and we pass in "Dog", and the class Dog allOf includes Animal, we move through Animal once using the discriminator, and pick Dog. Then in Dog, we will make an instance of the Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) affiliation_state (str): [optional] # noqa: E501 applicability (int, none_type): [optional] # noqa: E501 attack_note (str, none_type): [optional] # noqa: E501 authorization_state (str): [optional] # noqa: E501 confidence (int): [optional] # noqa: E501 cpe ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 criticality (int, none_type): [optional] # noqa: E501 deleted (bool): [optional] # noqa: E501 description (str, none_type): [optional] # noqa: E501 enumerability (int, none_type): [optional] # noqa: E501 first_seen (datetime): [optional] # noqa: E501 impact_score (str): [optional] # noqa: E501 last_seen (datetime): [optional] # noqa: E501 lens_id (str): [optional] # noqa: E501 lens_view (str): [optional] # noqa: E501 name (str): [optional] # noqa: E501 perspective (str): [optional] # noqa: E501 perspective_name (str): [optional] # noqa: E501 post_exploit (int, none_type): [optional] # noqa: E501 priority_impact_factor (float): [optional] # noqa: E501 priority_score (float): [optional] # noqa: E501 priority_status_factor (float): [optional] # noqa: E501 priority_tags_factor (float): [optional] # noqa: E501 private_weakness (int, none_type): [optional] # noqa: E501 public_weakness (int, none_type): [optional] # noqa: E501 randori_notes (str, none_type): [optional] # noqa: E501 reference (str, none_type): [optional] # noqa: E501 research (int, none_type): [optional] # noqa: E501 service_id (str): [optional] # noqa: E501 status (str): [optional] # noqa: E501 tags ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 target_temptation (int, none_type): [optional] # noqa: E501 tech_category ([str], none_type): [optional] # noqa: E501 temptation_last_modified (datetime): [optional] # noqa: E501 vendor (str, none_type): [optional] # noqa: E501 version (str, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: for arg in args: if isinstance(arg, dict): kwargs.update(arg) else: raise ApiTypeError( "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), path_to_item=_path_to_item, valid_classes=(self.__class__, ), ) self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming self._path_to_item = _path_to_item self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + ( self.__class__, ) self.id = id self.org_id = org_id for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: raise ApiAttributeError( f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " f"class with read only attributes.")