# coding: utf-8

"""
    Zadara VPSA Object Storage REST API

    # Overview  This document outlines the methods available for administrating your VPSA&#174; Object Storage. The 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. Alternately, you can use the username and password parameters for authentication, but we do not recommend this method for anything other than possibly retrieving an API key.  By default , all operations are allowed only to VPSA Object Storage admin. Some actions are allowed by an account admin and they will be marked on the action's 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 adding drives to storage policy, 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.  ## Metering API  Metering information can be retrieved using the VPSA Object Storage API for the following components:  - Accounts - Users - Drives - Virtual Controllers - Load Balancer Groups - Storage Policies  Metering information returned by the API is subject to the following constraints:  - 10 seconds interval - 1 hour range - 1 minute interval - 1 day range - 1 hour interval - 30 days range  Values outside the accepted range will be returned as 0.  ## 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 Zios.configuration import Configuration


class UpdateObjectStorageDestination(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',
        'type': 'str',
        'region_name': 'str',
        'region_name_text': 'str',
        'username': 'str',
        'password': 'str',
        'connect_via': 'str'
    }

    attribute_map = {
        'name': 'name',
        'type': 'type',
        'region_name': 'region_name',
        'region_name_text': 'region_name_text',
        'username': 'username',
        'password': 'password',
        'connect_via': 'connectVia'
    }

    def __init__(self, name=None, type=None, region_name=None, region_name_text=None, username=None, password=None, connect_via=None, _configuration=None):  # noqa: E501
        """UpdateObjectStorageDestination - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._name = None
        self._type = None
        self._region_name = None
        self._region_name_text = None
        self._username = None
        self._password = None
        self._connect_via = None
        self.discriminator = None

        if name is not None:
            self.name = name
        self.type = type
        if region_name is not None:
            self.region_name = region_name
        if region_name_text is not None:
            self.region_name_text = region_name_text
        if username is not None:
            self.username = username
        if password is not None:
            self.password = password
        if connect_via is not None:
            self.connect_via = connect_via

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

        Display Name for Remote Object Storage Endpoint  # noqa: E501

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

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

        Display Name for Remote Object Storage Endpoint  # noqa: E501

        :param name: The name of this UpdateObjectStorageDestination.  # noqa: E501
        :type: str
        """

        self._name = name

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

        Type for Remote Object Storage Endpoint  # noqa: E501

        :return: The type of this UpdateObjectStorageDestination.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this UpdateObjectStorageDestination.

        Type for Remote Object Storage Endpoint  # noqa: E501

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

        self._type = type

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

        Endpoint for AWS S3 destination type  # noqa: E501

        :return: The region_name of this UpdateObjectStorageDestination.  # noqa: E501
        :rtype: str
        """
        return self._region_name

    @region_name.setter
    def region_name(self, region_name):
        """Sets the region_name of this UpdateObjectStorageDestination.

        Endpoint for AWS S3 destination type  # noqa: E501

        :param region_name: The region_name of this UpdateObjectStorageDestination.  # noqa: E501
        :type: str
        """

        self._region_name = region_name

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

        Region for VPSA Object Storage S3 destination type  # noqa: E501

        :return: The region_name_text of this UpdateObjectStorageDestination.  # noqa: E501
        :rtype: str
        """
        return self._region_name_text

    @region_name_text.setter
    def region_name_text(self, region_name_text):
        """Sets the region_name_text of this UpdateObjectStorageDestination.

        Region for VPSA Object Storage S3 destination type  # noqa: E501

        :param region_name_text: The region_name_text of this UpdateObjectStorageDestination.  # noqa: E501
        :type: str
        """

        self._region_name_text = region_name_text

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

        Access Key ID for Remote Object Storage Endpoint  # noqa: E501

        :return: The username of this UpdateObjectStorageDestination.  # noqa: E501
        :rtype: str
        """
        return self._username

    @username.setter
    def username(self, username):
        """Sets the username of this UpdateObjectStorageDestination.

        Access Key ID for Remote Object Storage Endpoint  # noqa: E501

        :param username: The username of this UpdateObjectStorageDestination.  # noqa: E501
        :type: str
        """

        self._username = username

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

        Secret Access Key for Remote Object Storage Endpoint  # noqa: E501

        :return: The password of this UpdateObjectStorageDestination.  # noqa: E501
        :rtype: str
        """
        return self._password

    @password.setter
    def password(self, password):
        """Sets the password of this UpdateObjectStorageDestination.

        Secret Access Key for Remote Object Storage Endpoint  # noqa: E501

        :param password: The password of this UpdateObjectStorageDestination.  # noqa: E501
        :type: str
        """

        self._password = password

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

        Connection method for remote object storage  # noqa: E501

        :return: The connect_via of this UpdateObjectStorageDestination.  # noqa: E501
        :rtype: str
        """
        return self._connect_via

    @connect_via.setter
    def connect_via(self, connect_via):
        """Sets the connect_via of this UpdateObjectStorageDestination.

        Connection method for remote object storage  # noqa: E501

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

        self._connect_via = connect_via

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

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