# 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.pods import Pods  # noqa: F401,E501
from kps_api.models.runtime import Runtime  # noqa: F401,E501
from kps_api.models.services import Services  # noqa: F401,E501


class Workload(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_detail_sample': 'AdditionalItem',
        'additional_details': 'list[AdditionalItem]',
        'app_label': 'bool',
        'available_replicas': 'int',
        'created_at': 'str',
        'current_replicas': 'int',
        'desired_replicas': 'int',
        'istio_sidecar': 'bool',
        'labels': 'dict(str, str)',
        'name': 'str',
        'pod_count': 'int',
        'pods': 'Pods',
        'resource_version': 'str',
        'runtimes': 'list[Runtime]',
        'services': 'Services',
        'type': 'str',
        'version_label': 'bool'
    }

    attribute_map = {
        'additional_detail_sample': 'additionalDetailSample',
        'additional_details': 'additionalDetails',
        'app_label': 'appLabel',
        'available_replicas': 'availableReplicas',
        'created_at': 'createdAt',
        'current_replicas': 'currentReplicas',
        'desired_replicas': 'desiredReplicas',
        'istio_sidecar': 'istioSidecar',
        'labels': 'labels',
        'name': 'name',
        'pod_count': 'podCount',
        'pods': 'pods',
        'resource_version': 'resourceVersion',
        'runtimes': 'runtimes',
        'services': 'services',
        'type': 'type',
        'version_label': 'versionLabel'
    }

    def __init__(self, additional_detail_sample=None, additional_details=None, app_label=None, available_replicas=None, created_at=None, current_replicas=None, desired_replicas=None, istio_sidecar=None, labels=None, name=None, pod_count=None, pods=None, resource_version=None, runtimes=None, services=None, type=None, version_label=None):  # noqa: E501
        """Workload - a model defined in Swagger"""  # noqa: E501
        self._additional_detail_sample = None
        self._additional_details = None
        self._app_label = None
        self._available_replicas = None
        self._created_at = None
        self._current_replicas = None
        self._desired_replicas = None
        self._istio_sidecar = None
        self._labels = None
        self._name = None
        self._pod_count = None
        self._pods = None
        self._resource_version = None
        self._runtimes = None
        self._services = None
        self._type = None
        self._version_label = None
        self.discriminator = None
        if additional_detail_sample is not None:
            self.additional_detail_sample = additional_detail_sample
        if additional_details is not None:
            self.additional_details = additional_details
        self.app_label = app_label
        self.available_replicas = available_replicas
        self.created_at = created_at
        self.current_replicas = current_replicas
        self.desired_replicas = desired_replicas
        self.istio_sidecar = istio_sidecar
        if labels is not None:
            self.labels = labels
        self.name = name
        self.pod_count = pod_count
        if pods is not None:
            self.pods = pods
        self.resource_version = resource_version
        if runtimes is not None:
            self.runtimes = runtimes
        if services is not None:
            self.services = services
        self.type = type
        self.version_label = version_label

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


        :return: The additional_detail_sample of this Workload.  # noqa: E501
        :rtype: AdditionalItem
        """
        return self._additional_detail_sample

    @additional_detail_sample.setter
    def additional_detail_sample(self, additional_detail_sample):
        """Sets the additional_detail_sample of this Workload.


        :param additional_detail_sample: The additional_detail_sample of this Workload.  # noqa: E501
        :type: AdditionalItem
        """

        self._additional_detail_sample = additional_detail_sample

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

        Additional details to display, such as configured annotations  # noqa: E501

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

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

        Additional details to display, such as configured annotations  # noqa: E501

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

        self._additional_details = additional_details

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

        Define if Pods related to this Workload has the label App  # noqa: E501

        :return: The app_label of this Workload.  # noqa: E501
        :rtype: bool
        """
        return self._app_label

    @app_label.setter
    def app_label(self, app_label):
        """Sets the app_label of this Workload.

        Define if Pods related to this Workload has the label App  # noqa: E501

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

        self._app_label = app_label

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

        Number of available replicas  # noqa: E501

        :return: The available_replicas of this Workload.  # noqa: E501
        :rtype: int
        """
        return self._available_replicas

    @available_replicas.setter
    def available_replicas(self, available_replicas):
        """Sets the available_replicas of this Workload.

        Number of available replicas  # noqa: E501

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

        self._available_replicas = available_replicas

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

        Creation timestamp (in RFC3339 format)  # noqa: E501

        :return: The created_at of this Workload.  # noqa: E501
        :rtype: str
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this Workload.

        Creation timestamp (in RFC3339 format)  # noqa: E501

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

        self._created_at = created_at

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

        Number of current replicas pods that matches controller selector labels  # noqa: E501

        :return: The current_replicas of this Workload.  # noqa: E501
        :rtype: int
        """
        return self._current_replicas

    @current_replicas.setter
    def current_replicas(self, current_replicas):
        """Sets the current_replicas of this Workload.

        Number of current replicas pods that matches controller selector labels  # noqa: E501

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

        self._current_replicas = current_replicas

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

        Number of desired replicas defined by the user in the controller Spec  # noqa: E501

        :return: The desired_replicas of this Workload.  # noqa: E501
        :rtype: int
        """
        return self._desired_replicas

    @desired_replicas.setter
    def desired_replicas(self, desired_replicas):
        """Sets the desired_replicas of this Workload.

        Number of desired replicas defined by the user in the controller Spec  # noqa: E501

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

        self._desired_replicas = desired_replicas

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

        Define if Pods related to this Workload has an IstioSidecar deployed  # noqa: E501

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

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

        Define if Pods related to this Workload has an IstioSidecar deployed  # noqa: E501

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

        self._istio_sidecar = istio_sidecar

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

        Workload labels  # noqa: E501

        :return: The labels of this Workload.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._labels

    @labels.setter
    def labels(self, labels):
        """Sets the labels of this Workload.

        Workload labels  # noqa: E501

        :param labels: The labels of this Workload.  # noqa: E501
        :type: dict(str, str)
        """

        self._labels = labels

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

        Name of the workload  # noqa: E501

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

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

        Name of the workload  # noqa: E501

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

        Number of current workload pods  # noqa: E501

        :return: The pod_count of this Workload.  # noqa: E501
        :rtype: int
        """
        return self._pod_count

    @pod_count.setter
    def pod_count(self, pod_count):
        """Sets the pod_count of this Workload.

        Number of current workload pods  # noqa: E501

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

        self._pod_count = pod_count

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


        :return: The pods of this Workload.  # noqa: E501
        :rtype: Pods
        """
        return self._pods

    @pods.setter
    def pods(self, pods):
        """Sets the pods of this Workload.


        :param pods: The pods of this Workload.  # noqa: E501
        :type: Pods
        """

        self._pods = pods

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

        Kubernetes ResourceVersion  # noqa: E501

        :return: The resource_version of this Workload.  # noqa: E501
        :rtype: str
        """
        return self._resource_version

    @resource_version.setter
    def resource_version(self, resource_version):
        """Sets the resource_version of this Workload.

        Kubernetes ResourceVersion  # noqa: E501

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

        self._resource_version = resource_version

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

        Runtimes and associated dashboards  # noqa: E501

        :return: The runtimes of this Workload.  # noqa: E501
        :rtype: list[Runtime]
        """
        return self._runtimes

    @runtimes.setter
    def runtimes(self, runtimes):
        """Sets the runtimes of this Workload.

        Runtimes and associated dashboards  # noqa: E501

        :param runtimes: The runtimes of this Workload.  # noqa: E501
        :type: list[Runtime]
        """

        self._runtimes = runtimes

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


        :return: The services of this Workload.  # noqa: E501
        :rtype: Services
        """
        return self._services

    @services.setter
    def services(self, services):
        """Sets the services of this Workload.


        :param services: The services of this Workload.  # noqa: E501
        :type: Services
        """

        self._services = services

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

        Type of the workload  # noqa: E501

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

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

        Type of the workload  # noqa: E501

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

        self._type = type

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

        Define if Pods related to this Workload has the label Version  # noqa: E501

        :return: The version_label of this Workload.  # noqa: E501
        :rtype: bool
        """
        return self._version_label

    @version_label.setter
    def version_label(self, version_label):
        """Sets the version_label of this Workload.

        Define if Pods related to this Workload has the label Version  # noqa: E501

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

        self._version_label = version_label

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

        return self.__dict__ == other.__dict__

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