# 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 AgentConnectorPerShareStats(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 = {
        'share_prefix': 'str',
        'share_id': 'str',
        'local_path': 'str',
        'total_requests': 'int',
        'successful_requests': 'int',
        'failed_requests': 'int',
        'bytes_sent': 'int',
        'bytes_received': 'int',
        'share_start_time': 'datetime'
    }

    attribute_map = {
        'share_prefix': 'share_prefix',
        'share_id': 'share_id',
        'local_path': 'local_path',
        'total_requests': 'total_requests',
        'successful_requests': 'successful_requests',
        'failed_requests': 'failed_requests',
        'bytes_sent': 'bytes_sent',
        'bytes_received': 'bytes_received',
        'share_start_time': 'share_start_time'
    }

    def __init__(self, share_prefix=None, share_id=None, local_path=None, total_requests=None, successful_requests=None, failed_requests=None, bytes_sent=None, bytes_received=None, share_start_time=None, local_vars_configuration=None):  # noqa: E501
        """AgentConnectorPerShareStats - 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._share_prefix = None
        self._share_id = None
        self._local_path = None
        self._total_requests = None
        self._successful_requests = None
        self._failed_requests = None
        self._bytes_sent = None
        self._bytes_received = None
        self._share_start_time = None
        self.discriminator = None

        self.share_prefix = share_prefix
        self.share_id = share_id
        self.local_path = local_path
        self.total_requests = total_requests
        self.successful_requests = successful_requests
        self.failed_requests = failed_requests
        self.bytes_sent = bytes_sent
        self.bytes_received = bytes_received
        self.share_start_time = share_start_time

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

        The prefix used to route the requests to the shared local path. This is typically derived from the share_name of the Share.   # noqa: E501

        :return: The share_prefix of this AgentConnectorPerShareStats.  # noqa: E501
        :rtype: str
        """
        return self._share_prefix

    @share_prefix.setter
    def share_prefix(self, share_prefix):
        """Sets the share_prefix of this AgentConnectorPerShareStats.

        The prefix used to route the requests to the shared local path. This is typically derived from the share_name of the Share.   # noqa: E501

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

        self._share_prefix = share_prefix

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

        The unique ID of the FileShareService to which this share corresponds.   # noqa: E501

        :return: The share_id of this AgentConnectorPerShareStats.  # noqa: E501
        :rtype: str
        """
        return self._share_id

    @share_id.setter
    def share_id(self, share_id):
        """Sets the share_id of this AgentConnectorPerShareStats.

        The unique ID of the FileShareService to which this share corresponds.   # noqa: E501

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

        self._share_id = share_id

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

        The path on the local file system which is being shared.  # noqa: E501

        :return: The local_path of this AgentConnectorPerShareStats.  # noqa: E501
        :rtype: str
        """
        return self._local_path

    @local_path.setter
    def local_path(self, local_path):
        """Sets the local_path of this AgentConnectorPerShareStats.

        The path on the local file system which is being shared.  # noqa: E501

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

        self._local_path = local_path

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

        The total number of requests made to this share.  # noqa: E501

        :return: The total_requests of this AgentConnectorPerShareStats.  # noqa: E501
        :rtype: int
        """
        return self._total_requests

    @total_requests.setter
    def total_requests(self, total_requests):
        """Sets the total_requests of this AgentConnectorPerShareStats.

        The total number of requests made to this share.  # noqa: E501

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

        self._total_requests = total_requests

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

        The total number of requests which have succeeded.  # noqa: E501

        :return: The successful_requests of this AgentConnectorPerShareStats.  # noqa: E501
        :rtype: int
        """
        return self._successful_requests

    @successful_requests.setter
    def successful_requests(self, successful_requests):
        """Sets the successful_requests of this AgentConnectorPerShareStats.

        The total number of requests which have succeeded.  # noqa: E501

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

        self._successful_requests = successful_requests

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

        The total number of requests which have failed.  # noqa: E501

        :return: The failed_requests of this AgentConnectorPerShareStats.  # noqa: E501
        :rtype: int
        """
        return self._failed_requests

    @failed_requests.setter
    def failed_requests(self, failed_requests):
        """Sets the failed_requests of this AgentConnectorPerShareStats.

        The total number of requests which have failed.  # noqa: E501

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

        self._failed_requests = failed_requests

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

        The total number of bytes sent in the body of responses to requests. This includes any metadata about files, or data included in failure responses.   # noqa: E501

        :return: The bytes_sent of this AgentConnectorPerShareStats.  # noqa: E501
        :rtype: int
        """
        return self._bytes_sent

    @bytes_sent.setter
    def bytes_sent(self, bytes_sent):
        """Sets the bytes_sent of this AgentConnectorPerShareStats.

        The total number of bytes sent in the body of responses to requests. This includes any metadata about files, or data included in failure responses.   # noqa: E501

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

        self._bytes_sent = bytes_sent

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

        The total number of bytes received in the body of requests. This includes any metadata about files, files themselves, or general commands such as lock requests.   # noqa: E501

        :return: The bytes_received of this AgentConnectorPerShareStats.  # noqa: E501
        :rtype: int
        """
        return self._bytes_received

    @bytes_received.setter
    def bytes_received(self, bytes_received):
        """Sets the bytes_received of this AgentConnectorPerShareStats.

        The total number of bytes received in the body of requests. This includes any metadata about files, files themselves, or general commands such as lock requests.   # noqa: E501

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

        self._bytes_received = bytes_received

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

        When the share was started.  # noqa: E501

        :return: The share_start_time of this AgentConnectorPerShareStats.  # noqa: E501
        :rtype: datetime
        """
        return self._share_start_time

    @share_start_time.setter
    def share_start_time(self, share_start_time):
        """Sets the share_start_time of this AgentConnectorPerShareStats.

        When the share was started.  # noqa: E501

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

        self._share_start_time = share_start_time

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

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