# 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 CreateReverseProxyBackEnd(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 = {
        'scheme': 'str',
        'serverpool_id': 'str',
        'target_port': 'int',
        'options': 'object'
    }

    attribute_map = {
        'scheme': 'scheme',
        'serverpool_id': 'serverpool_id',
        'target_port': 'target_port',
        'options': 'options'
    }

    def __init__(self, scheme=None, serverpool_id=None, target_port=None, options=None, _configuration=None):  # noqa: E501
        """CreateReverseProxyBackEnd - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._scheme = None
        self._serverpool_id = None
        self._target_port = None
        self._options = None
        self.discriminator = None

        if scheme is not None:
            self.scheme = scheme
        if serverpool_id is not None:
            self.serverpool_id = serverpool_id
        if target_port is not None:
            self.target_port = target_port
        if options is not None:
            self.options = options

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

        Scheme reverse proxy supports [http, https, both]  # noqa: E501

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

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

        Scheme reverse proxy supports [http, https, both]  # noqa: E501

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

        self._scheme = scheme

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

        ID of the server pool used by the reverse proxy  # noqa: E501

        :return: The serverpool_id of this CreateReverseProxyBackEnd.  # noqa: E501
        :rtype: str
        """
        return self._serverpool_id

    @serverpool_id.setter
    def serverpool_id(self, serverpool_id):
        """Sets the serverpool_id of this CreateReverseProxyBackEnd.

        ID of the server pool used by the reverse proxy  # noqa: E501

        :param serverpool_id: The serverpool_id of this CreateReverseProxyBackEnd.  # noqa: E501
        :type: str
        """

        self._serverpool_id = serverpool_id

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

        Port used in VMs that reverse proxy will forward requests to  # noqa: E501

        :return: The target_port of this CreateReverseProxyBackEnd.  # noqa: E501
        :rtype: int
        """
        return self._target_port

    @target_port.setter
    def target_port(self, target_port):
        """Sets the target_port of this CreateReverseProxyBackEnd.

        Port used in VMs that reverse proxy will forward requests to  # noqa: E501

        :param target_port: The target_port of this CreateReverseProxyBackEnd.  # noqa: E501
        :type: int
        """

        self._target_port = target_port

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

        Additional options  # noqa: E501

        :return: The options of this CreateReverseProxyBackEnd.  # noqa: E501
        :rtype: object
        """
        return self._options

    @options.setter
    def options(self, options):
        """Sets the options of this CreateReverseProxyBackEnd.

        Additional options  # noqa: E501

        :param options: The options of this CreateReverseProxyBackEnd.  # noqa: E501
        :type: object
        """

        self._options = options

    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(CreateReverseProxyBackEnd, 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, CreateReverseProxyBackEnd):
            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, CreateReverseProxyBackEnd):
            return True

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