/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.35
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

namespace FreeSWITCH.Native {

using System;
using System.Runtime.InteropServices;

public class switch_core_session_message : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal switch_core_session_message(IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new HandleRef(this, cPtr);
  }

  internal static HandleRef getCPtr(switch_core_session_message obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }

  ~switch_core_session_message() {
    Dispose();
  }

  public virtual void Dispose() {
    lock(this) {
      if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
        swigCMemOwn = false;
        freeswitchPINVOKE.delete_switch_core_session_message(swigCPtr);
      }
      swigCPtr = new HandleRef(null, IntPtr.Zero);
      GC.SuppressFinalize(this);
    }
  }

  public string from {
    set {
      freeswitchPINVOKE.switch_core_session_message_from_set(swigCPtr, value);
    } 
    get {
      string ret = freeswitchPINVOKE.switch_core_session_message_from_get(swigCPtr);
      return ret;
    } 
  }

  public switch_core_session_message_types_t message_id {
    set {
      freeswitchPINVOKE.switch_core_session_message_message_id_set(swigCPtr, (int)value);
    } 
    get {
      switch_core_session_message_types_t ret = (switch_core_session_message_types_t)freeswitchPINVOKE.switch_core_session_message_message_id_get(swigCPtr);
      return ret;
    } 
  }

  public int numeric_arg {
    set {
      freeswitchPINVOKE.switch_core_session_message_numeric_arg_set(swigCPtr, value);
    } 
    get {
      int ret = freeswitchPINVOKE.switch_core_session_message_numeric_arg_get(swigCPtr);
      return ret;
    } 
  }

  public string string_arg {
    set {
      freeswitchPINVOKE.switch_core_session_message_string_arg_set(swigCPtr, value);
    } 
    get {
      string ret = freeswitchPINVOKE.switch_core_session_message_string_arg_get(swigCPtr);
      return ret;
    } 
  }

  public SWIGTYPE_p_switch_size_t string_arg_size {
    set {
      freeswitchPINVOKE.switch_core_session_message_string_arg_size_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value));
      if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_core_session_message_string_arg_size_get(swigCPtr), true);
      if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public SWIGTYPE_p_void pointer_arg {
    set {
      freeswitchPINVOKE.switch_core_session_message_pointer_arg_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_core_session_message_pointer_arg_get(swigCPtr);
      SWIGTYPE_p_void ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
      return ret;
    } 
  }

  public SWIGTYPE_p_switch_size_t pointer_arg_size {
    set {
      freeswitchPINVOKE.switch_core_session_message_pointer_arg_size_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value));
      if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_core_session_message_pointer_arg_size_get(swigCPtr), true);
      if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public int numeric_reply {
    set {
      freeswitchPINVOKE.switch_core_session_message_numeric_reply_set(swigCPtr, value);
    } 
    get {
      int ret = freeswitchPINVOKE.switch_core_session_message_numeric_reply_get(swigCPtr);
      return ret;
    } 
  }

  public string string_reply {
    set {
      freeswitchPINVOKE.switch_core_session_message_string_reply_set(swigCPtr, value);
    } 
    get {
      string ret = freeswitchPINVOKE.switch_core_session_message_string_reply_get(swigCPtr);
      return ret;
    } 
  }

  public SWIGTYPE_p_switch_size_t string_reply_size {
    set {
      freeswitchPINVOKE.switch_core_session_message_string_reply_size_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value));
      if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_core_session_message_string_reply_size_get(swigCPtr), true);
      if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public SWIGTYPE_p_void pointer_reply {
    set {
      freeswitchPINVOKE.switch_core_session_message_pointer_reply_set(swigCPtr, SWIGTYPE_p_void.getCPtr(value));
    } 
    get {
      IntPtr cPtr = freeswitchPINVOKE.switch_core_session_message_pointer_reply_get(swigCPtr);
      SWIGTYPE_p_void ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
      return ret;
    } 
  }

  public SWIGTYPE_p_switch_size_t pointer_reply_size {
    set {
      freeswitchPINVOKE.switch_core_session_message_pointer_reply_size_set(swigCPtr, SWIGTYPE_p_switch_size_t.getCPtr(value));
      if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      SWIGTYPE_p_switch_size_t ret = new SWIGTYPE_p_switch_size_t(freeswitchPINVOKE.switch_core_session_message_pointer_reply_size_get(swigCPtr), true);
      if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public uint flags {
    set {
      freeswitchPINVOKE.switch_core_session_message_flags_set(swigCPtr, value);
    } 
    get {
      uint ret = freeswitchPINVOKE.switch_core_session_message_flags_get(swigCPtr);
      return ret;
    } 
  }

  public switch_core_session_message() : this(freeswitchPINVOKE.new_switch_core_session_message(), true) {
  }

}

}
