/**
 * Autogenerated by Thrift
 *
 * 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;
namespace Evernote.EDAM.Type
{

  #if !SILVERLIGHT && !NETFX_CORE
  [Serializable]
  #endif
  public partial class SavedSearchScope : TBase
  {
    private bool _includeAccount;
    private bool _includePersonalLinkedNotebooks;
    private bool _includeBusinessLinkedNotebooks;

    public bool IncludeAccount
    {
      get
      {
        return _includeAccount;
      }
      set
      {
        __isset.includeAccount = true;
        this._includeAccount = value;
      }
    }

    public bool IncludePersonalLinkedNotebooks
    {
      get
      {
        return _includePersonalLinkedNotebooks;
      }
      set
      {
        __isset.includePersonalLinkedNotebooks = true;
        this._includePersonalLinkedNotebooks = value;
      }
    }

    public bool IncludeBusinessLinkedNotebooks
    {
      get
      {
        return _includeBusinessLinkedNotebooks;
      }
      set
      {
        __isset.includeBusinessLinkedNotebooks = true;
        this._includeBusinessLinkedNotebooks = value;
      }
    }


    public Isset __isset;
    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public struct Isset {
      public bool includeAccount;
      public bool includePersonalLinkedNotebooks;
      public bool includeBusinessLinkedNotebooks;
    }

    public SavedSearchScope() {
    }

    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.Bool) {
              IncludeAccount = iprot.ReadBool();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 2:
            if (field.Type == TType.Bool) {
              IncludePersonalLinkedNotebooks = iprot.ReadBool();
            } else { 
              TProtocolUtil.Skip(iprot, field.Type);
            }
            break;
          case 3:
            if (field.Type == TType.Bool) {
              IncludeBusinessLinkedNotebooks = iprot.ReadBool();
            } 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("SavedSearchScope");
      oprot.WriteStructBegin(struc);
      TField field = new TField();
      if (__isset.includeAccount) {
        field.Name = "includeAccount";
        field.Type = TType.Bool;
        field.ID = 1;
        oprot.WriteFieldBegin(field);
        oprot.WriteBool(IncludeAccount);
        oprot.WriteFieldEnd();
      }
      if (__isset.includePersonalLinkedNotebooks) {
        field.Name = "includePersonalLinkedNotebooks";
        field.Type = TType.Bool;
        field.ID = 2;
        oprot.WriteFieldBegin(field);
        oprot.WriteBool(IncludePersonalLinkedNotebooks);
        oprot.WriteFieldEnd();
      }
      if (__isset.includeBusinessLinkedNotebooks) {
        field.Name = "includeBusinessLinkedNotebooks";
        field.Type = TType.Bool;
        field.ID = 3;
        oprot.WriteFieldBegin(field);
        oprot.WriteBool(IncludeBusinessLinkedNotebooks);
        oprot.WriteFieldEnd();
      }
      oprot.WriteFieldStop();
      oprot.WriteStructEnd();
    }

    public override string ToString() {
      StringBuilder sb = new StringBuilder("SavedSearchScope(");
      sb.Append("IncludeAccount: ");
      sb.Append(IncludeAccount);
      sb.Append(",IncludePersonalLinkedNotebooks: ");
      sb.Append(IncludePersonalLinkedNotebooks);
      sb.Append(",IncludeBusinessLinkedNotebooks: ");
      sb.Append(IncludeBusinessLinkedNotebooks);
      sb.Append(")");
      return sb.ToString();
    }

  }

}
