# coding: utf-8

"""
    vke

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: common-version
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from volcenginesdkcore.configuration import Configuration


class CreateScalingPolicyRequest(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 = {
        'adjustment_value': 'int',
        'client_token': 'str',
        'cluster_id': 'str',
        'enabled': 'bool',
        'node_pool_id': 'str',
        'scheduled_instance_policy': 'ScheduledInstancePolicyForCreateScalingPolicyInput',
        'scheduled_policy': 'ScheduledPolicyForCreateScalingPolicyInput',
        'type': 'str'
    }

    attribute_map = {
        'adjustment_value': 'AdjustmentValue',
        'client_token': 'ClientToken',
        'cluster_id': 'ClusterId',
        'enabled': 'Enabled',
        'node_pool_id': 'NodePoolId',
        'scheduled_instance_policy': 'ScheduledInstancePolicy',
        'scheduled_policy': 'ScheduledPolicy',
        'type': 'Type'
    }

    def __init__(self, adjustment_value=None, client_token=None, cluster_id=None, enabled=None, node_pool_id=None, scheduled_instance_policy=None, scheduled_policy=None, type=None, _configuration=None):  # noqa: E501
        """CreateScalingPolicyRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._adjustment_value = None
        self._client_token = None
        self._cluster_id = None
        self._enabled = None
        self._node_pool_id = None
        self._scheduled_instance_policy = None
        self._scheduled_policy = None
        self._type = None
        self.discriminator = None

        self.adjustment_value = adjustment_value
        if client_token is not None:
            self.client_token = client_token
        self.cluster_id = cluster_id
        if enabled is not None:
            self.enabled = enabled
        self.node_pool_id = node_pool_id
        if scheduled_instance_policy is not None:
            self.scheduled_instance_policy = scheduled_instance_policy
        if scheduled_policy is not None:
            self.scheduled_policy = scheduled_policy
        self.type = type

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


        :return: The adjustment_value of this CreateScalingPolicyRequest.  # noqa: E501
        :rtype: int
        """
        return self._adjustment_value

    @adjustment_value.setter
    def adjustment_value(self, adjustment_value):
        """Sets the adjustment_value of this CreateScalingPolicyRequest.


        :param adjustment_value: The adjustment_value of this CreateScalingPolicyRequest.  # noqa: E501
        :type: int
        """
        if self._configuration.client_side_validation and adjustment_value is None:
            raise ValueError("Invalid value for `adjustment_value`, must not be `None`")  # noqa: E501

        self._adjustment_value = adjustment_value

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


        :return: The client_token of this CreateScalingPolicyRequest.  # noqa: E501
        :rtype: str
        """
        return self._client_token

    @client_token.setter
    def client_token(self, client_token):
        """Sets the client_token of this CreateScalingPolicyRequest.


        :param client_token: The client_token of this CreateScalingPolicyRequest.  # noqa: E501
        :type: str
        """

        self._client_token = client_token

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


        :return: The cluster_id of this CreateScalingPolicyRequest.  # noqa: E501
        :rtype: str
        """
        return self._cluster_id

    @cluster_id.setter
    def cluster_id(self, cluster_id):
        """Sets the cluster_id of this CreateScalingPolicyRequest.


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

        self._cluster_id = cluster_id

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


        :return: The enabled of this CreateScalingPolicyRequest.  # noqa: E501
        :rtype: bool
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """Sets the enabled of this CreateScalingPolicyRequest.


        :param enabled: The enabled of this CreateScalingPolicyRequest.  # noqa: E501
        :type: bool
        """

        self._enabled = enabled

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


        :return: The node_pool_id of this CreateScalingPolicyRequest.  # noqa: E501
        :rtype: str
        """
        return self._node_pool_id

    @node_pool_id.setter
    def node_pool_id(self, node_pool_id):
        """Sets the node_pool_id of this CreateScalingPolicyRequest.


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

        self._node_pool_id = node_pool_id

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


        :return: The scheduled_instance_policy of this CreateScalingPolicyRequest.  # noqa: E501
        :rtype: ScheduledInstancePolicyForCreateScalingPolicyInput
        """
        return self._scheduled_instance_policy

    @scheduled_instance_policy.setter
    def scheduled_instance_policy(self, scheduled_instance_policy):
        """Sets the scheduled_instance_policy of this CreateScalingPolicyRequest.


        :param scheduled_instance_policy: The scheduled_instance_policy of this CreateScalingPolicyRequest.  # noqa: E501
        :type: ScheduledInstancePolicyForCreateScalingPolicyInput
        """

        self._scheduled_instance_policy = scheduled_instance_policy

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


        :return: The scheduled_policy of this CreateScalingPolicyRequest.  # noqa: E501
        :rtype: ScheduledPolicyForCreateScalingPolicyInput
        """
        return self._scheduled_policy

    @scheduled_policy.setter
    def scheduled_policy(self, scheduled_policy):
        """Sets the scheduled_policy of this CreateScalingPolicyRequest.


        :param scheduled_policy: The scheduled_policy of this CreateScalingPolicyRequest.  # noqa: E501
        :type: ScheduledPolicyForCreateScalingPolicyInput
        """

        self._scheduled_policy = scheduled_policy

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


        :return: The type of this CreateScalingPolicyRequest.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this CreateScalingPolicyRequest.


        :param type: The type of this CreateScalingPolicyRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and type is None:
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501
        allowed_values = ["Scheduled", "Recurrence"]  # noqa: E501
        if (self._configuration.client_side_validation and
                type not in allowed_values):
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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

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