/**
 * Autogenerated by Thrift Compiler (0.7.0-dev)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Thrift;
using Thrift.Collections;
using Thrift.Protocol;
using Thrift.Transport;
public class FacebookService {
  public interface Iface {
    string getName();
    string getVersion();
    fb_status getStatus();
    string getStatusDetails();
    Dictionary<string, long> getCounters();
    long getCounter(string key);
    void setOption(string key, string value);
    string getOption(string key);
    Dictionary<string, string> getOptions();
    string getCpuProfile(int profileDurationInSec);
    long aliveSince();
    void reinitialize();
    void shutdown();
  }

  public class Client : Iface {
    public Client(TProtocol prot) : this(prot, prot)
    {
    }

    public Client(TProtocol iprot, TProtocol oprot)
    {
      iprot_ = iprot;
      oprot_ = oprot;
    }

    protected TProtocol iprot_;
    protected TProtocol oprot_;
    protected int seqid_;

    public TProtocol InputProtocol
    {
      get { return iprot_; }
    }
    public TProtocol OutputProtocol
    {
      get { return oprot_; }
    }


    public string getName()
    {
      send_getName();
      return recv_getName();
    }

    public void send_getName()
    {
      oprot_.WriteMessageBegin(new TMessage("getName", TMessageType.Call, seqid_));
      getName_args args = new getName_args();
      args.Write(oprot_);
      oprot_.WriteMessageEnd();
      oprot_.Transport.Flush();
    }

    public string recv_getName()
    {
      TMessage msg = iprot_.ReadMessageBegin();
      if (msg.Type == TMessageType.Exception) {
        TApplicationException x = TApplicationException.Read(iprot_);
        iprot_.ReadMessageEnd();
        throw x;
      }
      getName_result result = new getName_result();
      result.Read(iprot_);
      iprot_.ReadMessageEnd();
      if (result.__isset.success) {
        return result.Success;
      }
      throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getName failed: unknown result");
    }

    public string getVersion()
    {
      send_getVersion();
      return recv_getVersion();
    }

    public void send_getVersion()
    {
      oprot_.WriteMessageBegin(new TMessage("getVersion", TMessageType.Call, seqid_));
      getVersion_args args = new getVersion_args();
      args.Write(oprot_);
      oprot_.WriteMessageEnd();
      oprot_.Transport.Flush();
    }

    public string recv_getVersion()
    {
      TMessage msg = iprot_.ReadMessageBegin();
      if (msg.Type == TMessageType.Exception) {
        TApplicationException x = TApplicationException.Read(iprot_);
        iprot_.ReadMessageEnd();
        throw x;
      }
      getVersion_result result = new getVersion_result();
      result.Read(iprot_);
      iprot_.ReadMessageEnd();
      if (result.__isset.success) {
        return result.Success;
      }
      throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getVersion failed: unknown result");
    }

    public fb_status getStatus()
    {
      send_getStatus();
      return recv_getStatus();
    }

    public void send_getStatus()
    {
      oprot_.WriteMessageBegin(new TMessage("getStatus", TMessageType.Call, seqid_));
      getStatus_args args = new getStatus_args();
      args.Write(oprot_);
      oprot_.WriteMessageEnd();
      oprot_.Transport.Flush();
    }

    public fb_status recv_getStatus()
    {
      TMessage msg = iprot_.ReadMessageBegin();
      if (msg.Type == TMessageType.Exception) {
        TApplicationException x = TApplicationException.Read(iprot_);
        iprot_.ReadMessageEnd();
        throw x;
      }
      getStatus_result result = new getStatus_result();
      result.Read(iprot_);
      iprot_.ReadMessageEnd();
      if (result.__isset.success) {
        return result.Success;
      }
      throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getStatus failed: unknown result");
    }

    public string getStatusDetails()
    {
      send_getStatusDetails();
      return recv_getStatusDetails();
    }

    public void send_getStatusDetails()
    {
      oprot_.WriteMessageBegin(new TMessage("getStatusDetails", TMessageType.Call, seqid_));
      getStatusDetails_args args = new getStatusDetails_args();
      args.Write(oprot_);
      oprot_.WriteMessageEnd();
      oprot_.Transport.Flush();
    }

    public string recv_getStatusDetails()
    {
      TMessage msg = iprot_.ReadMessageBegin();
      if (msg.Type == TMessageType.Exception) {
        TApplicationException x = TApplicationException.Read(iprot_);
        iprot_.ReadMessageEnd();
        throw x;
      }
      getStatusDetails_result result = new getStatusDetails_result();
      result.Read(iprot_);
      iprot_.ReadMessageEnd();
      if (result.__isset.success) {
        return result.Success;
      }
      throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getStatusDetails failed: unknown result");
    }

    public Dictionary<string, long> getCounters()
    {
      send_getCounters();
      return recv_getCounters();
    }

    public void send_getCounters()
    {
      oprot_.WriteMessageBegin(new TMessage("getCounters", TMessageType.Call, seqid_));
      getCounters_args args = new getCounters_args();
      args.Write(oprot_);
      oprot_.WriteMessageEnd();
      oprot_.Transport.Flush();
    }

    public Dictionary<string, long> recv_getCounters()
    {
      TMessage msg = iprot_.ReadMessageBegin();
      if (msg.Type == TMessageType.Exception) {
        TApplicationException x = TApplicationException.Read(iprot_);
        iprot_.ReadMessageEnd();
        throw x;
      }
      getCounters_result result = new getCounters_result();
      result.Read(iprot_);
      iprot_.ReadMessageEnd();
      if (result.__isset.success) {
        return result.Success;
      }
      throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getCounters failed: unknown result");
    }

    public long getCounter(string key)
    {
      send_getCounter(key);
      return recv_getCounter();
    }

    public void send_getCounter(string key)
    {
      oprot_.WriteMessageBegin(new TMessage("getCounter", TMessageType.Call, seqid_));
      getCounter_args args = new getCounter_args();
      args.Key = key;
      args.Write(oprot_);
      oprot_.WriteMessageEnd();
      oprot_.Transport.Flush();
    }

    public long recv_getCounter()
    {
      TMessage msg = iprot_.ReadMessageBegin();
      if (msg.Type == TMessageType.Exception) {
        TApplicationException x = TApplicationException.Read(iprot_);
        iprot_.ReadMessageEnd();
        throw x;
      }
      getCounter_result result = new getCounter_result();
      result.Read(iprot_);
      iprot_.ReadMessageEnd();
      if (result.__isset.success) {
        return result.Success;
      }
      throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getCounter failed: unknown result");
    }

    public void setOption(string key, string value)
    {
      send_setOption(key, value);
      recv_setOption();
    }

    public void send_setOption(string key, string value)
    {
      oprot_.WriteMessageBegin(new TMessage("setOption", TMessageType.Call, seqid_));
      setOption_args args = new setOption_args();
      args.Key = key;
      args.Value = value;
      args.Write(oprot_);
      oprot_.WriteMessageEnd();
      oprot_.Transport.Flush();
    }

    public void recv_setOption()
    {
      TMessage msg = iprot_.ReadMessageBegin();
      if (msg.Type == TMessageType.Exception) {
        TApplicationException x = TApplicationException.Read(iprot_);
        iprot_.ReadMessageEnd();
        throw x;
      }
      setOption_result result = new setOption_result();
      result.Read(iprot_);
      iprot_.ReadMessageEnd();
      return;
    }

    public string getOption(string key)
    {
      send_getOption(key);
      return recv_getOption();
    }

    public void send_getOption(string key)
    {
      oprot_.WriteMessageBegin(new TMessage("getOption", TMessageType.Call, seqid_));
      getOption_args args = new getOption_args();
      args.Key = key;
      args.Write(oprot_);
      oprot_.WriteMessageEnd();
      oprot_.Transport.Flush();
    }

    public string recv_getOption()
    {
      TMessage msg = iprot_.ReadMessageBegin();
      if (msg.Type == TMessageType.Exception) {
        TApplicationException x = TApplicationException.Read(iprot_);
        iprot_.ReadMessageEnd();
        throw x;
      }
      getOption_result result = new getOption_result();
      result.Read(iprot_);
      iprot_.ReadMessageEnd();
      if (result.__isset.success) {
        return result.Success;
      }
      throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getOption failed: unknown result");
    }

    public Dictionary<string, string> getOptions()
    {
      send_getOptions();
      return recv_getOptions();
    }

    public void send_getOptions()
    {
      oprot_.WriteMessageBegin(new TMessage("getOptions", TMessageType.Call, seqid_));
      getOptions_args args = new getOptions_args();
      args.Write(oprot_);
      oprot_.WriteMessageEnd();
      oprot_.Transport.Flush();
    }

    public Dictionary<string, string> recv_getOptions()
    {
      TMessage msg = iprot_.ReadMessageBegin();
      if (msg.Type == TMessageType.Exception) {
        TApplicationException x = TApplicationException.Read(iprot_);
        iprot_.ReadMessageEnd();
        throw x;
      }
      getOptions_result result = new getOptions_result();
      result.Read(iprot_);
      iprot_.ReadMessageEnd();
      if (result.__isset.success) {
        return result.Success;
      }
      throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getOptions failed: unknown result");
    }

    public string getCpuProfile(int profileDurationInSec)
    {
      send_getCpuProfile(profileDurationInSec);
      return recv_getCpuProfile();
    }

    public void send_getCpuProfile(int profileDurationInSec)
    {
      oprot_.WriteMessageBegin(new TMessage("getCpuProfile", TMessageType.Call, seqid_));
      getCpuProfile_args args = new getCpuProfile_args();
      args.ProfileDurationInSec = profileDurationInSec;
      args.Write(oprot_);
      oprot_.WriteMessageEnd();
      oprot_.Transport.Flush();
    }

    public string recv_getCpuProfile()
    {
      TMessage msg = iprot_.ReadMessageBegin();
      if (msg.Type == TMessageType.Exception) {
        TApplicationException x = TApplicationException.Read(iprot_);
        iprot_.ReadMessageEnd();
        throw x;
      }
      getCpuProfile_result result = new getCpuProfile_result();
      result.Read(iprot_);
      iprot_.ReadMessageEnd();
      if (result.__isset.success) {
        return result.Success;
      }
      throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getCpuProfile failed: unknown result");
    }

    public long aliveSince()
    {
      send_aliveSince();
      return recv_aliveSince();
    }

    public void send_aliveSince()
    {
      oprot_.WriteMessageBegin(new TMessage("aliveSince", TMessageType.Call, seqid_));
      aliveSince_args args = new aliveSince_args();
      args.Write(oprot_);
      oprot_.WriteMessageEnd();
      oprot_.Transport.Flush();
    }

    public long recv_aliveSince()
    {
      TMessage msg = iprot_.ReadMessageBegin();
      if (msg.Type == TMessageType.Exception) {
        TApplicationException x = TApplicationException.Read(iprot_);
        iprot_.ReadMessageEnd();
        throw x;
      }
      aliveSince_result result = new aliveSince_result();
      result.Read(iprot_);
      iprot_.ReadMessageEnd();
      if (result.__isset.success) {
        return result.Success;
      }
      throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "aliveSince failed: unknown result");
    }

    public void reinitialize()
    {
      send_reinitialize();
    }

    public void send_reinitialize()
    {
      oprot_.WriteMessageBegin(new TMessage("reinitialize", TMessageType.Call, seqid_));
      reinitialize_args args = new reinitialize_args();
      args.Write(oprot_);
      oprot_.WriteMessageEnd();
      oprot_.Transport.Flush();
    }

    public void shutdown()
    {
      send_shutdown();
    }

    public void send_shutdown()
    {
      oprot_.WriteMessageBegin(new TMessage("shutdown", TMessageType.Call, seqid_));
      shutdown_args args = new shutdown_args();
      args.Write(oprot_);
      oprot_.WriteMessageEnd();
      oprot_.Transport.Flush();
    }

  }
  public class Processor : TProcessor {
    public Processor(Iface iface)
    {
      iface_ = iface;
      processMap_["getName"] = getName_Process;
      processMap_["getVersion"] = getVersion_Process;
      processMap_["getStatus"] = getStatus_Process;
      processMap_["getStatusDetails"] = getStatusDetails_Process;
      processMap_["getCounters"] = getCounters_Process;
      processMap_["getCounter"] = getCounter_Process;
      processMap_["setOption"] = setOption_Process;
      processMap_["getOption"] = getOption_Process;
      processMap_["getOptions"] = getOptions_Process;
      processMap_["getCpuProfile"] = getCpuProfile_Process;
      processMap_["aliveSince"] = aliveSince_Process;
      processMap_["reinitialize"] = reinitialize_Process;
      processMap_["shutdown"] = shutdown_Process;
    }

    protected delegate void ProcessFunction(int seqid, TProtocol iprot, TProtocol oprot);
    private Iface iface_;
    protected Dictionary<string, ProcessFunction> processMap_ = new Dictionary<string, ProcessFunction>();

    public bool Process(TProtocol iprot, TProtocol oprot)
    {
      try
      {
        TMessage msg = iprot.ReadMessageBegin();
        ProcessFunction fn;
        processMap_.TryGetValue(msg.Name, out fn);
        if (fn == null) {
          TProtocolUtil.Skip(iprot, TType.Struct);
          iprot.ReadMessageEnd();
          TApplicationException x = new TApplicationException (TApplicationException.ExceptionType.UnknownMethod, "Invalid method name: '" + msg.Name + "'");
          oprot.WriteMessageBegin(new TMessage(msg.Name, TMessageType.Exception, msg.SeqID));
          x.Write(oprot);
          oprot.WriteMessageEnd();
          oprot.Transport.Flush();
          return true;
        }
        fn(msg.SeqID, iprot, oprot);
      }
      catch (IOException)
      {
        return false;
      }
      return true;
    }

    public void getName_Process(int seqid, TProtocol iprot, TProtocol oprot)
    {
      getName_args args = new getName_args();
      args.Read(iprot);
      iprot.ReadMessageEnd();
      getName_result result = new getName_result();
      result.Success = iface_.getName();
      oprot.WriteMessageBegin(new TMessage("getName", TMessageType.Reply, seqid)); 
      result.Write(oprot);
      oprot.WriteMessageEnd();
      oprot.Transport.Flush();
    }

    public void getVersion_Process(int seqid, TProtocol iprot, TProtocol oprot)
    {
      getVersion_args args = new getVersion_args();
      args.Read(iprot);
      iprot.ReadMessageEnd();
      getVersion_result result = new getVersion_result();
      result.Success = iface_.getVersion();
      oprot.WriteMessageBegin(new TMessage("getVersion", TMessageType.Reply, seqid)); 
      result.Write(oprot);
      oprot.WriteMessageEnd();
      oprot.Transport.Flush();
    }

    public void getStatus_Process(int seqid, TProtocol iprot, TProtocol oprot)
    {
      getStatus_args args = new getStatus_args();
      args.Read(iprot);
      iprot.ReadMessageEnd();
      getStatus_result result = new getStatus_result();
      result.Success = iface_.getStatus();
      oprot.WriteMessageBegin(new TMessage("getStatus", TMessageType.Reply, seqid)); 
      result.Write(oprot);
      oprot.WriteMessageEnd();
      oprot.Transport.Flush();
    }

    public void getStatusDetails_Process(int seqid, TProtocol iprot, TProtocol oprot)
    {
      getStatusDetails_args args = new getStatusDetails_args();
      args.Read(iprot);
      iprot.ReadMessageEnd();
      getStatusDetails_result result = new getStatusDetails_result();
      result.Success = iface_.getStatusDetails();
      oprot.WriteMessageBegin(new TMessage("getStatusDetails", TMessageType.Reply, seqid)); 
      result.Write(oprot);
      oprot.WriteMessageEnd();
      oprot.Transport.Flush();
    }

    public void getCounters_Process(int seqid, TProtocol iprot, TProtocol oprot)
    {
      getCounters_args args = new getCounters_args();
      args.Read(iprot);
      iprot.ReadMessageEnd();
      getCounters_result result = new getCounters_result();
      result.Success = iface_.getCounters();
      oprot.WriteMessageBegin(new TMessage("getCounters", TMessageType.Reply, seqid)); 
      result.Write(oprot);
      oprot.WriteMessageEnd();
      oprot.Transport.Flush();
    }

    public void getCounter_Process(int seqid, TProtocol iprot, TProtocol oprot)
    {
      getCounter_args args = new getCounter_args();
      args.Read(iprot);
      iprot.ReadMessageEnd();
      getCounter_result result = new getCounter_result();
      result.Success = iface_.getCounter(args.Key);
      oprot.WriteMessageBegin(new TMessage("getCounter", TMessageType.Reply, seqid)); 
      result.Write(oprot);
      oprot.WriteMessageEnd();
      oprot.Transport.Flush();
    }

    public void setOption_Process(int seqid, TProtocol iprot, TProtocol oprot)
    {
      setOption_args args = new setOption_args();
      args.Read(iprot);
      iprot.ReadMessageEnd();
      setOption_result result = new setOption_result();
      iface_.setOption(args.Key, args.Value);
      oprot.WriteMessageBegin(new TMessage("setOption", TMessageType.Reply, seqid)); 
      result.Write(oprot);
      oprot.WriteMessageEnd();
      oprot.Transport.Flush();
    }

    public void getOption_Process(int seqid, TProtocol iprot, TProtocol oprot)
    {
      getOption_args args = new getOption_args();
      args.Read(iprot);
      iprot.ReadMessageEnd();
      getOption_result result = new getOption_result();
      result.Success = iface_.getOption(args.Key);
      oprot.WriteMessageBegin(new TMessage("getOption", TMessageType.Reply, seqid)); 
      result.Write(oprot);
      oprot.WriteMessageEnd();
      oprot.Transport.Flush();
    }

    public void getOptions_Process(int seqid, TProtocol iprot, TProtocol oprot)
    {
      getOptions_args args = new getOptions_args();
      args.Read(iprot);
      iprot.ReadMessageEnd();
      getOptions_result result = new getOptions_result();
      result.Success = iface_.getOptions();
      oprot.WriteMessageBegin(new TMessage("getOptions", TMessageType.Reply, seqid)); 
      result.Write(oprot);
      oprot.WriteMessageEnd();
      oprot.Transport.Flush();
    }

    public void getCpuProfile_Process(int seqid, TProtocol iprot, TProtocol oprot)
    {
      getCpuProfile_args args = new getCpuProfile_args();
      args.Read(iprot);
      iprot.ReadMessageEnd();
      getCpuProfile_result result = new getCpuProfile_result();
      result.Success = iface_.getCpuProfile(args.ProfileDurationInSec);
      oprot.WriteMessageBegin(new TMessage("getCpuProfile", TMessageType.Reply, seqid)); 
      result.Write(oprot);
      oprot.WriteMessageEnd();
      oprot.Transport.Flush();
    }

    public void aliveSince_Process(int seqid, TProtocol iprot, TProtocol oprot)
    {
      aliveSince_args args = new aliveSince_args();
      args.Read(iprot);
      iprot.ReadMessageEnd();
      aliveSince_result result = new aliveSince_result();
      result.Success = iface_.aliveSince();
      oprot.WriteMessageBegin(new TMessage("aliveSince", TMessageType.Reply, seqid)); 
      result.Write(oprot);
      oprot.WriteMessageEnd();
      oprot.Transport.Flush();
    }

    public void reinitialize_Process(int seqid, TProtocol iprot, TProtocol oprot)
    {
      reinitialize_args args = new reinitialize_args();
      args.Read(iprot);
      iprot.ReadMessageEnd();
      iface_.reinitialize();
      return;
    }
    public void shutdown_Process(int seqid, TProtocol iprot, TProtocol oprot)
    {
      shutdown_args args = new shutdown_args();
      args.Read(iprot);
      iprot.ReadMessageEnd();
      iface_.shutdown();
      return;
    }
  }


  [Serializable]
  public partial class getName_args : TBase
  {

    public getName_args() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getName_args");
      oprot.WriteStructBegin(struc);
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getName_args(");
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getName_result : TBase
  {
    private string _success;

    public string Success
    {
      get
      {
        return _success;
      }
      set
      {
        __isset.success = true;
        this._success = value;
      }
    }


    public Isset __isset;
    [Serializable]
    public struct Isset {
      public bool success;
    }

    public getName_result() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          case 0:
            if (field.Type == TType.String) {
              Success = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getName_result");
      oprot.WriteStructBegin(struc);
      TField field = new TField();

      if (this.__isset.success) {
        if (Success != null) {
          field.Name = "Success";
          field.Type = TType.String;
          field.ID = 0;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(Success);
          oprot.WriteFieldEnd();
        }
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getName_result(");
      sb.Append("Success: ");
      sb.Append(Success);
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getVersion_args : TBase
  {

    public getVersion_args() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getVersion_args");
      oprot.WriteStructBegin(struc);
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getVersion_args(");
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getVersion_result : TBase
  {
    private string _success;

    public string Success
    {
      get
      {
        return _success;
      }
      set
      {
        __isset.success = true;
        this._success = value;
      }
    }


    public Isset __isset;
    [Serializable]
    public struct Isset {
      public bool success;
    }

    public getVersion_result() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          case 0:
            if (field.Type == TType.String) {
              Success = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getVersion_result");
      oprot.WriteStructBegin(struc);
      TField field = new TField();

      if (this.__isset.success) {
        if (Success != null) {
          field.Name = "Success";
          field.Type = TType.String;
          field.ID = 0;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(Success);
          oprot.WriteFieldEnd();
        }
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getVersion_result(");
      sb.Append("Success: ");
      sb.Append(Success);
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getStatus_args : TBase
  {

    public getStatus_args() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getStatus_args");
      oprot.WriteStructBegin(struc);
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getStatus_args(");
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getStatus_result : TBase
  {
    private fb_status _success;

    public fb_status Success
    {
      get
      {
        return _success;
      }
      set
      {
        __isset.success = true;
        this._success = value;
      }
    }


    public Isset __isset;
    [Serializable]
    public struct Isset {
      public bool success;
    }

    public getStatus_result() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          case 0:
            if (field.Type == TType.I32) {
              Success = (fb_status)iprot.ReadI32();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getStatus_result");
      oprot.WriteStructBegin(struc);
      TField field = new TField();

      if (this.__isset.success) {
        field.Name = "Success";
        field.Type = TType.I32;
        field.ID = 0;
        oprot.WriteFieldBegin(field);
        oprot.WriteI32((int)Success);
        oprot.WriteFieldEnd();
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getStatus_result(");
      sb.Append("Success: ");
      sb.Append(Success);
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getStatusDetails_args : TBase
  {

    public getStatusDetails_args() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getStatusDetails_args");
      oprot.WriteStructBegin(struc);
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getStatusDetails_args(");
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getStatusDetails_result : TBase
  {
    private string _success;

    public string Success
    {
      get
      {
        return _success;
      }
      set
      {
        __isset.success = true;
        this._success = value;
      }
    }


    public Isset __isset;
    [Serializable]
    public struct Isset {
      public bool success;
    }

    public getStatusDetails_result() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          case 0:
            if (field.Type == TType.String) {
              Success = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getStatusDetails_result");
      oprot.WriteStructBegin(struc);
      TField field = new TField();

      if (this.__isset.success) {
        if (Success != null) {
          field.Name = "Success";
          field.Type = TType.String;
          field.ID = 0;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(Success);
          oprot.WriteFieldEnd();
        }
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getStatusDetails_result(");
      sb.Append("Success: ");
      sb.Append(Success);
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getCounters_args : TBase
  {

    public getCounters_args() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getCounters_args");
      oprot.WriteStructBegin(struc);
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getCounters_args(");
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getCounters_result : TBase
  {
    private Dictionary<string, long> _success;

    public Dictionary<string, long> Success
    {
      get
      {
        return _success;
      }
      set
      {
        __isset.success = true;
        this._success = value;
      }
    }


    public Isset __isset;
    [Serializable]
    public struct Isset {
      public bool success;
    }

    public getCounters_result() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          case 0:
            if (field.Type == TType.Map) {
              {
                Success = new Dictionary<string, long>();
                TMap _map0 = iprot.ReadMapBegin();
                for( int _i1 = 0; _i1 < _map0.Count; ++_i1)
                {
                  string _key2;
                  long _val3;
                  _key2 = iprot.ReadString();
                  _val3 = iprot.ReadI64();
                  Success[_key2] = _val3;
                }
                iprot.ReadMapEnd();
              }
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getCounters_result");
      oprot.WriteStructBegin(struc);
      TField field = new TField();

      if (this.__isset.success) {
        if (Success != null) {
          field.Name = "Success";
          field.Type = TType.Map;
          field.ID = 0;
          oprot.WriteFieldBegin(field);
          {
            oprot.WriteMapBegin(new TMap(TType.String, TType.I64, Success.Count));
            foreach (string _iter4 in Success.Keys)
            {
              oprot.WriteString(_iter4);
              oprot.WriteI64(Success[_iter4]);
            }
            oprot.WriteMapEnd();
          }
          oprot.WriteFieldEnd();
        }
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getCounters_result(");
      sb.Append("Success: ");
      sb.Append(Success);
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getCounter_args : TBase
  {
    private string _key;

    public string Key
    {
      get
      {
        return _key;
      }
      set
      {
        __isset.key = true;
        this._key = value;
      }
    }


    public Isset __isset;
    [Serializable]
    public struct Isset {
      public bool key;
    }

    public getCounter_args() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          case 1:
            if (field.Type == TType.String) {
              Key = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getCounter_args");
      oprot.WriteStructBegin(struc);
      TField field = new TField();
      if (Key != null && __isset.key) {
        field.Name = "key";
        field.Type = TType.String;
        field.ID = 1;
        oprot.WriteFieldBegin(field);
        oprot.WriteString(Key);
        oprot.WriteFieldEnd();
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getCounter_args(");
      sb.Append("Key: ");
      sb.Append(Key);
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getCounter_result : TBase
  {
    private long _success;

    public long Success
    {
      get
      {
        return _success;
      }
      set
      {
        __isset.success = true;
        this._success = value;
      }
    }


    public Isset __isset;
    [Serializable]
    public struct Isset {
      public bool success;
    }

    public getCounter_result() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          case 0:
            if (field.Type == TType.I64) {
              Success = iprot.ReadI64();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getCounter_result");
      oprot.WriteStructBegin(struc);
      TField field = new TField();

      if (this.__isset.success) {
        field.Name = "Success";
        field.Type = TType.I64;
        field.ID = 0;
        oprot.WriteFieldBegin(field);
        oprot.WriteI64(Success);
        oprot.WriteFieldEnd();
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getCounter_result(");
      sb.Append("Success: ");
      sb.Append(Success);
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class setOption_args : TBase
  {
    private string _key;
    private string _value;

    public string Key
    {
      get
      {
        return _key;
      }
      set
      {
        __isset.key = true;
        this._key = value;
      }
    }

    public string Value
    {
      get
      {
        return _value;
      }
      set
      {
        __isset.value = true;
        this._value = value;
      }
    }


    public Isset __isset;
    [Serializable]
    public struct Isset {
      public bool key;
      public bool value;
    }

    public setOption_args() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          case 1:
            if (field.Type == TType.String) {
              Key = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 2:
            if (field.Type == TType.String) {
              Value = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("setOption_args");
      oprot.WriteStructBegin(struc);
      TField field = new TField();
      if (Key != null && __isset.key) {
        field.Name = "key";
        field.Type = TType.String;
        field.ID = 1;
        oprot.WriteFieldBegin(field);
        oprot.WriteString(Key);
        oprot.WriteFieldEnd();
      }
      if (Value != null && __isset.value) {
        field.Name = "value";
        field.Type = TType.String;
        field.ID = 2;
        oprot.WriteFieldBegin(field);
        oprot.WriteString(Value);
        oprot.WriteFieldEnd();
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("setOption_args(");
      sb.Append("Key: ");
      sb.Append(Key);
      sb.Append(",Value: ");
      sb.Append(Value);
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class setOption_result : TBase
  {

    public setOption_result() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("setOption_result");
      oprot.WriteStructBegin(struc);

      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("setOption_result(");
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getOption_args : TBase
  {
    private string _key;

    public string Key
    {
      get
      {
        return _key;
      }
      set
      {
        __isset.key = true;
        this._key = value;
      }
    }


    public Isset __isset;
    [Serializable]
    public struct Isset {
      public bool key;
    }

    public getOption_args() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          case 1:
            if (field.Type == TType.String) {
              Key = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getOption_args");
      oprot.WriteStructBegin(struc);
      TField field = new TField();
      if (Key != null && __isset.key) {
        field.Name = "key";
        field.Type = TType.String;
        field.ID = 1;
        oprot.WriteFieldBegin(field);
        oprot.WriteString(Key);
        oprot.WriteFieldEnd();
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getOption_args(");
      sb.Append("Key: ");
      sb.Append(Key);
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getOption_result : TBase
  {
    private string _success;

    public string Success
    {
      get
      {
        return _success;
      }
      set
      {
        __isset.success = true;
        this._success = value;
      }
    }


    public Isset __isset;
    [Serializable]
    public struct Isset {
      public bool success;
    }

    public getOption_result() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          case 0:
            if (field.Type == TType.String) {
              Success = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getOption_result");
      oprot.WriteStructBegin(struc);
      TField field = new TField();

      if (this.__isset.success) {
        if (Success != null) {
          field.Name = "Success";
          field.Type = TType.String;
          field.ID = 0;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(Success);
          oprot.WriteFieldEnd();
        }
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getOption_result(");
      sb.Append("Success: ");
      sb.Append(Success);
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getOptions_args : TBase
  {

    public getOptions_args() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getOptions_args");
      oprot.WriteStructBegin(struc);
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getOptions_args(");
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getOptions_result : TBase
  {
    private Dictionary<string, string> _success;

    public Dictionary<string, string> Success
    {
      get
      {
        return _success;
      }
      set
      {
        __isset.success = true;
        this._success = value;
      }
    }


    public Isset __isset;
    [Serializable]
    public struct Isset {
      public bool success;
    }

    public getOptions_result() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          case 0:
            if (field.Type == TType.Map) {
              {
                Success = new Dictionary<string, string>();
                TMap _map5 = iprot.ReadMapBegin();
                for( int _i6 = 0; _i6 < _map5.Count; ++_i6)
                {
                  string _key7;
                  string _val8;
                  _key7 = iprot.ReadString();
                  _val8 = iprot.ReadString();
                  Success[_key7] = _val8;
                }
                iprot.ReadMapEnd();
              }
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getOptions_result");
      oprot.WriteStructBegin(struc);
      TField field = new TField();

      if (this.__isset.success) {
        if (Success != null) {
          field.Name = "Success";
          field.Type = TType.Map;
          field.ID = 0;
          oprot.WriteFieldBegin(field);
          {
            oprot.WriteMapBegin(new TMap(TType.String, TType.String, Success.Count));
            foreach (string _iter9 in Success.Keys)
            {
              oprot.WriteString(_iter9);
              oprot.WriteString(Success[_iter9]);
            }
            oprot.WriteMapEnd();
          }
          oprot.WriteFieldEnd();
        }
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getOptions_result(");
      sb.Append("Success: ");
      sb.Append(Success);
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getCpuProfile_args : TBase
  {
    private int _profileDurationInSec;

    public int ProfileDurationInSec
    {
      get
      {
        return _profileDurationInSec;
      }
      set
      {
        __isset.profileDurationInSec = true;
        this._profileDurationInSec = value;
      }
    }


    public Isset __isset;
    [Serializable]
    public struct Isset {
      public bool profileDurationInSec;
    }

    public getCpuProfile_args() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          case 1:
            if (field.Type == TType.I32) {
              ProfileDurationInSec = iprot.ReadI32();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getCpuProfile_args");
      oprot.WriteStructBegin(struc);
      TField field = new TField();
      if (__isset.profileDurationInSec) {
        field.Name = "profileDurationInSec";
        field.Type = TType.I32;
        field.ID = 1;
        oprot.WriteFieldBegin(field);
        oprot.WriteI32(ProfileDurationInSec);
        oprot.WriteFieldEnd();
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getCpuProfile_args(");
      sb.Append("ProfileDurationInSec: ");
      sb.Append(ProfileDurationInSec);
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class getCpuProfile_result : TBase
  {
    private string _success;

    public string Success
    {
      get
      {
        return _success;
      }
      set
      {
        __isset.success = true;
        this._success = value;
      }
    }


    public Isset __isset;
    [Serializable]
    public struct Isset {
      public bool success;
    }

    public getCpuProfile_result() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          case 0:
            if (field.Type == TType.String) {
              Success = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("getCpuProfile_result");
      oprot.WriteStructBegin(struc);
      TField field = new TField();

      if (this.__isset.success) {
        if (Success != null) {
          field.Name = "Success";
          field.Type = TType.String;
          field.ID = 0;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(Success);
          oprot.WriteFieldEnd();
        }
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("getCpuProfile_result(");
      sb.Append("Success: ");
      sb.Append(Success);
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class aliveSince_args : TBase
  {

    public aliveSince_args() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("aliveSince_args");
      oprot.WriteStructBegin(struc);
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("aliveSince_args(");
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class aliveSince_result : TBase
  {
    private long _success;

    public long Success
    {
      get
      {
        return _success;
      }
      set
      {
        __isset.success = true;
        this._success = value;
      }
    }


    public Isset __isset;
    [Serializable]
    public struct Isset {
      public bool success;
    }

    public aliveSince_result() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          case 0:
            if (field.Type == TType.I64) {
              Success = iprot.ReadI64();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("aliveSince_result");
      oprot.WriteStructBegin(struc);
      TField field = new TField();

      if (this.__isset.success) {
        field.Name = "Success";
        field.Type = TType.I64;
        field.ID = 0;
        oprot.WriteFieldBegin(field);
        oprot.WriteI64(Success);
        oprot.WriteFieldEnd();
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("aliveSince_result(");
      sb.Append("Success: ");
      sb.Append(Success);
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class reinitialize_args : TBase
  {

    public reinitialize_args() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("reinitialize_args");
      oprot.WriteStructBegin(struc);
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("reinitialize_args(");
      sb.Append(")");
      return sb.ToString();
    }

  }


  [Serializable]
  public partial class shutdown_args : TBase
  {

    public shutdown_args() {
    }

    public void Read (TProtocol iprot)
    {
      TField field;
      iprot.ReadStructBegin();
      while (true)
      {
        field = iprot.ReadFieldBegin();
        if (field.Type == TType.Stop) { 
          break;
        }
        switch (field.ID)
        {
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }

    public void Write(TProtocol oprot) {
      TStruct struc = new TStruct("shutdown_args");
      oprot.WriteStructBegin(struc);
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("shutdown_args(");
      sb.Append(")");
      return sb.ToString();
    }

  }

}
