# coding: utf-8

"""
    Anyscale 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 anyscale_client.configuration import Configuration


class ActorsQuery(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 = {
        'name': 'TextQuery',
        'runtime_environment_id': 'str',
        'job_id': 'str',
        'cluster_id': 'str',
        'serve_deployment_id': 'str',
        'only_replicas': 'bool',
        'paging': 'PageQuery',
        'state_filter': 'list[ActorStatus]'
    }

    attribute_map = {
        'name': 'name',
        'runtime_environment_id': 'runtime_environment_id',
        'job_id': 'job_id',
        'cluster_id': 'cluster_id',
        'serve_deployment_id': 'serve_deployment_id',
        'only_replicas': 'only_replicas',
        'paging': 'paging',
        'state_filter': 'state_filter'
    }

    def __init__(self, name=None, runtime_environment_id=None, job_id=None, cluster_id=None, serve_deployment_id=None, only_replicas=None, paging=None, state_filter=[], local_vars_configuration=None):  # noqa: E501
        """ActorsQuery - 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._name = None
        self._runtime_environment_id = None
        self._job_id = None
        self._cluster_id = None
        self._serve_deployment_id = None
        self._only_replicas = None
        self._paging = None
        self._state_filter = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if runtime_environment_id is not None:
            self.runtime_environment_id = runtime_environment_id
        if job_id is not None:
            self.job_id = job_id
        if cluster_id is not None:
            self.cluster_id = cluster_id
        if serve_deployment_id is not None:
            self.serve_deployment_id = serve_deployment_id
        if only_replicas is not None:
            self.only_replicas = only_replicas
        if paging is not None:
            self.paging = paging
        if state_filter is not None:
            self.state_filter = state_filter

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

        Filters Actors by name. If this field is absent, no filtering is done.  # noqa: E501

        :return: The name of this ActorsQuery.  # noqa: E501
        :rtype: TextQuery
        """
        return self._name

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

        Filters Actors by name. If this field is absent, no filtering is done.  # noqa: E501

        :param name: The name of this ActorsQuery.  # noqa: E501
        :type: TextQuery
        """

        self._name = name

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

        Filters Actors by runtime environment id. If this field is absent, no filtering is done.  # noqa: E501

        :return: The runtime_environment_id of this ActorsQuery.  # noqa: E501
        :rtype: str
        """
        return self._runtime_environment_id

    @runtime_environment_id.setter
    def runtime_environment_id(self, runtime_environment_id):
        """Sets the runtime_environment_id of this ActorsQuery.

        Filters Actors by runtime environment id. If this field is absent, no filtering is done.  # noqa: E501

        :param runtime_environment_id: The runtime_environment_id of this ActorsQuery.  # noqa: E501
        :type: str
        """

        self._runtime_environment_id = runtime_environment_id

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

        Filters Actors by job id. If this field is absent, no filtering is done.  # noqa: E501

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

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

        Filters Actors by job id. If this field is absent, no filtering is done.  # noqa: E501

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

        self._job_id = job_id

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

        Filters Actors by cluster_id. If this field is absent, no filtering is done.  # noqa: E501

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

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

        Filters Actors by cluster_id. If this field is absent, no filtering is done.  # noqa: E501

        :param cluster_id: The cluster_id of this ActorsQuery.  # noqa: E501
        :type: str
        """

        self._cluster_id = cluster_id

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

        Filters Actors by serve_deployment_id. If this field is absent, no filtering is done.  # noqa: E501

        :return: The serve_deployment_id of this ActorsQuery.  # noqa: E501
        :rtype: str
        """
        return self._serve_deployment_id

    @serve_deployment_id.setter
    def serve_deployment_id(self, serve_deployment_id):
        """Sets the serve_deployment_id of this ActorsQuery.

        Filters Actors by serve_deployment_id. If this field is absent, no filtering is done.  # noqa: E501

        :param serve_deployment_id: The serve_deployment_id of this ActorsQuery.  # noqa: E501
        :type: str
        """

        self._serve_deployment_id = serve_deployment_id

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

        Filters for Actors that are replicas by filtering out ServeController / HTTPProxyActors. Must be used in conjunction with serve_deployment_id  # noqa: E501

        :return: The only_replicas of this ActorsQuery.  # noqa: E501
        :rtype: bool
        """
        return self._only_replicas

    @only_replicas.setter
    def only_replicas(self, only_replicas):
        """Sets the only_replicas of this ActorsQuery.

        Filters for Actors that are replicas by filtering out ServeController / HTTPProxyActors. Must be used in conjunction with serve_deployment_id  # noqa: E501

        :param only_replicas: The only_replicas of this ActorsQuery.  # noqa: E501
        :type: bool
        """

        self._only_replicas = only_replicas

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

        Pagination information.  # noqa: E501

        :return: The paging of this ActorsQuery.  # noqa: E501
        :rtype: PageQuery
        """
        return self._paging

    @paging.setter
    def paging(self, paging):
        """Sets the paging of this ActorsQuery.

        Pagination information.  # noqa: E501

        :param paging: The paging of this ActorsQuery.  # noqa: E501
        :type: PageQuery
        """

        self._paging = paging

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

        Filter Actors by Actor Status. If this field is an empty set, no filtering is done.  # noqa: E501

        :return: The state_filter of this ActorsQuery.  # noqa: E501
        :rtype: list[ActorStatus]
        """
        return self._state_filter

    @state_filter.setter
    def state_filter(self, state_filter):
        """Sets the state_filter of this ActorsQuery.

        Filter Actors by Actor Status. If this field is an empty set, no filtering is done.  # noqa: E501

        :param state_filter: The state_filter of this ActorsQuery.  # noqa: E501
        :type: list[ActorStatus]
        """

        self._state_filter = state_filter

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

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