# generated from rosidl_generator_py/resource/_idl.py.em
# with input from g29_msg:msg/G29Msg.idl
# generated code does not contain a copyright notice


# Import statements for member types

import builtins  # noqa: E402, I100

import rosidl_parser.definition  # noqa: E402, I100


class Metaclass_G29Msg(type):
    """Metaclass of message 'G29Msg'."""

    _CREATE_ROS_MESSAGE = None
    _CONVERT_FROM_PY = None
    _CONVERT_TO_PY = None
    _DESTROY_ROS_MESSAGE = None
    _TYPE_SUPPORT = None

    __constants = {
    }

    @classmethod
    def __import_type_support__(cls):
        try:
            from rosidl_generator_py import import_type_support
            module = import_type_support('g29_msg')
        except ImportError:
            import logging
            import traceback
            logger = logging.getLogger(
                'g29_msg.msg.G29Msg')
            logger.debug(
                'Failed to import needed modules for type support:\n' +
                traceback.format_exc())
        else:
            cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__g29_msg
            cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__g29_msg
            cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__g29_msg
            cls._TYPE_SUPPORT = module.type_support_msg__msg__g29_msg
            cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__g29_msg

    @classmethod
    def __prepare__(cls, name, bases, **kwargs):
        # list constant names here so that they appear in the help text of
        # the message class under "Data and other attributes defined here:"
        # as well as populate each message instance
        return {
        }


