# coding: utf-8

"""
    Managed Ray API

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

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


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


class BufferRegistration(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    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 = {
        'aws': 'NodeRegistrationAWS',
        'gcp': 'NodeRegistrationGCP',
        'provisioned': 'NodeRegistrationProvisioned',
        'sagemaker': 'NodeRegistrationSagemaker',
        'provider': 'CloudProvider',
        'cloud_id': 'str',
        'buffer_id': 'str'
    }

    attribute_map = {
        'aws': 'aws',
        'gcp': 'gcp',
        'provisioned': 'provisioned',
        'sagemaker': 'sagemaker',
        'provider': 'provider',
        'cloud_id': 'cloud_id',
        'buffer_id': 'buffer_id'
    }

    def __init__(self, aws=None, gcp=None, provisioned=None, sagemaker=None, provider=None, cloud_id=None, buffer_id=None, local_vars_configuration=None):  # noqa: E501
        """BufferRegistration - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._aws = None
        self._gcp = None
        self._provisioned = None
        self._sagemaker = None
        self._provider = None
        self._cloud_id = None
        self._buffer_id = None
        self.discriminator = None

        if aws is not None:
            self.aws = aws
        if gcp is not None:
            self.gcp = gcp
        if provisioned is not None:
            self.provisioned = provisioned
        if sagemaker is not None:
            self.sagemaker = sagemaker
        self.provider = provider
        self.cloud_id = cloud_id
        self.buffer_id = buffer_id

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


        :return: The aws of this BufferRegistration.  # noqa: E501
        :rtype: NodeRegistrationAWS
        """
        return self._aws

    @aws.setter
    def aws(self, aws):
        """Sets the aws of this BufferRegistration.


        :param aws: The aws of this BufferRegistration.  # noqa: E501
        :type: NodeRegistrationAWS
        """

        self._aws = aws

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


        :return: The gcp of this BufferRegistration.  # noqa: E501
        :rtype: NodeRegistrationGCP
        """
        return self._gcp

    @gcp.setter
    def gcp(self, gcp):
        """Sets the gcp of this BufferRegistration.


        :param gcp: The gcp of this BufferRegistration.  # noqa: E501
        :type: NodeRegistrationGCP
        """

        self._gcp = gcp

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


        :return: The provisioned of this BufferRegistration.  # noqa: E501
        :rtype: NodeRegistrationProvisioned
        """
        return self._provisioned

    @provisioned.setter
    def provisioned(self, provisioned):
        """Sets the provisioned of this BufferRegistration.


        :param provisioned: The provisioned of this BufferRegistration.  # noqa: E501
        :type: NodeRegistrationProvisioned
        """

        self._provisioned = provisioned

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


        :return: The sagemaker of this BufferRegistration.  # noqa: E501
        :rtype: NodeRegistrationSagemaker
        """
        return self._sagemaker

    @sagemaker.setter
    def sagemaker(self, sagemaker):
        """Sets the sagemaker of this BufferRegistration.


        :param sagemaker: The sagemaker of this BufferRegistration.  # noqa: E501
        :type: NodeRegistrationSagemaker
        """

        self._sagemaker = sagemaker

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

        Which provider this registration is for.  # noqa: E501

        :return: The provider of this BufferRegistration.  # noqa: E501
        :rtype: CloudProvider
        """
        return self._provider

    @provider.setter
    def provider(self, provider):
        """Sets the provider of this BufferRegistration.

        Which provider this registration is for.  # noqa: E501

        :param provider: The provider of this BufferRegistration.  # noqa: E501
        :type: CloudProvider
        """
        if self.local_vars_configuration.client_side_validation and provider is None:  # noqa: E501
            raise ValueError("Invalid value for `provider`, must not be `None`")  # noqa: E501

        self._provider = provider

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

        Cloud ID of the buffer node.  # noqa: E501

        :return: The cloud_id of this BufferRegistration.  # noqa: E501
        :rtype: str
        """
        return self._cloud_id

    @cloud_id.setter
    def cloud_id(self, cloud_id):
        """Sets the cloud_id of this BufferRegistration.

        Cloud ID of the buffer node.  # noqa: E501

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

        self._cloud_id = cloud_id

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

        Buffer ID of the buffer node.  # noqa: E501

        :return: The buffer_id of this BufferRegistration.  # noqa: E501
        :rtype: str
        """
        return self._buffer_id

    @buffer_id.setter
    def buffer_id(self, buffer_id):
        """Sets the buffer_id of this BufferRegistration.

        Buffer ID of the buffer node.  # noqa: E501

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

        self._buffer_id = buffer_id

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

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