# coding: utf-8

"""
    herd

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

    OpenAPI spec version: 0.178.0-SNAPSHOT
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class EmrClusterDefinitionInstanceTypeConfig(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 = {
        'instance_type': 'str',
        'weighted_capacity': 'int',
        'bid_price': 'str',
        'bid_price_as_percentage_of_on_demand_price': 'str',
        'ebs_configuration': 'EmrClusterDefinitionEbsConfiguration',
        'configurations': 'list[EmrClusterDefinitionConfiguration]'
    }

    attribute_map = {
        'instance_type': 'instanceType',
        'weighted_capacity': 'weightedCapacity',
        'bid_price': 'bidPrice',
        'bid_price_as_percentage_of_on_demand_price': 'bidPriceAsPercentageOfOnDemandPrice',
        'ebs_configuration': 'ebsConfiguration',
        'configurations': 'configurations'
    }

    def __init__(self, instance_type=None, weighted_capacity=None, bid_price=None, bid_price_as_percentage_of_on_demand_price=None, ebs_configuration=None, configurations=None):  # noqa: E501
        """EmrClusterDefinitionInstanceTypeConfig - a model defined in OpenAPI"""  # noqa: E501

        self._instance_type = None
        self._weighted_capacity = None
        self._bid_price = None
        self._bid_price_as_percentage_of_on_demand_price = None
        self._ebs_configuration = None
        self._configurations = None
        self.discriminator = None

        if instance_type is not None:
            self.instance_type = instance_type
        if weighted_capacity is not None:
            self.weighted_capacity = weighted_capacity
        if bid_price is not None:
            self.bid_price = bid_price
        if bid_price_as_percentage_of_on_demand_price is not None:
            self.bid_price_as_percentage_of_on_demand_price = bid_price_as_percentage_of_on_demand_price
        if ebs_configuration is not None:
            self.ebs_configuration = ebs_configuration
        if configurations is not None:
            self.configurations = configurations

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

        An EC2 instance type, such as 'm3.xlarge'.                  # noqa: E501

        :return: The instance_type of this EmrClusterDefinitionInstanceTypeConfig.  # noqa: E501
        :rtype: str
        """
        return self._instance_type

    @instance_type.setter
    def instance_type(self, instance_type):
        """Sets the instance_type of this EmrClusterDefinitionInstanceTypeConfig.

        An EC2 instance type, such as 'm3.xlarge'.                  # noqa: E501

        :param instance_type: The instance_type of this EmrClusterDefinitionInstanceTypeConfig.  # noqa: E501
        :type: str
        """

        self._instance_type = instance_type

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

        The number of units that a provisioned instance of this type provides toward fulfilling the target capacities                   defined in InstanceFleetConfig. This value is 1 for a master instance fleet, and must be greater than 0                   for core and task instance fleets                  # noqa: E501

        :return: The weighted_capacity of this EmrClusterDefinitionInstanceTypeConfig.  # noqa: E501
        :rtype: int
        """
        return self._weighted_capacity

    @weighted_capacity.setter
    def weighted_capacity(self, weighted_capacity):
        """Sets the weighted_capacity of this EmrClusterDefinitionInstanceTypeConfig.

        The number of units that a provisioned instance of this type provides toward fulfilling the target capacities                   defined in InstanceFleetConfig. This value is 1 for a master instance fleet, and must be greater than 0                   for core and task instance fleets                  # noqa: E501

        :param weighted_capacity: The weighted_capacity of this EmrClusterDefinitionInstanceTypeConfig.  # noqa: E501
        :type: int
        """

        self._weighted_capacity = weighted_capacity

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

        The bid price for each EC2 Spot instance type as defined by InstanceType. Expressed in USD. If neither BidPrice nor                   BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%                  # noqa: E501

        :return: The bid_price of this EmrClusterDefinitionInstanceTypeConfig.  # noqa: E501
        :rtype: str
        """
        return self._bid_price

    @bid_price.setter
    def bid_price(self, bid_price):
        """Sets the bid_price of this EmrClusterDefinitionInstanceTypeConfig.

        The bid price for each EC2 Spot instance type as defined by InstanceType. Expressed in USD. If neither BidPrice nor                   BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%                  # noqa: E501

        :param bid_price: The bid_price of this EmrClusterDefinitionInstanceTypeConfig.  # noqa: E501
        :type: str
        """

        self._bid_price = bid_price

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

        The bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by InstanceType. Expressed as a number                   between 0 and 1000 (for example, 20 specifies 20%). If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided,                   BidPriceAsPercentageOfOnDemandPrice defaults to 100%                  # noqa: E501

        :return: The bid_price_as_percentage_of_on_demand_price of this EmrClusterDefinitionInstanceTypeConfig.  # noqa: E501
        :rtype: str
        """
        return self._bid_price_as_percentage_of_on_demand_price

    @bid_price_as_percentage_of_on_demand_price.setter
    def bid_price_as_percentage_of_on_demand_price(self, bid_price_as_percentage_of_on_demand_price):
        """Sets the bid_price_as_percentage_of_on_demand_price of this EmrClusterDefinitionInstanceTypeConfig.

        The bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by InstanceType. Expressed as a number                   between 0 and 1000 (for example, 20 specifies 20%). If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided,                   BidPriceAsPercentageOfOnDemandPrice defaults to 100%                  # noqa: E501

        :param bid_price_as_percentage_of_on_demand_price: The bid_price_as_percentage_of_on_demand_price of this EmrClusterDefinitionInstanceTypeConfig.  # noqa: E501
        :type: str
        """

        self._bid_price_as_percentage_of_on_demand_price = bid_price_as_percentage_of_on_demand_price

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


        :return: The ebs_configuration of this EmrClusterDefinitionInstanceTypeConfig.  # noqa: E501
        :rtype: EmrClusterDefinitionEbsConfiguration
        """
        return self._ebs_configuration

    @ebs_configuration.setter
    def ebs_configuration(self, ebs_configuration):
        """Sets the ebs_configuration of this EmrClusterDefinitionInstanceTypeConfig.


        :param ebs_configuration: The ebs_configuration of this EmrClusterDefinitionInstanceTypeConfig.  # noqa: E501
        :type: EmrClusterDefinitionEbsConfiguration
        """

        self._ebs_configuration = ebs_configuration

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

        A configuration classification that applies when provisioning cluster instances, which can include configurations for                   applications and software that run on the cluster                  # noqa: E501

        :return: The configurations of this EmrClusterDefinitionInstanceTypeConfig.  # noqa: E501
        :rtype: list[EmrClusterDefinitionConfiguration]
        """
        return self._configurations

    @configurations.setter
    def configurations(self, configurations):
        """Sets the configurations of this EmrClusterDefinitionInstanceTypeConfig.

        A configuration classification that applies when provisioning cluster instances, which can include configurations for                   applications and software that run on the cluster                  # noqa: E501

        :param configurations: The configurations of this EmrClusterDefinitionInstanceTypeConfig.  # noqa: E501
        :type: list[EmrClusterDefinitionConfiguration]
        """

        self._configurations = configurations

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

        return self.__dict__ == other.__dict__

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