@@ -4514,6 +4514,105 @@ def import_playbook_with_http_info(self, file, **kwargs): # noqa: E501
4514
4514
_request_timeout = params .get ('_request_timeout' ),
4515
4515
collection_formats = collection_formats )
4516
4516
4517
+ def import_reputation_handler (self , file , ** kwargs ): # noqa: E501
4518
+ """Import a reputation type # noqa: E501
4519
+
4520
+ Import a reputation type to XSOAR # noqa: E501
4521
+ This method makes a synchronous HTTP request by default. To make an
4522
+ asynchronous HTTP request, please pass async_req=True
4523
+ >>> thread = api.import_reputation_handler(file, async_req=True)
4524
+ >>> result = thread.get()
4525
+
4526
+ :param async_req bool
4527
+ :param file file: file (required)
4528
+ :return: ReputationsWithErrors
4529
+ If the method is called asynchronously,
4530
+ returns the request thread.
4531
+ """
4532
+ kwargs ['_return_http_data_only' ] = True
4533
+ if kwargs .get ('async_req' ):
4534
+ return self .import_reputation_handler_with_http_info (file , ** kwargs ) # noqa: E501
4535
+ else :
4536
+ (data ) = self .import_reputation_handler_with_http_info (file , ** kwargs ) # noqa: E501
4537
+ return data
4538
+
4539
+ def import_reputation_handler_with_http_info (self , file , ** kwargs ): # noqa: E501
4540
+ """Import a reputation type # noqa: E501
4541
+
4542
+ Import a reputation type to XSOAR # noqa: E501
4543
+ This method makes a synchronous HTTP request by default. To make an
4544
+ asynchronous HTTP request, please pass async_req=True
4545
+ >>> thread = api.import_reputation_handler_with_http_info(file, async_req=True)
4546
+ >>> result = thread.get()
4547
+
4548
+ :param async_req bool
4549
+ :param file file: file (required)
4550
+ :return: ReputationsWithErrors
4551
+ If the method is called asynchronously,
4552
+ returns the request thread.
4553
+ """
4554
+
4555
+ all_params = ['file' ] # noqa: E501
4556
+ all_params .append ('async_req' )
4557
+ all_params .append ('_return_http_data_only' )
4558
+ all_params .append ('_preload_content' )
4559
+ all_params .append ('_request_timeout' )
4560
+
4561
+ params = locals ()
4562
+ for key , val in six .iteritems (params ['kwargs' ]):
4563
+ if key not in all_params :
4564
+ raise TypeError (
4565
+ "Got an unexpected keyword argument '%s'"
4566
+ " to method import_reputation_handler" % key
4567
+ )
4568
+ params [key ] = val
4569
+ del params ['kwargs' ]
4570
+ # verify the required parameter 'file' is set
4571
+ if ('file' not in params or
4572
+ params ['file' ] is None ):
4573
+ raise ValueError ("Missing the required parameter `file` when calling `import_reputation_handler`" ) # noqa: E501
4574
+
4575
+ collection_formats = {}
4576
+
4577
+ path_params = {}
4578
+
4579
+ query_params = []
4580
+
4581
+ header_params = {}
4582
+
4583
+ form_params = []
4584
+ local_var_files = {}
4585
+ if 'file' in params :
4586
+ local_var_files ['file' ] = params ['file' ] # noqa: E501
4587
+
4588
+ body_params = None
4589
+ # HTTP header `Accept`
4590
+ header_params ['Accept' ] = self .api_client .select_header_accept (
4591
+ ['application/json' ]) # noqa: E501
4592
+
4593
+ # HTTP header `Content-Type`
4594
+ header_params ['Content-Type' ] = self .api_client .select_header_content_type ( # noqa: E501
4595
+ ['multipart/form-data' ]) # noqa: E501
4596
+
4597
+ # Authentication setting
4598
+ auth_settings = ['api_key' , 'csrf_token' , 'x-xdr-auth-id' ] # noqa: E501
4599
+
4600
+ return self .api_client .call_api (
4601
+ '/reputation/import' , 'POST' ,
4602
+ path_params ,
4603
+ query_params ,
4604
+ header_params ,
4605
+ body = body_params ,
4606
+ post_params = form_params ,
4607
+ files = local_var_files ,
4608
+ response_type = 'ReputationsWithErrors' , # noqa: E501
4609
+ auth_settings = auth_settings ,
4610
+ async_req = params .get ('async_req' ),
4611
+ _return_http_data_only = params .get ('_return_http_data_only' ),
4612
+ _preload_content = params .get ('_preload_content' , True ),
4613
+ _request_timeout = params .get ('_request_timeout' ),
4614
+ collection_formats = collection_formats )
4615
+
4517
4616
def import_script (self , file , ** kwargs ): # noqa: E501
4518
4617
"""Upload an automation # noqa: E501
4519
4618
0 commit comments