# coding: utf-8

"""
    ORY Hydra

    Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from ory_hydra_client.configuration import Configuration


class URL(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 = {
        'force_query': 'bool',
        'fragment': 'str',
        'host': 'str',
        'opaque': 'str',
        'path': 'str',
        'raw_path': 'str',
        'raw_query': 'str',
        'scheme': 'str',
        'user': 'object'
    }

    attribute_map = {
        'force_query': 'ForceQuery',
        'fragment': 'Fragment',
        'host': 'Host',
        'opaque': 'Opaque',
        'path': 'Path',
        'raw_path': 'RawPath',
        'raw_query': 'RawQuery',
        'scheme': 'Scheme',
        'user': 'User'
    }

    def __init__(self, force_query=None, fragment=None, host=None, opaque=None, path=None, raw_path=None, raw_query=None, scheme=None, user=None, local_vars_configuration=None):  # noqa: E501
        """URL - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._force_query = None
        self._fragment = None
        self._host = None
        self._opaque = None
        self._path = None
        self._raw_path = None
        self._raw_query = None
        self._scheme = None
        self._user = None
        self.discriminator = None

        if force_query is not None:
            self.force_query = force_query
        if fragment is not None:
            self.fragment = fragment
        if host is not None:
            self.host = host
        if opaque is not None:
            self.opaque = opaque
        if path is not None:
            self.path = path
        if raw_path is not None:
            self.raw_path = raw_path
        if raw_query is not None:
            self.raw_query = raw_query
        if scheme is not None:
            self.scheme = scheme
        if user is not None:
            self.user = user

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

        force query  # noqa: E501

        :return: The force_query of this URL.  # noqa: E501
        :rtype: bool
        """
        return self._force_query

    @force_query.setter
    def force_query(self, force_query):
        """Sets the force_query of this URL.

        force query  # noqa: E501

        :param force_query: The force_query of this URL.  # noqa: E501
        :type: bool
        """

        self._force_query = force_query

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

        fragment  # noqa: E501

        :return: The fragment of this URL.  # noqa: E501
        :rtype: str
        """
        return self._fragment

    @fragment.setter
    def fragment(self, fragment):
        """Sets the fragment of this URL.

        fragment  # noqa: E501

        :param fragment: The fragment of this URL.  # noqa: E501
        :type: str
        """

        self._fragment = fragment

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

        host  # noqa: E501

        :return: The host of this URL.  # noqa: E501
        :rtype: str
        """
        return self._host

    @host.setter
    def host(self, host):
        """Sets the host of this URL.

        host  # noqa: E501

        :param host: The host of this URL.  # noqa: E501
        :type: str
        """

        self._host = host

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

        opaque  # noqa: E501

        :return: The opaque of this URL.  # noqa: E501
        :rtype: str
        """
        return self._opaque

    @opaque.setter
    def opaque(self, opaque):
        """Sets the opaque of this URL.

        opaque  # noqa: E501

        :param opaque: The opaque of this URL.  # noqa: E501
        :type: str
        """

        self._opaque = opaque

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

        path  # noqa: E501

        :return: The path of this URL.  # noqa: E501
        :rtype: str
        """
        return self._path

    @path.setter
    def path(self, path):
        """Sets the path of this URL.

        path  # noqa: E501

        :param path: The path of this URL.  # noqa: E501
        :type: str
        """

        self._path = path

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

        raw path  # noqa: E501

        :return: The raw_path of this URL.  # noqa: E501
        :rtype: str
        """
        return self._raw_path

    @raw_path.setter
    def raw_path(self, raw_path):
        """Sets the raw_path of this URL.

        raw path  # noqa: E501

        :param raw_path: The raw_path of this URL.  # noqa: E501
        :type: str
        """

        self._raw_path = raw_path

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

        raw query  # noqa: E501

        :return: The raw_query of this URL.  # noqa: E501
        :rtype: str
        """
        return self._raw_query

    @raw_query.setter
    def raw_query(self, raw_query):
        """Sets the raw_query of this URL.

        raw query  # noqa: E501

        :param raw_query: The raw_query of this URL.  # noqa: E501
        :type: str
        """

        self._raw_query = raw_query

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

        scheme  # noqa: E501

        :return: The scheme of this URL.  # noqa: E501
        :rtype: str
        """
        return self._scheme

    @scheme.setter
    def scheme(self, scheme):
        """Sets the scheme of this URL.

        scheme  # noqa: E501

        :param scheme: The scheme of this URL.  # noqa: E501
        :type: str
        """

        self._scheme = scheme

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

        Userinfo Userinfo Userinfo The Userinfo type is an immutable encapsulation of username and password details for a URL. An existing Userinfo value is guaranteed to have a username set (potentially empty, as allowed by RFC 2396), and optionally a password.  # noqa: E501

        :return: The user of this URL.  # noqa: E501
        :rtype: object
        """
        return self._user

    @user.setter
    def user(self, user):
        """Sets the user of this URL.

        Userinfo Userinfo Userinfo The Userinfo type is an immutable encapsulation of username and password details for a URL. An existing Userinfo value is guaranteed to have a username set (potentially empty, as allowed by RFC 2396), and optionally a password.  # noqa: E501

        :param user: The user of this URL.  # noqa: E501
        :type: object
        """

        self._user = user

    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, URL):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
