# 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 HTTPServiceProxy(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 = {
        'dns_url': 'str',
        'duration': 'str',
        'id': 'str',
        'name': 'str',
        'password': 'str',
        'project_id': 'str',
        'service_name': 'str',
        'service_namespace': 'str',
        'service_port': 'int',
        'svc_domain_id': 'str',
        'type': 'str',
        'url': 'str',
        'username': 'str'
    }

    attribute_map = {
        'dns_url': 'dnsURL',
        'duration': 'duration',
        'id': 'id',
        'name': 'name',
        'password': 'password',
        'project_id': 'projectId',
        'service_name': 'serviceName',
        'service_namespace': 'serviceNamespace',
        'service_port': 'servicePort',
        'svc_domain_id': 'svcDomainId',
        'type': 'type',
        'url': 'url',
        'username': 'username'
    }

    def __init__(self, dns_url=None, duration=None, id=None, name=None, password=None, project_id=None, service_name=None, service_namespace=None, service_port=None, svc_domain_id=None, type=None, url=None, username=None):  # noqa: E501
        """HTTPServiceProxy - a model defined in Swagger"""  # noqa: E501
        self._dns_url = None
        self._duration = None
        self._id = None
        self._name = None
        self._password = None
        self._project_id = None
        self._service_name = None
        self._service_namespace = None
        self._service_port = None
        self._svc_domain_id = None
        self._type = None
        self._url = None
        self._username = None
        self.discriminator = None
        self.dns_url = dns_url
        self.duration = duration
        if id is not None:
            self.id = id
        self.name = name
        if password is not None:
            self.password = password
        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.svc_domain_id = svc_domain_id
        self.type = type
        self.url = url
        if username is not None:
            self.username = username

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

        DNS URL of the service proxy endpoint Valid only if setupDNS is set to true when creating the service proxy  # noqa: E501

        :return: The dns_url of this HTTPServiceProxy.  # noqa: E501
        :rtype: str
        """
        return self._dns_url

    @dns_url.setter
    def dns_url(self, dns_url):
        """Sets the dns_url of this HTTPServiceProxy.

        DNS URL of the service proxy endpoint Valid only if setupDNS is set to true when creating the service proxy  # noqa: E501

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

        self._dns_url = dns_url

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

        Duration of the http service proxy.  # noqa: E501

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

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

        Duration of the http service proxy.  # noqa: E501

        :param duration: The duration of this HTTPServiceProxy.  # 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 id(self):
        """Gets the id of this HTTPServiceProxy.  # noqa: E501

        ID of the entity Maximum character length is 64 for project, category, and runtime environment, 36 for other entity types.  # noqa: E501

        :return: The id of this HTTPServiceProxy.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this HTTPServiceProxy.

        ID of the entity Maximum character length is 64 for project, category, and runtime environment, 36 for other entity types.  # noqa: E501

        :param id: The id of this HTTPServiceProxy.  # noqa: E501
        :type: str
        """

        self._id = id

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

        HTTP service proxy name. Unique within (tenant, service domain)  # noqa: E501

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

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

        HTTP service proxy name. Unique within (tenant, service domain)  # noqa: E501

        :param name: The name of this HTTPServiceProxy.  # 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 password(self):
        """Gets the password of this HTTPServiceProxy.  # noqa: E501

        Password to login to the service when setupBasicAuth=true.  # noqa: E501

        :return: The password of this HTTPServiceProxy.  # noqa: E501
        :rtype: str
        """
        return self._password

    @password.setter
    def password(self, password):
        """Sets the password of this HTTPServiceProxy.

        Password to login to the service when setupBasicAuth=true.  # noqa: E501

        :param password: The password of this HTTPServiceProxy.  # noqa: E501
        :type: str
        """

        self._password = password

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

        ID of parent project, required when TYPE = PROJECT.  # noqa: E501

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

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

        ID of parent project, required when TYPE = PROJECT.  # noqa: E501

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

        self._project_id = project_id

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

        Name of the http service.  # noqa: E501

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

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

        Name of the http service.  # noqa: E501

        :param service_name: The service_name of this HTTPServiceProxy.  # 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 HTTPServiceProxy.  # noqa: E501

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

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

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

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

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

        self._service_namespace = service_namespace

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

        Port of the http service.  # noqa: E501

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

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

        Port of the http service.  # noqa: E501

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

        ID of the service domain this entity belongs to  # noqa: E501

        :return: The svc_domain_id of this HTTPServiceProxy.  # 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 HTTPServiceProxy.

        ID of the service domain this entity belongs to  # noqa: E501

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

        Service type for this http proxy.  # noqa: E501

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

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

        Service type for this http proxy.  # noqa: E501

        :param type: The type of this HTTPServiceProxy.  # 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

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

        URL of the service proxy endpoint  # noqa: E501

        :return: The url of this HTTPServiceProxy.  # noqa: E501
        :rtype: str
        """
        return self._url

    @url.setter
    def url(self, url):
        """Sets the url of this HTTPServiceProxy.

        URL of the service proxy endpoint  # noqa: E501

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

        self._url = url

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

        Username to login to the service when setupBasicAuth=true.  # noqa: E501

        :return: The username of this HTTPServiceProxy.  # noqa: E501
        :rtype: str
        """
        return self._username

    @username.setter
    def username(self, username):
        """Sets the username of this HTTPServiceProxy.

        Username to login to the service when setupBasicAuth=true.  # noqa: E501

        :param username: The username of this HTTPServiceProxy.  # noqa: E501
        :type: str
        """

        self._username = username

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

        return self.__dict__ == other.__dict__

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