/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Thrift;
using Thrift.Collections;
using System.Runtime.Serialization;
using Thrift.Protocol;
using Thrift.Transport;


/// <summary>
/// 西宁项目新增功能――函数 add 20170306 fuyunpeng*
/// </summary>
#if !SILVERLIGHT
[Serializable]
#endif
public partial class ChannelCfgLBS : TBase
{
  private string _tcChannelID;
  private string _tcUID;
  private string _tcPSW;
  private string _name;
  private string _tcDescription;
  private CaptureCfg _captureCfg;
  private CatchFaceCfg _catchFaceCfg;
  private string _addr;
  private int _port;
  private int _channel_type;
  private string _channel_address;
  private string _longitude;
  private string _latitude;
  private int _nState;

  public string TcChannelID
  {
    get
    {
      return _tcChannelID;
    }
    set
    {
      __isset.tcChannelID = true;
      this._tcChannelID = value;
    }
  }

  public string TcUID
  {
    get
    {
      return _tcUID;
    }
    set
    {
      __isset.tcUID = true;
      this._tcUID = value;
    }
  }

  public string TcPSW
  {
    get
    {
      return _tcPSW;
    }
    set
    {
      __isset.tcPSW = true;
      this._tcPSW = value;
    }
  }

  public string Name
  {
    get
    {
      return _name;
    }
    set
    {
      __isset.name = true;
      this._name = value;
    }
  }

  public string TcDescription
  {
    get
    {
      return _tcDescription;
    }
    set
    {
      __isset.tcDescription = true;
      this._tcDescription = value;
    }
  }

  public CaptureCfg CaptureCfg
  {
    get
    {
      return _captureCfg;
    }
    set
    {
      __isset.captureCfg = true;
      this._captureCfg = value;
    }
  }

  public CatchFaceCfg CatchFaceCfg
  {
    get
    {
      return _catchFaceCfg;
    }
    set
    {
      __isset.catchFaceCfg = true;
      this._catchFaceCfg = value;
    }
  }

  public string Addr
  {
    get
    {
      return _addr;
    }
    set
    {
      __isset.addr = true;
      this._addr = value;
    }
  }

  public int Port
  {
    get
    {
      return _port;
    }
    set
    {
      __isset.port = true;
      this._port = value;
    }
  }

  public int Channel_type
  {
    get
    {
      return _channel_type;
    }
    set
    {
      __isset.channel_type = true;
      this._channel_type = value;
    }
  }

  public string Channel_address
  {
    get
    {
      return _channel_address;
    }
    set
    {
      __isset.channel_address = true;
      this._channel_address = value;
    }
  }

  public string Longitude
  {
    get
    {
      return _longitude;
    }
    set
    {
      __isset.longitude = true;
      this._longitude = value;
    }
  }

  public string Latitude
  {
    get
    {
      return _latitude;
    }
    set
    {
      __isset.latitude = true;
      this._latitude = value;
    }
  }

  public int NState
  {
    get
    {
      return _nState;
    }
    set
    {
      __isset.nState = true;
      this._nState = value;
    }
  }


  public Isset __isset;
  #if !SILVERLIGHT
  [Serializable]
  #endif
  public struct Isset {
    public bool tcChannelID;
    public bool tcUID;
    public bool tcPSW;
    public bool name;
    public bool tcDescription;
    public bool captureCfg;
    public bool catchFaceCfg;
    public bool addr;
    public bool port;
    public bool channel_type;
    public bool channel_address;
    public bool longitude;
    public bool latitude;
    public bool nState;
  }

  public ChannelCfgLBS() {
  }