class G29Msg(metaclass=Metaclass_G29Msg):
    """Message class 'G29Msg'."""

    __slots__ = [
        '_heartbeat',
        '_axis0',
        '_axis1',
        '_axis2',
        '_axis3',
        '_axis4',
        '_axis5',
        '_button0',
        '_button1',
        '_button2',
        '_button3',
        '_button4',
        '_button5',
        '_button6',
        '_button7',
        '_button8',
        '_button9',
        '_button10',
        '_button11',
        '_button12',
        '_button13',
        '_button14',
        '_button15',
        '_button16',
        '_button17',
        '_button18',
        '_button19',
        '_button20',
        '_button21',
        '_button22',
        '_button23',
        '_button24',
    ]

    _fields_and_field_types = {
        'heartbeat': 'int32',
        'axis0': 'int32',
        'axis1': 'int32',
        'axis2': 'int32',
        'axis3': 'int32',
        'axis4': 'int32',
        'axis5': 'int32',
        'button0': 'boolean',
        'button1': 'boolean',
        'button2': 'boolean',
        'button3': 'boolean',
        'button4': 'boolean',
        'button5': 'boolean',
        'button6': 'boolean',
        'button7': 'boolean',
        'button8': 'boolean',
        'button9': 'boolean',
        'button10': 'boolean',
        'button11': 'boolean',
        'button12': 'boolean',
        'button13': 'boolean',
        'button14': 'boolean',
        'button15': 'boolean',
        'button16': 'boolean',
        'button17': 'boolean',
        'button18': 'boolean',
        'button19': 'boolean',
        'button20': 'boolean',
        'button21': 'boolean',
        'button22': 'boolean',
        'button23': 'boolean',
        'button24': 'boolean',
    }

    SLOT_TYPES = (
        rosidl_parser.definition.BasicType('int32'),  # noqa: E501
        rosidl_parser.definition.BasicType('int32'),  # noqa: E501
        rosidl_parser.definition.BasicType('int32'),  # noqa: E501
        rosidl_parser.definition.BasicType('int32'),  # noqa: E501
        rosidl_parser.definition.BasicType('int32'),  # noqa: E501
        rosidl_parser.definition.BasicType('int32'),  # noqa: E501
        rosidl_parser.definition.BasicType('int32'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
        rosidl_parser.definition.BasicType('boolean'),  # noqa: E501
    )

    def __init__(self, **kwargs):
        assert all('_' + key in self.__slots__ for key in kwargs.keys()), \
            'Invalid arguments passed to constructor: %s' % \
            ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__))
        self.heartbeat = kwargs.get('heartbeat', int())
        self.axis0 = kwargs.get('axis0', int())
        self.axis1 = kwargs.get('axis1', int())
        self.axis2 = kwargs.get('axis2', int())
        self.axis3 = kwargs.get('axis3', int())
        self.axis4 = kwargs.get('axis4', int())
        self.axis5 = kwargs.get('axis5', int())
        self.button0 = kwargs.get('button0', bool())
        self.button1 = kwargs.get('button1', bool())
        self.button2 = kwargs.get('button2', bool())
        self.button3 = kwargs.get('button3', bool())
        self.button4 = kwargs.get('button4', bool())
        self.button5 = kwargs.get('button5', bool())
        self.button6 = kwargs.get('button6', bool())
        self.button7 = kwargs.get('button7', bool())
        self.button8 = kwargs.get('button8', bool())
        self.button9 = kwargs.get('button9', bool())
        self.button10 = kwargs.get('button10', bool())
        self.button11 = kwargs.get('button11', bool())
        self.button12 = kwargs.get('button12', bool())
        self.button13 = kwargs.get('button13', bool())
        self.button14 = kwargs.get('button14', bool())
        self.button15 = kwargs.get('button15', bool())
        self.button16 = kwargs.get('button16', bool())
        self.button17 = kwargs.get('button17', bool())
        self.button18 = kwargs.get('button18', bool())
        self.button19 = kwargs.get('button19', bool())
        self.button20 = kwargs.get('button20', bool())
        self.button21 = kwargs.get('button21', bool())
        self.button22 = kwargs.get('button22', bool())
        self.button23 = kwargs.get('button23', bool())
        self.button24 = kwargs.get('button24', bool())

    def __repr__(self):
        typename = self.__class__.__module__.split('.')
        typename.pop()
        typename.append(self.__class__.__name__)
        args = []
        for s, t in zip(self.__slots__, self.SLOT_TYPES):
            field = getattr(self, s)
            fieldstr = repr(field)
            # We use Python array type for fields that can be directly stored
            # in them, and "normal" sequences for everything else.  If it is
            # a type that we store in an array, strip off the 'array' portion.
            if (
                isinstance(t, rosidl_parser.definition.AbstractSequence) and
                isinstance(t.value_type, rosidl_parser.definition.BasicType) and
                t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64']
            ):
                if len(field) == 0:
                    fieldstr = '[]'
                else:
                    assert fieldstr.startswith('array(')
                    prefix = "array('X', "
                    suffix = ')'
                    fieldstr = fieldstr[len(prefix):-len(suffix)]
            args.append(s[1:] + '=' + fieldstr)
        return '%s(%s)' % ('.'.join(typename), ', '.join(args))

    def __eq__(self, other):
        if not isinstance(other, self.__class__):
            return False
        if self.heartbeat != other.heartbeat:
            return False
        if self.axis0 != other.axis0:
            return False
        if self.axis1 != other.axis1:
            return False
        if self.axis2 != other.axis2:
            return False
        if self.axis3 != other.axis3:
            return False
        if self.axis4 != other.axis4:
            return False
        if self.axis5 != other.axis5:
            return False
        if self.button0 != other.button0:
            return False
        if self.button1 != other.button1:
            return False
        if self.button2 != other.button2:
            return False
        if self.button3 != other.button3:
            return False
        if self.button4 != other.button4:
            return False
        if self.button5 != other.button5:
            return False
        if self.button6 != other.button6:
            return False
        if self.button7 != other.button7:
            return False
        if self.button8 != other.button8:
            return False
        if self.button9 != other.button9:
            return False
        if self.button10 != other.button10:
            return False
        if self.button11 != other.button11:
            return False
        if self.button12 != other.button12:
            return False
        if self.button13 != other.button13:
            return False
        if self.button14 != other.button14:
            return False
        if self.button15 != other.button15:
            return False
        if self.button16 != other.button16:
            return False
        if self.button17 != other.button17:
            return False
        if self.button18 != other.button18:
            return False
        if self.button19 != other.button19:
            return False
        if self.button20 != other.button20:
            return False
        if self.button21 != other.button21:
            return False
        if self.button22 != other.button22:
            return False
        if self.button23 != other.button23:
            return False
        if self.button24 != other.button24:
            return False
        return True

    @classmethod
    def get_fields_and_field_types(cls):
        from copy import copy
        return copy(cls._fields_and_field_types)

    @builtins.property
    def heartbeat(self):
        """Message field 'heartbeat'."""
        return self._heartbeat

    @heartbeat.setter
    def heartbeat(self, value):
        if __debug__:
            assert \
                isinstance(value, int), \
                "The 'heartbeat' field must be of type 'int'"
            assert value >= -2147483648 and value < 2147483648, \
                "The 'heartbeat' field must be an integer in [-2147483648, 2147483647]"
        self._heartbeat = value

    @builtins.property
    def axis0(self):
        """Message field 'axis0'."""
        return self._axis0

    @axis0.setter
    def axis0(self, value):
        if __debug__:
            assert \
                isinstance(value, int), \
                "The 'axis0' field must be of type 'int'"
            assert value >= -2147483648 and value < 2147483648, \
                "The 'axis0' field must be an integer in [-2147483648, 2147483647]"
        self._axis0 = value

    @builtins.property
    def axis1(self):
        """Message field 'axis1'."""
        return self._axis1

    @axis1.setter
    def axis1(self, value):
        if __debug__:
            assert \
                isinstance(value, int), \
                "The 'axis1' field must be of type 'int'"
            assert value >= -2147483648 and value < 2147483648, \
                "The 'axis1' field must be an integer in [-2147483648, 2147483647]"
        self._axis1 = value

    @builtins.property
    def axis2(self):
        """Message field 'axis2'."""
        return self._axis2

    @axis2.setter
    def axis2(self, value):
        if __debug__:
            assert \
                isinstance(value, int), \
                "The 'axis2' field must be of type 'int'"
            assert value >= -2147483648 and value < 2147483648, \
                "The 'axis2' field must be an integer in [-2147483648, 2147483647]"
        self._axis2 = value

    @builtins.property
    def axis3(self):
        """Message field 'axis3'."""
        return self._axis3

    @axis3.setter
    def axis3(self, value):
        if __debug__:
            assert \
                isinstance(value, int), \
                "The 'axis3' field must be of type 'int'"
            assert value >= -2147483648 and value < 2147483648, \
                "The 'axis3' field must be an integer in [-2147483648, 2147483647]"
        self._axis3 = value

    @builtins.property
    def axis4(self):
        """Message field 'axis4'."""
        return self._axis4

    @axis4.setter
    def axis4(self, value):
        if __debug__:
            assert \
                isinstance(value, int), \
                "The 'axis4' field must be of type 'int'"
            assert value >= -2147483648 and value < 2147483648, \
                "The 'axis4' field must be an integer in [-2147483648, 2147483647]"
        self._axis4 = value

    @builtins.property
    def axis5(self):
        """Message field 'axis5'."""
        return self._axis5

    @axis5.setter
    def axis5(self, value):
        if __debug__:
            assert \
                isinstance(value, int), \
                "The 'axis5' field must be of type 'int'"
            assert value >= -2147483648 and value < 2147483648, \
                "The 'axis5' field must be an integer in [-2147483648, 2147483647]"
        self._axis5 = value

    @builtins.property
    def button0(self):
        """Message field 'button0'."""
        return self._button0

    @button0.setter
    def button0(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button0' field must be of type 'bool'"
        self._button0 = value

    @builtins.property
    def button1(self):
        """Message field 'button1'."""
        return self._button1

    @button1.setter
    def button1(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button1' field must be of type 'bool'"
        self._button1 = value

    @builtins.property
    def button2(self):
        """Message field 'button2'."""
        return self._button2

    @button2.setter
    def button2(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button2' field must be of type 'bool'"
        self._button2 = value

    @builtins.property
    def button3(self):
        """Message field 'button3'."""
        return self._button3

    @button3.setter
    def button3(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button3' field must be of type 'bool'"
        self._button3 = value

    @builtins.property
    def button4(self):
        """Message field 'button4'."""
        return self._button4

    @button4.setter
    def button4(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button4' field must be of type 'bool'"
        self._button4 = value

    @builtins.property
    def button5(self):
        """Message field 'button5'."""
        return self._button5

    @button5.setter
    def button5(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button5' field must be of type 'bool'"
        self._button5 = value

    @builtins.property
    def button6(self):
        """Message field 'button6'."""
        return self._button6

    @button6.setter
    def button6(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button6' field must be of type 'bool'"
        self._button6 = value

    @builtins.property
    def button7(self):
        """Message field 'button7'."""
        return self._button7

    @button7.setter
    def button7(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button7' field must be of type 'bool'"
        self._button7 = value

    @builtins.property
    def button8(self):
        """Message field 'button8'."""
        return self._button8

    @button8.setter
    def button8(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button8' field must be of type 'bool'"
        self._button8 = value

    @builtins.property
    def button9(self):
        """Message field 'button9'."""
        return self._button9

    @button9.setter
    def button9(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button9' field must be of type 'bool'"
        self._button9 = value

    @builtins.property
    def button10(self):
        """Message field 'button10'."""
        return self._button10

    @button10.setter
    def button10(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button10' field must be of type 'bool'"
        self._button10 = value

    @builtins.property
    def button11(self):
        """Message field 'button11'."""
        return self._button11

    @button11.setter
    def button11(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button11' field must be of type 'bool'"
        self._button11 = value

    @builtins.property
    def button12(self):
        """Message field 'button12'."""
        return self._button12

    @button12.setter
    def button12(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button12' field must be of type 'bool'"
        self._button12 = value

    @builtins.property
    def button13(self):
        """Message field 'button13'."""
        return self._button13

    @button13.setter
    def button13(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button13' field must be of type 'bool'"
        self._button13 = value

    @builtins.property
    def button14(self):
        """Message field 'button14'."""
        return self._button14

    @button14.setter
    def button14(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button14' field must be of type 'bool'"
        self._button14 = value

    @builtins.property
    def button15(self):
        """Message field 'button15'."""
        return self._button15

    @button15.setter
    def button15(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button15' field must be of type 'bool'"
        self._button15 = value

    @builtins.property
    def button16(self):
        """Message field 'button16'."""
        return self._button16

    @button16.setter
    def button16(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button16' field must be of type 'bool'"
        self._button16 = value

    @builtins.property
    def button17(self):
        """Message field 'button17'."""
        return self._button17

    @button17.setter
    def button17(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button17' field must be of type 'bool'"
        self._button17 = value

    @builtins.property
    def button18(self):
        """Message field 'button18'."""
        return self._button18

    @button18.setter
    def button18(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button18' field must be of type 'bool'"
        self._button18 = value

    @builtins.property
    def button19(self):
        """Message field 'button19'."""
        return self._button19

    @button19.setter
    def button19(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button19' field must be of type 'bool'"
        self._button19 = value

    @builtins.property
    def button20(self):
        """Message field 'button20'."""
        return self._button20

    @button20.setter
    def button20(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button20' field must be of type 'bool'"
        self._button20 = value

    @builtins.property
    def button21(self):
        """Message field 'button21'."""
        return self._button21

    @button21.setter
    def button21(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button21' field must be of type 'bool'"
        self._button21 = value

    @builtins.property
    def button22(self):
        """Message field 'button22'."""
        return self._button22

    @button22.setter
    def button22(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button22' field must be of type 'bool'"
        self._button22 = value

    @builtins.property
    def button23(self):
        """Message field 'button23'."""
        return self._button23

    @button23.setter
    def button23(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button23' field must be of type 'bool'"
        self._button23 = value

    @builtins.property
    def button24(self):
        """Message field 'button24'."""
        return self._button24

    @button24.setter
    def button24(self, value):
        if __debug__:
            assert \
                isinstance(value, bool), \
                "The 'button24' field must be of type 'bool'"
        self._button24 = value
