# 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 EmrClusterInstanceTypeSpecification(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_optimized': 'bool',
        'ebs_block_devices': 'list[EmrClusterEbsBlockDevice]',
        'configurations': 'list[EmrClusterInstanceTypeConfiguration]'
    }

    attribute_map = {
        'instance_type': 'instanceType',
        'weighted_capacity': 'weightedCapacity',
        'bid_price': 'bidPrice',
        'bid_price_as_percentage_of_on_demand_price': 'bidPriceAsPercentageOfOnDemandPrice',
        'ebs_optimized': 'ebsOptimized',
        'ebs_block_devices': 'ebsBlockDevices',
        'configurations': 'configurations'
    }

    def __init__(self, instance_type=None, weighted_capacity=None, bid_price=None, bid_price_as_percentage_of_on_demand_price=None, ebs_optimized=None, ebs_block_devices=None, configurations=None):  # noqa: E501
        """EmrClusterInstanceTypeSpecification - 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_optimized = None
        self._ebs_block_devices = 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_optimized is not None:
            self.ebs_optimized = ebs_optimized
        if ebs_block_devices is not None:
            self.ebs_block_devices = ebs_block_devices
        if configurations is not None:
            self.configurations = configurations

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

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

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

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

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

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

        self._instance_type = instance_type

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

        The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in                   InstanceFleetConfig                  # noqa: E501

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

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

        The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in                   InstanceFleetConfig                  # noqa: E501

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

        self._weighted_capacity = weighted_capacity

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

        The bid price for each EC2 Spot instance type as defined by InstanceType.                  # noqa: E501

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

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

        The bid price for each EC2 Spot instance type as defined by InstanceType.                  # noqa: E501

        :param bid_price: The bid_price of this EmrClusterInstanceTypeSpecification.  # 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 EmrClusterInstanceTypeSpecification.  # noqa: E501

        The bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by InstanceType                  # noqa: E501

        :return: The bid_price_as_percentage_of_on_demand_price of this EmrClusterInstanceTypeSpecification.  # 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 EmrClusterInstanceTypeSpecification.

        The bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by InstanceType                  # noqa: E501

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

        self._bid_price_as_percentage_of_on_demand_price = bid_price_as_percentage_of_on_demand_price

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

        Evaluates to TRUE when the specified InstanceType is EBS-optimized                  # noqa: E501

        :return: The ebs_optimized of this EmrClusterInstanceTypeSpecification.  # noqa: E501
        :rtype: bool
        """
        return self._ebs_optimized

    @ebs_optimized.setter
    def ebs_optimized(self, ebs_optimized):
        """Sets the ebs_optimized of this EmrClusterInstanceTypeSpecification.

        Evaluates to TRUE when the specified InstanceType is EBS-optimized                  # noqa: E501

        :param ebs_optimized: The ebs_optimized of this EmrClusterInstanceTypeSpecification.  # noqa: E501
        :type: bool
        """

        self._ebs_optimized = ebs_optimized

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

        The configuration of Amazon Elastic Block Storage (EBS) attached to each instance as defined by InstanceType                  # noqa: E501

        :return: The ebs_block_devices of this EmrClusterInstanceTypeSpecification.  # noqa: E501
        :rtype: list[EmrClusterEbsBlockDevice]
        """
        return self._ebs_block_devices

    @ebs_block_devices.setter
    def ebs_block_devices(self, ebs_block_devices):
        """Sets the ebs_block_devices of this EmrClusterInstanceTypeSpecification.

        The configuration of Amazon Elastic Block Storage (EBS) attached to each instance as defined by InstanceType                  # noqa: E501

        :param ebs_block_devices: The ebs_block_devices of this EmrClusterInstanceTypeSpecification.  # noqa: E501
        :type: list[EmrClusterEbsBlockDevice]
        """

        self._ebs_block_devices = ebs_block_devices

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

        A configuration classification that applies when provisioning cluster instances, which can include configurations for                   applications and software bundled with Amazon EMR                  # noqa: E501

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

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

        A configuration classification that applies when provisioning cluster instances, which can include configurations for                   applications and software bundled with Amazon EMR                  # noqa: E501

        :param configurations: The configurations of this EmrClusterInstanceTypeSpecification.  # noqa: E501
        :type: list[EmrClusterInstanceTypeConfiguration]
        """

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

        return self.__dict__ == other.__dict__

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