# coding: utf-8

"""
    Agilicus API

    Agilicus API endpoints  # noqa: E501

    The version of the OpenAPI document: 2021.02.16
    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 AgentConnectorSystemStats(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 = {
        'os_version': 'str',
        'os_uptime': 'int',
        'agent_uptime': 'int',
        'agent_version': 'str',
        'agent_release_train': 'str',
        'agent_connector_id': 'str',
        'agent_connector_org_id': 'str'
    }

    attribute_map = {
        'os_version': 'os_version',
        'os_uptime': 'os_uptime',
        'agent_uptime': 'agent_uptime',
        'agent_version': 'agent_version',
        'agent_release_train': 'agent_release_train',
        'agent_connector_id': 'agent_connector_id',
        'agent_connector_org_id': 'agent_connector_org_id'
    }

    def __init__(self, os_version=None, os_uptime=None, agent_uptime=None, agent_version=None, agent_release_train=None, agent_connector_id=None, agent_connector_org_id=None, local_vars_configuration=None):  # noqa: E501
        """AgentConnectorSystemStats - 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._os_version = None
        self._os_uptime = None
        self._agent_uptime = None
        self._agent_version = None
        self._agent_release_train = None
        self._agent_connector_id = None
        self._agent_connector_org_id = None
        self.discriminator = None

        self.os_version = os_version
        self.os_uptime = os_uptime
        self.agent_uptime = agent_uptime
        self.agent_version = agent_version
        if agent_release_train is not None:
            self.agent_release_train = agent_release_train
        self.agent_connector_id = agent_connector_id
        self.agent_connector_org_id = agent_connector_org_id

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

        The version of the operating system on which the AgentConnector is running.  # noqa: E501

        :return: The os_version of this AgentConnectorSystemStats.  # noqa: E501
        :rtype: str
        """
        return self._os_version

    @os_version.setter
    def os_version(self, os_version):
        """Sets the os_version of this AgentConnectorSystemStats.

        The version of the operating system on which the AgentConnector is running.  # noqa: E501

        :param os_version: The os_version of this AgentConnectorSystemStats.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and os_version is None:  # noqa: E501
            raise ValueError("Invalid value for `os_version`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                os_version is not None and len(os_version) > 2048):
            raise ValueError("Invalid value for `os_version`, length must be less than or equal to `2048`")  # noqa: E501

        self._os_version = os_version

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

        The length of time, in seconds, the operating system has been running.  # noqa: E501

        :return: The os_uptime of this AgentConnectorSystemStats.  # noqa: E501
        :rtype: int
        """
        return self._os_uptime

    @os_uptime.setter
    def os_uptime(self, os_uptime):
        """Sets the os_uptime of this AgentConnectorSystemStats.

        The length of time, in seconds, the operating system has been running.  # noqa: E501

        :param os_uptime: The os_uptime of this AgentConnectorSystemStats.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and os_uptime is None:  # noqa: E501
            raise ValueError("Invalid value for `os_uptime`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                os_uptime is not None and os_uptime < 0):  # noqa: E501
            raise ValueError("Invalid value for `os_uptime`, must be a value greater than or equal to `0`")  # noqa: E501

        self._os_uptime = os_uptime

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

        The length of time, in seconds, the AgentConnector has been running. If the AgentConnector restarts, this value will reset to zero.   # noqa: E501

        :return: The agent_uptime of this AgentConnectorSystemStats.  # noqa: E501
        :rtype: int
        """
        return self._agent_uptime

    @agent_uptime.setter
    def agent_uptime(self, agent_uptime):
        """Sets the agent_uptime of this AgentConnectorSystemStats.

        The length of time, in seconds, the AgentConnector has been running. If the AgentConnector restarts, this value will reset to zero.   # noqa: E501

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

        self._agent_uptime = agent_uptime

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

        The version of software currently running for this AgentConnector. This includes both the version number and the commit reference from which it was built.   # noqa: E501

        :return: The agent_version of this AgentConnectorSystemStats.  # noqa: E501
        :rtype: str
        """
        return self._agent_version

    @agent_version.setter
    def agent_version(self, agent_version):
        """Sets the agent_version of this AgentConnectorSystemStats.

        The version of software currently running for this AgentConnector. This includes both the version number and the commit reference from which it was built.   # noqa: E501

        :param agent_version: The agent_version of this AgentConnectorSystemStats.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and agent_version is None:  # noqa: E501
            raise ValueError("Invalid value for `agent_version`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                agent_version is not None and len(agent_version) > 2048):
            raise ValueError("Invalid value for `agent_version`, length must be less than or equal to `2048`")  # noqa: E501

        self._agent_version = agent_version

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

        The release train followed by the AgentConnector. It uses this when checking for updates to determine which version of the AgentConnector should be installed.   # noqa: E501

        :return: The agent_release_train of this AgentConnectorSystemStats.  # noqa: E501
        :rtype: str
        """
        return self._agent_release_train

    @agent_release_train.setter
    def agent_release_train(self, agent_release_train):
        """Sets the agent_release_train of this AgentConnectorSystemStats.

        The release train followed by the AgentConnector. It uses this when checking for updates to determine which version of the AgentConnector should be installed.   # noqa: E501

        :param agent_release_train: The agent_release_train of this AgentConnectorSystemStats.  # noqa: E501
        :type: str
        """
        if (self.local_vars_configuration.client_side_validation and
                agent_release_train is not None and len(agent_release_train) > 2048):
            raise ValueError("Invalid value for `agent_release_train`, length must be less than or equal to `2048`")  # noqa: E501

        self._agent_release_train = agent_release_train

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

        The identifier of the AgentConnector publishing these statistics. The AgentConnector publishes this information in order to ensure that an AgentConnector does not accidentally publish to the wrong endpoint.   # noqa: E501

        :return: The agent_connector_id of this AgentConnectorSystemStats.  # noqa: E501
        :rtype: str
        """
        return self._agent_connector_id

    @agent_connector_id.setter
    def agent_connector_id(self, agent_connector_id):
        """Sets the agent_connector_id of this AgentConnectorSystemStats.

        The identifier of the AgentConnector publishing these statistics. The AgentConnector publishes this information in order to ensure that an AgentConnector does not accidentally publish to the wrong endpoint.   # noqa: E501

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

        self._agent_connector_id = agent_connector_id

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

        The organisation identifier of the AgentConnector publishing these statistics. The AgentConnector publishes this information in order to ensure that an AgentConnector does not accidentally publish to the wrong endpoint.   # noqa: E501

        :return: The agent_connector_org_id of this AgentConnectorSystemStats.  # noqa: E501
        :rtype: str
        """
        return self._agent_connector_org_id

    @agent_connector_org_id.setter
    def agent_connector_org_id(self, agent_connector_org_id):
        """Sets the agent_connector_org_id of this AgentConnectorSystemStats.

        The organisation identifier of the AgentConnector publishing these statistics. The AgentConnector publishes this information in order to ensure that an AgentConnector does not accidentally publish to the wrong endpoint.   # noqa: E501

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

        self._agent_connector_org_id = agent_connector_org_id

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

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