# coding: utf-8

"""
    VNS3 Controller API

    Cohesive networks VNS3 API providing complete control of your network's addresses, routes, rules and edge  # noqa: E501

    The version of the OpenAPI document: 4.8
    Contact: solutions@cohesive.net
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class AccessUrl(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.
    """
    openapi_types = {
        "id": "int",
        "url": "str",
        "created_at": "datetime",
        "created_ip": "str",
        "description": "str",
        "expires_at": "datetime",
        "lifetime": "str",
        "expired": "bool",
        "last_access_at": "datetime",
        "last_accessed_ip": "str",
    }

    attribute_map = {
        "id": "id",
        "url": "url",
        "created_at": "created_at",
        "created_ip": "created_ip",
        "description": "description",
        "expires_at": "expires_at",
        "lifetime": "lifetime",
        "expired": "expired",
        "last_access_at": "last_access_at",
        "last_accessed_ip": "last_accessed_ip",
    }

    def __init__(
        self,
        id=None,
        url=None,
        created_at=None,
        created_ip=None,
        description=None,
        expires_at=None,
        lifetime=None,
        expired=None,
        last_access_at=None,
        last_accessed_ip=None,
    ):  # noqa: E501
        """AccessUrl - a model defined in OpenAPI"""  # noqa: E501

        self._id = None
        self._url = None
        self._created_at = None
        self._created_ip = None
        self._description = None
        self._expires_at = None
        self._lifetime = None
        self._expired = None
        self._last_access_at = None
        self._last_accessed_ip = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if url is not None:
            self.url = url
        if created_at is not None:
            self.created_at = created_at
        if created_ip is not None:
            self.created_ip = created_ip
        if description is not None:
            self.description = description
        if expires_at is not None:
            self.expires_at = expires_at
        if lifetime is not None:
            self.lifetime = lifetime
        if expired is not None:
            self.expired = expired
        if last_access_at is not None:
            self.last_access_at = last_access_at
        if last_accessed_ip is not None:
            self.last_accessed_ip = last_accessed_ip

    @property
    def id(self):
        """Gets the id of this AccessUrl.  # noqa: E501


        :return: The id of this AccessUrl.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this AccessUrl.


        :param id: The id of this AccessUrl.  # noqa: E501
        :type: int
        """

        self._id = id

    @property
    def url(self):
        """Gets the url of this AccessUrl.  # noqa: E501


        :return: The url of this AccessUrl.  # noqa: E501
        :rtype: str
        """
        return self._url

    @url.setter
    def url(self, url):
        """Sets the url of this AccessUrl.


        :param url: The url of this AccessUrl.  # noqa: E501
        :type: str
        """

        self._url = url

    @property
    def created_at(self):
        """Gets the created_at of this AccessUrl.  # noqa: E501


        :return: The created_at of this AccessUrl.  # noqa: E501
        :rtype: str
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this AccessUrl.


        :param created_at: The created_at of this AccessUrl.  # noqa: E501
        :type: str
        """

        self._created_at = created_at

    @property
    def created_ip(self):
        """Gets the created_ip of this AccessUrl.  # noqa: E501


        :return: The created_ip of this AccessUrl.  # noqa: E501
        :rtype: str
        """
        return self._created_ip

    @created_ip.setter
    def created_ip(self, created_ip):
        """Sets the created_ip of this AccessUrl.


        :param created_ip: The created_ip of this AccessUrl.  # noqa: E501
        :type: str
        """

        self._created_ip = created_ip

    @property
    def description(self):
        """Gets the description of this AccessUrl.  # noqa: E501


        :return: The description of this AccessUrl.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this AccessUrl.


        :param description: The description of this AccessUrl.  # noqa: E501
        :type: str
        """

        self._description = description

    @property
    def expires_at(self):
        """Gets the expires_at of this AccessUrl.  # noqa: E501


        :return: The expires_at of this AccessUrl.  # noqa: E501
        :rtype: int
        """
        return self._expires_at

    @expires_at.setter
    def expires_at(self, expires_at):
        """Sets the expires_at of this AccessUrl.


        :param expires_at: The expires_at of this AccessUrl.  # noqa: E501
        :type: int
        """

        self._expires_at = expires_at

    @property
    def lifetime(self):
        """Gets the lifetime of this AccessUrl.  # noqa: E501


        :return: The lifetime of this AccessUrl.  # noqa: E501
        :rtype: str
        """
        return self._lifetime

    @lifetime.setter
    def lifetime(self, lifetime):
        """Sets the lifetime of this AccessUrl.


        :param lifetime: The lifetime of this AccessUrl.  # noqa: E501
        :type: str
        """

        self._lifetime = lifetime

    @property
    def expired(self):
        """Gets the expired of this AccessUrl.  # noqa: E501


        :return: The expired of this AccessUrl.  # noqa: E501
        :rtype: bool
        """
        return self._expired

    @expired.setter
    def expired(self, expired):
        """Sets the expired of this AccessUrl.


        :param expired: The expired of this AccessUrl.  # noqa: E501
        :type: bool
        """

        self._expired = expired

    @property
    def last_access_at(self):
        """Gets the last_access_at of this AccessUrl.  # noqa: E501


        :return: The last_access_at of this AccessUrl.  # noqa: E501
        :rtype: str
        """
        return self._last_access_at

    @last_access_at.setter
    def last_access_at(self, last_access_at):
        """Sets the last_access_at of this AccessUrl.


        :param last_access_at: The last_access_at of this AccessUrl.  # noqa: E501
        :type: str
        """

        self._last_access_at = last_access_at

    @property
    def last_accessed_ip(self):
        """Gets the last_accessed_ip of this AccessUrl.  # noqa: E501


        :return: The last_accessed_ip of this AccessUrl.  # noqa: E501
        :rtype: str
        """
        return self._last_accessed_ip

    @last_accessed_ip.setter
    def last_accessed_ip(self, last_accessed_ip):
        """Sets the last_accessed_ip of this AccessUrl.


        :param last_accessed_ip: The last_accessed_ip of this AccessUrl.  # noqa: E501
        :type: str
        """

        self._last_accessed_ip = last_accessed_ip

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(
                    map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)
                )
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(
                    map(
                        lambda item: (item[0], item[1].to_dict())
                        if hasattr(item[1], "to_dict")
                        else item,
                        value.items(),
                    )
                )
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, AccessUrl):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
