text: // Auto-generated. Do not edit!
  
  // (in-package sound_play.msg)
  
  
  "use strict";
  
  const _serializer = _ros_msg_utils.Serialize;
  const _arraySerializer = _serializer.Array;
  const _deserializer = _ros_msg_utils.Deserialize;
  const _arrayDeserializer = _deserializer.Array;
  const _finder = _ros_msg_utils.Find;
  const _getByteLength = _ros_msg_utils.getByteLength;
  let SoundRequestActionGoal = require('./SoundRequestActionGoal.js');
  let SoundRequestActionResult = require('./SoundRequestActionResult.js');
  let SoundRequestActionFeedback = require('./SoundRequestActionFeedback.js');
  
  //-----------------------------------------------------------
  
  class SoundRequestAction {
    constructor(initObj={}) {
      if (initObj === null) {
        // initObj === null is a special case for deserialization where we don't initialize fields
        this.action_goal = null;
        this.action_result = null;
        this.action_feedback = null;
      }
      else {
        if (initObj.hasOwnProperty('action_goal')) {
          this.action_goal = initObj.action_goal
        }
        else {
          this.action_goal = new SoundRequestActionGoal();
        }
        if (initObj.hasOwnProperty('action_result')) {
          this.action_result = initObj.action_result
        }
        else {
          this.action_result = new SoundRequestActionResult();
        }
        if (initObj.hasOwnProperty('action_feedback')) {
          this.action_feedback = initObj.action_feedback
        }
        else {
          this.action_feedback = new SoundRequestActionFeedback();
        }
      }
    }
  
    static serialize(obj, buffer, bufferOffset) {
      // Serializes a message object of type SoundRequestAction
      // Serialize message field [action_goal]
      bufferOffset = SoundRequestActionGoal.serialize(obj.action_goal, buffer, bufferOffset);
      // Serialize message field [action_result]
      bufferOffset = SoundRequestActionResult.serialize(obj.action_result, buffer, bufferOffset);
      // Serialize message field [action_feedback]
      bufferOffset = SoundRequestActionFeedback.serialize(obj.action_feedback, buffer, bufferOffset);
      return bufferOffset;
    }
  
    static deserialize(buffer, bufferOffset=[0]) {
      //deserializes a message object of type SoundRequestAction
      let len;
      let data = new SoundRequestAction(null);
      // Deserialize message field [action_goal]
      data.action_goal = SoundRequestActionGoal.deserialize(buffer, bufferOffset);
      // Deserialize message field [action_result]
      data.action_result = SoundRequestActionResult.deserialize(buffer, bufferOffset);
      // Deserialize message field [action_feedback]
      data.action_feedback = SoundRequestActionFeedback.deserialize(buffer, bufferOffset);
      return data;
    }
  
    static getMessageSize(object) {
      let length = 0;
      length += SoundRequestActionGoal.getMessageSize(object.action_goal);
      length += SoundRequestActionResult.getMessageSize(object.action_result);
      length += SoundRequestActionFeedback.getMessageSize(object.action_feedback);
      return length;
    }
  
    static datatype() {
      // Returns string type for a message object
      return 'sound_play/SoundRequestAction';
    }
  
    static md5sum() {
      //Returns md5sum for a message object
      return 'f990cf5de6a2f8e514e825b2c1f4810b';
    }
  
    static messageDefinition() {
      // Returns full string definition for message
      return `
      # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
      
      SoundRequestActionGoal action_goal
      SoundRequestActionResult action_result
      SoundRequestActionFeedback action_feedback
      
      ================================================================================
      MSG: sound_play/SoundRequestActionGoal
      # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
      
      Header header
      actionlib_msgs/GoalID goal_id
      SoundRequestGoal goal
      
      ================================================================================
      MSG: std_msgs/Header
      # Standard metadata for higher-level stamped data types.
      # This is generally used to communicate timestamped data 
      # in a particular coordinate frame.
      # 
      # sequence ID: consecutively increasing ID 
      uint32 seq
      #Two-integer timestamp that is expressed as:
      # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
      # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
      # time-handling sugar is provided by the client library
      time stamp
      #Frame this data is associated with
      string frame_id
      
      ================================================================================
      MSG: actionlib_msgs/GoalID
      # The stamp should store the time at which this goal was requested.
      # It is used by an action server when it tries to preempt all
      # goals that were requested before a certain time
      time stamp
      
      # The id provides a way to associate feedback and
      # result message with specific goal requests. The id
      # specified must be unique.
      string id
      
      
      ================================================================================
      MSG: sound_play/SoundRequestGoal
      # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
      SoundRequest sound_request
      
      ================================================================================
      MSG: sound_play/SoundRequest
      # IMPORTANT: You should never have to generate this message yourself.
      # Use the sound_play::SoundClient C++ helper or the
      # sound_play.libsoundplay.SoundClient Python helper.
      
      # Sounds
      int8 BACKINGUP = 1
      int8 NEEDS_UNPLUGGING = 2
      int8 NEEDS_PLUGGING = 3
      int8 NEEDS_UNPLUGGING_BADLY = 4
      int8 NEEDS_PLUGGING_BADLY = 5
      
      # Sound identifiers that have special meaning
      int8 ALL = -1 # Only legal with PLAY_STOP
      int8 PLAY_FILE = -2
      int8 SAY = -3
      
      int8 sound # Selects which sound to play (see above)
      
      # Commands
      int8 PLAY_STOP = 0 # Stop this sound from playing
      int8 PLAY_ONCE = 1 # Play the sound once
      int8 PLAY_START = 2 # Play the sound in a loop until a stop request occurs
      
      int8 command # Indicates what to do with the sound
      
      # Volume at which to play the sound, with 0 as mute and 1.0 as 100%.
      float32 volume
      
      string arg # file name or text to say
      string arg2 # other arguments
      
      ================================================================================
      MSG: sound_play/SoundRequestActionResult
      # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
      
      Header header
      actionlib_msgs/GoalStatus status
      SoundRequestResult result
      
      ================================================================================
      MSG: actionlib_msgs/GoalStatus
      GoalID goal_id
      uint8 status
      uint8 PENDING         = 0   # The goal has yet to be processed by the action server
      uint8 ACTIVE          = 1   # The goal is currently being processed by the action server
      uint8 PREEMPTED       = 2   # The goal received a cancel request after it started executing
                                  #   and has since completed its execution (Terminal State)
      uint8 SUCCEEDED       = 3   # The goal was achieved successfully by the action server (Terminal State)
      uint8 ABORTED         = 4   # The goal was aborted during execution by the action server due
                                  #    to some failure (Terminal State)
      uint8 REJECTED        = 5   # The goal was rejected by the action server without being processed,
                                  #    because the goal was unattainable or invalid (Terminal State)
      uint8 PREEMPTING      = 6   # The goal received a cancel request after it started executing
                                  #    and has not yet completed execution
      uint8 RECALLING       = 7   # The goal received a cancel request before it started executing,
                                  #    but the action server has not yet confirmed that the goal is canceled
      uint8 RECALLED        = 8   # The goal received a cancel request before it started executing
                                  #    and was successfully cancelled (Terminal State)
      uint8 LOST            = 9   # An action client can determine that a goal is LOST. This should not be
                                  #    sent over the wire by an action server
      
      #Allow for the user to associate a string with GoalStatus for debugging
      string text
      
      
      ================================================================================
      MSG: sound_play/SoundRequestResult
      # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
      bool playing
      time stamp
      
      ================================================================================
      MSG: sound_play/SoundRequestActionFeedback
      # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
      
      Header header
      actionlib_msgs/GoalStatus status
      SoundRequestFeedback feedback
      
      ================================================================================
      MSG: sound_play/SoundRequestFeedback
      # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
      bool playing
      time stamp
      
      `;
    }
  
    static Resolve(msg) {
      // deep-construct a valid message object instance of whatever was passed in
      if (typeof msg !== 'object' || msg === null) {
        msg = {};
      }
      const resolved = new SoundRequestAction(null);
      if (msg.action_goal !== undefined) {
        resolved.action_goal = SoundRequestActionGoal.Resolve(msg.action_goal)
      }
      else {
        resolved.action_goal = new SoundRequestActionGoal()
      }
  
      if (msg.action_result !== undefined) {
        resolved.action_result = SoundRequestActionResult.Resolve(msg.action_result)
      }
      else {
        resolved.action_result = new SoundRequestActionResult()
      }
  
      if (msg.action_feedback !== undefined) {
        resolved.action_feedback = SoundRequestActionFeedback.Resolve(msg.action_feedback)
      }
      else {
        resolved.action_feedback = new SoundRequestActionFeedback()
      }
  
      return resolved;
      }
  };
  
  module.exports = SoundRequestAction;
  