# 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 CreateRosBackupJob(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 = {
        'name': 'str',
        'destination': 'str',
        'volume': 'str',
        'policy': 'str',
        'compression': 'str',
        'sse': 'str',
        'storage_class': 'str'
    }

    attribute_map = {
        'name': 'name',
        'destination': 'destination',
        'volume': 'volume',
        'policy': 'policy',
        'compression': 'compression',
        'sse': 'sse',
        'storage_class': 'storage_class'
    }

    def __init__(self, name=None, destination=None, volume=None, policy=None, compression=None, sse=None, storage_class=None, _configuration=None):  # noqa: E501
        """CreateRosBackupJob - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._name = None
        self._destination = None
        self._volume = None
        self._policy = None
        self._compression = None
        self._sse = None
        self._storage_class = None
        self.discriminator = None

        self.name = name
        self.destination = destination
        self.volume = volume
        self.policy = policy
        self.compression = compression
        self.sse = sse
        if storage_class is not None:
            self.storage_class = storage_class

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

        Display Name for object storage backup job  # noqa: E501

        :return: The name of this CreateRosBackupJob.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this CreateRosBackupJob.

        Display Name for object storage backup job  # noqa: E501

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

        self._name = name

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

        Object storage destination for the backup  # noqa: E501

        :return: The destination of this CreateRosBackupJob.  # noqa: E501
        :rtype: str
        """
        return self._destination

    @destination.setter
    def destination(self, destination):
        """Sets the destination of this CreateRosBackupJob.

        Object storage destination for the backup  # noqa: E501

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

        self._destination = destination

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

        Volume to backup  # noqa: E501

        :return: The volume of this CreateRosBackupJob.  # noqa: E501
        :rtype: str
        """
        return self._volume

    @volume.setter
    def volume(self, volume):
        """Sets the volume of this CreateRosBackupJob.

        Volume to backup  # noqa: E501

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

        self._volume = volume

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

        snapshot policy for backup  # noqa: E501

        :return: The policy of this CreateRosBackupJob.  # noqa: E501
        :rtype: str
        """
        return self._policy

    @policy.setter
    def policy(self, policy):
        """Sets the policy of this CreateRosBackupJob.

        snapshot policy for backup  # noqa: E501

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

        self._policy = policy

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

        enable compression  # noqa: E501

        :return: The compression of this CreateRosBackupJob.  # noqa: E501
        :rtype: str
        """
        return self._compression

    @compression.setter
    def compression(self, compression):
        """Sets the compression of this CreateRosBackupJob.

        enable compression  # noqa: E501

        :param compression: The compression of this CreateRosBackupJob.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and compression is None:
            raise ValueError("Invalid value for `compression`, must not be `None`")  # noqa: E501
        allowed_values = ["YES", "NO"]  # noqa: E501
        if (self._configuration.client_side_validation and
                compression not in allowed_values):
            raise ValueError(
                "Invalid value for `compression` ({0}), must be one of {1}"  # noqa: E501
                .format(compression, allowed_values)
            )

        self._compression = compression

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

        SSE - use 'NO' for Azure cloud.  # noqa: E501

        :return: The sse of this CreateRosBackupJob.  # noqa: E501
        :rtype: str
        """
        return self._sse

    @sse.setter
    def sse(self, sse):
        """Sets the sse of this CreateRosBackupJob.

        SSE - use 'NO' for Azure cloud.  # noqa: E501

        :param sse: The sse of this CreateRosBackupJob.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and sse is None:
            raise ValueError("Invalid value for `sse`, must not be `None`")  # noqa: E501
        allowed_values = ["NO", "AES256", "KMS", "KMSKEYID"]  # noqa: E501
        if (self._configuration.client_side_validation and
                sse not in allowed_values):
            raise ValueError(
                "Invalid value for `sse` ({0}), must be one of {1}"  # noqa: E501
                .format(sse, allowed_values)
            )

        self._sse = sse

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

        S3 storage class if the object storage destination is AWS S3 (STANDARD, INTELLIGENT_TIERING or STANDARD_IA), default is what configured on the bucket. Or BLOB storage tier for Azure cloud (HOT or COOL).  # noqa: E501

        :return: The storage_class of this CreateRosBackupJob.  # noqa: E501
        :rtype: str
        """
        return self._storage_class

    @storage_class.setter
    def storage_class(self, storage_class):
        """Sets the storage_class of this CreateRosBackupJob.

        S3 storage class if the object storage destination is AWS S3 (STANDARD, INTELLIGENT_TIERING or STANDARD_IA), default is what configured on the bucket. Or BLOB storage tier for Azure cloud (HOT or COOL).  # noqa: E501

        :param storage_class: The storage_class of this CreateRosBackupJob.  # noqa: E501
        :type: str
        """
        allowed_values = ["STANDARD", "INTELLIGENT_TIERING", "STANDARD_IA", "HOT", "COOL"]  # noqa: E501
        if (self._configuration.client_side_validation and
                storage_class not in allowed_values):
            raise ValueError(
                "Invalid value for `storage_class` ({0}), must be one of {1}"  # noqa: E501
                .format(storage_class, allowed_values)
            )

        self._storage_class = storage_class

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

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