# 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 DecoratedServeDeployment(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 = {
        'id': 'str',
        'status': 'ServeDeploymentState',
        'name': 'str',
        'application_name': 'str',
        'cluster_id': 'str',
        'job_id': 'str',
        'creator_id': 'str',
        'namespace_id': 'str',
        'created_at': 'datetime',
        'finished_at': 'datetime',
        'http_route': 'str',
        'grafana_dashboard_url': 'str',
        'class_name': 'str',
        'grafana_dashboard_state': 'ServeDeploymentGrafanaDashboardStatus',
        'version': 'str',
        'message': 'str',
        'replica_details': 'list[ReplicaDetails]',
        'cluster': 'MiniCluster',
        'creator': 'MiniUser',
        'namespace': 'MiniNamespace',
        'num_actors': 'int',
        'fast_api_docs_url': 'str'
    }

    attribute_map = {
        'id': 'id',
        'status': 'status',
        'name': 'name',
        'application_name': 'application_name',
        'cluster_id': 'cluster_id',
        'job_id': 'job_id',
        'creator_id': 'creator_id',
        'namespace_id': 'namespace_id',
        'created_at': 'created_at',
        'finished_at': 'finished_at',
        'http_route': 'http_route',
        'grafana_dashboard_url': 'grafana_dashboard_url',
        'class_name': 'class_name',
        'grafana_dashboard_state': 'grafana_dashboard_state',
        'version': 'version',
        'message': 'message',
        'replica_details': 'replica_details',
        'cluster': 'cluster',
        'creator': 'creator',
        'namespace': 'namespace',
        'num_actors': 'num_actors',
        'fast_api_docs_url': 'fast_api_docs_url'
    }

    def __init__(self, id=None, status=None, name=None, application_name=None, cluster_id=None, job_id=None, creator_id=None, namespace_id='DEPRECATED_NAMESPACE_ID', created_at=None, finished_at=None, http_route=None, grafana_dashboard_url=None, class_name=None, grafana_dashboard_state=None, version=None, message=None, replica_details=None, cluster=None, creator=None, namespace=None, num_actors=0, fast_api_docs_url=None, local_vars_configuration=None):  # noqa: E501
        """DecoratedServeDeployment - 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._id = None
        self._status = None
        self._name = None
        self._application_name = None
        self._cluster_id = None
        self._job_id = None
        self._creator_id = None
        self._namespace_id = None
        self._created_at = None
        self._finished_at = None
        self._http_route = None
        self._grafana_dashboard_url = None
        self._class_name = None
        self._grafana_dashboard_state = None
        self._version = None
        self._message = None
        self._replica_details = None
        self._cluster = None
        self._creator = None
        self._namespace = None
        self._num_actors = None
        self._fast_api_docs_url = None
        self.discriminator = None

        self.id = id
        self.status = status
        self.name = name
        if application_name is not None:
            self.application_name = application_name
        self.cluster_id = cluster_id
        if job_id is not None:
            self.job_id = job_id
        if creator_id is not None:
            self.creator_id = creator_id
        if namespace_id is not None:
            self.namespace_id = namespace_id
        self.created_at = created_at
        if finished_at is not None:
            self.finished_at = finished_at
        if http_route is not None:
            self.http_route = http_route
        if grafana_dashboard_url is not None:
            self.grafana_dashboard_url = grafana_dashboard_url
        if class_name is not None:
            self.class_name = class_name
        self.grafana_dashboard_state = grafana_dashboard_state
        if version is not None:
            self.version = version
        if message is not None:
            self.message = message
        if replica_details is not None:
            self.replica_details = replica_details
        self.cluster = cluster
        if creator is not None:
            self.creator = creator
        if namespace is not None:
            self.namespace = namespace
        if num_actors is not None:
            self.num_actors = num_actors
        if fast_api_docs_url is not None:
            self.fast_api_docs_url = fast_api_docs_url

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

        Server assigned unique identifier.  # noqa: E501

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

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

        Server assigned unique identifier.  # noqa: E501

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

        self._id = id

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

        Status of the deployment  # noqa: E501

        :return: The status of this DecoratedServeDeployment.  # noqa: E501
        :rtype: ServeDeploymentState
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this DecoratedServeDeployment.

        Status of the deployment  # noqa: E501

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

        self._status = status

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

        Name of this deployment.  # noqa: E501

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

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

        Name of this deployment.  # noqa: E501

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

        self._name = name

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

        Name of the application this deployment belongs to.  # noqa: E501

        :return: The application_name of this DecoratedServeDeployment.  # noqa: E501
        :rtype: str
        """
        return self._application_name

    @application_name.setter
    def application_name(self, application_name):
        """Sets the application_name of this DecoratedServeDeployment.

        Name of the application this deployment belongs to.  # noqa: E501

        :param application_name: The application_name of this DecoratedServeDeployment.  # noqa: E501
        :type: str
        """

        self._application_name = application_name

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

        ID of the Anyscale Cluster this Deployment is on.  # noqa: E501

        :return: The cluster_id of this DecoratedServeDeployment.  # noqa: E501
        :rtype: str
        """
        return self._cluster_id

    @cluster_id.setter
    def cluster_id(self, cluster_id):
        """Sets the cluster_id of this DecoratedServeDeployment.

        ID of the Anyscale Cluster this Deployment is on.  # noqa: E501

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

        self._cluster_id = cluster_id

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

        ID of the Anyscale Job that created this Deployment  # noqa: E501

        :return: The job_id of this DecoratedServeDeployment.  # noqa: E501
        :rtype: str
        """
        return self._job_id

    @job_id.setter
    def job_id(self, job_id):
        """Sets the job_id of this DecoratedServeDeployment.

        ID of the Anyscale Job that created this Deployment  # noqa: E501

        :param job_id: The job_id of this DecoratedServeDeployment.  # noqa: E501
        :type: str
        """

        self._job_id = job_id

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

        ID of the User who created this Deployment  # noqa: E501

        :return: The creator_id of this DecoratedServeDeployment.  # noqa: E501
        :rtype: str
        """
        return self._creator_id

    @creator_id.setter
    def creator_id(self, creator_id):
        """Sets the creator_id of this DecoratedServeDeployment.

        ID of the User who created this Deployment  # noqa: E501

        :param creator_id: The creator_id of this DecoratedServeDeployment.  # noqa: E501
        :type: str
        """

        self._creator_id = creator_id

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

        ID of the Anyscale Namespace this Job is using.  # noqa: E501

        :return: The namespace_id of this DecoratedServeDeployment.  # noqa: E501
        :rtype: str
        """
        return self._namespace_id

    @namespace_id.setter
    def namespace_id(self, namespace_id):
        """Sets the namespace_id of this DecoratedServeDeployment.

        ID of the Anyscale Namespace this Job is using.  # noqa: E501

        :param namespace_id: The namespace_id of this DecoratedServeDeployment.  # noqa: E501
        :type: str
        """

        self._namespace_id = namespace_id

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

        Time at which this Deployment was created.  # noqa: E501

        :return: The created_at of this DecoratedServeDeployment.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

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

        Time at which this Deployment was created.  # noqa: E501

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

        self._created_at = created_at

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

        Time at which this Deployment finished. If absent, this Deployment is still running.  # noqa: E501

        :return: The finished_at of this DecoratedServeDeployment.  # noqa: E501
        :rtype: datetime
        """
        return self._finished_at

    @finished_at.setter
    def finished_at(self, finished_at):
        """Sets the finished_at of this DecoratedServeDeployment.

        Time at which this Deployment finished. If absent, this Deployment is still running.  # noqa: E501

        :param finished_at: The finished_at of this DecoratedServeDeployment.  # noqa: E501
        :type: datetime
        """

        self._finished_at = finished_at

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

        HTTP route of this deployment  # noqa: E501

        :return: The http_route of this DecoratedServeDeployment.  # noqa: E501
        :rtype: str
        """
        return self._http_route

    @http_route.setter
    def http_route(self, http_route):
        """Sets the http_route of this DecoratedServeDeployment.

        HTTP route of this deployment  # noqa: E501

        :param http_route: The http_route of this DecoratedServeDeployment.  # noqa: E501
        :type: str
        """

        self._http_route = http_route

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

        URL of the grafana dashboard for this deployment. If absent, the dashboard has not been created  # noqa: E501

        :return: The grafana_dashboard_url of this DecoratedServeDeployment.  # noqa: E501
        :rtype: str
        """
        return self._grafana_dashboard_url

    @grafana_dashboard_url.setter
    def grafana_dashboard_url(self, grafana_dashboard_url):
        """Sets the grafana_dashboard_url of this DecoratedServeDeployment.

        URL of the grafana dashboard for this deployment. If absent, the dashboard has not been created  # noqa: E501

        :param grafana_dashboard_url: The grafana_dashboard_url of this DecoratedServeDeployment.  # noqa: E501
        :type: str
        """

        self._grafana_dashboard_url = grafana_dashboard_url

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

        The class name of the deployment object.  # noqa: E501

        :return: The class_name of this DecoratedServeDeployment.  # noqa: E501
        :rtype: str
        """
        return self._class_name

    @class_name.setter
    def class_name(self, class_name):
        """Sets the class_name of this DecoratedServeDeployment.

        The class name of the deployment object.  # noqa: E501

        :param class_name: The class_name of this DecoratedServeDeployment.  # noqa: E501
        :type: str
        """

        self._class_name = class_name

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

        Status of the grafana dashboard. This is used to determine if we need to create a dashboard.  # noqa: E501

        :return: The grafana_dashboard_state of this DecoratedServeDeployment.  # noqa: E501
        :rtype: ServeDeploymentGrafanaDashboardStatus
        """
        return self._grafana_dashboard_state

    @grafana_dashboard_state.setter
    def grafana_dashboard_state(self, grafana_dashboard_state):
        """Sets the grafana_dashboard_state of this DecoratedServeDeployment.

        Status of the grafana dashboard. This is used to determine if we need to create a dashboard.  # noqa: E501

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

        self._grafana_dashboard_state = grafana_dashboard_state

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

        Version of this Deployment  # noqa: E501

        :return: The version of this DecoratedServeDeployment.  # noqa: E501
        :rtype: str
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this DecoratedServeDeployment.

        Version of this Deployment  # noqa: E501

        :param version: The version of this DecoratedServeDeployment.  # noqa: E501
        :type: str
        """

        self._version = version

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

        Message of this Deployment  # noqa: E501

        :return: The message of this DecoratedServeDeployment.  # noqa: E501
        :rtype: str
        """
        return self._message

    @message.setter
    def message(self, message):
        """Sets the message of this DecoratedServeDeployment.

        Message of this Deployment  # noqa: E501

        :param message: The message of this DecoratedServeDeployment.  # noqa: E501
        :type: str
        """

        self._message = message

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

        Replica details of this Deployment  # noqa: E501

        :return: The replica_details of this DecoratedServeDeployment.  # noqa: E501
        :rtype: list[ReplicaDetails]
        """
        return self._replica_details

    @replica_details.setter
    def replica_details(self, replica_details):
        """Sets the replica_details of this DecoratedServeDeployment.

        Replica details of this Deployment  # noqa: E501

        :param replica_details: The replica_details of this DecoratedServeDeployment.  # noqa: E501
        :type: list[ReplicaDetails]
        """

        self._replica_details = replica_details

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


        :return: The cluster of this DecoratedServeDeployment.  # noqa: E501
        :rtype: MiniCluster
        """
        return self._cluster

    @cluster.setter
    def cluster(self, cluster):
        """Sets the cluster of this DecoratedServeDeployment.


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

        self._cluster = cluster

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


        :return: The creator of this DecoratedServeDeployment.  # noqa: E501
        :rtype: MiniUser
        """
        return self._creator

    @creator.setter
    def creator(self, creator):
        """Sets the creator of this DecoratedServeDeployment.


        :param creator: The creator of this DecoratedServeDeployment.  # noqa: E501
        :type: MiniUser
        """

        self._creator = creator

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

        This field is deprecated  # noqa: E501

        :return: The namespace of this DecoratedServeDeployment.  # noqa: E501
        :rtype: MiniNamespace
        """
        return self._namespace

    @namespace.setter
    def namespace(self, namespace):
        """Sets the namespace of this DecoratedServeDeployment.

        This field is deprecated  # noqa: E501

        :param namespace: The namespace of this DecoratedServeDeployment.  # noqa: E501
        :type: MiniNamespace
        """

        self._namespace = namespace

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

        This field is deprecated  # noqa: E501

        :return: The num_actors of this DecoratedServeDeployment.  # noqa: E501
        :rtype: int
        """
        return self._num_actors

    @num_actors.setter
    def num_actors(self, num_actors):
        """Sets the num_actors of this DecoratedServeDeployment.

        This field is deprecated  # noqa: E501

        :param num_actors: The num_actors of this DecoratedServeDeployment.  # noqa: E501
        :type: int
        """

        self._num_actors = num_actors

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


        :return: The fast_api_docs_url of this DecoratedServeDeployment.  # noqa: E501
        :rtype: str
        """
        return self._fast_api_docs_url

    @fast_api_docs_url.setter
    def fast_api_docs_url(self, fast_api_docs_url):
        """Sets the fast_api_docs_url of this DecoratedServeDeployment.


        :param fast_api_docs_url: The fast_api_docs_url of this DecoratedServeDeployment.  # noqa: E501
        :type: str
        """

        self._fast_api_docs_url = fast_api_docs_url

    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, DecoratedServeDeployment):
            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, DecoratedServeDeployment):
            return True

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