geonode.geoserver.acl.gsauth_client.api_client

GeoServer ACL

GeoServer Access Control List API # noqa: E501

The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech

Classes

ApiClient

Generic API client for OpenAPI client library builds.

Module Contents

class geonode.geoserver.acl.gsauth_client.api_client.ApiClient(configuration=None, header_name=None, header_value=None, cookie=None, pool_threads=1)[source]

Bases: object

Generic API client for OpenAPI client library builds.

OpenAPI generic API client. This client handles the client- server communication, and is invariant across implementations. Specifics of the methods and models for each application are generated from the OpenAPI templates.

Note

This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually.

Parameters:
  • configuration – .Configuration object for this client

  • header_name – a header to pass when making calls to the API.

  • header_value – a header value to pass when making calls to the API.

  • cookie – a cookie to include in the header when making calls to the API

  • pool_threads – The number of threads to use for async requests to the API. More threads means more concurrent API requests.

PRIMITIVE_TYPES[source]
NATIVE_TYPES_MAPPING[source]
_pool = None[source]
configuration[source]
pool_threads[source]
rest_client[source]
default_headers[source]
cookie[source]
property user_agent[source]
User agent for this API client
client_side_validation[source]
__enter__()[source]
__exit__(exc_type, exc_value, traceback)[source]
close()[source]
property pool[source]
Create thread pool on first request
avoids instantiating unused threadpool for blocking clients.
set_default_header(header_name, header_value)[source]
__call_api(resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_types_map=None, auth_settings=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None, _host=None, _request_auth=None)[source]
sanitize_for_serialization(obj)[source]

Builds a JSON POST object.

If obj is None, return None. If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. If obj is list, sanitize each element in the list. If obj is dict, return the dict. If obj is OpenAPI model, return the properties dict.

Parameters:

obj – The data to serialize.

Returns:

The serialized form of data.

deserialize(response, response_type)[source]

Deserializes response into an object.

Parameters:
  • response – RESTResponse object to be deserialized.

  • response_type – class literal for deserialized object, or string of class name.

Returns:

deserialized object.

__deserialize(data, klass)[source]

Deserializes dict, list, str into an object.

Parameters:
  • data – dict, list or str.

  • klass – class literal, or string of class name.

Returns:

object.

call_api(resource_path, method, path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, response_types_map=None, auth_settings=None, async_req=None, _return_http_data_only=None, collection_formats=None, _preload_content=True, _request_timeout=None, _host=None, _request_auth=None)[source]

Makes the HTTP request (synchronous) and returns deserialized data.

To make an async_req request, set the async_req parameter.

Parameters:
  • resource_path – Path to method endpoint.

  • method – Method to call.

  • path_params – Path parameters in the url.

  • query_params – Query parameters in the url.

  • header_params – Header parameters to be placed in the request header.

  • body – Request body.

  • dict (files) – Request post form parameters, for application/x-www-form-urlencoded, multipart/form-data.

  • list (auth_settings) – Auth Settings names for the request.

  • response – Response data type.

  • dict – key -> filename, value -> filepath, for multipart/form-data.

  • bool (async_req) – execute request asynchronously

  • _return_http_data_only – response data without head status code and headers

  • collection_formats – dict of collection formats for path, query, header, and post parameters.

  • _preload_content – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _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.

  • _request_auth – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

If async_req parameter is True, the request will be called asynchronously. The method will return the request thread. If parameter async_req is False or missing, then the method will return the response directly.

request(method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, _request_timeout=None)[source]

Makes the HTTP request using RESTClient.

parameters_to_tuples(params, collection_formats)[source]

Get parameters as list of tuples, formatting collections.

Parameters:
  • params – Parameters as dict or list of two-tuples

  • collection_formats (dict) – Parameter collection formats

Returns:

Parameters as list of tuples, collections formatted

files_parameters(files=None)[source]

Builds form parameters.

Parameters:

files – File parameters.

Returns:

Form parameters with files.

select_header_accept(accepts)[source]

Returns Accept based on an array of accepts provided.

Parameters:

accepts – List of headers.

Returns:

Accept (e.g. application/json).

select_header_content_type(content_types, method=None, body=None)[source]

Returns Content-Type based on an array of content_types provided.

Parameters:
  • content_types – List of content-types.

  • method – http method (e.g. POST, PATCH).

  • body – http body to send.

Returns:

Content-Type (e.g. application/json).

update_params_for_auth(headers, queries, auth_settings, request_auth=None)[source]

Updates header and query params based on authentication setting.

Parameters:
  • headers – Header parameters dict to be updated.

  • queries – Query parameters tuple list to be updated.

  • auth_settings – Authentication setting identifiers list.

  • request_auth – if set, the provided settings will override the token in the configuration.

_apply_auth_params(headers, queries, auth_setting)[source]

Updates the request parameters based on a single auth_setting

Parameters:
  • headers – Header parameters dict to be updated.

  • queries – Query parameters tuple list to be updated.

  • auth_setting – auth settings for the endpoint

__deserialize_file(response)[source]

Deserializes body to file

Saves response body into a file in a temporary folder, using the filename from the Content-Disposition header if provided.

Parameters:

response – RESTResponse.

Returns:

file path.

__deserialize_primitive(data, klass)[source]

Deserializes string to primitive type.

Parameters:
  • data – str.

  • klass – class literal.

Returns:

int, long, float, str, bool.

__deserialize_object(value)[source]

Return an original value.

Returns:

object.

__deserialize_date(string)[source]

Deserializes string to date.

Parameters:

string – str.

Returns:

date.

__deserialize_datetime(string)[source]

Deserializes string to datetime.

The string should be in iso8601 datetime format.

Parameters:

string – str.

Returns:

datetime.

__deserialize_model(data, klass)[source]

Deserializes list or dict to model.

Parameters:
  • data – dict, list.

  • klass – class literal.

Returns:

model object.