# coding: utf-8

"""
    Agilicus API

    Agilicus is API-first. Modern software is controlled by other software, is open, is available for you to use the way you want, securely, simply.  A rendered, online viewable and usable version of this specification is available at [api](https://www.agilicus.com/api). You may try the API inline directly in the web page. To do so, first obtain an Authentication Token (the simplest way is to install the Python SDK, and then run `agilicus-cli --issuer https://MYISSUER get-token`). You will need an org-id for most calls (and can obtain from `agilicus-cli --issuer https://MYISSUER list-orgs`). The `MYISSUER` will typically be `auth.MYDOMAIN`, and you will see it as you sign-in to the administrative UI.  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.05.06
    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()
