# 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 HTTPServiceProxyCreateParamPayload(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',
        'project_id': 'str',
        'service_name': 'str',
        'service_namespace': 'str',
        'service_port': 'int',
        'setup_basic_auth': 'bool',
        'setup_dns': 'bool',
        'skip_cert_verification': 'bool',
        'svc_domain_id': 'str',
        'tls_endpoint': 'bool',
        'type': 'str'
    }

    attribute_map = {
        'disable_rewrite_rules': 'disableRewriteRules',
        'duration': 'duration',
        'headers': 'headers',
        'name': 'name',
        'project_id': 'projectId',
        'service_name': 'serviceName',
        'service_namespace': 'serviceNamespace',
        'service_port': 'servicePort',
        'setup_basic_auth': 'setupBasicAuth',
        'setup_dns': 'setupDNS',
        'skip_cert_verification': 'skipCertVerification',
        'svc_domain_id': 'svcDomainId',
        'tls_endpoint': 'tlsEndpoint',
        'type': 'type'
    }

    def __init__(self, disable_rewrite_rules=None, duration=None, headers=None, name=None, project_id=None, service_name=None, service_namespace=None, service_port=None, setup_basic_auth=None, setup_dns=None, skip_cert_verification=None, svc_domain_id=None, tls_endpoint=None, type=None):  # noqa: E501
        """HTTPServiceProxyCreateParamPayload - a model defined in Swagger"""  # noqa: E501
        self._disable_rewrite_rules = None
        self._duration = None
        self._headers = None
        self._name = None
        self._project_id = None
        self._service_name = None
        self._service_namespace = None
        self._service_port = None
        self._setup_basic_auth = None
        self._setup_dns = None
        self._skip_cert_verification = None
        self._svc_domain_id = None
        self._tls_endpoint = None
        self._type = None
        self.discriminator = None
        self.disable_rewrite_rules = disable_rewrite_rules
        self.duration = duration
        if headers is not None:
            self.headers = headers
        self.name = name
        if project_id is not None:
            self.project_id = project_id
        self.service_name = service_name
        if service_namespace is not None:
            self.service_namespace = service_namespace
        self.service_port = service_port
        self.setup_basic_auth = setup_basic_auth
        self.setup_dns = setup_dns
        self.skip_cert_verification = skip_cert_verification
        self.svc_domain_id = svc_domain_id
        self.tls_endpoint = tls_endpoint
        self.type = type

    @property
    def disable_rewrite_rules(self):
        """Gets the disable_rewrite_rules of this HTTPServiceProxyCreateParamPayload.  # 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 HTTPServiceProxyCreateParamPayload.  # 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 HTTPServiceProxyCreateParamPayload.

        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 HTTPServiceProxyCreateParamPayload.  # noqa: E501
        :type: bool
        """
        if disable_rewrite_rules is None:
            raise ValueError("Invalid value for `disable_rewrite_rules`, must not be `None`")  # noqa: E501

        self._disable_rewrite_rules = disable_rewrite_rules

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

        Duration of the http service proxy.  # noqa: E501

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

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

        Duration of the http service proxy.  # noqa: E501

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

        self._duration = duration

    @property
    def headers(self):
        """Gets the headers of this HTTPServiceProxyCreateParamPayload.  # 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 HTTPServiceProxyCreateParamPayload.  # noqa: E501
        :rtype: str
        """
        return self._headers

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

        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 HTTPServiceProxyCreateParamPayload.  # noqa: E501
        :type: str
        """

        self._headers = headers

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


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

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


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

        self._name = name

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


        :return: The project_id of this HTTPServiceProxyCreateParamPayload.  # noqa: E501
        :rtype: str
        """
        return self._project_id

    @project_id.setter
    def project_id(self, project_id):
        """Sets the project_id of this HTTPServiceProxyCreateParamPayload.


        :param project_id: The project_id of this HTTPServiceProxyCreateParamPayload.  # noqa: E501
        :type: str
        """

        self._project_id = project_id

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


        :return: The service_name of this HTTPServiceProxyCreateParamPayload.  # noqa: E501
        :rtype: str
        """
        return self._service_name

    @service_name.setter
    def service_name(self, service_name):
        """Sets the service_name of this HTTPServiceProxyCreateParamPayload.


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

        self._service_name = service_name

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

        Namespace of the http service, required when TYPE = SYSTEM  # noqa: E501

        :return: The service_namespace of this HTTPServiceProxyCreateParamPayload.  # noqa: E501
        :rtype: str
        """
        return self._service_namespace

    @service_namespace.setter
    def service_namespace(self, service_namespace):
        """Sets the service_namespace of this HTTPServiceProxyCreateParamPayload.

        Namespace of the http service, required when TYPE = SYSTEM  # noqa: E501

        :param service_namespace: The service_namespace of this HTTPServiceProxyCreateParamPayload.  # noqa: E501
        :type: str
        """

        self._service_namespace = service_namespace

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


        :return: The service_port of this HTTPServiceProxyCreateParamPayload.  # noqa: E501
        :rtype: int
        """
        return self._service_port

    @service_port.setter
    def service_port(self, service_port):
        """Sets the service_port of this HTTPServiceProxyCreateParamPayload.


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

        self._service_port = service_port

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

        Whether to setup basic auth to protect the endpoint  # noqa: E501

        :return: The setup_basic_auth of this HTTPServiceProxyCreateParamPayload.  # noqa: E501
        :rtype: bool
        """
        return self._setup_basic_auth

    @setup_basic_auth.setter
    def setup_basic_auth(self, setup_basic_auth):
        """Sets the setup_basic_auth of this HTTPServiceProxyCreateParamPayload.

        Whether to setup basic auth to protect the endpoint  # noqa: E501

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

        self._setup_basic_auth = setup_basic_auth

    @property
    def setup_dns(self):
        """Gets the setup_dns of this HTTPServiceProxyCreateParamPayload.  # 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 HTTPServiceProxyCreateParamPayload.  # noqa: E501
        :rtype: bool
        """
        return self._setup_dns

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

        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 HTTPServiceProxyCreateParamPayload.  # 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 HTTPServiceProxyCreateParamPayload.  # 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 HTTPServiceProxyCreateParamPayload.  # 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 HTTPServiceProxyCreateParamPayload.

        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 HTTPServiceProxyCreateParamPayload.  # 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 svc_domain_id(self):
        """Gets the svc_domain_id of this HTTPServiceProxyCreateParamPayload.  # noqa: E501

        ID of Service Domain to create the http service proxy  # noqa: E501

        :return: The svc_domain_id of this HTTPServiceProxyCreateParamPayload.  # noqa: E501
        :rtype: str
        """
        return self._svc_domain_id

    @svc_domain_id.setter
    def svc_domain_id(self, svc_domain_id):
        """Sets the svc_domain_id of this HTTPServiceProxyCreateParamPayload.

        ID of Service Domain to create the http service proxy  # noqa: E501

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

        self._svc_domain_id = svc_domain_id

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

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

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

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

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

        :param tls_endpoint: The tls_endpoint of this HTTPServiceProxyCreateParamPayload.  # 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

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


        :return: The type of this HTTPServiceProxyCreateParamPayload.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this HTTPServiceProxyCreateParamPayload.


        :param type: The type of this HTTPServiceProxyCreateParamPayload.  # noqa: E501
        :type: str
        """
        if type is None:
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501
        allowed_values = ["SYSTEM", "PROJECT", "CUSTOM"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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

        return self.__dict__ == other.__dict__

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