Source code for geonode.geoserver.acl.gsauth_client.models.access_request

# coding: utf-8

"""
    GeoServer ACL

    GeoServer Access Control List API  # noqa: E501

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


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from geonode.geoserver.acl.gsauth_client.configuration import Configuration


[docs] class AccessRequest(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """
[docs] openapi_types = { 'user': 'str', 'roles': 'list[str]', 'instance': 'str', 'source_address': 'str', 'service': 'str', 'request': 'str', 'subfield': 'str', 'workspace': 'str', 'layer': 'str' }
[docs] attribute_map = { 'user': 'user', 'roles': 'roles', 'instance': 'instance', 'source_address': 'sourceAddress', 'service': 'service', 'request': 'request', 'subfield': 'subfield', 'workspace': 'workspace', 'layer': 'layer' }
def __init__(self, user=None, roles=None, instance='*', source_address='*', service='*', request='*', subfield='*', workspace='*', layer='*', local_vars_configuration=None): # noqa: E501 """AccessRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy()
[docs] self.local_vars_configuration = local_vars_configuration
[docs] self._user = None
[docs] self._roles = None
[docs] self._instance = None
[docs] self._source_address = None
[docs] self._service = None
[docs] self._request = None
[docs] self._subfield = None
[docs] self._workspace = None
[docs] self._layer = None
[docs] self.discriminator = None
if user is not None: self.user = user self.roles = roles if instance is not None: self.instance = instance if source_address is not None: self.source_address = source_address if service is not None: self.service = service if request is not None: self.request = request if subfield is not None: self.subfield = subfield if workspace is not None: self.workspace = workspace if layer is not None: self.layer = layer @property
[docs] def user(self): """Gets the user of this AccessRequest. # noqa: E501 the authentication user name performing the request for which the authorization is being requested # noqa: E501 :return: The user of this AccessRequest. # noqa: E501 :rtype: str """ return self._user
@user.setter def user(self, user): """Sets the user of this AccessRequest. the authentication user name performing the request for which the authorization is being requested # noqa: E501 :param user: The user of this AccessRequest. # noqa: E501 :type user: str """ self._user = user @property
[docs] def roles(self): """Gets the roles of this AccessRequest. # noqa: E501 The roles the requesting user belongs to # noqa: E501 :return: The roles of this AccessRequest. # noqa: E501 :rtype: list[str] """ return self._roles
@roles.setter def roles(self, roles): """Sets the roles of this AccessRequest. The roles the requesting user belongs to # noqa: E501 :param roles: The roles of this AccessRequest. # noqa: E501 :type roles: list[str] """ self._roles = roles @property
[docs] def instance(self): """Gets the instance of this AccessRequest. # noqa: E501 :return: The instance of this AccessRequest. # noqa: E501 :rtype: str """ return self._instance
@instance.setter def instance(self, instance): """Sets the instance of this AccessRequest. :param instance: The instance of this AccessRequest. # noqa: E501 :type instance: str """ self._instance = instance @property
[docs] def source_address(self): """Gets the source_address of this AccessRequest. # noqa: E501 :return: The source_address of this AccessRequest. # noqa: E501 :rtype: str """ return self._source_address
@source_address.setter def source_address(self, source_address): """Sets the source_address of this AccessRequest. :param source_address: The source_address of this AccessRequest. # noqa: E501 :type source_address: str """ self._source_address = source_address @property
[docs] def service(self): """Gets the service of this AccessRequest. # noqa: E501 :return: The service of this AccessRequest. # noqa: E501 :rtype: str """ return self._service
@service.setter def service(self, service): """Sets the service of this AccessRequest. :param service: The service of this AccessRequest. # noqa: E501 :type service: str """ self._service = service @property
[docs] def request(self): """Gets the request of this AccessRequest. # noqa: E501 :return: The request of this AccessRequest. # noqa: E501 :rtype: str """ return self._request
@request.setter def request(self, request): """Sets the request of this AccessRequest. :param request: The request of this AccessRequest. # noqa: E501 :type request: str """ self._request = request @property
[docs] def subfield(self): """Gets the subfield of this AccessRequest. # noqa: E501 :return: The subfield of this AccessRequest. # noqa: E501 :rtype: str """ return self._subfield
@subfield.setter def subfield(self, subfield): """Sets the subfield of this AccessRequest. :param subfield: The subfield of this AccessRequest. # noqa: E501 :type subfield: str """ self._subfield = subfield @property
[docs] def workspace(self): """Gets the workspace of this AccessRequest. # noqa: E501 :return: The workspace of this AccessRequest. # noqa: E501 :rtype: str """ return self._workspace
@workspace.setter def workspace(self, workspace): """Sets the workspace of this AccessRequest. :param workspace: The workspace of this AccessRequest. # noqa: E501 :type workspace: str """ self._workspace = workspace @property
[docs] def layer(self): """Gets the layer of this AccessRequest. # noqa: E501 :return: The layer of this AccessRequest. # noqa: E501 :rtype: str """ return self._layer
@layer.setter def layer(self, layer): """Sets the layer of this AccessRequest. :param layer: The layer of this AccessRequest. # noqa: E501 :type layer: str """ self._layer = layer
[docs] def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} def convert(x): if hasattr(x, "to_dict"): args = getfullargspec(x.to_dict).args if len(args) == 1: return x.to_dict() else: return x.to_dict(serialize) else: return x for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) attr = self.attribute_map.get(attr, attr) if serialize else attr if isinstance(value, list): result[attr] = list(map( lambda x: convert(x), value )) elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], convert(item[1])), value.items() )) else: result[attr] = convert(value) return result
[docs] def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict())
[docs] def __repr__(self): """For `print` and `pprint`""" return self.to_str()
[docs] def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, AccessRequest): return False return self.to_dict() == other.to_dict()
[docs] def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, AccessRequest): return True return self.to_dict() != other.to_dict()