# coding: utf-8

"""
    Karbon Platform Services API reference.

    OpenAPI documentation for public facing Karbon Platform Services API  This API documentation is generated from source code using go-swagger. Do not edit the generated kps_api.json directly!  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: karbon-platform-services-api@nutanix.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six


class HTTPServiceProxyUpdateParamPayload(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 = {
        'disable_rewrite_rules': 'bool',
        'duration': 'str',
        'headers': 'str',
        'name': 'str',
        'setup_dns': 'bool',
        'skip_cert_verification': 'bool',
        'tls_endpoint': 'bool'
    }

    attribute_map = {
        'disable_rewrite_rules': 'disableRewriteRules',
        'duration': 'duration',
        'headers': 'headers',
        'name': 'name',
        'setup_dns': 'setupDNS',
        'skip_cert_verification': 'skipCertVerification',
        'tls_endpoint': 'tlsEndpoint'
    }

    def __init__(self, disable_rewrite_rules=None, duration=None, headers=None, name=None, setup_dns=None, skip_cert_verification=None, tls_endpoint=None):  # noqa: E501
        """HTTPServiceProxyUpdateParamPayload - a model defined in Swagger"""  # noqa: E501
        self._disable_rewrite_rules = None
        self._duration = None
        self._headers = None
        self._name = None
        self._setup_dns = None
        self._skip_cert_verification = None
        self._tls_endpoint = None
        self.discriminator = None
        if disable_rewrite_rules is not None:
            self.disable_rewrite_rules = disable_rewrite_rules
        if duration is not None:
            self.duration = duration
        if headers is not None:
            self.headers = headers
        if name is not None:
            self.name = name
        self.setup_dns = setup_dns
        self.skip_cert_verification = skip_cert_verification
        self.tls_endpoint = tls_endpoint

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

        By default, a rewrite rule will be put in place to rewrite service URL path base to / set this flag to true to retain the URL path base.  # noqa: E501

        :return: The disable_rewrite_rules of this HTTPServiceProxyUpdateParamPayload.  # noqa: E501
        :rtype: bool
        """
        return self._disable_rewrite_rules

    @disable_rewrite_rules.setter
    def disable_rewrite_rules(self, disable_rewrite_rules):
        """Sets the disable_rewrite_rules of this HTTPServiceProxyUpdateParamPayload.

        By default, a rewrite rule will be put in place to rewrite service URL path base to / set this flag to true to retain the URL path base.  # noqa: E501

        :param disable_rewrite_rules: The disable_rewrite_rules of this HTTPServiceProxyUpdateParamPayload.  # noqa: E501
        :type: bool
        """

        self._disable_rewrite_rules = disable_rewrite_rules

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

        Duration of the http service proxy.  # noqa: E501

        :return: The duration of this HTTPServiceProxyUpdateParamPayload.  # noqa: E501
        :rtype: str
        """
        return self._duration

    @duration.setter
    def duration(self, duration):
        """Sets the duration of this HTTPServiceProxyUpdateParamPayload.

        Duration of the http service proxy.  # noqa: E501

        :param duration: The duration of this HTTPServiceProxyUpdateParamPayload.  # noqa: E501
        :type: str
        """

        self._duration = duration

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

        JSON object representation of HTTP headers to overwrite. May be useful for (https) endpoint that require specific Host field for example.  # noqa: E501

        :return: The headers of this HTTPServiceProxyUpdateParamPayload.  # noqa: E501
        :rtype: str
        """
        return self._headers

    @headers.setter
    def headers(self, headers):
        """Sets the headers of this HTTPServiceProxyUpdateParamPayload.

        JSON object representation of HTTP headers to overwrite. May be useful for (https) endpoint that require specific Host field for example.  # noqa: E501

        :param headers: The headers of this HTTPServiceProxyUpdateParamPayload.  # noqa: E501
        :type: str
        """

        self._headers = headers

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


        :return: The name of this HTTPServiceProxyUpdateParamPayload.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this HTTPServiceProxyUpdateParamPayload.


        :param name: The name of this HTTPServiceProxyUpdateParamPayload.  # noqa: E501
        :type: str
        """

        self._name = name

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

        Whether to setup DNS entry for this service. Default is false. Might be useful for services that do not work with URL path. However, bear in mind it may take several minutes for the DNS name to propagate/resolve.  # noqa: E501

        :return: The setup_dns of this HTTPServiceProxyUpdateParamPayload.  # noqa: E501
        :rtype: bool
        """
        return self._setup_dns

    @setup_dns.setter
    def setup_dns(self, setup_dns):
        """Sets the setup_dns of this HTTPServiceProxyUpdateParamPayload.

        Whether to setup DNS entry for this service. Default is false. Might be useful for services that do not work with URL path. However, bear in mind it may take several minutes for the DNS name to propagate/resolve.  # noqa: E501

        :param setup_dns: The setup_dns of this HTTPServiceProxyUpdateParamPayload.  # noqa: E501
        :type: bool
        """
        if setup_dns is None:
            raise ValueError("Invalid value for `setup_dns`, must not be `None`")  # noqa: E501

        self._setup_dns = setup_dns

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

        Whether to skip TLS certification verification for endpoint. Only relevant when TLSEndpoint is true. This should be set to true if the endpoint is using a self-signed certificate.  # noqa: E501

        :return: The skip_cert_verification of this HTTPServiceProxyUpdateParamPayload.  # noqa: E501
        :rtype: bool
        """
        return self._skip_cert_verification

    @skip_cert_verification.setter
    def skip_cert_verification(self, skip_cert_verification):
        """Sets the skip_cert_verification of this HTTPServiceProxyUpdateParamPayload.

        Whether to skip TLS certification verification for endpoint. Only relevant when TLSEndpoint is true. This should be set to true if the endpoint is using a self-signed certificate.  # noqa: E501

        :param skip_cert_verification: The skip_cert_verification of this HTTPServiceProxyUpdateParamPayload.  # noqa: E501
        :type: bool
        """
        if skip_cert_verification is None:
            raise ValueError("Invalid value for `skip_cert_verification`, must not be `None`")  # noqa: E501

        self._skip_cert_verification = skip_cert_verification

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

        Whether the endpoint to proxy to is a TLS endpoint.  # noqa: E501

        :return: The tls_endpoint of this HTTPServiceProxyUpdateParamPayload.  # noqa: E501
        :rtype: bool
        """
        return self._tls_endpoint

    @tls_endpoint.setter
    def tls_endpoint(self, tls_endpoint):
        """Sets the tls_endpoint of this HTTPServiceProxyUpdateParamPayload.

        Whether the endpoint to proxy to is a TLS endpoint.  # noqa: E501

        :param tls_endpoint: The tls_endpoint of this HTTPServiceProxyUpdateParamPayload.  # noqa: E501
        :type: bool
        """
        if tls_endpoint is None:
            raise ValueError("Invalid value for `tls_endpoint`, must not be `None`")  # noqa: E501

        self._tls_endpoint = tls_endpoint

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

        return self.__dict__ == other.__dict__

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