# coding: utf-8

"""
    Agilicus API

    Agilicus API endpoints  # noqa: E501

    The version of the OpenAPI document: 2021.04.08
    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 AgentConnectorStats(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 = {
        'metadata': 'ConnectorStatsMetadata',
        'overall_status': 'str',
        'system': 'AgentConnectorSystemStats',
        'transport': 'AgentConnectorTransportStats',
        'shares': 'AgentConnectorShareStats',
        'authz': 'AgentConnectorAuthzStats',
        'proxy': 'AgentConnectorProxyStats'
    }

    attribute_map = {
        'metadata': 'metadata',
        'overall_status': 'overall_status',
        'system': 'system',
        'transport': 'transport',
        'shares': 'shares',
        'authz': 'authz',
        'proxy': 'proxy'
    }

    def __init__(self, metadata=None, overall_status=None, system=None, transport=None, shares=None, authz=None, proxy=None, local_vars_configuration=None):  # noqa: E501
        """AgentConnectorStats - 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._metadata = None
        self._overall_status = None
        self._system = None
        self._transport = None
        self._shares = None
        self._authz = None
        self._proxy = None
        self.discriminator = None

        self.metadata = metadata
        self.overall_status = overall_status
        self.system = system
        self.transport = transport
        if shares is not None:
            self.shares = shares
        if authz is not None:
            self.authz = authz
        if proxy is not None:
            self.proxy = proxy

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


        :return: The metadata of this AgentConnectorStats.  # noqa: E501
        :rtype: ConnectorStatsMetadata
        """
        return self._metadata

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


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

        self._metadata = metadata

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

        The summary status of the Connector. - A `good` status means that no action is neccessary on this Connector - A `warn` status means that there is an issue that should be dealt with   Examples include connections restarting frequently. - 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 Connector'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.   # noqa: E501

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

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

        The summary status of the Connector. - A `good` status means that no action is neccessary on this Connector - A `warn` status means that there is an issue that should be dealt with   Examples include connections restarting frequently. - 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 Connector'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.   # noqa: E501

        :param overall_status: The overall_status of this AgentConnectorStats.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and overall_status is None:  # noqa: E501
            raise ValueError("Invalid value for `overall_status`, must not be `None`")  # noqa: E501
        allowed_values = ["good", "warn", "down", "stale"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and overall_status not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `overall_status` ({0}), must be one of {1}"  # noqa: E501
                .format(overall_status, allowed_values)
            )

        self._overall_status = overall_status

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


        :return: The system of this AgentConnectorStats.  # noqa: E501
        :rtype: AgentConnectorSystemStats
        """
        return self._system

    @system.setter
    def system(self, system):
        """Sets the system of this AgentConnectorStats.


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

        self._system = system

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


        :return: The transport of this AgentConnectorStats.  # noqa: E501
        :rtype: AgentConnectorTransportStats
        """
        return self._transport

    @transport.setter
    def transport(self, transport):
        """Sets the transport of this AgentConnectorStats.


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

        self._transport = transport

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


        :return: The shares of this AgentConnectorStats.  # noqa: E501
        :rtype: AgentConnectorShareStats
        """
        return self._shares

    @shares.setter
    def shares(self, shares):
        """Sets the shares of this AgentConnectorStats.


        :param shares: The shares of this AgentConnectorStats.  # noqa: E501
        :type: AgentConnectorShareStats
        """

        self._shares = shares

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


        :return: The authz of this AgentConnectorStats.  # noqa: E501
        :rtype: AgentConnectorAuthzStats
        """
        return self._authz

    @authz.setter
    def authz(self, authz):
        """Sets the authz of this AgentConnectorStats.


        :param authz: The authz of this AgentConnectorStats.  # noqa: E501
        :type: AgentConnectorAuthzStats
        """

        self._authz = authz

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


        :return: The proxy of this AgentConnectorStats.  # noqa: E501
        :rtype: AgentConnectorProxyStats
        """
        return self._proxy

    @proxy.setter
    def proxy(self, proxy):
        """Sets the proxy of this AgentConnectorStats.


        :param proxy: The proxy of this AgentConnectorStats.  # noqa: E501
        :type: AgentConnectorProxyStats
        """

        self._proxy = proxy

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

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