# coding: utf-8

"""
    Zadara Provisioning Portal API

     # Overview  This document outlines the methods available for creation and high-level administration of Zadara Storage VPSAs via a Zadara Storage Provisioning Portal. This API supports form-encoded requests, and can return either JSON or XML responses.  ## Endpoint  The base URL for the requests is the Provisioning Portal URL you created your VPSA through - for example: https://manage.zadarastorage.com/, and all APIs will be prefixed with /api as noted in the documentation below.  ## Authentication  To use this API, an authentication token is required. The API for retrieving this token can be found below in the Authentication section. You may pass this token in requests either via the the X-Token header or via basic authentication (base64 encoded) in Authorization header.  ## 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 ProvisioningPortal.configuration import Configuration


class CreateObjectStorageAccount(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 = {
        'object_storage_account_name': 'str',
        'object_storage_admin_username': 'str',
        'object_storage_admin_password': 'str',
        'user_id': 'int',
        'moderate': 'bool'
    }

    attribute_map = {
        'object_storage_account_name': 'object_storage_account_name',
        'object_storage_admin_username': 'object_storage_admin_username',
        'object_storage_admin_password': 'object_storage_admin_password',
        'user_id': 'user_id',
        'moderate': 'moderate'
    }

    def __init__(self, object_storage_account_name=None, object_storage_admin_username=None, object_storage_admin_password=None, user_id=None, moderate=None, _configuration=None):  # noqa: E501
        """CreateObjectStorageAccount - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._object_storage_account_name = None
        self._object_storage_admin_username = None
        self._object_storage_admin_password = None
        self._user_id = None
        self._moderate = None
        self.discriminator = None

        self.object_storage_account_name = object_storage_account_name
        self.object_storage_admin_username = object_storage_admin_username
        self.object_storage_admin_password = object_storage_admin_password
        self.user_id = user_id
        if moderate is not None:
            self.moderate = moderate

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

        The new account name.  # noqa: E501

        :return: The object_storage_account_name of this CreateObjectStorageAccount.  # noqa: E501
        :rtype: str
        """
        return self._object_storage_account_name

    @object_storage_account_name.setter
    def object_storage_account_name(self, object_storage_account_name):
        """Sets the object_storage_account_name of this CreateObjectStorageAccount.

        The new account name.  # noqa: E501

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

        self._object_storage_account_name = object_storage_account_name

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

        The new account administrator username. The administrator user will be created with the account.  # noqa: E501

        :return: The object_storage_admin_username of this CreateObjectStorageAccount.  # noqa: E501
        :rtype: str
        """
        return self._object_storage_admin_username

    @object_storage_admin_username.setter
    def object_storage_admin_username(self, object_storage_admin_username):
        """Sets the object_storage_admin_username of this CreateObjectStorageAccount.

        The new account administrator username. The administrator user will be created with the account.  # noqa: E501

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

        self._object_storage_admin_username = object_storage_admin_username

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

        The new account administrator password. The administrator user will be created with the account.  # noqa: E501

        :return: The object_storage_admin_password of this CreateObjectStorageAccount.  # noqa: E501
        :rtype: str
        """
        return self._object_storage_admin_password

    @object_storage_admin_password.setter
    def object_storage_admin_password(self, object_storage_admin_password):
        """Sets the object_storage_admin_password of this CreateObjectStorageAccount.

        The new account administrator password. The administrator user will be created with the account.  # noqa: E501

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

        self._object_storage_admin_password = object_storage_admin_password

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

        The ID of the user that creates the account.  # noqa: E501

        :return: The user_id of this CreateObjectStorageAccount.  # noqa: E501
        :rtype: int
        """
        return self._user_id

    @user_id.setter
    def user_id(self, user_id):
        """Sets the user_id of this CreateObjectStorageAccount.

        The ID of the user that creates the account.  # noqa: E501

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

        self._user_id = user_id

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

        When false, the account will be immediately created. When true, only a request will be created and it should be approved by an administrator. Default is false. Usable only for administrator or auto-approved user.  # noqa: E501

        :return: The moderate of this CreateObjectStorageAccount.  # noqa: E501
        :rtype: bool
        """
        return self._moderate

    @moderate.setter
    def moderate(self, moderate):
        """Sets the moderate of this CreateObjectStorageAccount.

        When false, the account will be immediately created. When true, only a request will be created and it should be approved by an administrator. Default is false. Usable only for administrator or auto-approved user.  # noqa: E501

        :param moderate: The moderate of this CreateObjectStorageAccount.  # noqa: E501
        :type: bool
        """

        self._moderate = moderate

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

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