# 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
from kps_api.models.additional_item import AdditionalItem  # noqa: F401,E501
from kps_api.models.destination_rules import DestinationRules  # noqa: F401,E501
from kps_api.models.endpoints import Endpoints  # noqa: F401,E501
from kps_api.models.istio_validations import IstioValidations  # noqa: F401,E501
from kps_api.models.mtls_status import MTLSStatus  # noqa: F401,E501
from kps_api.models.service import Service  # noqa: F401,E501
from kps_api.models.service_health import ServiceHealth  # noqa: F401,E501
from kps_api.models.virtual_services import VirtualServices  # noqa: F401,E501
from kps_api.models.workload_overviews import WorkloadOverviews  # noqa: F401,E501


class ServiceDetails(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 = {
        'additional_details': 'list[AdditionalItem]',
        'destination_rules': 'DestinationRules',
        'endpoints': 'Endpoints',
        'health': 'ServiceHealth',
        'istio_sidecar': 'bool',
        'namespace_mtls': 'MTLSStatus',
        'service': 'Service',
        'validations': 'IstioValidations',
        'virtual_services': 'VirtualServices',
        'workloads': 'WorkloadOverviews'
    }

    attribute_map = {
        'additional_details': 'additionalDetails',
        'destination_rules': 'destinationRules',
        'endpoints': 'endpoints',
        'health': 'health',
        'istio_sidecar': 'istioSidecar',
        'namespace_mtls': 'namespaceMTLS',
        'service': 'service',
        'validations': 'validations',
        'virtual_services': 'virtualServices',
        'workloads': 'workloads'
    }

    def __init__(self, additional_details=None, destination_rules=None, endpoints=None, health=None, istio_sidecar=None, namespace_mtls=None, service=None, validations=None, virtual_services=None, workloads=None):  # noqa: E501
        """ServiceDetails - a model defined in Swagger"""  # noqa: E501
        self._additional_details = None
        self._destination_rules = None
        self._endpoints = None
        self._health = None
        self._istio_sidecar = None
        self._namespace_mtls = None
        self._service = None
        self._validations = None
        self._virtual_services = None
        self._workloads = None
        self.discriminator = None
        if additional_details is not None:
            self.additional_details = additional_details
        if destination_rules is not None:
            self.destination_rules = destination_rules
        if endpoints is not None:
            self.endpoints = endpoints
        if health is not None:
            self.health = health
        if istio_sidecar is not None:
            self.istio_sidecar = istio_sidecar
        if namespace_mtls is not None:
            self.namespace_mtls = namespace_mtls
        if service is not None:
            self.service = service
        if validations is not None:
            self.validations = validations
        if virtual_services is not None:
            self.virtual_services = virtual_services
        if workloads is not None:
            self.workloads = workloads

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


        :return: The additional_details of this ServiceDetails.  # noqa: E501
        :rtype: list[AdditionalItem]
        """
        return self._additional_details

    @additional_details.setter
    def additional_details(self, additional_details):
        """Sets the additional_details of this ServiceDetails.


        :param additional_details: The additional_details of this ServiceDetails.  # noqa: E501
        :type: list[AdditionalItem]
        """

        self._additional_details = additional_details

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


        :return: The destination_rules of this ServiceDetails.  # noqa: E501
        :rtype: DestinationRules
        """
        return self._destination_rules

    @destination_rules.setter
    def destination_rules(self, destination_rules):
        """Sets the destination_rules of this ServiceDetails.


        :param destination_rules: The destination_rules of this ServiceDetails.  # noqa: E501
        :type: DestinationRules
        """

        self._destination_rules = destination_rules

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


        :return: The endpoints of this ServiceDetails.  # noqa: E501
        :rtype: Endpoints
        """
        return self._endpoints

    @endpoints.setter
    def endpoints(self, endpoints):
        """Sets the endpoints of this ServiceDetails.


        :param endpoints: The endpoints of this ServiceDetails.  # noqa: E501
        :type: Endpoints
        """

        self._endpoints = endpoints

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


        :return: The health of this ServiceDetails.  # noqa: E501
        :rtype: ServiceHealth
        """
        return self._health

    @health.setter
    def health(self, health):
        """Sets the health of this ServiceDetails.


        :param health: The health of this ServiceDetails.  # noqa: E501
        :type: ServiceHealth
        """

        self._health = health

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


        :return: The istio_sidecar of this ServiceDetails.  # noqa: E501
        :rtype: bool
        """
        return self._istio_sidecar

    @istio_sidecar.setter
    def istio_sidecar(self, istio_sidecar):
        """Sets the istio_sidecar of this ServiceDetails.


        :param istio_sidecar: The istio_sidecar of this ServiceDetails.  # noqa: E501
        :type: bool
        """

        self._istio_sidecar = istio_sidecar

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


        :return: The namespace_mtls of this ServiceDetails.  # noqa: E501
        :rtype: MTLSStatus
        """
        return self._namespace_mtls

    @namespace_mtls.setter
    def namespace_mtls(self, namespace_mtls):
        """Sets the namespace_mtls of this ServiceDetails.


        :param namespace_mtls: The namespace_mtls of this ServiceDetails.  # noqa: E501
        :type: MTLSStatus
        """

        self._namespace_mtls = namespace_mtls

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


        :return: The service of this ServiceDetails.  # noqa: E501
        :rtype: Service
        """
        return self._service

    @service.setter
    def service(self, service):
        """Sets the service of this ServiceDetails.


        :param service: The service of this ServiceDetails.  # noqa: E501
        :type: Service
        """

        self._service = service

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


        :return: The validations of this ServiceDetails.  # noqa: E501
        :rtype: IstioValidations
        """
        return self._validations

    @validations.setter
    def validations(self, validations):
        """Sets the validations of this ServiceDetails.


        :param validations: The validations of this ServiceDetails.  # noqa: E501
        :type: IstioValidations
        """

        self._validations = validations

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


        :return: The virtual_services of this ServiceDetails.  # noqa: E501
        :rtype: VirtualServices
        """
        return self._virtual_services

    @virtual_services.setter
    def virtual_services(self, virtual_services):
        """Sets the virtual_services of this ServiceDetails.


        :param virtual_services: The virtual_services of this ServiceDetails.  # noqa: E501
        :type: VirtualServices
        """

        self._virtual_services = virtual_services

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


        :return: The workloads of this ServiceDetails.  # noqa: E501
        :rtype: WorkloadOverviews
        """
        return self._workloads

    @workloads.setter
    def workloads(self, workloads):
        """Sets the workloads of this ServiceDetails.


        :param workloads: The workloads of this ServiceDetails.  # noqa: E501
        :type: WorkloadOverviews
        """

        self._workloads = workloads

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

        return self.__dict__ == other.__dict__

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