# coding: utf-8

"""
    Argo

    Python client for Argo Workflows  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class V1ListOptions(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_watch_bookmarks': 'bool',
        '_continue': 'str',
        'field_selector': 'str',
        'label_selector': 'str',
        'limit': 'str',
        'resource_version': 'str',
        'timeout_seconds': 'str',
        'watch': 'bool'
    }

    attribute_map = {
        'allow_watch_bookmarks': 'allowWatchBookmarks',
        '_continue': 'continue',
        'field_selector': 'fieldSelector',
        'label_selector': 'labelSelector',
        'limit': 'limit',
        'resource_version': 'resourceVersion',
        'timeout_seconds': 'timeoutSeconds',
        'watch': 'watch'
    }

    def __init__(self, allow_watch_bookmarks=None, _continue=None, field_selector=None, label_selector=None, limit=None, resource_version=None, timeout_seconds=None, watch=None):  # noqa: E501
        """V1ListOptions - a model defined in Swagger"""  # noqa: E501

        self._allow_watch_bookmarks = None
        self.__continue = None
        self._field_selector = None
        self._label_selector = None
        self._limit = None
        self._resource_version = None
        self._timeout_seconds = None
        self._watch = None
        self.discriminator = None

        if allow_watch_bookmarks is not None:
            self.allow_watch_bookmarks = allow_watch_bookmarks
        if _continue is not None:
            self._continue = _continue
        if field_selector is not None:
            self.field_selector = field_selector
        if label_selector is not None:
            self.label_selector = label_selector
        if limit is not None:
            self.limit = limit
        if resource_version is not None:
            self.resource_version = resource_version
        if timeout_seconds is not None:
            self.timeout_seconds = timeout_seconds
        if watch is not None:
            self.watch = watch

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

        allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.  This field is beta.  +optional  # noqa: E501

        :return: The allow_watch_bookmarks of this V1ListOptions.  # noqa: E501
        :rtype: bool
        """
        return self._allow_watch_bookmarks

    @allow_watch_bookmarks.setter
    def allow_watch_bookmarks(self, allow_watch_bookmarks):
        """Sets the allow_watch_bookmarks of this V1ListOptions.

        allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.  This field is beta.  +optional  # noqa: E501

        :param allow_watch_bookmarks: The allow_watch_bookmarks of this V1ListOptions.  # noqa: E501
        :type: bool
        """

        self._allow_watch_bookmarks = allow_watch_bookmarks

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

        The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".  This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.  # noqa: E501

        :return: The _continue of this V1ListOptions.  # noqa: E501
        :rtype: str
        """
        return self.__continue

    @_continue.setter
    def _continue(self, _continue):
        """Sets the _continue of this V1ListOptions.

        The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".  This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.  # noqa: E501

        :param _continue: The _continue of this V1ListOptions.  # noqa: E501
        :type: str
        """

        self.__continue = _continue

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


        :return: The field_selector of this V1ListOptions.  # noqa: E501
        :rtype: str
        """
        return self._field_selector

    @field_selector.setter
    def field_selector(self, field_selector):
        """Sets the field_selector of this V1ListOptions.


        :param field_selector: The field_selector of this V1ListOptions.  # noqa: E501
        :type: str
        """

        self._field_selector = field_selector

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


        :return: The label_selector of this V1ListOptions.  # noqa: E501
        :rtype: str
        """
        return self._label_selector

    @label_selector.setter
    def label_selector(self, label_selector):
        """Sets the label_selector of this V1ListOptions.


        :param label_selector: The label_selector of this V1ListOptions.  # noqa: E501
        :type: str
        """

        self._label_selector = label_selector

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

        limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.  The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.  # noqa: E501

        :return: The limit of this V1ListOptions.  # noqa: E501
        :rtype: str
        """
        return self._limit

    @limit.setter
    def limit(self, limit):
        """Sets the limit of this V1ListOptions.

        limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.  The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.  # noqa: E501

        :param limit: The limit of this V1ListOptions.  # noqa: E501
        :type: str
        """

        self._limit = limit

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


        :return: The resource_version of this V1ListOptions.  # noqa: E501
        :rtype: str
        """
        return self._resource_version

    @resource_version.setter
    def resource_version(self, resource_version):
        """Sets the resource_version of this V1ListOptions.


        :param resource_version: The resource_version of this V1ListOptions.  # noqa: E501
        :type: str
        """

        self._resource_version = resource_version

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


        :return: The timeout_seconds of this V1ListOptions.  # noqa: E501
        :rtype: str
        """
        return self._timeout_seconds

    @timeout_seconds.setter
    def timeout_seconds(self, timeout_seconds):
        """Sets the timeout_seconds of this V1ListOptions.


        :param timeout_seconds: The timeout_seconds of this V1ListOptions.  # noqa: E501
        :type: str
        """

        self._timeout_seconds = timeout_seconds

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


        :return: The watch of this V1ListOptions.  # noqa: E501
        :rtype: bool
        """
        return self._watch

    @watch.setter
    def watch(self, watch):
        """Sets the watch of this V1ListOptions.


        :param watch: The watch of this V1ListOptions.  # noqa: E501
        :type: bool
        """

        self._watch = watch

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

        for attr, _ in six.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
        if issubclass(V1ListOptions, dict):
            for key, value in self.items():
                result[key] = 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, V1ListOptions):
            return False

        return self.__dict__ == other.__dict__

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