def get_terminal_audit_log_by_moid_with_http_info(self, moid, **kwargs): # noqa: E501 """Read a 'terminal.AuditLog' resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_terminal_audit_log_by_moid_with_http_info(moid, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str moid: The unique Moid identifier of a resource instance. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(TerminalAuditLog, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['moid'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_terminal_audit_log_by_moid" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'moid' is set if self.api_client.client_side_validation and ( 'moid' not in local_var_params or # noqa: E501 local_var_params['moid'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `moid` when calling `get_terminal_audit_log_by_moid`" ) # noqa: E501 collection_formats = {} path_params = {} if 'moid' in local_var_params: path_params['Moid'] = local_var_params['moid'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept([ 'application/json', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ]) # noqa: E501 # Authentication setting auth_settings = ['cookieAuth', 'oAuth2'] # noqa: E501 return self.api_client.call_api( '/terminal/AuditLogs/{Moid}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TerminalAuditLog', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def update_sdcard_policy_with_http_info(self, moid, sdcard_policy, **kwargs): # noqa: E501 """Update a 'sdcard.Policy' resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_sdcard_policy_with_http_info(moid, sdcard_policy, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str moid: The unique Moid identifier of a resource instance. (required) :param SdcardPolicy sdcard_policy: The 'sdcard.Policy' resource to update. (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(SdcardPolicy, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['moid', 'sdcard_policy'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method update_sdcard_policy" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'moid' is set if self.api_client.client_side_validation and ( 'moid' not in local_var_params or # noqa: E501 local_var_params['moid'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `moid` when calling `update_sdcard_policy`" ) # noqa: E501 # verify the required parameter 'sdcard_policy' is set if self.api_client.client_side_validation and ( 'sdcard_policy' not in local_var_params or # noqa: E501 local_var_params['sdcard_policy'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `sdcard_policy` when calling `update_sdcard_policy`" ) # noqa: E501 collection_formats = {} path_params = {} if 'moid' in local_var_params: path_params['Moid'] = local_var_params['moid'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'sdcard_policy' in local_var_params: body_params = local_var_params['sdcard_policy'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json', 'application/json-patch+json']) # noqa: E501 # Authentication setting auth_settings = ['cookieAuth', 'oAuth2'] # noqa: E501 return self.api_client.call_api( '/sdcard/Policies/{Moid}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='SdcardPolicy', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def get_terminal_audit_log_list_with_http_info(self, **kwargs): # noqa: E501 """Read a 'terminal.AuditLog' resource. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_terminal_audit_log_list_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str filter: Filter criteria for the resources to return. A URI with a $filter query option identifies a subset of the entries from the Collection of Entries. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the $filter option. The expression language that is used in $filter queries supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false). :param str orderby: Determines what properties are used to sort the collection of resources. :param int top: Specifies the maximum number of resources to return in the response. :param int skip: Specifies the number of resources to skip in the response. :param str select: Specifies a subset of properties to return. :param str expand: Specify additional attributes or related resources to return in addition to the primary resources. :param str apply: Specify one or more transformation operations to perform aggregation on the resources. The transformations are processed in order with the output from a transformation being used as input for the subsequent transformation. The \"$apply\" query takes a sequence of set transformations, separated by forward slashes to express that they are consecutively applied, i.e. the result of each transformation is the input to the next transformation. Supported aggregation methods are \"aggregate\" and \"groupby\". The **aggregate** transformation takes a comma-separated list of one or more aggregate expressions as parameters and returns a result set with a single instance, representing the aggregated value for all instances in the input set. The **groupby** transformation takes one or two parameters and 1. Splits the initial set into subsets where all instances in a subset have the same values for the grouping properties specified in the first parameter, 2. Applies set transformations to each subset according to the second parameter, resulting in a new set of potentially different structure and cardinality, 3. Ensures that the instances in the result set contain all grouping properties with the correct values for the group, 4. Concatenates the intermediate result sets into one result set. A groupby transformation affects the structure of the result set. :param bool count: The $count query specifies the service should return the count of the matching resources, instead of returning the resources. :param str inlinecount: The $inlinecount query option allows clients to request an inline count of the matching resources included with the resources in the response. :param str at: Similar to \"$filter\", but \"at\" is specifically used to filter versioning information properties for resources to return. A URI with an \"at\" Query Option identifies a subset of the Entries from the Collection of Entries identified by the Resource Path section of the URI. The subset is determined by selecting only the Entries that satisfy the predicate expression specified by the query option. The expression language that is used in at operators supports references to properties and literals. The literal values can be strings enclosed in single quotes, numbers and boolean values (true or false) or any of the additional literal representations shown in the Abstract Type System section. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(TerminalAuditLogList, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'filter', 'orderby', 'top', 'skip', 'select', 'expand', 'apply', 'count', 'inlinecount', 'at' ] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_terminal_audit_log_list" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'filter' in local_var_params and local_var_params[ 'filter'] is not None: # noqa: E501 query_params.append( ('$filter', local_var_params['filter'])) # noqa: E501 if 'orderby' in local_var_params and local_var_params[ 'orderby'] is not None: # noqa: E501 query_params.append( ('$orderby', local_var_params['orderby'])) # noqa: E501 if 'top' in local_var_params and local_var_params[ 'top'] is not None: # noqa: E501 query_params.append( ('$top', local_var_params['top'])) # noqa: E501 if 'skip' in local_var_params and local_var_params[ 'skip'] is not None: # noqa: E501 query_params.append( ('$skip', local_var_params['skip'])) # noqa: E501 if 'select' in local_var_params and local_var_params[ 'select'] is not None: # noqa: E501 query_params.append( ('$select', local_var_params['select'])) # noqa: E501 if 'expand' in local_var_params and local_var_params[ 'expand'] is not None: # noqa: E501 query_params.append( ('$expand', local_var_params['expand'])) # noqa: E501 if 'apply' in local_var_params and local_var_params[ 'apply'] is not None: # noqa: E501 query_params.append( ('$apply', local_var_params['apply'])) # noqa: E501 if 'count' in local_var_params and local_var_params[ 'count'] is not None: # noqa: E501 query_params.append( ('$count', local_var_params['count'])) # noqa: E501 if 'inlinecount' in local_var_params and local_var_params[ 'inlinecount'] is not None: # noqa: E501 query_params.append( ('$inlinecount', local_var_params['inlinecount'])) # noqa: E501 if 'at' in local_var_params and local_var_params[ 'at'] is not None: # noqa: E501 query_params.append(('at', local_var_params['at'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept([ 'application/json', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ]) # noqa: E501 # Authentication setting auth_settings = ['cookieAuth', 'oAuth2'] # noqa: E501 return self.api_client.call_api( '/terminal/AuditLogs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='TerminalAuditLogList', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def call_with_http_info(self, **kwargs): try: index = self.api_client.configuration.server_operation_index.get( self.settings['operation_id'], self.api_client.configuration.server_index ) if kwargs['_host_index'] is None else kwargs['_host_index'] server_variables = self.api_client.configuration.server_operation_variables.get( self.settings['operation_id'], self.api_client.configuration.server_variables) _host = self.api_client.configuration.get_host_from_settings( index, variables=server_variables, servers=self.settings['servers']) except IndexError: if self.settings['servers']: raise ApiValueError( "Invalid host index. Must be 0 <= index < %s" % len(self.settings['servers'])) _host = None for key, value in kwargs.items(): if key not in self.params_map['all']: raise ApiTypeError("Got an unexpected parameter '%s'" " to method `%s`" % (key, self.settings['operation_id'])) # only throw this nullable ApiValueError if _check_input_type # is False, if _check_input_type==True we catch this case # in self.__validate_inputs if (key not in self.params_map['nullable'] and value is None and kwargs['_check_input_type'] is False): raise ApiValueError( "Value may not be None for non-nullable parameter `%s`" " when calling `%s`" % (key, self.settings['operation_id'])) for key in self.params_map['required']: if key not in kwargs.keys(): raise ApiValueError( "Missing the required parameter `%s` when calling " "`%s`" % (key, self.settings['operation_id'])) self.__validate_inputs(kwargs) params = self.__gather_params(kwargs) accept_headers_list = self.headers_map['accept'] if accept_headers_list: params['header']['Accept'] = self.api_client.select_header_accept( accept_headers_list) if kwargs.get('_content_type'): params['header']['Content-Type'] = kwargs['_content_type'] else: content_type_headers_list = self.headers_map['content_type'] if content_type_headers_list: if params['body'] != "": content_types_list = self.api_client.select_header_content_type( content_type_headers_list, self.settings['http_method'], params['body']) if content_types_list: params['header']['Content-Type'] = content_types_list return self.api_client.call_api( self.settings['endpoint_path'], self.settings['http_method'], params['path'], params['query'], params['header'], body=params['body'], post_params=params['form'], files=params['file'], response_type=self.settings['response_type'], auth_settings=self.settings['auth'], async_req=kwargs['async_req'], _check_type=kwargs['_check_return_type'], _return_http_data_only=kwargs['_return_http_data_only'], _preload_content=kwargs['_preload_content'], _request_timeout=kwargs['_request_timeout'], _host=_host, _request_auths=kwargs['_request_auths'], collection_formats=params['collection_format'])