# coding: utf-8

"""
    Hydrogen Proton API

    Financial engineering module of Hydrogen Atom  # noqa: E501

    OpenAPI spec version: 1.8.0
    Contact: info@hydrogenplatform.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class RiskAllocationRequest(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 = {
        'market_data_source': 'str',
        'allocations': 'list[str]',
        'client_id': 'str',
        'opt_config': 'OptConfig',
        'risk_score': 'float',
        'use_proxy_data': 'bool',
        'allocation_method': 'str'
    }

    attribute_map = {
        'market_data_source': 'market_data_source',
        'allocations': 'allocations',
        'client_id': 'client_id',
        'opt_config': 'opt_config',
        'risk_score': 'risk_score',
        'use_proxy_data': 'use_proxy_data',
        'allocation_method': 'allocation_method'
    }

    def __init__(self, market_data_source='nucleus', allocations=None, client_id=None, opt_config=None, risk_score=None, use_proxy_data=False, allocation_method=None):  # noqa: E501
        """RiskAllocationRequest - a model defined in Swagger"""  # noqa: E501

        self._market_data_source = None
        self._allocations = None
        self._client_id = None
        self._opt_config = None
        self._risk_score = None
        self._use_proxy_data = None
        self._allocation_method = None
        self.discriminator = None

        if market_data_source is not None:
            self.market_data_source = market_data_source
        if allocations is not None:
            self.allocations = allocations
        if client_id is not None:
            self.client_id = client_id
        if opt_config is not None:
            self.opt_config = opt_config
        if risk_score is not None:
            self.risk_score = risk_score
        if use_proxy_data is not None:
            self.use_proxy_data = use_proxy_data
        self.allocation_method = allocation_method

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


        :return: The market_data_source of this RiskAllocationRequest.  # noqa: E501
        :rtype: str
        """
        return self._market_data_source

    @market_data_source.setter
    def market_data_source(self, market_data_source):
        """Sets the market_data_source of this RiskAllocationRequest.


        :param market_data_source: The market_data_source of this RiskAllocationRequest.  # noqa: E501
        :type: str
        """
        allowed_values = ["nucleus", "integration"]  # noqa: E501
        if market_data_source not in allowed_values:
            raise ValueError(
                "Invalid value for `market_data_source` ({0}), must be one of {1}"  # noqa: E501
                .format(market_data_source, allowed_values)
            )

        self._market_data_source = market_data_source

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


        :return: The allocations of this RiskAllocationRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._allocations

    @allocations.setter
    def allocations(self, allocations):
        """Sets the allocations of this RiskAllocationRequest.


        :param allocations: The allocations of this RiskAllocationRequest.  # noqa: E501
        :type: list[str]
        """

        self._allocations = allocations

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


        :return: The client_id of this RiskAllocationRequest.  # noqa: E501
        :rtype: str
        """
        return self._client_id

    @client_id.setter
    def client_id(self, client_id):
        """Sets the client_id of this RiskAllocationRequest.


        :param client_id: The client_id of this RiskAllocationRequest.  # noqa: E501
        :type: str
        """

        self._client_id = client_id

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


        :return: The opt_config of this RiskAllocationRequest.  # noqa: E501
        :rtype: OptConfig
        """
        return self._opt_config

    @opt_config.setter
    def opt_config(self, opt_config):
        """Sets the opt_config of this RiskAllocationRequest.


        :param opt_config: The opt_config of this RiskAllocationRequest.  # noqa: E501
        :type: OptConfig
        """

        self._opt_config = opt_config

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


        :return: The risk_score of this RiskAllocationRequest.  # noqa: E501
        :rtype: float
        """
        return self._risk_score

    @risk_score.setter
    def risk_score(self, risk_score):
        """Sets the risk_score of this RiskAllocationRequest.


        :param risk_score: The risk_score of this RiskAllocationRequest.  # noqa: E501
        :type: float
        """
        if risk_score is not None and risk_score > 100:  # noqa: E501
            raise ValueError("Invalid value for `risk_score`, must be a value less than or equal to `100`")  # noqa: E501
        if risk_score is not None and risk_score < 0:  # noqa: E501
            raise ValueError("Invalid value for `risk_score`, must be a value greater than or equal to `0`")  # noqa: E501

        self._risk_score = risk_score

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


        :return: The use_proxy_data of this RiskAllocationRequest.  # noqa: E501
        :rtype: bool
        """
        return self._use_proxy_data

    @use_proxy_data.setter
    def use_proxy_data(self, use_proxy_data):
        """Sets the use_proxy_data of this RiskAllocationRequest.


        :param use_proxy_data: The use_proxy_data of this RiskAllocationRequest.  # noqa: E501
        :type: bool
        """

        self._use_proxy_data = use_proxy_data

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


        :return: The allocation_method of this RiskAllocationRequest.  # noqa: E501
        :rtype: str
        """
        return self._allocation_method

    @allocation_method.setter
    def allocation_method(self, allocation_method):
        """Sets the allocation_method of this RiskAllocationRequest.


        :param allocation_method: The allocation_method of this RiskAllocationRequest.  # noqa: E501
        :type: str
        """
        if allocation_method is None:
            raise ValueError("Invalid value for `allocation_method`, must not be `None`")  # noqa: E501
        allowed_values = ["select", "create"]  # noqa: E501
        if allocation_method not in allowed_values:
            raise ValueError(
                "Invalid value for `allocation_method` ({0}), must be one of {1}"  # noqa: E501
                .format(allocation_method, allowed_values)
            )

        self._allocation_method = allocation_method

    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(RiskAllocationRequest, 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, RiskAllocationRequest):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
