evernote 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -46,16 +46,17 @@ module Evernote
46
46
  # this account in the current monthly period. This can be compared against
47
47
  # Accounting.uploadLimit (from the UserStore) to determine how close the user
48
48
  # is to their monthly upload limit.
49
+ # This value may not be present if the SyncState has been retrieved by
50
+ # a caller that only has read access to the account.
49
51
  # </dd>
50
52
  # </dl>
51
53
  class SyncState
52
- include ::Thrift::Struct
54
+ include ::Thrift::Struct, ::Thrift::Struct_Union
53
55
  CURRENTTIME = 1
54
56
  FULLSYNCBEFORE = 2
55
57
  UPDATECOUNT = 3
56
58
  UPLOADED = 4
57
59
 
58
- ::Thrift::Struct.field_accessor self, :currentTime, :fullSyncBefore, :updateCount, :uploaded
59
60
  FIELDS = {
60
61
  CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'},
61
62
  FULLSYNCBEFORE => {:type => ::Thrift::Types::I64, :name => 'fullSyncBefore'},
@@ -71,6 +72,7 @@ module Evernote
71
72
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field updateCount is unset!') unless @updateCount
72
73
  end
73
74
 
75
+ ::Thrift::Struct.generate_accessors self
74
76
  end
75
77
 
76
78
  # This structure is given out by the NoteStore when a client asks to
@@ -165,9 +167,21 @@ module Evernote
165
167
  # If present, the GUIDs of all of the saved searches
166
168
  # that were permanently expunged in this chunk.
167
169
  # </dd>
170
+ #
171
+ # <dt>linkedNotebooks</dt>
172
+ # <dd>
173
+ # If present, this is a list of non-expunged LinkedNotebooks that
174
+ # have a USN in this chunk.
175
+ # </dd>
176
+ #
177
+ # <dt>expungedLinkedNotebooks</dt>
178
+ # <dd>
179
+ # If present, the GUIDs of all of the LinkedNotebooks
180
+ # that were permanently expunged in this chunk.
181
+ # </dd>
168
182
  # </dl>
169
183
  class SyncChunk
170
- include ::Thrift::Struct
184
+ include ::Thrift::Struct, ::Thrift::Struct_Union
171
185
  CURRENTTIME = 1
172
186
  CHUNKHIGHUSN = 2
173
187
  UPDATECOUNT = 3
@@ -180,8 +194,9 @@ module Evernote
180
194
  EXPUNGEDNOTEBOOKS = 10
181
195
  EXPUNGEDTAGS = 11
182
196
  EXPUNGEDSEARCHES = 12
197
+ LINKEDNOTEBOOKS = 13
198
+ EXPUNGEDLINKEDNOTEBOOKS = 14
183
199
 
184
- ::Thrift::Struct.field_accessor self, :currentTime, :chunkHighUSN, :updateCount, :notes, :notebooks, :tags, :searches, :resources, :expungedNotes, :expungedNotebooks, :expungedTags, :expungedSearches
185
200
  FIELDS = {
186
201
  CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'},
187
202
  CHUNKHIGHUSN => {:type => ::Thrift::Types::I32, :name => 'chunkHighUSN', :optional => true},
@@ -194,7 +209,9 @@ module Evernote
194
209
  EXPUNGEDNOTES => {:type => ::Thrift::Types::LIST, :name => 'expungedNotes', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
195
210
  EXPUNGEDNOTEBOOKS => {:type => ::Thrift::Types::LIST, :name => 'expungedNotebooks', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
196
211
  EXPUNGEDTAGS => {:type => ::Thrift::Types::LIST, :name => 'expungedTags', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
197
- EXPUNGEDSEARCHES => {:type => ::Thrift::Types::LIST, :name => 'expungedSearches', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
212
+ EXPUNGEDSEARCHES => {:type => ::Thrift::Types::LIST, :name => 'expungedSearches', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
213
+ LINKEDNOTEBOOKS => {:type => ::Thrift::Types::LIST, :name => 'linkedNotebooks', :element => {:type => ::Thrift::Types::STRUCT, :class => Evernote::EDAM::Type::LinkedNotebook}, :optional => true},
214
+ EXPUNGEDLINKEDNOTEBOOKS => {:type => ::Thrift::Types::LIST, :name => 'expungedLinkedNotebooks', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
198
215
  }
199
216
 
200
217
  def struct_fields; FIELDS; end
@@ -204,6 +221,7 @@ module Evernote
204
221
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field updateCount is unset!') unless @updateCount
205
222
  end
206
223
 
224
+ ::Thrift::Struct.generate_accessors self
207
225
  end
208
226
 
209
227
  # A list of criteria that are used to indicate which notes are desired from
@@ -259,7 +277,7 @@ module Evernote
259
277
  # </dd>
260
278
  # </dl>
261
279
  class NoteFilter
262
- include ::Thrift::Struct
280
+ include ::Thrift::Struct, ::Thrift::Struct_Union
263
281
  ORDER = 1
264
282
  ASCENDING = 2
265
283
  WORDS = 3
@@ -268,7 +286,6 @@ module Evernote
268
286
  TIMEZONE = 6
269
287
  INACTIVE = 7
270
288
 
271
- ::Thrift::Struct.field_accessor self, :order, :ascending, :words, :notebookGuid, :tagGuids, :timeZone, :inactive
272
289
  FIELDS = {
273
290
  ORDER => {:type => ::Thrift::Types::I32, :name => 'order', :optional => true},
274
291
  ASCENDING => {:type => ::Thrift::Types::BOOL, :name => 'ascending', :optional => true},
@@ -284,6 +301,7 @@ module Evernote
284
301
  def validate
285
302
  end
286
303
 
304
+ ::Thrift::Struct.generate_accessors self
287
305
  end
288
306
 
289
307
  # A small structure for returning a list of notes out of a larger set.
@@ -323,22 +341,33 @@ module Evernote
323
341
  # include a list of those words. Any stopped words will not be included
324
342
  # in this list.
325
343
  # </dd>
344
+ #
345
+ # <dt>updateCount</dt>
346
+ # <dd>
347
+ # Indicates the total number of transactions that have
348
+ # been committed within the account. This reflects (for example) the
349
+ # number of discrete additions or modifications that have been made to
350
+ # the data in this account (tags, notes, resources, etc.).
351
+ # This number is the "high water mark" for Update Sequence Numbers (USN)
352
+ # within the account.
353
+ # </dd>
326
354
  # </dl>
327
355
  class NoteList
328
- include ::Thrift::Struct
356
+ include ::Thrift::Struct, ::Thrift::Struct_Union
329
357
  STARTINDEX = 1
330
358
  TOTALNOTES = 2
331
359
  NOTES = 3
332
360
  STOPPEDWORDS = 4
333
361
  SEARCHEDWORDS = 5
362
+ UPDATECOUNT = 6
334
363
 
335
- ::Thrift::Struct.field_accessor self, :startIndex, :totalNotes, :notes, :stoppedWords, :searchedWords
336
364
  FIELDS = {
337
365
  STARTINDEX => {:type => ::Thrift::Types::I32, :name => 'startIndex'},
338
366
  TOTALNOTES => {:type => ::Thrift::Types::I32, :name => 'totalNotes'},
339
367
  NOTES => {:type => ::Thrift::Types::LIST, :name => 'notes', :element => {:type => ::Thrift::Types::STRUCT, :class => Evernote::EDAM::Type::Note}},
340
368
  STOPPEDWORDS => {:type => ::Thrift::Types::LIST, :name => 'stoppedWords', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
341
- SEARCHEDWORDS => {:type => ::Thrift::Types::LIST, :name => 'searchedWords', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
369
+ SEARCHEDWORDS => {:type => ::Thrift::Types::LIST, :name => 'searchedWords', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
370
+ UPDATECOUNT => {:type => ::Thrift::Types::I32, :name => 'updateCount', :optional => true}
342
371
  }
343
372
 
344
373
  def struct_fields; FIELDS; end
@@ -349,6 +378,7 @@ module Evernote
349
378
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field notes is unset!') unless @notes
350
379
  end
351
380
 
381
+ ::Thrift::Struct.generate_accessors self
352
382
  end
353
383
 
354
384
  # A data structure representing the number of notes for each notebook
@@ -376,12 +406,11 @@ module Evernote
376
406
  # </dd>
377
407
  # </dl>
378
408
  class NoteCollectionCounts
379
- include ::Thrift::Struct
409
+ include ::Thrift::Struct, ::Thrift::Struct_Union
380
410
  NOTEBOOKCOUNTS = 1
381
411
  TAGCOUNTS = 2
382
412
  TRASHCOUNT = 3
383
413
 
384
- ::Thrift::Struct.field_accessor self, :notebookCounts, :tagCounts, :trashCount
385
414
  FIELDS = {
386
415
  NOTEBOOKCOUNTS => {:type => ::Thrift::Types::MAP, :name => 'notebookCounts', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I32}, :optional => true},
387
416
  TAGCOUNTS => {:type => ::Thrift::Types::MAP, :name => 'tagCounts', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I32}, :optional => true},
@@ -393,6 +422,7 @@ module Evernote
393
422
  def validate
394
423
  end
395
424
 
425
+ ::Thrift::Struct.generate_accessors self
396
426
  end
397
427
 
398
428
  # Information for tracking the display of a particular ad by a client.
@@ -418,12 +448,11 @@ module Evernote
418
448
  # </dd>
419
449
  # </dl>
420
450
  class AdImpressions
421
- include ::Thrift::Struct
451
+ include ::Thrift::Struct, ::Thrift::Struct_Union
422
452
  ADID = 1
423
453
  IMPRESSIONCOUNT = 2
424
454
  IMPRESSIONTIME = 3
425
455
 
426
- ::Thrift::Struct.field_accessor self, :adId, :impressionCount, :impressionTime
427
456
  FIELDS = {
428
457
  ADID => {:type => ::Thrift::Types::I32, :name => 'adId'},
429
458
  IMPRESSIONCOUNT => {:type => ::Thrift::Types::I32, :name => 'impressionCount'},
@@ -438,6 +467,7 @@ module Evernote
438
467
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field impressionTime is unset!') unless @impressionTime
439
468
  end
440
469
 
470
+ ::Thrift::Struct.generate_accessors self
441
471
  end
442
472
 
443
473
  # Parameters that will be given by a client to the service when it requests
@@ -473,13 +503,12 @@ module Evernote
473
503
  # </dd>
474
504
  # </dl>
475
505
  class AdParameters
476
- include ::Thrift::Struct
506
+ include ::Thrift::Struct, ::Thrift::Struct_Union
477
507
  CLIENTLANGUAGE = 2
478
508
  IMPRESSIONS = 4
479
509
  SUPPORTHTML = 5
480
510
  CLIENTPROPERTIES = 6
481
511
 
482
- ::Thrift::Struct.field_accessor self, :clientLanguage, :impressions, :supportHtml, :clientProperties
483
512
  FIELDS = {
484
513
  CLIENTLANGUAGE => {:type => ::Thrift::Types::STRING, :name => 'clientLanguage', :optional => true},
485
514
  IMPRESSIONS => {:type => ::Thrift::Types::LIST, :name => 'impressions', :element => {:type => ::Thrift::Types::STRUCT, :class => Evernote::EDAM::NoteStore::AdImpressions}, :optional => true},
@@ -492,6 +521,7 @@ module Evernote
492
521
  def validate
493
522
  end
494
523
 
524
+ ::Thrift::Struct.generate_accessors self
495
525
  end
496
526
 
497
527
  # Parameters that must be given to the NoteStore emailNote call. These allow
@@ -541,7 +571,7 @@ module Evernote
541
571
  # </dd>
542
572
  # </dl>
543
573
  class NoteEmailParameters
544
- include ::Thrift::Struct
574
+ include ::Thrift::Struct, ::Thrift::Struct_Union
545
575
  GUID = 1
546
576
  NOTE = 2
547
577
  TOADDRESSES = 3
@@ -549,7 +579,6 @@ module Evernote
549
579
  SUBJECT = 5
550
580
  MESSAGE = 6
551
581
 
552
- ::Thrift::Struct.field_accessor self, :guid, :note, :toAddresses, :ccAddresses, :subject, :message
553
582
  FIELDS = {
554
583
  GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
555
584
  NOTE => {:type => ::Thrift::Types::STRUCT, :name => 'note', :class => Evernote::EDAM::Type::Note, :optional => true},
@@ -564,6 +593,63 @@ module Evernote
564
593
  def validate
565
594
  end
566
595
 
596
+ ::Thrift::Struct.generate_accessors self
597
+ end
598
+
599
+ # Identfying information about previous versions of a note that are backed up
600
+ # within Evernote's servers. Used in the return value of the listNoteVersions
601
+ # call.
602
+ #
603
+ # <dl>
604
+ # <dt>updateSequenceNum</dt>
605
+ # <dd>
606
+ # The update sequence number for the Note when it last had this content.
607
+ # This serves to uniquely identify each version of the note, since USN
608
+ # values are unique within an account for each update.
609
+ # </dd>
610
+ # <dt>updated</dt>
611
+ # <dd>
612
+ # The 'updated' time that was set on the Note when it had this version
613
+ # of the content. This is the user-modifiable modification time on the
614
+ # note, so it's not reliable for guaranteeing the order of various
615
+ # versions. (E.g. if someone modifies the note, then changes this time
616
+ # manually into the past and then updates the note again.)
617
+ # </dd>
618
+ # <dt>saved</dt>
619
+ # <dd>
620
+ # A timestamp that holds the date and time when this version of the note
621
+ # was backed up by Evernote's servers. This
622
+ # </dd>
623
+ # <dt>title</dt>
624
+ # <dd>
625
+ # The title of the note when this particular verison was saved. (The
626
+ # current title of the note may differ from this value.)
627
+ # </dd>
628
+ # </dl>
629
+ class NoteVersionId
630
+ include ::Thrift::Struct, ::Thrift::Struct_Union
631
+ UPDATESEQUENCENUM = 1
632
+ UPDATED = 2
633
+ SAVED = 3
634
+ TITLE = 4
635
+
636
+ FIELDS = {
637
+ UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum'},
638
+ UPDATED => {:type => ::Thrift::Types::I64, :name => 'updated'},
639
+ SAVED => {:type => ::Thrift::Types::I64, :name => 'saved'},
640
+ TITLE => {:type => ::Thrift::Types::STRING, :name => 'title'}
641
+ }
642
+
643
+ def struct_fields; FIELDS; end
644
+
645
+ def validate
646
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field updateSequenceNum is unset!') unless @updateSequenceNum
647
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field updated is unset!') unless @updated
648
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field saved is unset!') unless @saved
649
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field title is unset!') unless @title
650
+ end
651
+
652
+ ::Thrift::Struct.generate_accessors self
567
653
  end
568
654
 
569
655
  end
@@ -32,8 +32,9 @@ module Evernote
32
32
  UPDATED = 2
33
33
  RELEVANCE = 3
34
34
  UPDATE_SEQUENCE_NUMBER = 4
35
- VALUE_MAP = {1 => "CREATED", 2 => "UPDATED", 3 => "RELEVANCE", 4 => "UPDATE_SEQUENCE_NUMBER"}
36
- VALID_VALUES = Set.new([CREATED, UPDATED, RELEVANCE, UPDATE_SEQUENCE_NUMBER]).freeze
35
+ TITLE = 5
36
+ VALUE_MAP = {1 => "CREATED", 2 => "UPDATED", 3 => "RELEVANCE", 4 => "UPDATE_SEQUENCE_NUMBER", 5 => "TITLE"}
37
+ VALID_VALUES = Set.new([CREATED, UPDATED, RELEVANCE, UPDATE_SEQUENCE_NUMBER, TITLE]).freeze
37
38
  end
38
39
 
39
40
  module PremiumOrderStatus
@@ -74,16 +75,15 @@ module Evernote
74
75
  # </dd>
75
76
  # </dl>
76
77
  class Data
77
- include ::Thrift::Struct
78
+ include ::Thrift::Struct, ::Thrift::Struct_Union
78
79
  BODYHASH = 1
79
80
  SIZE = 2
80
81
  BODY = 3
81
82
 
82
- ::Thrift::Struct.field_accessor self, :bodyHash, :size, :body
83
83
  FIELDS = {
84
- BODYHASH => {:type => ::Thrift::Types::STRING, :name => 'bodyHash', :optional => true},
84
+ BODYHASH => {:type => ::Thrift::Types::STRING, :name => 'bodyHash', :binary => true, :optional => true},
85
85
  SIZE => {:type => ::Thrift::Types::I32, :name => 'size', :optional => true},
86
- BODY => {:type => ::Thrift::Types::STRING, :name => 'body', :optional => true}
86
+ BODY => {:type => ::Thrift::Types::STRING, :name => 'body', :binary => true, :optional => true}
87
87
  }
88
88
 
89
89
  def struct_fields; FIELDS; end
@@ -91,6 +91,7 @@ module Evernote
91
91
  def validate
92
92
  end
93
93
 
94
+ ::Thrift::Struct.generate_accessors self
94
95
  end
95
96
 
96
97
  # A structure holding the optional attributes that can be stored
@@ -246,8 +247,14 @@ module Evernote
246
247
  # </dd>
247
248
  # </dl>
248
249
  #
250
+ # <dt>educationalInstitution</dt>
251
+ # <dd>a flag indicating that the user is part of an educational institution which
252
+ # makes them eligible for discounts on bulk purchases
253
+ # </dd>
254
+ # </dl>
255
+ #
249
256
  class UserAttributes
250
- include ::Thrift::Struct
257
+ include ::Thrift::Struct, ::Thrift::Struct_Union
251
258
  DEFAULTLOCATIONNAME = 1
252
259
  DEFAULTLATITUDE = 2
253
260
  DEFAULTLONGITUDE = 3
@@ -273,8 +280,9 @@ module Evernote
273
280
  GROUPNAME = 25
274
281
  RECOGNITIONLANGUAGE = 26
275
282
  CUSTOMERPROFILEID = 27
283
+ REFERRALPROOF = 28
284
+ EDUCATIONALDISCOUNT = 29
276
285
 
277
- ::Thrift::Struct.field_accessor self, :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
278
286
  FIELDS = {
279
287
  DEFAULTLOCATIONNAME => {:type => ::Thrift::Types::STRING, :name => 'defaultLocationName', :optional => true},
280
288
  DEFAULTLATITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'defaultLatitude', :optional => true},
@@ -300,7 +308,9 @@ module Evernote
300
308
  TWITTERID => {:type => ::Thrift::Types::STRING, :name => 'twitterId', :optional => true},
301
309
  GROUPNAME => {:type => ::Thrift::Types::STRING, :name => 'groupName', :optional => true},
302
310
  RECOGNITIONLANGUAGE => {:type => ::Thrift::Types::STRING, :name => 'recognitionLanguage', :optional => true},
303
- CUSTOMERPROFILEID => {:type => ::Thrift::Types::I64, :name => 'customerProfileId', :optional => true}
311
+ CUSTOMERPROFILEID => {:type => ::Thrift::Types::I64, :name => 'customerProfileId', :optional => true},
312
+ REFERRALPROOF => {:type => ::Thrift::Types::STRING, :name => 'referralProof', :optional => true},
313
+ EDUCATIONALDISCOUNT => {:type => ::Thrift::Types::BOOL, :name => 'educationalDiscount', :optional => true}
304
314
  }
305
315
 
306
316
  def struct_fields; FIELDS; end
@@ -308,6 +318,7 @@ module Evernote
308
318
  def validate
309
319
  end
310
320
 
321
+ ::Thrift::Struct.generate_accessors self
311
322
  end
312
323
 
313
324
  # This represents the bookkeeping information for the user's subscription.
@@ -328,7 +339,7 @@ module Evernote
328
339
  # the start of the new month.
329
340
  # </dd>
330
341
  # <dt>uploadLimitNextMonth</dt>
331
- # <dd> When uploadLimitEnd is research the service
342
+ # <dd> When uploadLimitEnd is reached, the service
332
343
  # will change uploadLimit to uploadLimitNextMonth. If a premium account is
333
344
  # canceled, this mechanism will reset the quota appropriately.
334
345
  # </dd>
@@ -381,7 +392,7 @@ module Evernote
381
392
  # </dd>
382
393
  # </dl>
383
394
  class Accounting
384
- include ::Thrift::Struct
395
+ include ::Thrift::Struct, ::Thrift::Struct_Union
385
396
  UPLOADLIMIT = 1
386
397
  UPLOADLIMITEND = 2
387
398
  UPLOADLIMITNEXTMONTH = 3
@@ -399,7 +410,6 @@ module Evernote
399
410
  PREMIUMSUBSCRIPTIONNUMBER = 16
400
411
  LASTREQUESTEDCHARGE = 17
401
412
 
402
- ::Thrift::Struct.field_accessor self, :uploadLimit, :uploadLimitEnd, :uploadLimitNextMonth, :premiumServiceStatus, :premiumOrderNumber, :premiumCommerceService, :premiumServiceStart, :premiumServiceSKU, :lastSuccessfulCharge, :lastFailedCharge, :lastFailedChargeReason, :nextPaymentDue, :premiumLockUntil, :updated, :premiumSubscriptionNumber, :lastRequestedCharge
403
413
  FIELDS = {
404
414
  UPLOADLIMIT => {:type => ::Thrift::Types::I64, :name => 'uploadLimit', :optional => true},
405
415
  UPLOADLIMITEND => {:type => ::Thrift::Types::I64, :name => 'uploadLimitEnd', :optional => true},
@@ -427,6 +437,7 @@ module Evernote
427
437
  end
428
438
  end
429
439
 
440
+ ::Thrift::Struct.generate_accessors self
430
441
  end
431
442
 
432
443
  # This represents the information about a single user account.
@@ -522,7 +533,7 @@ module Evernote
522
533
  # </dd>
523
534
  # </dl>
524
535
  class User
525
- include ::Thrift::Struct
536
+ include ::Thrift::Struct, ::Thrift::Struct_Union
526
537
  ID = 1
527
538
  USERNAME = 2
528
539
  EMAIL = 3
@@ -537,7 +548,6 @@ module Evernote
537
548
  ATTRIBUTES = 15
538
549
  ACCOUNTING = 16
539
550
 
540
- ::Thrift::Struct.field_accessor self, :id, :username, :email, :name, :timezone, :privilege, :created, :updated, :deleted, :active, :shardId, :attributes, :accounting
541
551
  FIELDS = {
542
552
  ID => {:type => ::Thrift::Types::I32, :name => 'id', :optional => true},
543
553
  USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
@@ -562,6 +572,7 @@ module Evernote
562
572
  end
563
573
  end
564
574
 
575
+ ::Thrift::Struct.generate_accessors self
565
576
  end
566
577
 
567
578
  # A tag within a user's account is a unique name which may be organized
@@ -609,13 +620,12 @@ module Evernote
609
620
  # </dd>
610
621
  # </dl>
611
622
  class Tag
612
- include ::Thrift::Struct
623
+ include ::Thrift::Struct, ::Thrift::Struct_Union
613
624
  GUID = 1
614
625
  NAME = 2
615
626
  PARENTGUID = 3
616
627
  UPDATESEQUENCENUM = 4
617
628
 
618
- ::Thrift::Struct.field_accessor self, :guid, :name, :parentGuid, :updateSequenceNum
619
629
  FIELDS = {
620
630
  GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
621
631
  NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
@@ -628,6 +638,7 @@ module Evernote
628
638
  def validate
629
639
  end
630
640
 
641
+ ::Thrift::Struct.generate_accessors self
631
642
  end
632
643
 
633
644
  # Structure holding the optional attributes of a Resource
@@ -693,7 +704,7 @@ module Evernote
693
704
  # </dd>
694
705
  # </dl>
695
706
  class ResourceAttributes
696
- include ::Thrift::Struct
707
+ include ::Thrift::Struct, ::Thrift::Struct_Union
697
708
  SOURCEURL = 1
698
709
  TIMESTAMP = 2
699
710
  LATITUDE = 3
@@ -706,7 +717,6 @@ module Evernote
706
717
  FILENAME = 10
707
718
  ATTACHMENT = 11
708
719
 
709
- ::Thrift::Struct.field_accessor self, :sourceURL, :timestamp, :latitude, :longitude, :altitude, :cameraMake, :cameraModel, :clientWillIndex, :recoType, :fileName, :attachment
710
720
  FIELDS = {
711
721
  SOURCEURL => {:type => ::Thrift::Types::STRING, :name => 'sourceURL', :optional => true},
712
722
  TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true},
@@ -726,6 +736,7 @@ module Evernote
726
736
  def validate
727
737
  end
728
738
 
739
+ ::Thrift::Struct.generate_accessors self
729
740
  end
730
741
 
731
742
  # Every media file that is embedded or attached to a note is represented
@@ -753,7 +764,8 @@ module Evernote
753
764
  #
754
765
  # <dt>data</dt>
755
766
  # <dd>The contents of the resource.
756
- # Maximum length: The data.body is limited to 25 MB (26214400 bytes)
767
+ # Maximum length: The data.body is limited to EDAM_RESOURCE_SIZE_MAX_FREE
768
+ # for free accounts and EDAM_RESOURCE_SIZE_MAX_PREMIUM for premium accounts.
757
769
  # </dd>
758
770
  #
759
771
  # <dt>mime</dt>
@@ -806,7 +818,7 @@ module Evernote
806
818
  # this field will be unset.</dd>
807
819
  # </dl>
808
820
  class Resource
809
- include ::Thrift::Struct
821
+ include ::Thrift::Struct, ::Thrift::Struct_Union
810
822
  GUID = 1
811
823
  NOTEGUID = 2
812
824
  DATA = 3
@@ -820,7 +832,6 @@ module Evernote
820
832
  UPDATESEQUENCENUM = 12
821
833
  ALTERNATEDATA = 13
822
834
 
823
- ::Thrift::Struct.field_accessor self, :guid, :noteGuid, :data, :mime, :width, :height, :duration, :active, :recognition, :attributes, :updateSequenceNum, :alternateData
824
835
  FIELDS = {
825
836
  GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
826
837
  NOTEGUID => {:type => ::Thrift::Types::STRING, :name => 'noteGuid', :optional => true},
@@ -841,6 +852,7 @@ module Evernote
841
852
  def validate
842
853
  end
843
854
 
855
+ ::Thrift::Struct.generate_accessors self
844
856
  end
845
857
 
846
858
  # The list of optional attributes that can be stored on a note.
@@ -889,7 +901,7 @@ module Evernote
889
901
  # </dd>
890
902
  # </dl>
891
903
  class NoteAttributes
892
- include ::Thrift::Struct
904
+ include ::Thrift::Struct, ::Thrift::Struct_Union
893
905
  SUBJECTDATE = 1
894
906
  LATITUDE = 10
895
907
  LONGITUDE = 11
@@ -899,7 +911,6 @@ module Evernote
899
911
  SOURCEURL = 15
900
912
  SOURCEAPPLICATION = 16
901
913
 
902
- ::Thrift::Struct.field_accessor self, :subjectDate, :latitude, :longitude, :altitude, :author, :source, :sourceURL, :sourceApplication
903
914
  FIELDS = {
904
915
  SUBJECTDATE => {:type => ::Thrift::Types::I64, :name => 'subjectDate', :optional => true},
905
916
  LATITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'latitude', :optional => true},
@@ -916,6 +927,7 @@ module Evernote
916
927
  def validate
917
928
  end
918
929
 
930
+ ::Thrift::Struct.generate_accessors self
919
931
  end
920
932
 
921
933
  # Represents a single note in the user's account.
@@ -1046,7 +1058,7 @@ module Evernote
1046
1058
  # </dd>
1047
1059
  # </dl>
1048
1060
  class Note
1049
- include ::Thrift::Struct
1061
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1050
1062
  GUID = 1
1051
1063
  TITLE = 2
1052
1064
  CONTENT = 3
@@ -1063,12 +1075,11 @@ module Evernote
1063
1075
  ATTRIBUTES = 14
1064
1076
  TAGNAMES = 15
1065
1077
 
1066
- ::Thrift::Struct.field_accessor self, :guid, :title, :content, :contentHash, :contentLength, :created, :updated, :deleted, :active, :updateSequenceNum, :notebookGuid, :tagGuids, :resources, :attributes, :tagNames
1067
1078
  FIELDS = {
1068
1079
  GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1069
1080
  TITLE => {:type => ::Thrift::Types::STRING, :name => 'title', :optional => true},
1070
1081
  CONTENT => {:type => ::Thrift::Types::STRING, :name => 'content', :optional => true},
1071
- CONTENTHASH => {:type => ::Thrift::Types::STRING, :name => 'contentHash', :optional => true},
1082
+ CONTENTHASH => {:type => ::Thrift::Types::STRING, :name => 'contentHash', :binary => true, :optional => true},
1072
1083
  CONTENTLENGTH => {:type => ::Thrift::Types::I32, :name => 'contentLength', :optional => true},
1073
1084
  CREATED => {:type => ::Thrift::Types::I64, :name => 'created', :optional => true},
1074
1085
  UPDATED => {:type => ::Thrift::Types::I64, :name => 'updated', :optional => true},
@@ -1087,6 +1098,7 @@ module Evernote
1087
1098
  def validate
1088
1099
  end
1089
1100
 
1101
+ ::Thrift::Struct.generate_accessors self
1090
1102
  end
1091
1103
 
1092
1104
  # If a Notebook has been opened to the public, the Notebook will have a
@@ -1128,13 +1140,12 @@ module Evernote
1128
1140
  # </dd>
1129
1141
  # </dl>
1130
1142
  class Publishing
1131
- include ::Thrift::Struct
1143
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1132
1144
  URI = 1
1133
1145
  ORDER = 2
1134
1146
  ASCENDING = 3
1135
1147
  PUBLICDESCRIPTION = 4
1136
1148
 
1137
- ::Thrift::Struct.field_accessor self, :uri, :order, :ascending, :publicDescription
1138
1149
  FIELDS = {
1139
1150
  URI => {:type => ::Thrift::Types::STRING, :name => 'uri', :optional => true},
1140
1151
  ORDER => {:type => ::Thrift::Types::I32, :name => 'order', :optional => true, :enum_class => Evernote::EDAM::Type::NoteSortOrder},
@@ -1150,6 +1161,7 @@ module Evernote
1150
1161
  end
1151
1162
  end
1152
1163
 
1164
+ ::Thrift::Struct.generate_accessors self
1153
1165
  end
1154
1166
 
1155
1167
  # A unique container for a set of notes.
@@ -1225,9 +1237,24 @@ module Evernote
1225
1237
  # Clients that do not wish to change the publishing behavior of a Notebook
1226
1238
  # should not set this value when calling NoteStore.updateNotebook().
1227
1239
  # </dd>
1240
+ #
1241
+ # <dt>stack</dt>
1242
+ # <dd>If this is set, then the notebook is visually contained within a stack
1243
+ # of notebooks with this name. All notebooks in the same account with the
1244
+ # same 'stack' field are considered to be in the same stack.
1245
+ # Notebooks with no stack set are "top level" and not contained within a
1246
+ # stack.
1247
+ # </dd>
1248
+ #
1249
+ # <dt>sharedNotebookIds</dt>
1250
+ # <dd>If this notebook has been shared with one or more individuals, then
1251
+ # this will contain the 'id' fields to identify those SharedNotebook
1252
+ # entries in the NoteStore. This field is only set by the server, and it
1253
+ # is ignored in calls to createNotebook, updateNotebook, etc.
1254
+ # </dd>
1228
1255
  # </dl>
1229
1256
  class Notebook
1230
- include ::Thrift::Struct
1257
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1231
1258
  GUID = 1
1232
1259
  NAME = 2
1233
1260
  UPDATESEQUENCENUM = 5
@@ -1236,8 +1263,9 @@ module Evernote
1236
1263
  SERVICEUPDATED = 8
1237
1264
  PUBLISHING = 10
1238
1265
  PUBLISHED = 11
1266
+ STACK = 12
1267
+ SHAREDNOTEBOOKIDS = 13
1239
1268
 
1240
- ::Thrift::Struct.field_accessor self, :guid, :name, :updateSequenceNum, :defaultNotebook, :serviceCreated, :serviceUpdated, :publishing, :published
1241
1269
  FIELDS = {
1242
1270
  GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1243
1271
  NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
@@ -1246,7 +1274,9 @@ module Evernote
1246
1274
  SERVICECREATED => {:type => ::Thrift::Types::I64, :name => 'serviceCreated', :optional => true},
1247
1275
  SERVICEUPDATED => {:type => ::Thrift::Types::I64, :name => 'serviceUpdated', :optional => true},
1248
1276
  PUBLISHING => {:type => ::Thrift::Types::STRUCT, :name => 'publishing', :class => Evernote::EDAM::Type::Publishing, :optional => true},
1249
- PUBLISHED => {:type => ::Thrift::Types::BOOL, :name => 'published', :optional => true}
1277
+ PUBLISHED => {:type => ::Thrift::Types::BOOL, :name => 'published', :optional => true},
1278
+ STACK => {:type => ::Thrift::Types::STRING, :name => 'stack', :optional => true},
1279
+ SHAREDNOTEBOOKIDS => {:type => ::Thrift::Types::LIST, :name => 'sharedNotebookIds', :element => {:type => ::Thrift::Types::I64}, :optional => true}
1250
1280
  }
1251
1281
 
1252
1282
  def struct_fields; FIELDS; end
@@ -1254,6 +1284,7 @@ module Evernote
1254
1284
  def validate
1255
1285
  end
1256
1286
 
1287
+ ::Thrift::Struct.generate_accessors self
1257
1288
  end
1258
1289
 
1259
1290
  # A named search associated with the account that can be quickly re-used.
@@ -1296,14 +1327,13 @@ module Evernote
1296
1327
  # </dd>
1297
1328
  # </dl>
1298
1329
  class SavedSearch
1299
- include ::Thrift::Struct
1330
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1300
1331
  GUID = 1
1301
1332
  NAME = 2
1302
1333
  QUERY = 3
1303
1334
  FORMAT = 4
1304
1335
  UPDATESEQUENCENUM = 5
1305
1336
 
1306
- ::Thrift::Struct.field_accessor self, :guid, :name, :query, :format, :updateSequenceNum
1307
1337
  FIELDS = {
1308
1338
  GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1309
1339
  NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
@@ -1320,6 +1350,7 @@ module Evernote
1320
1350
  end
1321
1351
  end
1322
1352
 
1353
+ ::Thrift::Struct.generate_accessors self
1323
1354
  end
1324
1355
 
1325
1356
  # An advertisement that may be displayed within an Evernote client.
@@ -1381,7 +1412,7 @@ module Evernote
1381
1412
  # three times more frequently than an ad with a frequency of 1.0.</dd>
1382
1413
  # </dl>
1383
1414
  class Ad
1384
- include ::Thrift::Struct
1415
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1385
1416
  ID = 1
1386
1417
  WIDTH = 2
1387
1418
  HEIGHT = 3
@@ -1395,7 +1426,6 @@ module Evernote
1395
1426
  HTML = 11
1396
1427
  DISPLAYFREQUENCY = 12
1397
1428
 
1398
- ::Thrift::Struct.field_accessor self, :id, :width, :height, :advertiserName, :imageUrl, :destinationUrl, :displaySeconds, :score, :image, :imageMime, :html, :displayFrequency
1399
1429
  FIELDS = {
1400
1430
  ID => {:type => ::Thrift::Types::I32, :name => 'id', :optional => true},
1401
1431
  WIDTH => {:type => ::Thrift::Types::I16, :name => 'width', :optional => true},
@@ -1405,7 +1435,7 @@ module Evernote
1405
1435
  DESTINATIONURL => {:type => ::Thrift::Types::STRING, :name => 'destinationUrl', :optional => true},
1406
1436
  DISPLAYSECONDS => {:type => ::Thrift::Types::I16, :name => 'displaySeconds', :optional => true},
1407
1437
  SCORE => {:type => ::Thrift::Types::DOUBLE, :name => 'score', :optional => true},
1408
- IMAGE => {:type => ::Thrift::Types::STRING, :name => 'image', :optional => true},
1438
+ IMAGE => {:type => ::Thrift::Types::STRING, :name => 'image', :binary => true, :optional => true},
1409
1439
  IMAGEMIME => {:type => ::Thrift::Types::STRING, :name => 'imageMime', :optional => true},
1410
1440
  HTML => {:type => ::Thrift::Types::STRING, :name => 'html', :optional => true},
1411
1441
  DISPLAYFREQUENCY => {:type => ::Thrift::Types::DOUBLE, :name => 'displayFrequency', :optional => true}
@@ -1416,6 +1446,7 @@ module Evernote
1416
1446
  def validate
1417
1447
  end
1418
1448
 
1449
+ ::Thrift::Struct.generate_accessors self
1419
1450
  end
1420
1451
 
1421
1452
  # Shared notebooks represent a relationship between a notebook and a single
@@ -1425,17 +1456,17 @@ module Evernote
1425
1456
  # <dd>the primary identifier of the share</dd>
1426
1457
  #
1427
1458
  # <dt>userId</dt>
1428
- # <dd>The user id of the owner of the notebook</dd>
1459
+ # <dd>the user id of the owner of the notebook</dd>
1429
1460
  #
1430
1461
  # <dt>notebookGuid</dt>
1431
- # <dd>the GUID of the notebooks that's being shared.</dd>
1462
+ # <dd>the GUID of the associated notebook shared.</dd>
1432
1463
  #
1433
1464
  # <dt>email</dt>
1434
1465
  # <dd>the email address of the recipient - used by the notebook
1435
1466
  # owner to identify who they shared with.</dd>
1436
1467
  #
1437
1468
  # <dt>notebookModifiable</dt>
1438
- # <dd>a flag indicating the a share is read/write -otherwise it's read only</dd>
1469
+ # <dd>a flag indicating the share is read/write -otherwise it's read only</dd>
1439
1470
  #
1440
1471
  # <dt>requireLogin</dt>
1441
1472
  # <dd>indicates that a user must login to access the share</dd>
@@ -1449,7 +1480,7 @@ module Evernote
1449
1480
  # Once it's assigned it cannot be changed.</dd>
1450
1481
  # </dl>
1451
1482
  class SharedNotebook
1452
- include ::Thrift::Struct
1483
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1453
1484
  ID = 1
1454
1485
  USERID = 2
1455
1486
  NOTEBOOKGUID = 3
@@ -1460,7 +1491,6 @@ module Evernote
1460
1491
  SHAREKEY = 8
1461
1492
  USERNAME = 9
1462
1493
 
1463
- ::Thrift::Struct.field_accessor self, :id, :userId, :notebookGuid, :email, :notebookModifiable, :requireLogin, :serviceCreated, :shareKey, :username
1464
1494
  FIELDS = {
1465
1495
  ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true},
1466
1496
  USERID => {:type => ::Thrift::Types::I32, :name => 'userId', :optional => true},
@@ -1478,15 +1508,13 @@ module Evernote
1478
1508
  def validate
1479
1509
  end
1480
1510
 
1511
+ ::Thrift::Struct.generate_accessors self
1481
1512
  end
1482
1513
 
1483
1514
  # A link in an users account that refers them to a public or individual share in
1484
1515
  # another user's account.
1485
1516
  #
1486
1517
  # <dl>
1487
- # <dt>id</dt>
1488
- # <dd>the primary identify of a linked notebook only used for deleting.</dd>
1489
- #
1490
1518
  # <dt>shareName</dt>
1491
1519
  # <dd>the display name of the shared notebook.
1492
1520
  # The link owner can change this.</dd>
@@ -1502,23 +1530,42 @@ module Evernote
1502
1530
  #
1503
1531
  # <dt>uri</dt>
1504
1532
  # <dd>the identifier of the public notebook</dd>
1533
+ #
1534
+ # <dt>guid</dt>
1535
+ # <dd>The unique identifier of this linked notebook. Will be set whenever
1536
+ # a resource is retrieved from the service, but may be null when a client
1537
+ # is creating a resource.
1538
+ # <br/>
1539
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
1540
+ # <br/>
1541
+ # Regex: EDAM_GUID_REGEX
1542
+ # </dd>
1543
+ #
1544
+ # <dt>updateSequenceNum</dt>
1545
+ # <dd>A number identifying the last transaction to
1546
+ # modify the state of this object. The USN values are sequential within an
1547
+ # account, and can be used to compare the order of modifications within the
1548
+ # service.
1549
+ # </dd>
1550
+ # </dl>
1505
1551
  class LinkedNotebook
1506
- include ::Thrift::Struct
1507
- ID = 1
1552
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1508
1553
  SHARENAME = 2
1509
1554
  USERNAME = 3
1510
1555
  SHARDID = 4
1511
1556
  SHAREKEY = 5
1512
1557
  URI = 6
1558
+ GUID = 7
1559
+ UPDATESEQUENCENUM = 8
1513
1560
 
1514
- ::Thrift::Struct.field_accessor self, :id, :shareName, :username, :shardId, :shareKey, :uri
1515
1561
  FIELDS = {
1516
- ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true},
1517
1562
  SHARENAME => {:type => ::Thrift::Types::STRING, :name => 'shareName', :optional => true},
1518
1563
  USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
1519
1564
  SHARDID => {:type => ::Thrift::Types::STRING, :name => 'shardId', :optional => true},
1520
1565
  SHAREKEY => {:type => ::Thrift::Types::STRING, :name => 'shareKey', :optional => true},
1521
- URI => {:type => ::Thrift::Types::STRING, :name => 'uri', :optional => true}
1566
+ URI => {:type => ::Thrift::Types::STRING, :name => 'uri', :optional => true},
1567
+ GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1568
+ UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true}
1522
1569
  }
1523
1570
 
1524
1571
  def struct_fields; FIELDS; end
@@ -1526,6 +1573,7 @@ module Evernote
1526
1573
  def validate
1527
1574
  end
1528
1575
 
1576
+ ::Thrift::Struct.generate_accessors self
1529
1577
  end
1530
1578
 
1531
1579
  end