# coding: utf-8

"""
    Cyber Wars API

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

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


import pprint
import re  # noqa: F401

import six


class UnitActionParams(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 = {
        'unit_id': 'str',
        'turn_id': 'str',
        'type': 'str',
        'args': 'OneOfMoveActionArgsAttackActionArgs'
    }

    attribute_map = {
        'unit_id': 'unitId',
        'turn_id': 'turnId',
        'type': 'type',
        'args': 'args'
    }

    def __init__(self, unit_id=None, turn_id=None, type=None, args=None):  # noqa: E501
        """UnitActionParams - a model defined in OpenAPI"""  # noqa: E501

        self._unit_id = None
        self._turn_id = None
        self._type = None
        self._args = None
        self.discriminator = None

        self.unit_id = unit_id
        self.turn_id = turn_id
        self.type = type
        if args is not None:
            self.args = args

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


        :return: The unit_id of this UnitActionParams.  # noqa: E501
        :rtype: str
        """
        return self._unit_id

    @unit_id.setter
    def unit_id(self, unit_id):
        """Sets the unit_id of this UnitActionParams.


        :param unit_id: The unit_id of this UnitActionParams.  # noqa: E501
        :type: str
        """
        if unit_id is None:
            raise ValueError("Invalid value for `unit_id`, must not be `None`")  # noqa: E501

        self._unit_id = unit_id

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


        :return: The turn_id of this UnitActionParams.  # noqa: E501
        :rtype: str
        """
        return self._turn_id

    @turn_id.setter
    def turn_id(self, turn_id):
        """Sets the turn_id of this UnitActionParams.


        :param turn_id: The turn_id of this UnitActionParams.  # noqa: E501
        :type: str
        """
        if turn_id is None:
            raise ValueError("Invalid value for `turn_id`, must not be `None`")  # noqa: E501

        self._turn_id = turn_id

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


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

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


        :param type: The type of this UnitActionParams.  # noqa: E501
        :type: str
        """
        if type is None:
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501
        allowed_values = ["move", "attack"]  # noqa: E501
        if 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

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

        Varies based on type  # noqa: E501

        :return: The args of this UnitActionParams.  # noqa: E501
        :rtype: OneOfMoveActionArgsAttackActionArgs
        """
        return self._args

    @args.setter
    def args(self, args):
        """Sets the args of this UnitActionParams.

        Varies based on type  # noqa: E501

        :param args: The args of this UnitActionParams.  # noqa: E501
        :type: OneOfMoveActionArgsAttackActionArgs
        """

        self._args = args

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

        return self.__dict__ == other.__dict__

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