# coding: utf-8

"""
    Python client for GIG based clouds (pc4g)

    RESTful api client to a GIG based cloud.  # noqa: E501

    OpenAPI spec version: v1.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from pc4g.configuration import Configuration


class ReverseProxyFrontEnd(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'domain': 'str',
        'http_port': 'int',
        'https_port': 'int',
        'scheme': 'str',
        'letsencrypt': 'LetsEncrypt'
    }

    attribute_map = {
        'domain': 'domain',
        'http_port': 'http_port',
        'https_port': 'https_port',
        'scheme': 'scheme',
        'letsencrypt': 'letsencrypt'
    }

    def __init__(self, domain=None, http_port=None, https_port=None, scheme=None, letsencrypt=None, _configuration=None):  # noqa: E501
        """ReverseProxyFrontEnd - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._domain = None
        self._http_port = None
        self._https_port = None
        self._scheme = None
        self._letsencrypt = None
        self.discriminator = None

        if domain is not None:
            self.domain = domain
        if http_port is not None:
            self.http_port = http_port
        if https_port is not None:
            self.https_port = https_port
        if scheme is not None:
            self.scheme = scheme
        if letsencrypt is not None:
            self.letsencrypt = letsencrypt

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

        Domain that reverse proxy should match  # noqa: E501

        :return: The domain of this ReverseProxyFrontEnd.  # noqa: E501
        :rtype: str
        """
        return self._domain

    @domain.setter
    def domain(self, domain):
        """Sets the domain of this ReverseProxyFrontEnd.

        Domain that reverse proxy should match  # noqa: E501

        :param domain: The domain of this ReverseProxyFrontEnd.  # noqa: E501
        :type: str
        """

        self._domain = domain

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

        http port that reverse proxy should listens to  # noqa: E501

        :return: The http_port of this ReverseProxyFrontEnd.  # noqa: E501
        :rtype: int
        """
        return self._http_port

    @http_port.setter
    def http_port(self, http_port):
        """Sets the http_port of this ReverseProxyFrontEnd.

        http port that reverse proxy should listens to  # noqa: E501

        :param http_port: The http_port of this ReverseProxyFrontEnd.  # noqa: E501
        :type: int
        """

        self._http_port = http_port

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

        https port that reverse proxy should listens to  # noqa: E501

        :return: The https_port of this ReverseProxyFrontEnd.  # noqa: E501
        :rtype: int
        """
        return self._https_port

    @https_port.setter
    def https_port(self, https_port):
        """Sets the https_port of this ReverseProxyFrontEnd.

        https port that reverse proxy should listens to  # noqa: E501

        :param https_port: The https_port of this ReverseProxyFrontEnd.  # noqa: E501
        :type: int
        """
        if (self._configuration.client_side_validation and
                https_port is not None and https_port > 65535):  # noqa: E501
            raise ValueError("Invalid value for `https_port`, must be a value less than or equal to `65535`")  # noqa: E501
        if (self._configuration.client_side_validation and
                https_port is not None and https_port < 1):  # noqa: E501
            raise ValueError("Invalid value for `https_port`, must be a value greater than or equal to `1`")  # noqa: E501

        self._https_port = https_port

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

        http, https, or both of them  # noqa: E501

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

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

        http, https, or both of them  # noqa: E501

        :param scheme: The scheme of this ReverseProxyFrontEnd.  # noqa: E501
        :type: str
        """
        allowed_values = ["http", "https", "both"]  # noqa: E501
        if (self._configuration.client_side_validation and
                scheme not in allowed_values):
            raise ValueError(
                "Invalid value for `scheme` ({0}), must be one of {1}"  # noqa: E501
                .format(scheme, allowed_values)
            )

        self._scheme = scheme

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


        :return: The letsencrypt of this ReverseProxyFrontEnd.  # noqa: E501
        :rtype: LetsEncrypt
        """
        return self._letsencrypt

    @letsencrypt.setter
    def letsencrypt(self, letsencrypt):
        """Sets the letsencrypt of this ReverseProxyFrontEnd.


        :param letsencrypt: The letsencrypt of this ReverseProxyFrontEnd.  # noqa: E501
        :type: LetsEncrypt
        """

        self._letsencrypt = letsencrypt

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

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(ReverseProxyFrontEnd, dict):
            for key, value in self.items():
                result[key] = 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, ReverseProxyFrontEnd):
            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, ReverseProxyFrontEnd):
            return True

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