  public void Read (TProtocol iprot)
  {
    iprot.IncrementRecursionDepth();
    try
    {
      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) {
              TcChannelID = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 2:
            if (field.Type == TType.String) {
              TcUID = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 3:
            if (field.Type == TType.String) {
              TcPSW = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 4:
            if (field.Type == TType.String) {
              Name = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 5:
            if (field.Type == TType.String) {
              TcDescription = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 6:
            if (field.Type == TType.Struct) {
              CaptureCfg = new CaptureCfg();
              CaptureCfg.Read(iprot);
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 7:
            if (field.Type == TType.Struct) {
              CatchFaceCfg = new CatchFaceCfg();
              CatchFaceCfg.Read(iprot);
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 8:
            if (field.Type == TType.String) {
              Addr = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 9:
            if (field.Type == TType.I32) {
              Port = iprot.ReadI32();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 10:
            if (field.Type == TType.I32) {
              Channel_type = iprot.ReadI32();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 11:
            if (field.Type == TType.String) {
              Channel_address = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 12:
            if (field.Type == TType.String) {
              Longitude = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 13:
            if (field.Type == TType.String) {
              Latitude = iprot.ReadString();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 14:
            if (field.Type == TType.I32) {
              NState = iprot.ReadI32();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          default: 
            TProtocolUtil.Skip(iprot, field.Type);
            break;
        }
        iprot.ReadFieldEnd();
      }
      iprot.ReadStructEnd();
    }
    finally
    {
      iprot.DecrementRecursionDepth();
    }
  }

  public void Write(TProtocol oprot) {
    oprot.IncrementRecursionDepth();
    try
    {
      TStruct struc = new TStruct("ChannelCfgLBS");
      oprot.WriteStructBegin(struc);
      TField field = new TField();
      if (TcChannelID != null && __isset.tcChannelID) {
        field.Name = "tcChannelID";
        field.Type = TType.String;
        field.ID = 1;
        oprot.WriteFieldBegin(field);
        oprot.WriteString(TcChannelID);
        oprot.WriteFieldEnd();
      }
      if (TcUID != null && __isset.tcUID) {
        field.Name = "tcUID";
        field.Type = TType.String;
        field.ID = 2;
        oprot.WriteFieldBegin(field);
        oprot.WriteString(TcUID);
        oprot.WriteFieldEnd();
      }
      if (TcPSW != null && __isset.tcPSW) {
        field.Name = "tcPSW";
        field.Type = TType.String;
        field.ID = 3;
        oprot.WriteFieldBegin(field);
        oprot.WriteString(TcPSW);
        oprot.WriteFieldEnd();
      }
      if (Name != null && __isset.name) {
        field.Name = "name";
        field.Type = TType.String;
        field.ID = 4;
        oprot.WriteFieldBegin(field);
        oprot.WriteString(Name);
        oprot.WriteFieldEnd();
      }
      if (TcDescription != null && __isset.tcDescription) {
        field.Name = "tcDescription";
        field.Type = TType.String;
        field.ID = 5;
        oprot.WriteFieldBegin(field);
        oprot.WriteString(TcDescription);
        oprot.WriteFieldEnd();
      }
      if (CaptureCfg != null && __isset.captureCfg) {
        field.Name = "captureCfg";
        field.Type = TType.Struct;
        field.ID = 6;
        oprot.WriteFieldBegin(field);
        CaptureCfg.Write(oprot);
        oprot.WriteFieldEnd();
      }
      if (CatchFaceCfg != null && __isset.catchFaceCfg) {
        field.Name = "catchFaceCfg";
        field.Type = TType.Struct;
        field.ID = 7;
        oprot.WriteFieldBegin(field);
        CatchFaceCfg.Write(oprot);
        oprot.WriteFieldEnd();
      }
      if (Addr != null && __isset.addr) {
        field.Name = "addr";
        field.Type = TType.String;
        field.ID = 8;
        oprot.WriteFieldBegin(field);
        oprot.WriteString(Addr);
        oprot.WriteFieldEnd();
      }
      if (__isset.port) {
        field.Name = "port";
        field.Type = TType.I32;
        field.ID = 9;
        oprot.WriteFieldBegin(field);
        oprot.WriteI32(Port);
        oprot.WriteFieldEnd();
      }
      if (__isset.channel_type) {
        field.Name = "channel_type";
        field.Type = TType.I32;
        field.ID = 10;
        oprot.WriteFieldBegin(field);
        oprot.WriteI32(Channel_type);
        oprot.WriteFieldEnd();
      }
      if (Channel_address != null && __isset.channel_address) {
        field.Name = "channel_address";
        field.Type = TType.String;
        field.ID = 11;
        oprot.WriteFieldBegin(field);
        oprot.WriteString(Channel_address);
        oprot.WriteFieldEnd();
      }
      if (Longitude != null && __isset.longitude) {
        field.Name = "longitude";
        field.Type = TType.String;
        field.ID = 12;
        oprot.WriteFieldBegin(field);
        oprot.WriteString(Longitude);
        oprot.WriteFieldEnd();
      }
      if (Latitude != null && __isset.latitude) {
        field.Name = "latitude";
        field.Type = TType.String;
        field.ID = 13;
        oprot.WriteFieldBegin(field);
        oprot.WriteString(Latitude);
        oprot.WriteFieldEnd();
      }
      if (__isset.nState) {
        field.Name = "nState";
        field.Type = TType.I32;
        field.ID = 14;
        oprot.WriteFieldBegin(field);
        oprot.WriteI32(NState);
        oprot.WriteFieldEnd();
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }
    finally
    {
      oprot.DecrementRecursionDepth();
    }
  }

  public override string ToString() {
    StringBuilder __sb = new StringBuilder("ChannelCfgLBS(");
    bool __first = true;
    if (TcChannelID != null && __isset.tcChannelID) {
      if(!__first) { __sb.Append(", "); }
      __first = false;
      __sb.Append("TcChannelID: ");
      __sb.Append(TcChannelID);
    }
    if (TcUID != null && __isset.tcUID) {
      if(!__first) { __sb.Append(", "); }
      __first = false;
      __sb.Append("TcUID: ");
      __sb.Append(TcUID);
    }
    if (TcPSW != null && __isset.tcPSW) {
      if(!__first) { __sb.Append(", "); }
      __first = false;
      __sb.Append("TcPSW: ");
      __sb.Append(TcPSW);
    }
    if (Name != null && __isset.name) {
      if(!__first) { __sb.Append(", "); }
      __first = false;
      __sb.Append("Name: ");
      __sb.Append(Name);
    }
    if (TcDescription != null && __isset.tcDescription) {
      if(!__first) { __sb.Append(", "); }
      __first = false;
      __sb.Append("TcDescription: ");
      __sb.Append(TcDescription);
    }
    if (CaptureCfg != null && __isset.captureCfg) {
      if(!__first) { __sb.Append(", "); }
      __first = false;
      __sb.Append("CaptureCfg: ");
      __sb.Append(CaptureCfg== null ? "<null>" : CaptureCfg.ToString());
    }
    if (CatchFaceCfg != null && __isset.catchFaceCfg) {
      if(!__first) { __sb.Append(", "); }
      __first = false;
      __sb.Append("CatchFaceCfg: ");
      __sb.Append(CatchFaceCfg== null ? "<null>" : CatchFaceCfg.ToString());
    }
    if (Addr != null && __isset.addr) {
      if(!__first) { __sb.Append(", "); }
      __first = false;
      __sb.Append("Addr: ");
      __sb.Append(Addr);
    }
    if (__isset.port) {
      if(!__first) { __sb.Append(", "); }
      __first = false;
      __sb.Append("Port: ");
      __sb.Append(Port);
    }
    if (__isset.channel_type) {
      if(!__first) { __sb.Append(", "); }
      __first = false;
      __sb.Append("Channel_type: ");
      __sb.Append(Channel_type);
    }
    if (Channel_address != null && __isset.channel_address) {
      if(!__first) { __sb.Append(", "); }
      __first = false;
      __sb.Append("Channel_address: ");
      __sb.Append(Channel_address);
    }
    if (Longitude != null && __isset.longitude) {
      if(!__first) { __sb.Append(", "); }
      __first = false;
      __sb.Append("Longitude: ");
      __sb.Append(Longitude);
    }
    if (Latitude != null && __isset.latitude) {
      if(!__first) { __sb.Append(", "); }
      __first = false;
      __sb.Append("Latitude: ");
      __sb.Append(Latitude);
    }
    if (__isset.nState) {
      if(!__first) { __sb.Append(", "); }
      __first = false;
      __sb.Append("NState: ");
      __sb.Append(NState);
    }
    __sb.Append(")");
    return __sb.ToString();
  }

}

