# coding: utf-8

"""
    Seeq REST API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

    OpenAPI spec version: 53.2.1-SNAPSHOT
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class DatasourceSummaryStatusOutputV1(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """


    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'allow_requests': 'bool',
        'connections': 'list[ConnectionStatusOutputV1]',
        'connections_connected_count': 'int',
        'current_index_at': 'str',
        'datasource_class': 'str',
        'datasource_id': 'str',
        'datasource_indexing': 'bool',
        'id': 'str',
        'name': 'str',
        'next_scheduled_index_at': 'str',
        'previous_index_at': 'str',
        'sync_progress': 'SyncProgressOutputV1',
        'total_connections_count': 'int'
    }

    attribute_map = {
        'allow_requests': 'allowRequests',
        'connections': 'connections',
        'connections_connected_count': 'connectionsConnectedCount',
        'current_index_at': 'currentIndexAt',
        'datasource_class': 'datasourceClass',
        'datasource_id': 'datasourceId',
        'datasource_indexing': 'datasourceIndexing',
        'id': 'id',
        'name': 'name',
        'next_scheduled_index_at': 'nextScheduledIndexAt',
        'previous_index_at': 'previousIndexAt',
        'sync_progress': 'syncProgress',
        'total_connections_count': 'totalConnectionsCount'
    }

    def __init__(self, allow_requests=False, connections=None, connections_connected_count=None, current_index_at=None, datasource_class=None, datasource_id=None, datasource_indexing=False, id=None, name=None, next_scheduled_index_at=None, previous_index_at=None, sync_progress=None, total_connections_count=None):
        """
        DatasourceSummaryStatusOutputV1 - a model defined in Swagger
        """

        self._allow_requests = None
        self._connections = None
        self._connections_connected_count = None
        self._current_index_at = None
        self._datasource_class = None
        self._datasource_id = None
        self._datasource_indexing = None
        self._id = None
        self._name = None
        self._next_scheduled_index_at = None
        self._previous_index_at = None
        self._sync_progress = None
        self._total_connections_count = None

        if allow_requests is not None:
          self.allow_requests = allow_requests
        if connections is not None:
          self.connections = connections
        if connections_connected_count is not None:
          self.connections_connected_count = connections_connected_count
        if current_index_at is not None:
          self.current_index_at = current_index_at
        if datasource_class is not None:
          self.datasource_class = datasource_class
        if datasource_id is not None:
          self.datasource_id = datasource_id
        if datasource_indexing is not None:
          self.datasource_indexing = datasource_indexing
        if id is not None:
          self.id = id
        if name is not None:
          self.name = name
        if next_scheduled_index_at is not None:
          self.next_scheduled_index_at = next_scheduled_index_at
        if previous_index_at is not None:
          self.previous_index_at = previous_index_at
        if sync_progress is not None:
          self.sync_progress = sync_progress
        if total_connections_count is not None:
          self.total_connections_count = total_connections_count

    @property
    def allow_requests(self):
        """
        Gets the allow_requests of this DatasourceSummaryStatusOutputV1.
        Whether Seeq allows requests to the datasource

        :return: The allow_requests of this DatasourceSummaryStatusOutputV1.
        :rtype: bool
        """
        return self._allow_requests

    @allow_requests.setter
    def allow_requests(self, allow_requests):
        """
        Sets the allow_requests of this DatasourceSummaryStatusOutputV1.
        Whether Seeq allows requests to the datasource

        :param allow_requests: The allow_requests of this DatasourceSummaryStatusOutputV1.
        :type: bool
        """

        self._allow_requests = allow_requests

    @property
    def connections(self):
        """
        Gets the connections of this DatasourceSummaryStatusOutputV1.
        The status for each connection that provides data to this datasource.Provided only when the required level of detail is 'Complete'

        :return: The connections of this DatasourceSummaryStatusOutputV1.
        :rtype: list[ConnectionStatusOutputV1]
        """
        return self._connections

    @connections.setter
    def connections(self, connections):
        """
        Sets the connections of this DatasourceSummaryStatusOutputV1.
        The status for each connection that provides data to this datasource.Provided only when the required level of detail is 'Complete'

        :param connections: The connections of this DatasourceSummaryStatusOutputV1.
        :type: list[ConnectionStatusOutputV1]
        """

        self._connections = connections

    @property
    def connections_connected_count(self):
        """
        Gets the connections_connected_count of this DatasourceSummaryStatusOutputV1.
        Number of connections in status 'Connected' providing data for this datasource

        :return: The connections_connected_count of this DatasourceSummaryStatusOutputV1.
        :rtype: int
        """
        return self._connections_connected_count

    @connections_connected_count.setter
    def connections_connected_count(self, connections_connected_count):
        """
        Sets the connections_connected_count of this DatasourceSummaryStatusOutputV1.
        Number of connections in status 'Connected' providing data for this datasource

        :param connections_connected_count: The connections_connected_count of this DatasourceSummaryStatusOutputV1.
        :type: int
        """

        self._connections_connected_count = connections_connected_count

    @property
    def current_index_at(self):
        """
        Gets the current_index_at of this DatasourceSummaryStatusOutputV1.
        The ISO 8601 date of when current index occurred (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm)

        :return: The current_index_at of this DatasourceSummaryStatusOutputV1.
        :rtype: str
        """
        return self._current_index_at

    @current_index_at.setter
    def current_index_at(self, current_index_at):
        """
        Sets the current_index_at of this DatasourceSummaryStatusOutputV1.
        The ISO 8601 date of when current index occurred (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm)

        :param current_index_at: The current_index_at of this DatasourceSummaryStatusOutputV1.
        :type: str
        """

        self._current_index_at = current_index_at

    @property
    def datasource_class(self):
        """
        Gets the datasource_class of this DatasourceSummaryStatusOutputV1.
        The datasource class.  Example: OSIsoft PI

        :return: The datasource_class of this DatasourceSummaryStatusOutputV1.
        :rtype: str
        """
        return self._datasource_class

    @datasource_class.setter
    def datasource_class(self, datasource_class):
        """
        Sets the datasource_class of this DatasourceSummaryStatusOutputV1.
        The datasource class.  Example: OSIsoft PI

        :param datasource_class: The datasource_class of this DatasourceSummaryStatusOutputV1.
        :type: str
        """
        if datasource_class is None:
            raise ValueError("Invalid value for `datasource_class`, must not be `None`")

        self._datasource_class = datasource_class

    @property
    def datasource_id(self):
        """
        Gets the datasource_id of this DatasourceSummaryStatusOutputV1.
        The datasource ID

        :return: The datasource_id of this DatasourceSummaryStatusOutputV1.
        :rtype: str
        """
        return self._datasource_id

    @datasource_id.setter
    def datasource_id(self, datasource_id):
        """
        Sets the datasource_id of this DatasourceSummaryStatusOutputV1.
        The datasource ID

        :param datasource_id: The datasource_id of this DatasourceSummaryStatusOutputV1.
        :type: str
        """
        if datasource_id is None:
            raise ValueError("Invalid value for `datasource_id`, must not be `None`")

        self._datasource_id = datasource_id

    @property
    def datasource_indexing(self):
        """
        Gets the datasource_indexing of this DatasourceSummaryStatusOutputV1.
        Whether any connection of the datasource is currently indexing

        :return: The datasource_indexing of this DatasourceSummaryStatusOutputV1.
        :rtype: bool
        """
        return self._datasource_indexing

    @datasource_indexing.setter
    def datasource_indexing(self, datasource_indexing):
        """
        Sets the datasource_indexing of this DatasourceSummaryStatusOutputV1.
        Whether any connection of the datasource is currently indexing

        :param datasource_indexing: The datasource_indexing of this DatasourceSummaryStatusOutputV1.
        :type: bool
        """

        self._datasource_indexing = datasource_indexing

    @property
    def id(self):
        """
        Gets the id of this DatasourceSummaryStatusOutputV1.
        The Seeq ID of the datasource

        :return: The id of this DatasourceSummaryStatusOutputV1.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this DatasourceSummaryStatusOutputV1.
        The Seeq ID of the datasource

        :param id: The id of this DatasourceSummaryStatusOutputV1.
        :type: str
        """
        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")

        self._id = id

    @property
    def name(self):
        """
        Gets the name of this DatasourceSummaryStatusOutputV1.
        The name of the datasource

        :return: The name of this DatasourceSummaryStatusOutputV1.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this DatasourceSummaryStatusOutputV1.
        The name of the datasource

        :param name: The name of this DatasourceSummaryStatusOutputV1.
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")

        self._name = name

    @property
    def next_scheduled_index_at(self):
        """
        Gets the next_scheduled_index_at of this DatasourceSummaryStatusOutputV1.
        The ISO 8601 date of when next indexing is scheduled (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm)

        :return: The next_scheduled_index_at of this DatasourceSummaryStatusOutputV1.
        :rtype: str
        """
        return self._next_scheduled_index_at

    @next_scheduled_index_at.setter
    def next_scheduled_index_at(self, next_scheduled_index_at):
        """
        Sets the next_scheduled_index_at of this DatasourceSummaryStatusOutputV1.
        The ISO 8601 date of when next indexing is scheduled (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm)

        :param next_scheduled_index_at: The next_scheduled_index_at of this DatasourceSummaryStatusOutputV1.
        :type: str
        """

        self._next_scheduled_index_at = next_scheduled_index_at

    @property
    def previous_index_at(self):
        """
        Gets the previous_index_at of this DatasourceSummaryStatusOutputV1.
        The ISO 8601 date of when previous index occurred (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm)

        :return: The previous_index_at of this DatasourceSummaryStatusOutputV1.
        :rtype: str
        """
        return self._previous_index_at

    @previous_index_at.setter
    def previous_index_at(self, previous_index_at):
        """
        Sets the previous_index_at of this DatasourceSummaryStatusOutputV1.
        The ISO 8601 date of when previous index occurred (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm)

        :param previous_index_at: The previous_index_at of this DatasourceSummaryStatusOutputV1.
        :type: str
        """

        self._previous_index_at = previous_index_at

    @property
    def sync_progress(self):
        """
        Gets the sync_progress of this DatasourceSummaryStatusOutputV1.
        Metadata sync progress and total items synced from an external datasource to Seeq

        :return: The sync_progress of this DatasourceSummaryStatusOutputV1.
        :rtype: SyncProgressOutputV1
        """
        return self._sync_progress

    @sync_progress.setter
    def sync_progress(self, sync_progress):
        """
        Sets the sync_progress of this DatasourceSummaryStatusOutputV1.
        Metadata sync progress and total items synced from an external datasource to Seeq

        :param sync_progress: The sync_progress of this DatasourceSummaryStatusOutputV1.
        :type: SyncProgressOutputV1
        """

        self._sync_progress = sync_progress

    @property
    def total_connections_count(self):
        """
        Gets the total_connections_count of this DatasourceSummaryStatusOutputV1.
        The total number of connections that should be in status 'Connected' for this datasource

        :return: The total_connections_count of this DatasourceSummaryStatusOutputV1.
        :rtype: int
        """
        return self._total_connections_count

    @total_connections_count.setter
    def total_connections_count(self, total_connections_count):
        """
        Sets the total_connections_count of this DatasourceSummaryStatusOutputV1.
        The total number of connections that should be in status 'Connected' for this datasource

        :param total_connections_count: The total_connections_count of this DatasourceSummaryStatusOutputV1.
        :type: int
        """

        self._total_connections_count = total_connections_count

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in iteritems(self.swagger_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 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, DatasourceSummaryStatusOutputV1):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other
