# coding: utf-8

"""
    Managed Ray API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


class WorkloadStateInfo(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'workload_name': 'str',
        'workload_type': 'str',
        'workload_start_time': 'datetime',
        'workload_cloud': 'str',
        'workload_project': 'str',
        'workload_creator': 'str',
        'url': 'str',
        'tags': 'list[TagKeyValue]',
        'workload_machine_info': 'list[WorkloadMachineInfo]'
    }

    attribute_map = {
        'workload_name': 'workload_name',
        'workload_type': 'workload_type',
        'workload_start_time': 'workload_start_time',
        'workload_cloud': 'workload_cloud',
        'workload_project': 'workload_project',
        'workload_creator': 'workload_creator',
        'url': 'url',
        'tags': 'tags',
        'workload_machine_info': 'workload_machine_info'
    }

    def __init__(self, workload_name=None, workload_type=None, workload_start_time=None, workload_cloud=None, workload_project='', workload_creator='', url='', tags=None, workload_machine_info=None, local_vars_configuration=None):  # noqa: E501
        """WorkloadStateInfo - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._workload_name = None
        self._workload_type = None
        self._workload_start_time = None
        self._workload_cloud = None
        self._workload_project = None
        self._workload_creator = None
        self._url = None
        self._tags = None
        self._workload_machine_info = None
        self.discriminator = None

        self.workload_name = workload_name
        self.workload_type = workload_type
        self.workload_start_time = workload_start_time
        self.workload_cloud = workload_cloud
        if workload_project is not None:
            self.workload_project = workload_project
        if workload_creator is not None:
            self.workload_creator = workload_creator
        if url is not None:
            self.url = url
        if tags is not None:
            self.tags = tags
        self.workload_machine_info = workload_machine_info

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

        The name of the workload.  # noqa: E501

        :return: The workload_name of this WorkloadStateInfo.  # noqa: E501
        :rtype: str
        """
        return self._workload_name

    @workload_name.setter
    def workload_name(self, workload_name):
        """Sets the workload_name of this WorkloadStateInfo.

        The name of the workload.  # noqa: E501

        :param workload_name: The workload_name of this WorkloadStateInfo.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and workload_name is None:  # noqa: E501
            raise ValueError("Invalid value for `workload_name`, must not be `None`")  # noqa: E501

        self._workload_name = workload_name

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

        The type of the workload.  # noqa: E501

        :return: The workload_type of this WorkloadStateInfo.  # noqa: E501
        :rtype: str
        """
        return self._workload_type

    @workload_type.setter
    def workload_type(self, workload_type):
        """Sets the workload_type of this WorkloadStateInfo.

        The type of the workload.  # noqa: E501

        :param workload_type: The workload_type of this WorkloadStateInfo.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and workload_type is None:  # noqa: E501
            raise ValueError("Invalid value for `workload_type`, must not be `None`")  # noqa: E501

        self._workload_type = workload_type

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

        The start time of the workload.  # noqa: E501

        :return: The workload_start_time of this WorkloadStateInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._workload_start_time

    @workload_start_time.setter
    def workload_start_time(self, workload_start_time):
        """Sets the workload_start_time of this WorkloadStateInfo.

        The start time of the workload.  # noqa: E501

        :param workload_start_time: The workload_start_time of this WorkloadStateInfo.  # noqa: E501
        :type: datetime
        """
        if self.local_vars_configuration.client_side_validation and workload_start_time is None:  # noqa: E501
            raise ValueError("Invalid value for `workload_start_time`, must not be `None`")  # noqa: E501

        self._workload_start_time = workload_start_time

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

        The cloud of the workload.  # noqa: E501

        :return: The workload_cloud of this WorkloadStateInfo.  # noqa: E501
        :rtype: str
        """
        return self._workload_cloud

    @workload_cloud.setter
    def workload_cloud(self, workload_cloud):
        """Sets the workload_cloud of this WorkloadStateInfo.

        The cloud of the workload.  # noqa: E501

        :param workload_cloud: The workload_cloud of this WorkloadStateInfo.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and workload_cloud is None:  # noqa: E501
            raise ValueError("Invalid value for `workload_cloud`, must not be `None`")  # noqa: E501

        self._workload_cloud = workload_cloud

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

        The project of the workload.  # noqa: E501

        :return: The workload_project of this WorkloadStateInfo.  # noqa: E501
        :rtype: str
        """
        return self._workload_project

    @workload_project.setter
    def workload_project(self, workload_project):
        """Sets the workload_project of this WorkloadStateInfo.

        The project of the workload.  # noqa: E501

        :param workload_project: The workload_project of this WorkloadStateInfo.  # noqa: E501
        :type: str
        """

        self._workload_project = workload_project

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

        The creator of the workload.  # noqa: E501

        :return: The workload_creator of this WorkloadStateInfo.  # noqa: E501
        :rtype: str
        """
        return self._workload_creator

    @workload_creator.setter
    def workload_creator(self, workload_creator):
        """Sets the workload_creator of this WorkloadStateInfo.

        The creator of the workload.  # noqa: E501

        :param workload_creator: The workload_creator of this WorkloadStateInfo.  # noqa: E501
        :type: str
        """

        self._workload_creator = workload_creator

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

        Relative URL for deeplink to workload detail page.  # noqa: E501

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

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

        Relative URL for deeplink to workload detail page.  # noqa: E501

        :param url: The url of this WorkloadStateInfo.  # noqa: E501
        :type: str
        """

        self._url = url

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

        User Managed tags associated with this workload.  # noqa: E501

        :return: The tags of this WorkloadStateInfo.  # noqa: E501
        :rtype: list[TagKeyValue]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this WorkloadStateInfo.

        User Managed tags associated with this workload.  # noqa: E501

        :param tags: The tags of this WorkloadStateInfo.  # noqa: E501
        :type: list[TagKeyValue]
        """

        self._tags = tags

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

        The machines allocated to this workload.  # noqa: E501

        :return: The workload_machine_info of this WorkloadStateInfo.  # noqa: E501
        :rtype: list[WorkloadMachineInfo]
        """
        return self._workload_machine_info

    @workload_machine_info.setter
    def workload_machine_info(self, workload_machine_info):
        """Sets the workload_machine_info of this WorkloadStateInfo.

        The machines allocated to this workload.  # noqa: E501

        :param workload_machine_info: The workload_machine_info of this WorkloadStateInfo.  # noqa: E501
        :type: list[WorkloadMachineInfo]
        """
        if self.local_vars_configuration.client_side_validation and workload_machine_info is None:  # noqa: E501
            raise ValueError("Invalid value for `workload_machine_info`, must not be `None`")  # noqa: E501

        self._workload_machine_info = workload_machine_info

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
