#
# Autogenerated by Thrift Compiler (0.7.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
require 5.6.0;
use strict;
use warnings;
use Thrift;

package Net::Evernote::Simple::EDAMTypes::PrivilegeLevel;
use constant NORMAL => 1;
use constant PREMIUM => 3;
use constant MANAGER => 7;
use constant SUPPORT => 8;
use constant ADMIN => 9;
package Net::Evernote::Simple::EDAMTypes::QueryFormat;
use constant USER => 1;
use constant SEXP => 2;
package Net::Evernote::Simple::EDAMTypes::NoteSortOrder;
use constant CREATED => 1;
use constant UPDATED => 2;
use constant RELEVANCE => 3;
use constant UPDATE_SEQUENCE_NUMBER => 4;
use constant TITLE => 5;
package Net::Evernote::Simple::EDAMTypes::PremiumOrderStatus;
use constant NONE => 0;
use constant PENDING => 1;
use constant ACTIVE => 2;
use constant FAILED => 3;
use constant CANCELLATION_PENDING => 4;
use constant CANCELED => 5;
package Net::Evernote::Simple::EDAMTypes::Data;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::Data->mk_accessors( qw( bodyHash size body ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{bodyHash} = undef;
  $self->{size} = undef;
  $self->{body} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{bodyHash}) {
      $self->{bodyHash} = $vals->{bodyHash};
    }
    if (defined $vals->{size}) {
      $self->{size} = $vals->{size};
    }
    if (defined $vals->{body}) {
      $self->{body} = $vals->{body};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'Data';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^1$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{bodyHash});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^2$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{size});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^3$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{body});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('Data');
  if (defined $self->{bodyHash}) {
    $xfer += $output->writeFieldBegin('bodyHash', TType::STRING, 1);
    $xfer += $output->writeString($self->{bodyHash});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{size}) {
    $xfer += $output->writeFieldBegin('size', TType::I32, 2);
    $xfer += $output->writeI32($self->{size});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{body}) {
    $xfer += $output->writeFieldBegin('body', TType::STRING, 3);
    $xfer += $output->writeString($self->{body});
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

package Net::Evernote::Simple::EDAMTypes::UserAttributes;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::UserAttributes->mk_accessors( qw( defaultLocationName defaultLatitude defaultLongitude preactivation viewedPromotions incomingEmailAddress recentMailedAddresses comments dateAgreedToTermsOfService maxReferrals referralCount refererCode sentEmailDate sentEmailCount dailyEmailLimit emailOptOutDate partnerEmailOptInDate preferredLanguage preferredCountry clipFullPage twitterUserName twitterId groupName recognitionLanguage customerProfileId referralProof educationalDiscount businessAddress hideSponsorBilling ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{defaultLocationName} = undef;
  $self->{defaultLatitude} = undef;
  $self->{defaultLongitude} = undef;
  $self->{preactivation} = undef;
  $self->{viewedPromotions} = undef;
  $self->{incomingEmailAddress} = undef;
  $self->{recentMailedAddresses} = undef;
  $self->{comments} = undef;
  $self->{dateAgreedToTermsOfService} = undef;
  $self->{maxReferrals} = undef;
  $self->{referralCount} = undef;
  $self->{refererCode} = undef;
  $self->{sentEmailDate} = undef;
  $self->{sentEmailCount} = undef;
  $self->{dailyEmailLimit} = undef;
  $self->{emailOptOutDate} = undef;
  $self->{partnerEmailOptInDate} = undef;
  $self->{preferredLanguage} = undef;
  $self->{preferredCountry} = undef;
  $self->{clipFullPage} = undef;
  $self->{twitterUserName} = undef;
  $self->{twitterId} = undef;
  $self->{groupName} = undef;
  $self->{recognitionLanguage} = undef;
  $self->{customerProfileId} = undef;
  $self->{referralProof} = undef;
  $self->{educationalDiscount} = undef;
  $self->{businessAddress} = undef;
  $self->{hideSponsorBilling} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{defaultLocationName}) {
      $self->{defaultLocationName} = $vals->{defaultLocationName};
    }
    if (defined $vals->{defaultLatitude}) {
      $self->{defaultLatitude} = $vals->{defaultLatitude};
    }
    if (defined $vals->{defaultLongitude}) {
      $self->{defaultLongitude} = $vals->{defaultLongitude};
    }
    if (defined $vals->{preactivation}) {
      $self->{preactivation} = $vals->{preactivation};
    }
    if (defined $vals->{viewedPromotions}) {
      $self->{viewedPromotions} = $vals->{viewedPromotions};
    }
    if (defined $vals->{incomingEmailAddress}) {
      $self->{incomingEmailAddress} = $vals->{incomingEmailAddress};
    }
    if (defined $vals->{recentMailedAddresses}) {
      $self->{recentMailedAddresses} = $vals->{recentMailedAddresses};
    }
    if (defined $vals->{comments}) {
      $self->{comments} = $vals->{comments};
    }
    if (defined $vals->{dateAgreedToTermsOfService}) {
      $self->{dateAgreedToTermsOfService} = $vals->{dateAgreedToTermsOfService};
    }
    if (defined $vals->{maxReferrals}) {
      $self->{maxReferrals} = $vals->{maxReferrals};
    }
    if (defined $vals->{referralCount}) {
      $self->{referralCount} = $vals->{referralCount};
    }
    if (defined $vals->{refererCode}) {
      $self->{refererCode} = $vals->{refererCode};
    }
    if (defined $vals->{sentEmailDate}) {
      $self->{sentEmailDate} = $vals->{sentEmailDate};
    }
    if (defined $vals->{sentEmailCount}) {
      $self->{sentEmailCount} = $vals->{sentEmailCount};
    }
    if (defined $vals->{dailyEmailLimit}) {
      $self->{dailyEmailLimit} = $vals->{dailyEmailLimit};
    }
    if (defined $vals->{emailOptOutDate}) {
      $self->{emailOptOutDate} = $vals->{emailOptOutDate};
    }
    if (defined $vals->{partnerEmailOptInDate}) {
      $self->{partnerEmailOptInDate} = $vals->{partnerEmailOptInDate};
    }
    if (defined $vals->{preferredLanguage}) {
      $self->{preferredLanguage} = $vals->{preferredLanguage};
    }
    if (defined $vals->{preferredCountry}) {
      $self->{preferredCountry} = $vals->{preferredCountry};
    }
    if (defined $vals->{clipFullPage}) {
      $self->{clipFullPage} = $vals->{clipFullPage};
    }
    if (defined $vals->{twitterUserName}) {
      $self->{twitterUserName} = $vals->{twitterUserName};
    }
    if (defined $vals->{twitterId}) {
      $self->{twitterId} = $vals->{twitterId};
    }
    if (defined $vals->{groupName}) {
      $self->{groupName} = $vals->{groupName};
    }
    if (defined $vals->{recognitionLanguage}) {
      $self->{recognitionLanguage} = $vals->{recognitionLanguage};
    }
    if (defined $vals->{customerProfileId}) {
      $self->{customerProfileId} = $vals->{customerProfileId};
    }
    if (defined $vals->{referralProof}) {
      $self->{referralProof} = $vals->{referralProof};
    }
    if (defined $vals->{educationalDiscount}) {
      $self->{educationalDiscount} = $vals->{educationalDiscount};
    }
    if (defined $vals->{businessAddress}) {
      $self->{businessAddress} = $vals->{businessAddress};
    }
    if (defined $vals->{hideSponsorBilling}) {
      $self->{hideSponsorBilling} = $vals->{hideSponsorBilling};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'UserAttributes';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^1$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{defaultLocationName});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^2$/ && do{      if ($ftype == TType::DOUBLE) {
        $xfer += $input->readDouble(\$self->{defaultLatitude});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^3$/ && do{      if ($ftype == TType::DOUBLE) {
        $xfer += $input->readDouble(\$self->{defaultLongitude});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^4$/ && do{      if ($ftype == TType::BOOL) {
        $xfer += $input->readBool(\$self->{preactivation});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^5$/ && do{      if ($ftype == TType::LIST) {
        {
          my $_size0 = 0;
          $self->{viewedPromotions} = [];
          my $_etype3 = 0;
          $xfer += $input->readListBegin(\$_etype3, \$_size0);
          for (my $_i4 = 0; $_i4 < $_size0; ++$_i4)
          {
            my $elem5 = undef;
            $xfer += $input->readString(\$elem5);
            push(@{$self->{viewedPromotions}},$elem5);
          }
          $xfer += $input->readListEnd();
        }
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^6$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{incomingEmailAddress});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^7$/ && do{      if ($ftype == TType::LIST) {
        {
          my $_size6 = 0;
          $self->{recentMailedAddresses} = [];
          my $_etype9 = 0;
          $xfer += $input->readListBegin(\$_etype9, \$_size6);
          for (my $_i10 = 0; $_i10 < $_size6; ++$_i10)
          {
            my $elem11 = undef;
            $xfer += $input->readString(\$elem11);
            push(@{$self->{recentMailedAddresses}},$elem11);
          }
          $xfer += $input->readListEnd();
        }
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^9$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{comments});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^11$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{dateAgreedToTermsOfService});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^12$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{maxReferrals});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^13$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{referralCount});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^14$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{refererCode});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^15$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{sentEmailDate});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^16$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{sentEmailCount});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^17$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{dailyEmailLimit});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^18$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{emailOptOutDate});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^19$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{partnerEmailOptInDate});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^20$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{preferredLanguage});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^21$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{preferredCountry});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^22$/ && do{      if ($ftype == TType::BOOL) {
        $xfer += $input->readBool(\$self->{clipFullPage});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^23$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{twitterUserName});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^24$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{twitterId});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^25$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{groupName});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^26$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{recognitionLanguage});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^27$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{customerProfileId});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^28$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{referralProof});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^29$/ && do{      if ($ftype == TType::BOOL) {
        $xfer += $input->readBool(\$self->{educationalDiscount});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^30$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{businessAddress});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^31$/ && do{      if ($ftype == TType::BOOL) {
        $xfer += $input->readBool(\$self->{hideSponsorBilling});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('UserAttributes');
  if (defined $self->{defaultLocationName}) {
    $xfer += $output->writeFieldBegin('defaultLocationName', TType::STRING, 1);
    $xfer += $output->writeString($self->{defaultLocationName});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{defaultLatitude}) {
    $xfer += $output->writeFieldBegin('defaultLatitude', TType::DOUBLE, 2);
    $xfer += $output->writeDouble($self->{defaultLatitude});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{defaultLongitude}) {
    $xfer += $output->writeFieldBegin('defaultLongitude', TType::DOUBLE, 3);
    $xfer += $output->writeDouble($self->{defaultLongitude});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{preactivation}) {
    $xfer += $output->writeFieldBegin('preactivation', TType::BOOL, 4);
    $xfer += $output->writeBool($self->{preactivation});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{viewedPromotions}) {
    $xfer += $output->writeFieldBegin('viewedPromotions', TType::LIST, 5);
    {
      $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{viewedPromotions}}));
      {
        foreach my $iter12 (@{$self->{viewedPromotions}}) 
        {
          $xfer += $output->writeString($iter12);
        }
      }
      $xfer += $output->writeListEnd();
    }
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{incomingEmailAddress}) {
    $xfer += $output->writeFieldBegin('incomingEmailAddress', TType::STRING, 6);
    $xfer += $output->writeString($self->{incomingEmailAddress});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{recentMailedAddresses}) {
    $xfer += $output->writeFieldBegin('recentMailedAddresses', TType::LIST, 7);
    {
      $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{recentMailedAddresses}}));
      {
        foreach my $iter13 (@{$self->{recentMailedAddresses}}) 
        {
          $xfer += $output->writeString($iter13);
        }
      }
      $xfer += $output->writeListEnd();
    }
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{comments}) {
    $xfer += $output->writeFieldBegin('comments', TType::STRING, 9);
    $xfer += $output->writeString($self->{comments});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{dateAgreedToTermsOfService}) {
    $xfer += $output->writeFieldBegin('dateAgreedToTermsOfService', TType::I64, 11);
    $xfer += $output->writeI64($self->{dateAgreedToTermsOfService});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{maxReferrals}) {
    $xfer += $output->writeFieldBegin('maxReferrals', TType::I32, 12);
    $xfer += $output->writeI32($self->{maxReferrals});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{referralCount}) {
    $xfer += $output->writeFieldBegin('referralCount', TType::I32, 13);
    $xfer += $output->writeI32($self->{referralCount});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{refererCode}) {
    $xfer += $output->writeFieldBegin('refererCode', TType::STRING, 14);
    $xfer += $output->writeString($self->{refererCode});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{sentEmailDate}) {
    $xfer += $output->writeFieldBegin('sentEmailDate', TType::I64, 15);
    $xfer += $output->writeI64($self->{sentEmailDate});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{sentEmailCount}) {
    $xfer += $output->writeFieldBegin('sentEmailCount', TType::I32, 16);
    $xfer += $output->writeI32($self->{sentEmailCount});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{dailyEmailLimit}) {
    $xfer += $output->writeFieldBegin('dailyEmailLimit', TType::I32, 17);
    $xfer += $output->writeI32($self->{dailyEmailLimit});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{emailOptOutDate}) {
    $xfer += $output->writeFieldBegin('emailOptOutDate', TType::I64, 18);
    $xfer += $output->writeI64($self->{emailOptOutDate});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{partnerEmailOptInDate}) {
    $xfer += $output->writeFieldBegin('partnerEmailOptInDate', TType::I64, 19);
    $xfer += $output->writeI64($self->{partnerEmailOptInDate});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{preferredLanguage}) {
    $xfer += $output->writeFieldBegin('preferredLanguage', TType::STRING, 20);
    $xfer += $output->writeString($self->{preferredLanguage});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{preferredCountry}) {
    $xfer += $output->writeFieldBegin('preferredCountry', TType::STRING, 21);
    $xfer += $output->writeString($self->{preferredCountry});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{clipFullPage}) {
    $xfer += $output->writeFieldBegin('clipFullPage', TType::BOOL, 22);
    $xfer += $output->writeBool($self->{clipFullPage});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{twitterUserName}) {
    $xfer += $output->writeFieldBegin('twitterUserName', TType::STRING, 23);
    $xfer += $output->writeString($self->{twitterUserName});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{twitterId}) {
    $xfer += $output->writeFieldBegin('twitterId', TType::STRING, 24);
    $xfer += $output->writeString($self->{twitterId});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{groupName}) {
    $xfer += $output->writeFieldBegin('groupName', TType::STRING, 25);
    $xfer += $output->writeString($self->{groupName});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{recognitionLanguage}) {
    $xfer += $output->writeFieldBegin('recognitionLanguage', TType::STRING, 26);
    $xfer += $output->writeString($self->{recognitionLanguage});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{customerProfileId}) {
    $xfer += $output->writeFieldBegin('customerProfileId', TType::I64, 27);
    $xfer += $output->writeI64($self->{customerProfileId});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{referralProof}) {
    $xfer += $output->writeFieldBegin('referralProof', TType::STRING, 28);
    $xfer += $output->writeString($self->{referralProof});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{educationalDiscount}) {
    $xfer += $output->writeFieldBegin('educationalDiscount', TType::BOOL, 29);
    $xfer += $output->writeBool($self->{educationalDiscount});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{businessAddress}) {
    $xfer += $output->writeFieldBegin('businessAddress', TType::STRING, 30);
    $xfer += $output->writeString($self->{businessAddress});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{hideSponsorBilling}) {
    $xfer += $output->writeFieldBegin('hideSponsorBilling', TType::BOOL, 31);
    $xfer += $output->writeBool($self->{hideSponsorBilling});
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

package Net::Evernote::Simple::EDAMTypes::Accounting;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::Accounting->mk_accessors( qw( uploadLimit uploadLimitEnd uploadLimitNextMonth premiumServiceStatus premiumOrderNumber premiumCommerceService premiumServiceStart premiumServiceSKU lastSuccessfulCharge lastFailedCharge lastFailedChargeReason nextPaymentDue premiumLockUntil updated premiumSubscriptionNumber lastRequestedCharge currency unitPrice ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{uploadLimit} = undef;
  $self->{uploadLimitEnd} = undef;
  $self->{uploadLimitNextMonth} = undef;
  $self->{premiumServiceStatus} = undef;
  $self->{premiumOrderNumber} = undef;
  $self->{premiumCommerceService} = undef;
  $self->{premiumServiceStart} = undef;
  $self->{premiumServiceSKU} = undef;
  $self->{lastSuccessfulCharge} = undef;
  $self->{lastFailedCharge} = undef;
  $self->{lastFailedChargeReason} = undef;
  $self->{nextPaymentDue} = undef;
  $self->{premiumLockUntil} = undef;
  $self->{updated} = undef;
  $self->{premiumSubscriptionNumber} = undef;
  $self->{lastRequestedCharge} = undef;
  $self->{currency} = undef;
  $self->{unitPrice} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{uploadLimit}) {
      $self->{uploadLimit} = $vals->{uploadLimit};
    }
    if (defined $vals->{uploadLimitEnd}) {
      $self->{uploadLimitEnd} = $vals->{uploadLimitEnd};
    }
    if (defined $vals->{uploadLimitNextMonth}) {
      $self->{uploadLimitNextMonth} = $vals->{uploadLimitNextMonth};
    }
    if (defined $vals->{premiumServiceStatus}) {
      $self->{premiumServiceStatus} = $vals->{premiumServiceStatus};
    }
    if (defined $vals->{premiumOrderNumber}) {
      $self->{premiumOrderNumber} = $vals->{premiumOrderNumber};
    }
    if (defined $vals->{premiumCommerceService}) {
      $self->{premiumCommerceService} = $vals->{premiumCommerceService};
    }
    if (defined $vals->{premiumServiceStart}) {
      $self->{premiumServiceStart} = $vals->{premiumServiceStart};
    }
    if (defined $vals->{premiumServiceSKU}) {
      $self->{premiumServiceSKU} = $vals->{premiumServiceSKU};
    }
    if (defined $vals->{lastSuccessfulCharge}) {
      $self->{lastSuccessfulCharge} = $vals->{lastSuccessfulCharge};
    }
    if (defined $vals->{lastFailedCharge}) {
      $self->{lastFailedCharge} = $vals->{lastFailedCharge};
    }
    if (defined $vals->{lastFailedChargeReason}) {
      $self->{lastFailedChargeReason} = $vals->{lastFailedChargeReason};
    }
    if (defined $vals->{nextPaymentDue}) {
      $self->{nextPaymentDue} = $vals->{nextPaymentDue};
    }
    if (defined $vals->{premiumLockUntil}) {
      $self->{premiumLockUntil} = $vals->{premiumLockUntil};
    }
    if (defined $vals->{updated}) {
      $self->{updated} = $vals->{updated};
    }
    if (defined $vals->{premiumSubscriptionNumber}) {
      $self->{premiumSubscriptionNumber} = $vals->{premiumSubscriptionNumber};
    }
    if (defined $vals->{lastRequestedCharge}) {
      $self->{lastRequestedCharge} = $vals->{lastRequestedCharge};
    }
    if (defined $vals->{currency}) {
      $self->{currency} = $vals->{currency};
    }
    if (defined $vals->{unitPrice}) {
      $self->{unitPrice} = $vals->{unitPrice};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'Accounting';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^1$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{uploadLimit});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^2$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{uploadLimitEnd});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^3$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{uploadLimitNextMonth});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^4$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{premiumServiceStatus});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^5$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{premiumOrderNumber});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^6$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{premiumCommerceService});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^7$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{premiumServiceStart});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^8$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{premiumServiceSKU});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^9$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{lastSuccessfulCharge});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^10$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{lastFailedCharge});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^11$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{lastFailedChargeReason});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^12$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{nextPaymentDue});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^13$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{premiumLockUntil});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^14$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{updated});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^16$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{premiumSubscriptionNumber});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^17$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{lastRequestedCharge});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^18$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{currency});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^19$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{unitPrice});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('Accounting');
  if (defined $self->{uploadLimit}) {
    $xfer += $output->writeFieldBegin('uploadLimit', TType::I64, 1);
    $xfer += $output->writeI64($self->{uploadLimit});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{uploadLimitEnd}) {
    $xfer += $output->writeFieldBegin('uploadLimitEnd', TType::I64, 2);
    $xfer += $output->writeI64($self->{uploadLimitEnd});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{uploadLimitNextMonth}) {
    $xfer += $output->writeFieldBegin('uploadLimitNextMonth', TType::I64, 3);
    $xfer += $output->writeI64($self->{uploadLimitNextMonth});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{premiumServiceStatus}) {
    $xfer += $output->writeFieldBegin('premiumServiceStatus', TType::I32, 4);
    $xfer += $output->writeI32($self->{premiumServiceStatus});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{premiumOrderNumber}) {
    $xfer += $output->writeFieldBegin('premiumOrderNumber', TType::STRING, 5);
    $xfer += $output->writeString($self->{premiumOrderNumber});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{premiumCommerceService}) {
    $xfer += $output->writeFieldBegin('premiumCommerceService', TType::STRING, 6);
    $xfer += $output->writeString($self->{premiumCommerceService});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{premiumServiceStart}) {
    $xfer += $output->writeFieldBegin('premiumServiceStart', TType::I64, 7);
    $xfer += $output->writeI64($self->{premiumServiceStart});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{premiumServiceSKU}) {
    $xfer += $output->writeFieldBegin('premiumServiceSKU', TType::STRING, 8);
    $xfer += $output->writeString($self->{premiumServiceSKU});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{lastSuccessfulCharge}) {
    $xfer += $output->writeFieldBegin('lastSuccessfulCharge', TType::I64, 9);
    $xfer += $output->writeI64($self->{lastSuccessfulCharge});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{lastFailedCharge}) {
    $xfer += $output->writeFieldBegin('lastFailedCharge', TType::I64, 10);
    $xfer += $output->writeI64($self->{lastFailedCharge});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{lastFailedChargeReason}) {
    $xfer += $output->writeFieldBegin('lastFailedChargeReason', TType::STRING, 11);
    $xfer += $output->writeString($self->{lastFailedChargeReason});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{nextPaymentDue}) {
    $xfer += $output->writeFieldBegin('nextPaymentDue', TType::I64, 12);
    $xfer += $output->writeI64($self->{nextPaymentDue});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{premiumLockUntil}) {
    $xfer += $output->writeFieldBegin('premiumLockUntil', TType::I64, 13);
    $xfer += $output->writeI64($self->{premiumLockUntil});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{updated}) {
    $xfer += $output->writeFieldBegin('updated', TType::I64, 14);
    $xfer += $output->writeI64($self->{updated});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{premiumSubscriptionNumber}) {
    $xfer += $output->writeFieldBegin('premiumSubscriptionNumber', TType::STRING, 16);
    $xfer += $output->writeString($self->{premiumSubscriptionNumber});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{lastRequestedCharge}) {
    $xfer += $output->writeFieldBegin('lastRequestedCharge', TType::I64, 17);
    $xfer += $output->writeI64($self->{lastRequestedCharge});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{currency}) {
    $xfer += $output->writeFieldBegin('currency', TType::STRING, 18);
    $xfer += $output->writeString($self->{currency});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{unitPrice}) {
    $xfer += $output->writeFieldBegin('unitPrice', TType::I32, 19);
    $xfer += $output->writeI32($self->{unitPrice});
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

package Net::Evernote::Simple::EDAMTypes::User;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::User->mk_accessors( qw( id username email name timezone privilege created updated deleted active shardId attributes accounting ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{id} = undef;
  $self->{username} = undef;
  $self->{email} = undef;
  $self->{name} = undef;
  $self->{timezone} = undef;
  $self->{privilege} = undef;
  $self->{created} = undef;
  $self->{updated} = undef;
  $self->{deleted} = undef;
  $self->{active} = undef;
  $self->{shardId} = undef;
  $self->{attributes} = undef;
  $self->{accounting} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{id}) {
      $self->{id} = $vals->{id};
    }
    if (defined $vals->{username}) {
      $self->{username} = $vals->{username};
    }
    if (defined $vals->{email}) {
      $self->{email} = $vals->{email};
    }
    if (defined $vals->{name}) {
      $self->{name} = $vals->{name};
    }
    if (defined $vals->{timezone}) {
      $self->{timezone} = $vals->{timezone};
    }
    if (defined $vals->{privilege}) {
      $self->{privilege} = $vals->{privilege};
    }
    if (defined $vals->{created}) {
      $self->{created} = $vals->{created};
    }
    if (defined $vals->{updated}) {
      $self->{updated} = $vals->{updated};
    }
    if (defined $vals->{deleted}) {
      $self->{deleted} = $vals->{deleted};
    }
    if (defined $vals->{active}) {
      $self->{active} = $vals->{active};
    }
    if (defined $vals->{shardId}) {
      $self->{shardId} = $vals->{shardId};
    }
    if (defined $vals->{attributes}) {
      $self->{attributes} = $vals->{attributes};
    }
    if (defined $vals->{accounting}) {
      $self->{accounting} = $vals->{accounting};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'User';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^1$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{id});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^2$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{username});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^3$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{email});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^4$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{name});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^6$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{timezone});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^7$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{privilege});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^9$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{created});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^10$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{updated});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^11$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{deleted});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^13$/ && do{      if ($ftype == TType::BOOL) {
        $xfer += $input->readBool(\$self->{active});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^14$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{shardId});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^15$/ && do{      if ($ftype == TType::STRUCT) {
        $self->{attributes} = Net::Evernote::Simple::EDAMTypes::UserAttributes->new();
        $xfer += $self->{attributes}->read($input);
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^16$/ && do{      if ($ftype == TType::STRUCT) {
        $self->{accounting} = Net::Evernote::Simple::EDAMTypes::Accounting->new();
        $xfer += $self->{accounting}->read($input);
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('User');
  if (defined $self->{id}) {
    $xfer += $output->writeFieldBegin('id', TType::I32, 1);
    $xfer += $output->writeI32($self->{id});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{username}) {
    $xfer += $output->writeFieldBegin('username', TType::STRING, 2);
    $xfer += $output->writeString($self->{username});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{email}) {
    $xfer += $output->writeFieldBegin('email', TType::STRING, 3);
    $xfer += $output->writeString($self->{email});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{name}) {
    $xfer += $output->writeFieldBegin('name', TType::STRING, 4);
    $xfer += $output->writeString($self->{name});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{timezone}) {
    $xfer += $output->writeFieldBegin('timezone', TType::STRING, 6);
    $xfer += $output->writeString($self->{timezone});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{privilege}) {
    $xfer += $output->writeFieldBegin('privilege', TType::I32, 7);
    $xfer += $output->writeI32($self->{privilege});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{created}) {
    $xfer += $output->writeFieldBegin('created', TType::I64, 9);
    $xfer += $output->writeI64($self->{created});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{updated}) {
    $xfer += $output->writeFieldBegin('updated', TType::I64, 10);
    $xfer += $output->writeI64($self->{updated});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{deleted}) {
    $xfer += $output->writeFieldBegin('deleted', TType::I64, 11);
    $xfer += $output->writeI64($self->{deleted});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{active}) {
    $xfer += $output->writeFieldBegin('active', TType::BOOL, 13);
    $xfer += $output->writeBool($self->{active});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{shardId}) {
    $xfer += $output->writeFieldBegin('shardId', TType::STRING, 14);
    $xfer += $output->writeString($self->{shardId});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{attributes}) {
    $xfer += $output->writeFieldBegin('attributes', TType::STRUCT, 15);
    $xfer += $self->{attributes}->write($output);
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{accounting}) {
    $xfer += $output->writeFieldBegin('accounting', TType::STRUCT, 16);
    $xfer += $self->{accounting}->write($output);
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

package Net::Evernote::Simple::EDAMTypes::Tag;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::Tag->mk_accessors( qw( guid name parentGuid updateSequenceNum ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{guid} = undef;
  $self->{name} = undef;
  $self->{parentGuid} = undef;
  $self->{updateSequenceNum} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{guid}) {
      $self->{guid} = $vals->{guid};
    }
    if (defined $vals->{name}) {
      $self->{name} = $vals->{name};
    }
    if (defined $vals->{parentGuid}) {
      $self->{parentGuid} = $vals->{parentGuid};
    }
    if (defined $vals->{updateSequenceNum}) {
      $self->{updateSequenceNum} = $vals->{updateSequenceNum};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'Tag';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^1$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{guid});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^2$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{name});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^3$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{parentGuid});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^4$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{updateSequenceNum});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('Tag');
  if (defined $self->{guid}) {
    $xfer += $output->writeFieldBegin('guid', TType::STRING, 1);
    $xfer += $output->writeString($self->{guid});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{name}) {
    $xfer += $output->writeFieldBegin('name', TType::STRING, 2);
    $xfer += $output->writeString($self->{name});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{parentGuid}) {
    $xfer += $output->writeFieldBegin('parentGuid', TType::STRING, 3);
    $xfer += $output->writeString($self->{parentGuid});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{updateSequenceNum}) {
    $xfer += $output->writeFieldBegin('updateSequenceNum', TType::I32, 4);
    $xfer += $output->writeI32($self->{updateSequenceNum});
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

package Net::Evernote::Simple::EDAMTypes::LazyMap;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::LazyMap->mk_accessors( qw( keysOnly fullMap ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{keysOnly} = undef;
  $self->{fullMap} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{keysOnly}) {
      $self->{keysOnly} = $vals->{keysOnly};
    }
    if (defined $vals->{fullMap}) {
      $self->{fullMap} = $vals->{fullMap};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'LazyMap';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^1$/ && do{      if ($ftype == TType::SET) {
        {
          my $_size14 = 0;
          $self->{keysOnly} = {};
          my $_etype17 = 0;
          $xfer += $input->readSetBegin(\$_etype17, \$_size14);
          for (my $_i18 = 0; $_i18 < $_size14; ++$_i18)
          {
            my $elem19 = undef;
            $xfer += $input->readString(\$elem19);
            $self->{keysOnly}->{$elem19} = 1;
          }
          $xfer += $input->readSetEnd();
        }
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^2$/ && do{      if ($ftype == TType::MAP) {
        {
          my $_size20 = 0;
          $self->{fullMap} = {};
          my $_ktype21 = 0;
          my $_vtype22 = 0;
          $xfer += $input->readMapBegin(\$_ktype21, \$_vtype22, \$_size20);
          for (my $_i24 = 0; $_i24 < $_size20; ++$_i24)
          {
            my $key25 = '';
            my $val26 = '';
            $xfer += $input->readString(\$key25);
            $xfer += $input->readString(\$val26);
            $self->{fullMap}->{$key25} = $val26;
          }
          $xfer += $input->readMapEnd();
        }
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('LazyMap');
  if (defined $self->{keysOnly}) {
    $xfer += $output->writeFieldBegin('keysOnly', TType::SET, 1);
    {
      $xfer += $output->writeSetBegin(TType::STRING, scalar(@{$self->{keysOnly}}));
      {
        foreach my $iter27 (@{$self->{keysOnly}})
        {
          $xfer += $output->writeString($iter27);
        }
      }
      $xfer += $output->writeSetEnd();
    }
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{fullMap}) {
    $xfer += $output->writeFieldBegin('fullMap', TType::MAP, 2);
    {
      $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{fullMap}}));
      {
        while( my ($kiter28,$viter29) = each %{$self->{fullMap}}) 
        {
          $xfer += $output->writeString($kiter28);
          $xfer += $output->writeString($viter29);
        }
      }
      $xfer += $output->writeMapEnd();
    }
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

package Net::Evernote::Simple::EDAMTypes::ResourceAttributes;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::ResourceAttributes->mk_accessors( qw( sourceURL timestamp latitude longitude altitude cameraMake cameraModel clientWillIndex recoType fileName attachment applicationData ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{sourceURL} = undef;
  $self->{timestamp} = undef;
  $self->{latitude} = undef;
  $self->{longitude} = undef;
  $self->{altitude} = undef;
  $self->{cameraMake} = undef;
  $self->{cameraModel} = undef;
  $self->{clientWillIndex} = undef;
  $self->{recoType} = undef;
  $self->{fileName} = undef;
  $self->{attachment} = undef;
  $self->{applicationData} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{sourceURL}) {
      $self->{sourceURL} = $vals->{sourceURL};
    }
    if (defined $vals->{timestamp}) {
      $self->{timestamp} = $vals->{timestamp};
    }
    if (defined $vals->{latitude}) {
      $self->{latitude} = $vals->{latitude};
    }
    if (defined $vals->{longitude}) {
      $self->{longitude} = $vals->{longitude};
    }
    if (defined $vals->{altitude}) {
      $self->{altitude} = $vals->{altitude};
    }
    if (defined $vals->{cameraMake}) {
      $self->{cameraMake} = $vals->{cameraMake};
    }
    if (defined $vals->{cameraModel}) {
      $self->{cameraModel} = $vals->{cameraModel};
    }
    if (defined $vals->{clientWillIndex}) {
      $self->{clientWillIndex} = $vals->{clientWillIndex};
    }
    if (defined $vals->{recoType}) {
      $self->{recoType} = $vals->{recoType};
    }
    if (defined $vals->{fileName}) {
      $self->{fileName} = $vals->{fileName};
    }
    if (defined $vals->{attachment}) {
      $self->{attachment} = $vals->{attachment};
    }
    if (defined $vals->{applicationData}) {
      $self->{applicationData} = $vals->{applicationData};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'ResourceAttributes';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^1$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{sourceURL});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^2$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{timestamp});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^3$/ && do{      if ($ftype == TType::DOUBLE) {
        $xfer += $input->readDouble(\$self->{latitude});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^4$/ && do{      if ($ftype == TType::DOUBLE) {
        $xfer += $input->readDouble(\$self->{longitude});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^5$/ && do{      if ($ftype == TType::DOUBLE) {
        $xfer += $input->readDouble(\$self->{altitude});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^6$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{cameraMake});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^7$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{cameraModel});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^8$/ && do{      if ($ftype == TType::BOOL) {
        $xfer += $input->readBool(\$self->{clientWillIndex});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^9$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{recoType});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^10$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{fileName});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^11$/ && do{      if ($ftype == TType::BOOL) {
        $xfer += $input->readBool(\$self->{attachment});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^12$/ && do{      if ($ftype == TType::STRUCT) {
        $self->{applicationData} = Net::Evernote::Simple::EDAMTypes::LazyMap->new();
        $xfer += $self->{applicationData}->read($input);
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('ResourceAttributes');
  if (defined $self->{sourceURL}) {
    $xfer += $output->writeFieldBegin('sourceURL', TType::STRING, 1);
    $xfer += $output->writeString($self->{sourceURL});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{timestamp}) {
    $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2);
    $xfer += $output->writeI64($self->{timestamp});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{latitude}) {
    $xfer += $output->writeFieldBegin('latitude', TType::DOUBLE, 3);
    $xfer += $output->writeDouble($self->{latitude});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{longitude}) {
    $xfer += $output->writeFieldBegin('longitude', TType::DOUBLE, 4);
    $xfer += $output->writeDouble($self->{longitude});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{altitude}) {
    $xfer += $output->writeFieldBegin('altitude', TType::DOUBLE, 5);
    $xfer += $output->writeDouble($self->{altitude});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{cameraMake}) {
    $xfer += $output->writeFieldBegin('cameraMake', TType::STRING, 6);
    $xfer += $output->writeString($self->{cameraMake});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{cameraModel}) {
    $xfer += $output->writeFieldBegin('cameraModel', TType::STRING, 7);
    $xfer += $output->writeString($self->{cameraModel});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{clientWillIndex}) {
    $xfer += $output->writeFieldBegin('clientWillIndex', TType::BOOL, 8);
    $xfer += $output->writeBool($self->{clientWillIndex});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{recoType}) {
    $xfer += $output->writeFieldBegin('recoType', TType::STRING, 9);
    $xfer += $output->writeString($self->{recoType});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{fileName}) {
    $xfer += $output->writeFieldBegin('fileName', TType::STRING, 10);
    $xfer += $output->writeString($self->{fileName});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{attachment}) {
    $xfer += $output->writeFieldBegin('attachment', TType::BOOL, 11);
    $xfer += $output->writeBool($self->{attachment});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{applicationData}) {
    $xfer += $output->writeFieldBegin('applicationData', TType::STRUCT, 12);
    $xfer += $self->{applicationData}->write($output);
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

package Net::Evernote::Simple::EDAMTypes::Resource;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::Resource->mk_accessors( qw( guid noteGuid data mime width height duration active recognition attributes updateSequenceNum alternateData ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{guid} = undef;
  $self->{noteGuid} = undef;
  $self->{data} = undef;
  $self->{mime} = undef;
  $self->{width} = undef;
  $self->{height} = undef;
  $self->{duration} = undef;
  $self->{active} = undef;
  $self->{recognition} = undef;
  $self->{attributes} = undef;
  $self->{updateSequenceNum} = undef;
  $self->{alternateData} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{guid}) {
      $self->{guid} = $vals->{guid};
    }
    if (defined $vals->{noteGuid}) {
      $self->{noteGuid} = $vals->{noteGuid};
    }
    if (defined $vals->{data}) {
      $self->{data} = $vals->{data};
    }
    if (defined $vals->{mime}) {
      $self->{mime} = $vals->{mime};
    }
    if (defined $vals->{width}) {
      $self->{width} = $vals->{width};
    }
    if (defined $vals->{height}) {
      $self->{height} = $vals->{height};
    }
    if (defined $vals->{duration}) {
      $self->{duration} = $vals->{duration};
    }
    if (defined $vals->{active}) {
      $self->{active} = $vals->{active};
    }
    if (defined $vals->{recognition}) {
      $self->{recognition} = $vals->{recognition};
    }
    if (defined $vals->{attributes}) {
      $self->{attributes} = $vals->{attributes};
    }
    if (defined $vals->{updateSequenceNum}) {
      $self->{updateSequenceNum} = $vals->{updateSequenceNum};
    }
    if (defined $vals->{alternateData}) {
      $self->{alternateData} = $vals->{alternateData};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'Resource';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^1$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{guid});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^2$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{noteGuid});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^3$/ && do{      if ($ftype == TType::STRUCT) {
        $self->{data} = Net::Evernote::Simple::EDAMTypes::Data->new();
        $xfer += $self->{data}->read($input);
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^4$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{mime});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^5$/ && do{      if ($ftype == TType::I16) {
        $xfer += $input->readI16(\$self->{width});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^6$/ && do{      if ($ftype == TType::I16) {
        $xfer += $input->readI16(\$self->{height});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^7$/ && do{      if ($ftype == TType::I16) {
        $xfer += $input->readI16(\$self->{duration});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^8$/ && do{      if ($ftype == TType::BOOL) {
        $xfer += $input->readBool(\$self->{active});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^9$/ && do{      if ($ftype == TType::STRUCT) {
        $self->{recognition} = Net::Evernote::Simple::EDAMTypes::Data->new();
        $xfer += $self->{recognition}->read($input);
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^11$/ && do{      if ($ftype == TType::STRUCT) {
        $self->{attributes} = Net::Evernote::Simple::EDAMTypes::ResourceAttributes->new();
        $xfer += $self->{attributes}->read($input);
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^12$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{updateSequenceNum});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^13$/ && do{      if ($ftype == TType::STRUCT) {
        $self->{alternateData} = Net::Evernote::Simple::EDAMTypes::Data->new();
        $xfer += $self->{alternateData}->read($input);
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('Resource');
  if (defined $self->{guid}) {
    $xfer += $output->writeFieldBegin('guid', TType::STRING, 1);
    $xfer += $output->writeString($self->{guid});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{noteGuid}) {
    $xfer += $output->writeFieldBegin('noteGuid', TType::STRING, 2);
    $xfer += $output->writeString($self->{noteGuid});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{data}) {
    $xfer += $output->writeFieldBegin('data', TType::STRUCT, 3);
    $xfer += $self->{data}->write($output);
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{mime}) {
    $xfer += $output->writeFieldBegin('mime', TType::STRING, 4);
    $xfer += $output->writeString($self->{mime});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{width}) {
    $xfer += $output->writeFieldBegin('width', TType::I16, 5);
    $xfer += $output->writeI16($self->{width});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{height}) {
    $xfer += $output->writeFieldBegin('height', TType::I16, 6);
    $xfer += $output->writeI16($self->{height});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{duration}) {
    $xfer += $output->writeFieldBegin('duration', TType::I16, 7);
    $xfer += $output->writeI16($self->{duration});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{active}) {
    $xfer += $output->writeFieldBegin('active', TType::BOOL, 8);
    $xfer += $output->writeBool($self->{active});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{recognition}) {
    $xfer += $output->writeFieldBegin('recognition', TType::STRUCT, 9);
    $xfer += $self->{recognition}->write($output);
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{attributes}) {
    $xfer += $output->writeFieldBegin('attributes', TType::STRUCT, 11);
    $xfer += $self->{attributes}->write($output);
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{updateSequenceNum}) {
    $xfer += $output->writeFieldBegin('updateSequenceNum', TType::I32, 12);
    $xfer += $output->writeI32($self->{updateSequenceNum});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{alternateData}) {
    $xfer += $output->writeFieldBegin('alternateData', TType::STRUCT, 13);
    $xfer += $self->{alternateData}->write($output);
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

package Net::Evernote::Simple::EDAMTypes::NoteAttributes;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::NoteAttributes->mk_accessors( qw( subjectDate latitude longitude altitude author source sourceURL sourceApplication shareDate placeName contentClass applicationData lastEditedBy ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{subjectDate} = undef;
  $self->{latitude} = undef;
  $self->{longitude} = undef;
  $self->{altitude} = undef;
  $self->{author} = undef;
  $self->{source} = undef;
  $self->{sourceURL} = undef;
  $self->{sourceApplication} = undef;
  $self->{shareDate} = undef;
  $self->{placeName} = undef;
  $self->{contentClass} = undef;
  $self->{applicationData} = undef;
  $self->{lastEditedBy} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{subjectDate}) {
      $self->{subjectDate} = $vals->{subjectDate};
    }
    if (defined $vals->{latitude}) {
      $self->{latitude} = $vals->{latitude};
    }
    if (defined $vals->{longitude}) {
      $self->{longitude} = $vals->{longitude};
    }
    if (defined $vals->{altitude}) {
      $self->{altitude} = $vals->{altitude};
    }
    if (defined $vals->{author}) {
      $self->{author} = $vals->{author};
    }
    if (defined $vals->{source}) {
      $self->{source} = $vals->{source};
    }
    if (defined $vals->{sourceURL}) {
      $self->{sourceURL} = $vals->{sourceURL};
    }
    if (defined $vals->{sourceApplication}) {
      $self->{sourceApplication} = $vals->{sourceApplication};
    }
    if (defined $vals->{shareDate}) {
      $self->{shareDate} = $vals->{shareDate};
    }
    if (defined $vals->{placeName}) {
      $self->{placeName} = $vals->{placeName};
    }
    if (defined $vals->{contentClass}) {
      $self->{contentClass} = $vals->{contentClass};
    }
    if (defined $vals->{applicationData}) {
      $self->{applicationData} = $vals->{applicationData};
    }
    if (defined $vals->{lastEditedBy}) {
      $self->{lastEditedBy} = $vals->{lastEditedBy};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'NoteAttributes';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^1$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{subjectDate});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^10$/ && do{      if ($ftype == TType::DOUBLE) {
        $xfer += $input->readDouble(\$self->{latitude});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^11$/ && do{      if ($ftype == TType::DOUBLE) {
        $xfer += $input->readDouble(\$self->{longitude});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^12$/ && do{      if ($ftype == TType::DOUBLE) {
        $xfer += $input->readDouble(\$self->{altitude});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^13$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{author});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^14$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{source});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^15$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{sourceURL});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^16$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{sourceApplication});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^17$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{shareDate});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^21$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{placeName});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^22$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{contentClass});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^23$/ && do{      if ($ftype == TType::STRUCT) {
        $self->{applicationData} = Net::Evernote::Simple::EDAMTypes::LazyMap->new();
        $xfer += $self->{applicationData}->read($input);
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^24$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{lastEditedBy});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('NoteAttributes');
  if (defined $self->{subjectDate}) {
    $xfer += $output->writeFieldBegin('subjectDate', TType::I64, 1);
    $xfer += $output->writeI64($self->{subjectDate});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{latitude}) {
    $xfer += $output->writeFieldBegin('latitude', TType::DOUBLE, 10);
    $xfer += $output->writeDouble($self->{latitude});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{longitude}) {
    $xfer += $output->writeFieldBegin('longitude', TType::DOUBLE, 11);
    $xfer += $output->writeDouble($self->{longitude});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{altitude}) {
    $xfer += $output->writeFieldBegin('altitude', TType::DOUBLE, 12);
    $xfer += $output->writeDouble($self->{altitude});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{author}) {
    $xfer += $output->writeFieldBegin('author', TType::STRING, 13);
    $xfer += $output->writeString($self->{author});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{source}) {
    $xfer += $output->writeFieldBegin('source', TType::STRING, 14);
    $xfer += $output->writeString($self->{source});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{sourceURL}) {
    $xfer += $output->writeFieldBegin('sourceURL', TType::STRING, 15);
    $xfer += $output->writeString($self->{sourceURL});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{sourceApplication}) {
    $xfer += $output->writeFieldBegin('sourceApplication', TType::STRING, 16);
    $xfer += $output->writeString($self->{sourceApplication});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{shareDate}) {
    $xfer += $output->writeFieldBegin('shareDate', TType::I64, 17);
    $xfer += $output->writeI64($self->{shareDate});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{placeName}) {
    $xfer += $output->writeFieldBegin('placeName', TType::STRING, 21);
    $xfer += $output->writeString($self->{placeName});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{contentClass}) {
    $xfer += $output->writeFieldBegin('contentClass', TType::STRING, 22);
    $xfer += $output->writeString($self->{contentClass});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{applicationData}) {
    $xfer += $output->writeFieldBegin('applicationData', TType::STRUCT, 23);
    $xfer += $self->{applicationData}->write($output);
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{lastEditedBy}) {
    $xfer += $output->writeFieldBegin('lastEditedBy', TType::STRING, 24);
    $xfer += $output->writeString($self->{lastEditedBy});
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

package Net::Evernote::Simple::EDAMTypes::Note;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::Note->mk_accessors( qw( guid title content contentHash contentLength created updated deleted active updateSequenceNum notebookGuid tagGuids resources attributes tagNames ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{guid} = undef;
  $self->{title} = undef;
  $self->{content} = undef;
  $self->{contentHash} = undef;
  $self->{contentLength} = undef;
  $self->{created} = undef;
  $self->{updated} = undef;
  $self->{deleted} = undef;
  $self->{active} = undef;
  $self->{updateSequenceNum} = undef;
  $self->{notebookGuid} = undef;
  $self->{tagGuids} = undef;
  $self->{resources} = undef;
  $self->{attributes} = undef;
  $self->{tagNames} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{guid}) {
      $self->{guid} = $vals->{guid};
    }
    if (defined $vals->{title}) {
      $self->{title} = $vals->{title};
    }
    if (defined $vals->{content}) {
      $self->{content} = $vals->{content};
    }
    if (defined $vals->{contentHash}) {
      $self->{contentHash} = $vals->{contentHash};
    }
    if (defined $vals->{contentLength}) {
      $self->{contentLength} = $vals->{contentLength};
    }
    if (defined $vals->{created}) {
      $self->{created} = $vals->{created};
    }
    if (defined $vals->{updated}) {
      $self->{updated} = $vals->{updated};
    }
    if (defined $vals->{deleted}) {
      $self->{deleted} = $vals->{deleted};
    }
    if (defined $vals->{active}) {
      $self->{active} = $vals->{active};
    }
    if (defined $vals->{updateSequenceNum}) {
      $self->{updateSequenceNum} = $vals->{updateSequenceNum};
    }
    if (defined $vals->{notebookGuid}) {
      $self->{notebookGuid} = $vals->{notebookGuid};
    }
    if (defined $vals->{tagGuids}) {
      $self->{tagGuids} = $vals->{tagGuids};
    }
    if (defined $vals->{resources}) {
      $self->{resources} = $vals->{resources};
    }
    if (defined $vals->{attributes}) {
      $self->{attributes} = $vals->{attributes};
    }
    if (defined $vals->{tagNames}) {
      $self->{tagNames} = $vals->{tagNames};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'Note';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^1$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{guid});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^2$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{title});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^3$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{content});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^4$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{contentHash});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^5$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{contentLength});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^6$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{created});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^7$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{updated});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^8$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{deleted});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^9$/ && do{      if ($ftype == TType::BOOL) {
        $xfer += $input->readBool(\$self->{active});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^10$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{updateSequenceNum});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^11$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{notebookGuid});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^12$/ && do{      if ($ftype == TType::LIST) {
        {
          my $_size30 = 0;
          $self->{tagGuids} = [];
          my $_etype33 = 0;
          $xfer += $input->readListBegin(\$_etype33, \$_size30);
          for (my $_i34 = 0; $_i34 < $_size30; ++$_i34)
          {
            my $elem35 = undef;
            $xfer += $input->readString(\$elem35);
            push(@{$self->{tagGuids}},$elem35);
          }
          $xfer += $input->readListEnd();
        }
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^13$/ && do{      if ($ftype == TType::LIST) {
        {
          my $_size36 = 0;
          $self->{resources} = [];
          my $_etype39 = 0;
          $xfer += $input->readListBegin(\$_etype39, \$_size36);
          for (my $_i40 = 0; $_i40 < $_size36; ++$_i40)
          {
            my $elem41 = undef;
            $elem41 = Net::Evernote::Simple::EDAMTypes::Resource->new();
            $xfer += $elem41->read($input);
            push(@{$self->{resources}},$elem41);
          }
          $xfer += $input->readListEnd();
        }
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^14$/ && do{      if ($ftype == TType::STRUCT) {
        $self->{attributes} = Net::Evernote::Simple::EDAMTypes::NoteAttributes->new();
        $xfer += $self->{attributes}->read($input);
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^15$/ && do{      if ($ftype == TType::LIST) {
        {
          my $_size42 = 0;
          $self->{tagNames} = [];
          my $_etype45 = 0;
          $xfer += $input->readListBegin(\$_etype45, \$_size42);
          for (my $_i46 = 0; $_i46 < $_size42; ++$_i46)
          {
            my $elem47 = undef;
            $xfer += $input->readString(\$elem47);
            push(@{$self->{tagNames}},$elem47);
          }
          $xfer += $input->readListEnd();
        }
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('Note');
  if (defined $self->{guid}) {
    $xfer += $output->writeFieldBegin('guid', TType::STRING, 1);
    $xfer += $output->writeString($self->{guid});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{title}) {
    $xfer += $output->writeFieldBegin('title', TType::STRING, 2);
    $xfer += $output->writeString($self->{title});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{content}) {
    $xfer += $output->writeFieldBegin('content', TType::STRING, 3);
    $xfer += $output->writeString($self->{content});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{contentHash}) {
    $xfer += $output->writeFieldBegin('contentHash', TType::STRING, 4);
    $xfer += $output->writeString($self->{contentHash});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{contentLength}) {
    $xfer += $output->writeFieldBegin('contentLength', TType::I32, 5);
    $xfer += $output->writeI32($self->{contentLength});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{created}) {
    $xfer += $output->writeFieldBegin('created', TType::I64, 6);
    $xfer += $output->writeI64($self->{created});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{updated}) {
    $xfer += $output->writeFieldBegin('updated', TType::I64, 7);
    $xfer += $output->writeI64($self->{updated});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{deleted}) {
    $xfer += $output->writeFieldBegin('deleted', TType::I64, 8);
    $xfer += $output->writeI64($self->{deleted});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{active}) {
    $xfer += $output->writeFieldBegin('active', TType::BOOL, 9);
    $xfer += $output->writeBool($self->{active});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{updateSequenceNum}) {
    $xfer += $output->writeFieldBegin('updateSequenceNum', TType::I32, 10);
    $xfer += $output->writeI32($self->{updateSequenceNum});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{notebookGuid}) {
    $xfer += $output->writeFieldBegin('notebookGuid', TType::STRING, 11);
    $xfer += $output->writeString($self->{notebookGuid});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{tagGuids}) {
    $xfer += $output->writeFieldBegin('tagGuids', TType::LIST, 12);
    {
      $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{tagGuids}}));
      {
        foreach my $iter48 (@{$self->{tagGuids}}) 
        {
          $xfer += $output->writeString($iter48);
        }
      }
      $xfer += $output->writeListEnd();
    }
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{resources}) {
    $xfer += $output->writeFieldBegin('resources', TType::LIST, 13);
    {
      $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{resources}}));
      {
        foreach my $iter49 (@{$self->{resources}}) 
        {
          $xfer += ${iter49}->write($output);
        }
      }
      $xfer += $output->writeListEnd();
    }
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{attributes}) {
    $xfer += $output->writeFieldBegin('attributes', TType::STRUCT, 14);
    $xfer += $self->{attributes}->write($output);
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{tagNames}) {
    $xfer += $output->writeFieldBegin('tagNames', TType::LIST, 15);
    {
      $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{tagNames}}));
      {
        foreach my $iter50 (@{$self->{tagNames}}) 
        {
          $xfer += $output->writeString($iter50);
        }
      }
      $xfer += $output->writeListEnd();
    }
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

package Net::Evernote::Simple::EDAMTypes::Publishing;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::Publishing->mk_accessors( qw( uri order ascending publicDescription ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{uri} = undef;
  $self->{order} = undef;
  $self->{ascending} = undef;
  $self->{publicDescription} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{uri}) {
      $self->{uri} = $vals->{uri};
    }
    if (defined $vals->{order}) {
      $self->{order} = $vals->{order};
    }
    if (defined $vals->{ascending}) {
      $self->{ascending} = $vals->{ascending};
    }
    if (defined $vals->{publicDescription}) {
      $self->{publicDescription} = $vals->{publicDescription};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'Publishing';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^1$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{uri});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^2$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{order});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^3$/ && do{      if ($ftype == TType::BOOL) {
        $xfer += $input->readBool(\$self->{ascending});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^4$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{publicDescription});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('Publishing');
  if (defined $self->{uri}) {
    $xfer += $output->writeFieldBegin('uri', TType::STRING, 1);
    $xfer += $output->writeString($self->{uri});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{order}) {
    $xfer += $output->writeFieldBegin('order', TType::I32, 2);
    $xfer += $output->writeI32($self->{order});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{ascending}) {
    $xfer += $output->writeFieldBegin('ascending', TType::BOOL, 3);
    $xfer += $output->writeBool($self->{ascending});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{publicDescription}) {
    $xfer += $output->writeFieldBegin('publicDescription', TType::STRING, 4);
    $xfer += $output->writeString($self->{publicDescription});
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

package Net::Evernote::Simple::EDAMTypes::SavedSearch;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::SavedSearch->mk_accessors( qw( guid name query format updateSequenceNum ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{guid} = undef;
  $self->{name} = undef;
  $self->{query} = undef;
  $self->{format} = undef;
  $self->{updateSequenceNum} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{guid}) {
      $self->{guid} = $vals->{guid};
    }
    if (defined $vals->{name}) {
      $self->{name} = $vals->{name};
    }
    if (defined $vals->{query}) {
      $self->{query} = $vals->{query};
    }
    if (defined $vals->{format}) {
      $self->{format} = $vals->{format};
    }
    if (defined $vals->{updateSequenceNum}) {
      $self->{updateSequenceNum} = $vals->{updateSequenceNum};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'SavedSearch';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^1$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{guid});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^2$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{name});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^3$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{query});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^4$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{format});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^5$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{updateSequenceNum});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('SavedSearch');
  if (defined $self->{guid}) {
    $xfer += $output->writeFieldBegin('guid', TType::STRING, 1);
    $xfer += $output->writeString($self->{guid});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{name}) {
    $xfer += $output->writeFieldBegin('name', TType::STRING, 2);
    $xfer += $output->writeString($self->{name});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{query}) {
    $xfer += $output->writeFieldBegin('query', TType::STRING, 3);
    $xfer += $output->writeString($self->{query});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{format}) {
    $xfer += $output->writeFieldBegin('format', TType::I32, 4);
    $xfer += $output->writeI32($self->{format});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{updateSequenceNum}) {
    $xfer += $output->writeFieldBegin('updateSequenceNum', TType::I32, 5);
    $xfer += $output->writeI32($self->{updateSequenceNum});
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

package Net::Evernote::Simple::EDAMTypes::Ad;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::Ad->mk_accessors( qw( id width height advertiserName imageUrl destinationUrl displaySeconds score image imageMime html displayFrequency openInTrunk ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{id} = undef;
  $self->{width} = undef;
  $self->{height} = undef;
  $self->{advertiserName} = undef;
  $self->{imageUrl} = undef;
  $self->{destinationUrl} = undef;
  $self->{displaySeconds} = undef;
  $self->{score} = undef;
  $self->{image} = undef;
  $self->{imageMime} = undef;
  $self->{html} = undef;
  $self->{displayFrequency} = undef;
  $self->{openInTrunk} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{id}) {
      $self->{id} = $vals->{id};
    }
    if (defined $vals->{width}) {
      $self->{width} = $vals->{width};
    }
    if (defined $vals->{height}) {
      $self->{height} = $vals->{height};
    }
    if (defined $vals->{advertiserName}) {
      $self->{advertiserName} = $vals->{advertiserName};
    }
    if (defined $vals->{imageUrl}) {
      $self->{imageUrl} = $vals->{imageUrl};
    }
    if (defined $vals->{destinationUrl}) {
      $self->{destinationUrl} = $vals->{destinationUrl};
    }
    if (defined $vals->{displaySeconds}) {
      $self->{displaySeconds} = $vals->{displaySeconds};
    }
    if (defined $vals->{score}) {
      $self->{score} = $vals->{score};
    }
    if (defined $vals->{image}) {
      $self->{image} = $vals->{image};
    }
    if (defined $vals->{imageMime}) {
      $self->{imageMime} = $vals->{imageMime};
    }
    if (defined $vals->{html}) {
      $self->{html} = $vals->{html};
    }
    if (defined $vals->{displayFrequency}) {
      $self->{displayFrequency} = $vals->{displayFrequency};
    }
    if (defined $vals->{openInTrunk}) {
      $self->{openInTrunk} = $vals->{openInTrunk};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'Ad';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^1$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{id});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^2$/ && do{      if ($ftype == TType::I16) {
        $xfer += $input->readI16(\$self->{width});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^3$/ && do{      if ($ftype == TType::I16) {
        $xfer += $input->readI16(\$self->{height});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^4$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{advertiserName});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^5$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{imageUrl});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^6$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{destinationUrl});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^7$/ && do{      if ($ftype == TType::I16) {
        $xfer += $input->readI16(\$self->{displaySeconds});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^8$/ && do{      if ($ftype == TType::DOUBLE) {
        $xfer += $input->readDouble(\$self->{score});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^9$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{image});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^10$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{imageMime});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^11$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{html});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^12$/ && do{      if ($ftype == TType::DOUBLE) {
        $xfer += $input->readDouble(\$self->{displayFrequency});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^13$/ && do{      if ($ftype == TType::BOOL) {
        $xfer += $input->readBool(\$self->{openInTrunk});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('Ad');
  if (defined $self->{id}) {
    $xfer += $output->writeFieldBegin('id', TType::I32, 1);
    $xfer += $output->writeI32($self->{id});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{width}) {
    $xfer += $output->writeFieldBegin('width', TType::I16, 2);
    $xfer += $output->writeI16($self->{width});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{height}) {
    $xfer += $output->writeFieldBegin('height', TType::I16, 3);
    $xfer += $output->writeI16($self->{height});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{advertiserName}) {
    $xfer += $output->writeFieldBegin('advertiserName', TType::STRING, 4);
    $xfer += $output->writeString($self->{advertiserName});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{imageUrl}) {
    $xfer += $output->writeFieldBegin('imageUrl', TType::STRING, 5);
    $xfer += $output->writeString($self->{imageUrl});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{destinationUrl}) {
    $xfer += $output->writeFieldBegin('destinationUrl', TType::STRING, 6);
    $xfer += $output->writeString($self->{destinationUrl});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{displaySeconds}) {
    $xfer += $output->writeFieldBegin('displaySeconds', TType::I16, 7);
    $xfer += $output->writeI16($self->{displaySeconds});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{score}) {
    $xfer += $output->writeFieldBegin('score', TType::DOUBLE, 8);
    $xfer += $output->writeDouble($self->{score});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{image}) {
    $xfer += $output->writeFieldBegin('image', TType::STRING, 9);
    $xfer += $output->writeString($self->{image});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{imageMime}) {
    $xfer += $output->writeFieldBegin('imageMime', TType::STRING, 10);
    $xfer += $output->writeString($self->{imageMime});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{html}) {
    $xfer += $output->writeFieldBegin('html', TType::STRING, 11);
    $xfer += $output->writeString($self->{html});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{displayFrequency}) {
    $xfer += $output->writeFieldBegin('displayFrequency', TType::DOUBLE, 12);
    $xfer += $output->writeDouble($self->{displayFrequency});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{openInTrunk}) {
    $xfer += $output->writeFieldBegin('openInTrunk', TType::BOOL, 13);
    $xfer += $output->writeBool($self->{openInTrunk});
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

package Net::Evernote::Simple::EDAMTypes::SharedNotebook;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::SharedNotebook->mk_accessors( qw( id userId notebookGuid email notebookModifiable requireLogin serviceCreated serviceUpdated shareKey username ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{id} = undef;
  $self->{userId} = undef;
  $self->{notebookGuid} = undef;
  $self->{email} = undef;
  $self->{notebookModifiable} = undef;
  $self->{requireLogin} = undef;
  $self->{serviceCreated} = undef;
  $self->{serviceUpdated} = undef;
  $self->{shareKey} = undef;
  $self->{username} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{id}) {
      $self->{id} = $vals->{id};
    }
    if (defined $vals->{userId}) {
      $self->{userId} = $vals->{userId};
    }
    if (defined $vals->{notebookGuid}) {
      $self->{notebookGuid} = $vals->{notebookGuid};
    }
    if (defined $vals->{email}) {
      $self->{email} = $vals->{email};
    }
    if (defined $vals->{notebookModifiable}) {
      $self->{notebookModifiable} = $vals->{notebookModifiable};
    }
    if (defined $vals->{requireLogin}) {
      $self->{requireLogin} = $vals->{requireLogin};
    }
    if (defined $vals->{serviceCreated}) {
      $self->{serviceCreated} = $vals->{serviceCreated};
    }
    if (defined $vals->{serviceUpdated}) {
      $self->{serviceUpdated} = $vals->{serviceUpdated};
    }
    if (defined $vals->{shareKey}) {
      $self->{shareKey} = $vals->{shareKey};
    }
    if (defined $vals->{username}) {
      $self->{username} = $vals->{username};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'SharedNotebook';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^1$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{id});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^2$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{userId});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^3$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{notebookGuid});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^4$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{email});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^5$/ && do{      if ($ftype == TType::BOOL) {
        $xfer += $input->readBool(\$self->{notebookModifiable});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^6$/ && do{      if ($ftype == TType::BOOL) {
        $xfer += $input->readBool(\$self->{requireLogin});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^7$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{serviceCreated});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^10$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{serviceUpdated});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^8$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{shareKey});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^9$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{username});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('SharedNotebook');
  if (defined $self->{id}) {
    $xfer += $output->writeFieldBegin('id', TType::I64, 1);
    $xfer += $output->writeI64($self->{id});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{userId}) {
    $xfer += $output->writeFieldBegin('userId', TType::I32, 2);
    $xfer += $output->writeI32($self->{userId});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{notebookGuid}) {
    $xfer += $output->writeFieldBegin('notebookGuid', TType::STRING, 3);
    $xfer += $output->writeString($self->{notebookGuid});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{email}) {
    $xfer += $output->writeFieldBegin('email', TType::STRING, 4);
    $xfer += $output->writeString($self->{email});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{notebookModifiable}) {
    $xfer += $output->writeFieldBegin('notebookModifiable', TType::BOOL, 5);
    $xfer += $output->writeBool($self->{notebookModifiable});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{requireLogin}) {
    $xfer += $output->writeFieldBegin('requireLogin', TType::BOOL, 6);
    $xfer += $output->writeBool($self->{requireLogin});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{serviceCreated}) {
    $xfer += $output->writeFieldBegin('serviceCreated', TType::I64, 7);
    $xfer += $output->writeI64($self->{serviceCreated});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{shareKey}) {
    $xfer += $output->writeFieldBegin('shareKey', TType::STRING, 8);
    $xfer += $output->writeString($self->{shareKey});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{username}) {
    $xfer += $output->writeFieldBegin('username', TType::STRING, 9);
    $xfer += $output->writeString($self->{username});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{serviceUpdated}) {
    $xfer += $output->writeFieldBegin('serviceUpdated', TType::I64, 10);
    $xfer += $output->writeI64($self->{serviceUpdated});
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

package Net::Evernote::Simple::EDAMTypes::Notebook;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::Notebook->mk_accessors( qw( guid name updateSequenceNum defaultNotebook serviceCreated serviceUpdated publishing published stack sharedNotebookIds sharedNotebooks ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{guid} = undef;
  $self->{name} = undef;
  $self->{updateSequenceNum} = undef;
  $self->{defaultNotebook} = undef;
  $self->{serviceCreated} = undef;
  $self->{serviceUpdated} = undef;
  $self->{publishing} = undef;
  $self->{published} = undef;
  $self->{stack} = undef;
  $self->{sharedNotebookIds} = undef;
  $self->{sharedNotebooks} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{guid}) {
      $self->{guid} = $vals->{guid};
    }
    if (defined $vals->{name}) {
      $self->{name} = $vals->{name};
    }
    if (defined $vals->{updateSequenceNum}) {
      $self->{updateSequenceNum} = $vals->{updateSequenceNum};
    }
    if (defined $vals->{defaultNotebook}) {
      $self->{defaultNotebook} = $vals->{defaultNotebook};
    }
    if (defined $vals->{serviceCreated}) {
      $self->{serviceCreated} = $vals->{serviceCreated};
    }
    if (defined $vals->{serviceUpdated}) {
      $self->{serviceUpdated} = $vals->{serviceUpdated};
    }
    if (defined $vals->{publishing}) {
      $self->{publishing} = $vals->{publishing};
    }
    if (defined $vals->{published}) {
      $self->{published} = $vals->{published};
    }
    if (defined $vals->{stack}) {
      $self->{stack} = $vals->{stack};
    }
    if (defined $vals->{sharedNotebookIds}) {
      $self->{sharedNotebookIds} = $vals->{sharedNotebookIds};
    }
    if (defined $vals->{sharedNotebooks}) {
      $self->{sharedNotebooks} = $vals->{sharedNotebooks};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'Notebook';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^1$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{guid});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^2$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{name});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^5$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{updateSequenceNum});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^6$/ && do{      if ($ftype == TType::BOOL) {
        $xfer += $input->readBool(\$self->{defaultNotebook});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^7$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{serviceCreated});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^8$/ && do{      if ($ftype == TType::I64) {
        $xfer += $input->readI64(\$self->{serviceUpdated});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^10$/ && do{      if ($ftype == TType::STRUCT) {
        $self->{publishing} = Net::Evernote::Simple::EDAMTypes::Publishing->new();
        $xfer += $self->{publishing}->read($input);
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^11$/ && do{      if ($ftype == TType::BOOL) {
        $xfer += $input->readBool(\$self->{published});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^12$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{stack});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^13$/ && do{      if ($ftype == TType::LIST) {
        {
          my $_size51 = 0;
          $self->{sharedNotebookIds} = [];
          my $_etype54 = 0;
          $xfer += $input->readListBegin(\$_etype54, \$_size51);
          for (my $_i55 = 0; $_i55 < $_size51; ++$_i55)
          {
            my $elem56 = undef;
            $xfer += $input->readI64(\$elem56);
            push(@{$self->{sharedNotebookIds}},$elem56);
          }
          $xfer += $input->readListEnd();
        }
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^14$/ && do{      if ($ftype == TType::LIST) {
        {
          my $_size57 = 0;
          $self->{sharedNotebooks} = [];
          my $_etype60 = 0;
          $xfer += $input->readListBegin(\$_etype60, \$_size57);
          for (my $_i61 = 0; $_i61 < $_size57; ++$_i61)
          {
            my $elem62 = undef;
            $elem62 = Net::Evernote::Simple::EDAMTypes::SharedNotebook->new();
            $xfer += $elem62->read($input);
            push(@{$self->{sharedNotebooks}},$elem62);
          }
          $xfer += $input->readListEnd();
        }
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('Notebook');
  if (defined $self->{guid}) {
    $xfer += $output->writeFieldBegin('guid', TType::STRING, 1);
    $xfer += $output->writeString($self->{guid});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{name}) {
    $xfer += $output->writeFieldBegin('name', TType::STRING, 2);
    $xfer += $output->writeString($self->{name});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{updateSequenceNum}) {
    $xfer += $output->writeFieldBegin('updateSequenceNum', TType::I32, 5);
    $xfer += $output->writeI32($self->{updateSequenceNum});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{defaultNotebook}) {
    $xfer += $output->writeFieldBegin('defaultNotebook', TType::BOOL, 6);
    $xfer += $output->writeBool($self->{defaultNotebook});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{serviceCreated}) {
    $xfer += $output->writeFieldBegin('serviceCreated', TType::I64, 7);
    $xfer += $output->writeI64($self->{serviceCreated});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{serviceUpdated}) {
    $xfer += $output->writeFieldBegin('serviceUpdated', TType::I64, 8);
    $xfer += $output->writeI64($self->{serviceUpdated});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{publishing}) {
    $xfer += $output->writeFieldBegin('publishing', TType::STRUCT, 10);
    $xfer += $self->{publishing}->write($output);
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{published}) {
    $xfer += $output->writeFieldBegin('published', TType::BOOL, 11);
    $xfer += $output->writeBool($self->{published});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{stack}) {
    $xfer += $output->writeFieldBegin('stack', TType::STRING, 12);
    $xfer += $output->writeString($self->{stack});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{sharedNotebookIds}) {
    $xfer += $output->writeFieldBegin('sharedNotebookIds', TType::LIST, 13);
    {
      $xfer += $output->writeListBegin(TType::I64, scalar(@{$self->{sharedNotebookIds}}));
      {
        foreach my $iter63 (@{$self->{sharedNotebookIds}}) 
        {
          $xfer += $output->writeI64($iter63);
        }
      }
      $xfer += $output->writeListEnd();
    }
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{sharedNotebooks}) {
    $xfer += $output->writeFieldBegin('sharedNotebooks', TType::LIST, 14);
    {
      $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{sharedNotebooks}}));
      {
        foreach my $iter64 (@{$self->{sharedNotebooks}}) 
        {
          $xfer += ${iter64}->write($output);
        }
      }
      $xfer += $output->writeListEnd();
    }
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

package Net::Evernote::Simple::EDAMTypes::LinkedNotebook;
use base qw(Class::Accessor);
Net::Evernote::Simple::EDAMTypes::LinkedNotebook->mk_accessors( qw( shareName username shardId shareKey uri guid updateSequenceNum noteStoreUrl webApiUrlPrefix ) );

sub new {
  my $classname = shift;
  my $self      = {};
  my $vals      = shift || {};
  $self->{shareName} = undef;
  $self->{username} = undef;
  $self->{shardId} = undef;
  $self->{shareKey} = undef;
  $self->{uri} = undef;
  $self->{guid} = undef;
  $self->{updateSequenceNum} = undef;
  $self->{noteStoreUrl} = undef;
  $self->{webApiUrlPrefix} = undef;
  if (UNIVERSAL::isa($vals,'HASH')) {
    if (defined $vals->{shareName}) {
      $self->{shareName} = $vals->{shareName};
    }
    if (defined $vals->{username}) {
      $self->{username} = $vals->{username};
    }
    if (defined $vals->{shardId}) {
      $self->{shardId} = $vals->{shardId};
    }
    if (defined $vals->{shareKey}) {
      $self->{shareKey} = $vals->{shareKey};
    }
    if (defined $vals->{uri}) {
      $self->{uri} = $vals->{uri};
    }
    if (defined $vals->{guid}) {
      $self->{guid} = $vals->{guid};
    }
    if (defined $vals->{updateSequenceNum}) {
      $self->{updateSequenceNum} = $vals->{updateSequenceNum};
    }
    if (defined $vals->{noteStoreUrl}) {
      $self->{noteStoreUrl} = $vals->{noteStoreUrl};
    }
    if (defined $vals->{webApiUrlPrefix}) {
      $self->{webApiUrlPrefix} = $vals->{webApiUrlPrefix};
    }
  }
  return bless ($self, $classname);
}

sub getName {
  return 'LinkedNotebook';
}

sub read {
  my ($self, $input) = @_;
  my $xfer  = 0;
  my $fname;
  my $ftype = 0;
  my $fid   = 0;
  $xfer += $input->readStructBegin(\$fname);
  while (1) 
  {
    $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid);
    if ($ftype == TType::STOP) {
      last;
    }
    SWITCH: for($fid)
    {
      /^2$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{shareName});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^3$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{username});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^4$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{shardId});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^5$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{shareKey});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^6$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{uri});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^7$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{guid});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^8$/ && do{      if ($ftype == TType::I32) {
        $xfer += $input->readI32(\$self->{updateSequenceNum});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^9$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{noteStoreUrl});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
      /^10$/ && do{      if ($ftype == TType::STRING) {
        $xfer += $input->readString(\$self->{webApiUrlPrefix});
      } else {
        $xfer += $input->skip($ftype);
      }
      last; };
        $xfer += $input->skip($ftype);
    }
    $xfer += $input->readFieldEnd();
  }
  $xfer += $input->readStructEnd();
  return $xfer;
}

sub write {
  my ($self, $output) = @_;
  my $xfer   = 0;
  $xfer += $output->writeStructBegin('LinkedNotebook');
  if (defined $self->{shareName}) {
    $xfer += $output->writeFieldBegin('shareName', TType::STRING, 2);
    $xfer += $output->writeString($self->{shareName});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{username}) {
    $xfer += $output->writeFieldBegin('username', TType::STRING, 3);
    $xfer += $output->writeString($self->{username});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{shardId}) {
    $xfer += $output->writeFieldBegin('shardId', TType::STRING, 4);
    $xfer += $output->writeString($self->{shardId});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{shareKey}) {
    $xfer += $output->writeFieldBegin('shareKey', TType::STRING, 5);
    $xfer += $output->writeString($self->{shareKey});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{uri}) {
    $xfer += $output->writeFieldBegin('uri', TType::STRING, 6);
    $xfer += $output->writeString($self->{uri});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{guid}) {
    $xfer += $output->writeFieldBegin('guid', TType::STRING, 7);
    $xfer += $output->writeString($self->{guid});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{updateSequenceNum}) {
    $xfer += $output->writeFieldBegin('updateSequenceNum', TType::I32, 8);
    $xfer += $output->writeI32($self->{updateSequenceNum});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{noteStoreUrl}) {
    $xfer += $output->writeFieldBegin('noteStoreUrl', TType::STRING, 9);
    $xfer += $output->writeString($self->{noteStoreUrl});
    $xfer += $output->writeFieldEnd();
  }
  if (defined $self->{webApiUrlPrefix}) {
    $xfer += $output->writeFieldBegin('webApiUrlPrefix', TType::STRING, 10);
    $xfer += $output->writeString($self->{webApiUrlPrefix});
    $xfer += $output->writeFieldEnd();
  }
  $xfer += $output->writeFieldStop();
  $xfer += $output->writeStructEnd();
  return $xfer;
}

1;
