# coding: utf-8

"""
    Tator REST API

    Interface to the Tator backend.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from ..configuration import Configuration


class Bucket(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 = {
        'access_key': 'str',
        'endpoint_url': 'str',
        'id': 'int',
        'name': 'str',
        'organization': 'int',
        'region': 'str',
        'secret_key': 'str'
    }

    attribute_map = {
        'access_key': 'access_key',
        'endpoint_url': 'endpoint_url',
        'id': 'id',
        'name': 'name',
        'organization': 'organization',
        'region': 'region',
        'secret_key': 'secret_key'
    }

    def __init__(self, access_key=None, endpoint_url=None, id=None, name=None, organization=None, region=None, secret_key=None, local_vars_configuration=None):  # noqa: E501
        """Bucket - a model defined in OpenAPI"""
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._access_key = None
        self._endpoint_url = None
        self._id = None
        self._name = None
        self._organization = None
        self._region = None
        self._secret_key = None
        self.discriminator = None

        if access_key is not None:
            self.access_key = access_key
        if endpoint_url is not None:
            self.endpoint_url = endpoint_url
        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if organization is not None:
            self.organization = organization
        if region is not None:
            self.region = region
        if secret_key is not None:
            self.secret_key = secret_key

    @property
    def access_key(self):
        """
        Account access key.

        :return: The access_key of this Bucket. 
        :rtype: str
        """
        return self._access_key

    @access_key.setter
    def access_key(self, access_key):
        """
        Account access key.

        :param access_key: The access_key of this Bucket.
        :type: str
        """

        self._access_key = access_key

    @property
    def endpoint_url(self):
        """
        Endpoint URL for bucket.

        :return: The endpoint_url of this Bucket. 
        :rtype: str
        """
        return self._endpoint_url

    @endpoint_url.setter
    def endpoint_url(self, endpoint_url):
        """
        Endpoint URL for bucket.

        :param endpoint_url: The endpoint_url of this Bucket.
        :type: str
        """

        self._endpoint_url = endpoint_url

    @property
    def id(self):
        """
        Unique integer identifying a bucket.

        :return: The id of this Bucket. 
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Unique integer identifying a bucket.

        :param id: The id of this Bucket.
        :type: int
        """

        self._id = id

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

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

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

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

        self._name = name

    @property
    def organization(self):
        """
        Unique integer identifying organization that owns this bucket.

        :return: The organization of this Bucket. 
        :rtype: int
        """
        return self._organization

    @organization.setter
    def organization(self, organization):
        """
        Unique integer identifying organization that owns this bucket.

        :param organization: The organization of this Bucket.
        :type: int
        """

        self._organization = organization

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

        :return: The region of this Bucket. 
        :rtype: str
        """
        return self._region

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

        :param region: The region of this Bucket.
        :type: str
        """

        self._region = region

    @property
    def secret_key(self):
        """
        Account secret key.

        :return: The secret_key of this Bucket. 
        :rtype: str
        """
        return self._secret_key

    @secret_key.setter
    def secret_key(self, secret_key):
        """
        Account secret key.

        :param secret_key: The secret_key of this Bucket.
        :type: str
        """

        self._secret_key = secret_key

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

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