# coding: utf-8

"""
    Zadara VPSA Storage Array REST API

     # Overview  This document outlines the methods available for administrating your Zadara Storage VPSA&#8482;. The Zadara Storage Array REST API   supports form-encoded, JSON, and XML requests, and can return either JSON or XML responses.  ## Usage  The majority of the APIs available require authentication which requires an API token to use. You can retrieve this token through the   Users section of your VPSA, or through the API using the \"Return a user's access key\" API in the Users Section below.  ## Authentication Methods  The authentication token can be passed either through the access_key parameter inside of the body of the REST API request, or   through the X-Access-Key header.  ## Timeouts  By default, all operations that don't complete within five seconds will return a message informing you that the action may take some  time to complete. When using the API, this can cause some actions, such as large volume creation, to be undesirably asynchronous.  You can specify your own timeout with the timeout parameter, in seconds, and a timeout value of -1 specifies an infinite timeout.  ## Specific Fields For Product  Some of the fields/actions used in the API should be used only for a specific product. The following tags are used to mark which   product responds to the fields/actions  VPSA Flash Array  VPSA Storage Array - Hybrid VPSA  ## Questions  If you have any questions or need support involving the REST API, please contact for assistance.   # noqa: E501

    OpenAPI spec version: 23.03-sp1
    Contact: support@zadarastorage.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from Vpsa.configuration import Configuration


class GetAllSnapshots(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 = {
        'start': 'int',
        'limit': 'int',
        'application': 'str',
        'jobname': 'str',
        'snapshot_policy': 'str',
        'start_date': 'str',
        'end_date': 'str'
    }

    attribute_map = {
        'start': 'start',
        'limit': 'limit',
        'application': 'application',
        'jobname': 'jobname',
        'snapshot_policy': 'snapshot_policy',
        'start_date': 'start_date',
        'end_date': 'end_date'
    }

    def __init__(self, start=None, limit=None, application=None, jobname=None, snapshot_policy=None, start_date=None, end_date=None, _configuration=None):  # noqa: E501
        """GetAllSnapshots - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._start = None
        self._limit = None
        self._application = None
        self._jobname = None
        self._snapshot_policy = None
        self._start_date = None
        self._end_date = None
        self.discriminator = None

        if start is not None:
            self.start = start
        if limit is not None:
            self.limit = limit
        if application is not None:
            self.application = application
        if jobname is not None:
            self.jobname = jobname
        if snapshot_policy is not None:
            self.snapshot_policy = snapshot_policy
        if start_date is not None:
            self.start_date = start_date
        if end_date is not None:
            self.end_date = end_date

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

        The item number to start from. 0 starts from the beginning.  # noqa: E501

        :return: The start of this GetAllSnapshots.  # noqa: E501
        :rtype: int
        """
        return self._start

    @start.setter
    def start(self, start):
        """Sets the start of this GetAllSnapshots.

        The item number to start from. 0 starts from the beginning.  # noqa: E501

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

        self._start = start

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

        The total number of records to return.  # noqa: E501

        :return: The limit of this GetAllSnapshots.  # noqa: E501
        :rtype: int
        """
        return self._limit

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

        The total number of records to return.  # noqa: E501

        :param limit: The limit of this GetAllSnapshots.  # noqa: E501
        :type: int
        """

        self._limit = limit

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

        Policy Application.  # noqa: E501

        :return: The application of this GetAllSnapshots.  # noqa: E501
        :rtype: str
        """
        return self._application

    @application.setter
    def application(self, application):
        """Sets the application of this GetAllSnapshots.

        Policy Application.  # noqa: E501

        :param application: The application of this GetAllSnapshots.  # noqa: E501
        :type: str
        """
        allowed_values = ["user", "mirror", "migration", "obs_mirror", "shadow_copy"]  # noqa: E501
        if (self._configuration.client_side_validation and
                application not in allowed_values):
            raise ValueError(
                "Invalid value for `application` ({0}), must be one of {1}"  # noqa: E501
                .format(application, allowed_values)
            )

        self._application = application

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

        Mirror Job used to create the snapshots.  # noqa: E501

        :return: The jobname of this GetAllSnapshots.  # noqa: E501
        :rtype: str
        """
        return self._jobname

    @jobname.setter
    def jobname(self, jobname):
        """Sets the jobname of this GetAllSnapshots.

        Mirror Job used to create the snapshots.  # noqa: E501

        :param jobname: The jobname of this GetAllSnapshots.  # noqa: E501
        :type: str
        """
        if (self._configuration.client_side_validation and
                jobname is not None and not re.search(r'^bkpjobs-[0-9a-f]{8}$', jobname)):  # noqa: E501
            raise ValueError(r"Invalid value for `jobname`, must be a follow pattern or equal to `/^bkpjobs-[0-9a-f]{8}$/`")  # noqa: E501

        self._jobname = jobname

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

        Snapshot Policy which created the snapshots.  # noqa: E501

        :return: The snapshot_policy of this GetAllSnapshots.  # noqa: E501
        :rtype: str
        """
        return self._snapshot_policy

    @snapshot_policy.setter
    def snapshot_policy(self, snapshot_policy):
        """Sets the snapshot_policy of this GetAllSnapshots.

        Snapshot Policy which created the snapshots.  # noqa: E501

        :param snapshot_policy: The snapshot_policy of this GetAllSnapshots.  # noqa: E501
        :type: str
        """

        self._snapshot_policy = snapshot_policy

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

        Snapshots created after the provided value (DD:MM:YY:HH:MM:SS localtime)  # noqa: E501

        :return: The start_date of this GetAllSnapshots.  # noqa: E501
        :rtype: str
        """
        return self._start_date

    @start_date.setter
    def start_date(self, start_date):
        """Sets the start_date of this GetAllSnapshots.

        Snapshots created after the provided value (DD:MM:YY:HH:MM:SS localtime)  # noqa: E501

        :param start_date: The start_date of this GetAllSnapshots.  # noqa: E501
        :type: str
        """

        self._start_date = start_date

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

        Snapshots created before the provided value DD:MM:YY:HH:MM:SS localtime)  # noqa: E501

        :return: The end_date of this GetAllSnapshots.  # noqa: E501
        :rtype: str
        """
        return self._end_date

    @end_date.setter
    def end_date(self, end_date):
        """Sets the end_date of this GetAllSnapshots.

        Snapshots created before the provided value DD:MM:YY:HH:MM:SS localtime)  # noqa: E501

        :param end_date: The end_date of this GetAllSnapshots.  # noqa: E501
        :type: str
        """

        self._end_date = end_date

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

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