# coding: utf-8

"""
    Tator REST API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.6.5
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from ..configuration import Configuration


class BucketUpdate(object):
    """
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'archive_sc': 'str',
        'config': 'object',
        'effective_permission': 'int',
        'external_host': 'str',
        'live_sc': 'str',
        'name': 'str',
        'store_type': 'str'
    }

    attribute_map = {
        'archive_sc': 'archive_sc',
        'config': 'config',
        'effective_permission': 'effective_permission',
        'external_host': 'external_host',
        'live_sc': 'live_sc',
        'name': 'name',
        'store_type': 'store_type'
    }

    def __init__(self, archive_sc=None, config=None, effective_permission=None, external_host=None, live_sc=None, name=None, store_type=None, local_vars_configuration=None):  # noqa: E501
        """BucketUpdate - a model defined in OpenAPI"""
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._archive_sc = None
        self._config = None
        self._effective_permission = None
        self._external_host = None
        self._live_sc = None
        self._name = None
        self._store_type = None
        self.discriminator = None

        if archive_sc is not None:
            self.archive_sc = archive_sc
        if config is not None:
            self.config = config
        if effective_permission is not None:
            self.effective_permission = effective_permission
        if external_host is not None:
            self.external_host = external_host
        if live_sc is not None:
            self.live_sc = live_sc
        if name is not None:
            self.name = name
        if store_type is not None:
            self.store_type = store_type

    @property
    def archive_sc(self):
        """
        Storage class in which archived objects live.

        :return: The archive_sc of this BucketUpdate. 
        :rtype: str
        """
        return self._archive_sc

    @archive_sc.setter
    def archive_sc(self, archive_sc):
        """
        Storage class in which archived objects live.

        :param archive_sc: The archive_sc of this BucketUpdate.
        :type: str
        """
        allowed_values = ["STANDARD", "DEEP_ARCHIVE", "COLDLINE"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and archive_sc not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `archive_sc` ({0}), must be one of {1}"  # noqa: E501
                .format(archive_sc, allowed_values)
            )

        self._archive_sc = archive_sc

    @property
    def config(self):
        """
        JSON string containing cloud storage credentials.

        :return: The config of this BucketUpdate. 
        :rtype: object
        """
        return self._config

    @config.setter
    def config(self, config):
        """
        JSON string containing cloud storage credentials.

        :param config: The config of this BucketUpdate.
        :type: object
        """

        self._config = config

    @property
    def effective_permission(self):
        """
        Effective permission mask for this entity.

        :return: The effective_permission of this BucketUpdate. 
        :rtype: int
        """
        return self._effective_permission

    @effective_permission.setter
    def effective_permission(self, effective_permission):
        """
        Effective permission mask for this entity.

        :param effective_permission: The effective_permission of this BucketUpdate.
        :type: int
        """

        self._effective_permission = effective_permission

    @property
    def external_host(self):
        """
        The proxy host for presigned urls.

        :return: The external_host of this BucketUpdate. 
        :rtype: str
        """
        return self._external_host

    @external_host.setter
    def external_host(self, external_host):
        """
        The proxy host for presigned urls.

        :param external_host: The external_host of this BucketUpdate.
        :type: str
        """

        self._external_host = external_host

    @property
    def live_sc(self):
        """
        Storage class in which live objects live.

        :return: The live_sc of this BucketUpdate. 
        :rtype: str
        """
        return self._live_sc

    @live_sc.setter
    def live_sc(self, live_sc):
        """
        Storage class in which live objects live.

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

        self._live_sc = live_sc

    @property
    def name(self):
        """
        Bucket name.

        :return: The name of this BucketUpdate. 
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Bucket name.

        :param name: The name of this BucketUpdate.
        :type: str
        """

        self._name = name

    @property
    def store_type(self):
        """
        Type of object store on which the bucket is hosted.

        :return: The store_type of this BucketUpdate. 
        :rtype: str
        """
        return self._store_type

    @store_type.setter
    def store_type(self, store_type):
        """
        Type of object store on which the bucket is hosted.

        :param store_type: The store_type of this BucketUpdate.
        :type: str
        """
        allowed_values = ["AWS", "MINIO", "GCP", "OCI", "S3BASIC", "AZURE"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and store_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `store_type` ({0}), must be one of {1}"  # noqa: E501
                .format(store_type, allowed_values)
            )

        self._store_type = store_type

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

        for attr, _ in six.iteritems(self.openapi_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

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

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