# coding: utf-8

"""
    Agilicus API

    Agilicus API.  A rendered, online viewable and usable version of this specification is available at [api](https://www.agilicus.com/api).  This API releases on Bearer-Token authentication. To obtain a valid bearer token you will need to Authenticate to an Issuer with OpenID Connect (a superset of OAUTH2).  Your \"issuer\" will look like https://auth.MYDOMAIN. For example, when you signed-up, if you said \"use my own domain name\" and assigned a CNAME of cloud.example.com, then your issuer would be https://auth.cloud.example.com. If you selected \"use an Agilicus supplied domain name\", your issuer would look like https://auth.myorg.agilicus.cloud.  For test purposes you can use our [Python SDK](https://pypi.org/project/agilicus/) and run `agilicus-cli --issuer https://auth.MYDOMAIN get-token`.  This API may be used in any language runtime that supports OpenAPI 3.0, or, you may use our [Python SDK](https://pypi.org/project/agilicus/), our [Typescript SDK](https://www.npmjs.com/package/@agilicus/angular), or our [Golang SDK](https://git.agilicus.com/pub/sdk-go).  100% of the activities in our system our API-driven, from our web-admin, through our progressive web applications, to all internals: there is nothing that is not accessible.  For more information, see [developer resources](https://www.agilicus.com/developer).   # noqa: E501

    The version of the OpenAPI document: 2021.04.30
    Contact: dev@agilicus.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from agilicus_api.configuration import Configuration


class ResourceStats(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 = {
        'resource_id': 'str',
        'metadata': 'ResourceStatsMetadata',
        'overall_status': 'str',
        'last_warning_message': 'str',
        'session_stats': 'ResourceSessionStats'
    }

    attribute_map = {
        'resource_id': 'resource_id',
        'metadata': 'metadata',
        'overall_status': 'overall_status',
        'last_warning_message': 'last_warning_message',
        'session_stats': 'session_stats'
    }

    def __init__(self, resource_id=None, metadata=None, overall_status=None, last_warning_message=None, session_stats=None, local_vars_configuration=None):  # noqa: E501
        """ResourceStats - 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._resource_id = None
        self._metadata = None
        self._overall_status = None
        self._last_warning_message = None
        self._session_stats = None
        self.discriminator = None

        if resource_id is not None:
            self.resource_id = resource_id
        if metadata is not None:
            self.metadata = metadata
        if overall_status is not None:
            self.overall_status = overall_status
        if last_warning_message is not None:
            self.last_warning_message = last_warning_message
        if session_stats is not None:
            self.session_stats = session_stats

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

        The unique ID of the resource. The id is provided here so that a list of resource stats can be POSTed in a single request.   # noqa: E501

        :return: The resource_id of this ResourceStats.  # noqa: E501
        :rtype: str
        """
        return self._resource_id

    @resource_id.setter
    def resource_id(self, resource_id):
        """Sets the resource_id of this ResourceStats.

        The unique ID of the resource. The id is provided here so that a list of resource stats can be POSTed in a single request.   # noqa: E501

        :param resource_id: The resource_id of this ResourceStats.  # noqa: E501
        :type: str
        """

        self._resource_id = resource_id

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


        :return: The metadata of this ResourceStats.  # noqa: E501
        :rtype: ResourceStatsMetadata
        """
        return self._metadata

    @metadata.setter
    def metadata(self, metadata):
        """Sets the metadata of this ResourceStats.


        :param metadata: The metadata of this ResourceStats.  # noqa: E501
        :type: ResourceStatsMetadata
        """

        self._metadata = metadata

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

        The summary status of the Resource. - A `good` status means that no action is neccessary on this Resource  - A `warn` status means that there is an issue that should be dealt with   Examples include a forwarder resource that cannot bind to the provisioned port (eg. permission   issue binding to port 80) - A `down` status indicates that there is a service accessibility problem   that should be dealt with as soon as possible. This could mean that there is a   problem with the Resource's configuration, or the platform. - A `stale` status indicates that although there may not be anything wrong,   we haven't been able to update the status recently. This may indicate   a communications issue between Agilicus and the Connector containing the resource.   # noqa: E501

        :return: The overall_status of this ResourceStats.  # noqa: E501
        :rtype: str
        """
        return self._overall_status

    @overall_status.setter
    def overall_status(self, overall_status):
        """Sets the overall_status of this ResourceStats.

        The summary status of the Resource. - A `good` status means that no action is neccessary on this Resource  - A `warn` status means that there is an issue that should be dealt with   Examples include a forwarder resource that cannot bind to the provisioned port (eg. permission   issue binding to port 80) - A `down` status indicates that there is a service accessibility problem   that should be dealt with as soon as possible. This could mean that there is a   problem with the Resource's configuration, or the platform. - A `stale` status indicates that although there may not be anything wrong,   we haven't been able to update the status recently. This may indicate   a communications issue between Agilicus and the Connector containing the resource.   # noqa: E501

        :param overall_status: The overall_status of this ResourceStats.  # noqa: E501
        :type: str
        """

        self._overall_status = overall_status

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

        A message pertaining to the last warning associated with the resource. This message is persistent in that it will remain when the status goes to `good`.   # noqa: E501

        :return: The last_warning_message of this ResourceStats.  # noqa: E501
        :rtype: str
        """
        return self._last_warning_message

    @last_warning_message.setter
    def last_warning_message(self, last_warning_message):
        """Sets the last_warning_message of this ResourceStats.

        A message pertaining to the last warning associated with the resource. This message is persistent in that it will remain when the status goes to `good`.   # noqa: E501

        :param last_warning_message: The last_warning_message of this ResourceStats.  # noqa: E501
        :type: str
        """

        self._last_warning_message = last_warning_message

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


        :return: The session_stats of this ResourceStats.  # noqa: E501
        :rtype: ResourceSessionStats
        """
        return self._session_stats

    @session_stats.setter
    def session_stats(self, session_stats):
        """Sets the session_stats of this ResourceStats.


        :param session_stats: The session_stats of this ResourceStats.  # noqa: E501
        :type: ResourceSessionStats
        """

        self._session_stats = session_stats

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

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