evernote-thrift 1.23.0 → 1.23.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,25 +1,26 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.8.0)
2
+ # Autogenerated by Thrift Compiler (0.9.0)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
6
6
 
7
+ require 'thrift'
7
8
  require 'types_types'
8
9
 
9
- module Evernote
10
- module EDAM
11
- module Type
12
- CLASSIFICATION_RECIPE_USER_NON_RECIPE = %q"000"
10
+ module Evernote
11
+ module EDAM
12
+ module Type
13
+ CLASSIFICATION_RECIPE_USER_NON_RECIPE = %q"000"
13
14
 
14
- CLASSIFICATION_RECIPE_USER_RECIPE = %q"001"
15
+ CLASSIFICATION_RECIPE_USER_RECIPE = %q"001"
15
16
 
16
- CLASSIFICATION_RECIPE_SERVICE_RECIPE = %q"002"
17
+ CLASSIFICATION_RECIPE_SERVICE_RECIPE = %q"002"
17
18
 
18
- EDAM_NOTE_SOURCE_WEB_CLIP = %q"web.clip"
19
+ EDAM_NOTE_SOURCE_WEB_CLIP = %q"web.clip"
19
20
 
20
- EDAM_NOTE_SOURCE_MAIL_CLIP = %q"mail.clip"
21
+ EDAM_NOTE_SOURCE_MAIL_CLIP = %q"mail.clip"
21
22
 
22
- EDAM_NOTE_SOURCE_MAIL_SMTP_GATEWAY = %q"mail.smtp"
23
+ EDAM_NOTE_SOURCE_MAIL_SMTP_GATEWAY = %q"mail.smtp"
23
24
 
24
25
  end
25
26
  end
@@ -1,2181 +1,2211 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.8.0)
2
+ # Autogenerated by Thrift Compiler (0.9.0)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
6
6
 
7
+ require 'thrift'
7
8
  require 'limits_types'
8
9
 
9
10
 
10
11
  module Evernote
11
12
  module EDAM
12
13
  module Type
13
- module PrivilegeLevel
14
- NORMAL = 1
15
- PREMIUM = 3
16
- MANAGER = 7
17
- SUPPORT = 8
18
- ADMIN = 9
19
- VALUE_MAP = {1 => "NORMAL", 3 => "PREMIUM", 7 => "MANAGER", 8 => "SUPPORT", 9 => "ADMIN"}
20
- VALID_VALUES = Set.new([NORMAL, PREMIUM, MANAGER, SUPPORT, ADMIN]).freeze
21
- end
22
-
23
- module QueryFormat
24
- USER = 1
25
- SEXP = 2
26
- VALUE_MAP = {1 => "USER", 2 => "SEXP"}
27
- VALID_VALUES = Set.new([USER, SEXP]).freeze
28
- end
29
-
30
- module NoteSortOrder
31
- CREATED = 1
32
- UPDATED = 2
33
- RELEVANCE = 3
34
- UPDATE_SEQUENCE_NUMBER = 4
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
38
- end
39
-
40
- module PremiumOrderStatus
41
- NONE = 0
42
- PENDING = 1
43
- ACTIVE = 2
44
- FAILED = 3
45
- CANCELLATION_PENDING = 4
46
- CANCELED = 5
47
- VALUE_MAP = {0 => "NONE", 1 => "PENDING", 2 => "ACTIVE", 3 => "FAILED", 4 => "CANCELLATION_PENDING", 5 => "CANCELED"}
48
- VALID_VALUES = Set.new([NONE, PENDING, ACTIVE, FAILED, CANCELLATION_PENDING, CANCELED]).freeze
49
- end
50
-
51
- module SharedNotebookPrivilegeLevel
52
- READ_NOTEBOOK = 0
53
- MODIFY_NOTEBOOK_PLUS_ACTIVITY = 1
54
- READ_NOTEBOOK_PLUS_ACTIVITY = 2
55
- GROUP = 3
56
- FULL_ACCESS = 4
57
- BUSINESS_FULL_ACCESS = 5
58
- VALUE_MAP = {0 => "READ_NOTEBOOK", 1 => "MODIFY_NOTEBOOK_PLUS_ACTIVITY", 2 => "READ_NOTEBOOK_PLUS_ACTIVITY", 3 => "GROUP", 4 => "FULL_ACCESS", 5 => "BUSINESS_FULL_ACCESS"}
59
- VALID_VALUES = Set.new([READ_NOTEBOOK, MODIFY_NOTEBOOK_PLUS_ACTIVITY, READ_NOTEBOOK_PLUS_ACTIVITY, GROUP, FULL_ACCESS, BUSINESS_FULL_ACCESS]).freeze
60
- end
61
-
62
- module SponsoredGroupRole
63
- GROUP_MEMBER = 1
64
- GROUP_ADMIN = 2
65
- GROUP_OWNER = 3
66
- VALUE_MAP = {1 => "GROUP_MEMBER", 2 => "GROUP_ADMIN", 3 => "GROUP_OWNER"}
67
- VALID_VALUES = Set.new([GROUP_MEMBER, GROUP_ADMIN, GROUP_OWNER]).freeze
68
- end
69
-
70
- module BusinessUserRole
71
- ADMIN = 1
72
- NORMAL = 2
73
- VALUE_MAP = {1 => "ADMIN", 2 => "NORMAL"}
74
- VALID_VALUES = Set.new([ADMIN, NORMAL]).freeze
75
- end
76
-
77
- module SharedNotebookInstanceRestrictions
78
- ONLY_JOINED_OR_PREVIEW = 1
79
- NO_SHARED_NOTEBOOKS = 2
80
- VALUE_MAP = {1 => "ONLY_JOINED_OR_PREVIEW", 2 => "NO_SHARED_NOTEBOOKS"}
81
- VALID_VALUES = Set.new([ONLY_JOINED_OR_PREVIEW, NO_SHARED_NOTEBOOKS]).freeze
82
- end
83
-
84
- # In several places, EDAM exchanges blocks of bytes of data for a component
85
- # which may be relatively large. For example: the contents of a clipped
86
- # HTML note, the bytes of an embedded image, or the recognition XML for
87
- # a large image. This structure is used in the protocol to represent
88
- # any of those large blocks of data when they are transmitted or when
89
- # they are only referenced their metadata.
90
- #
91
- # <dl>
92
- # <dt>bodyHash</dt>
93
- # <dd>This field carries a one-way hash of the contents of the
94
- # data body, in binary form. The hash function is MD5<br/>
95
- # Length: EDAM_HASH_LEN (exactly)
96
- # </dd>
97
- #
98
- # <dt>size</dt>
99
- # <dd>The length, in bytes, of the data body.
100
- # </dd>
101
- #
102
- # <dt>body</dt>
103
- # <dd>This field is set to contain the binary contents of the data
104
- # whenever the resource is being transferred. If only metadata is
105
- # being exchanged, this field will be empty. For example, a client could
106
- # notify the service about the change to an attribute for a resource
107
- # without transmitting the binary resource contents.
108
- # </dd>
109
- # </dl>
110
- class Data
111
- include ::Thrift::Struct, ::Thrift::Struct_Union
112
- BODYHASH = 1
113
- SIZE = 2
114
- BODY = 3
115
-
116
- FIELDS = {
117
- BODYHASH => {:type => ::Thrift::Types::STRING, :name => 'bodyHash', :binary => true, :optional => true},
118
- SIZE => {:type => ::Thrift::Types::I32, :name => 'size', :optional => true},
119
- BODY => {:type => ::Thrift::Types::STRING, :name => 'body', :binary => true, :optional => true}
120
- }
121
-
122
- def struct_fields; FIELDS; end
123
-
124
- def validate
125
- end
126
-
127
- ::Thrift::Struct.generate_accessors self
128
- end
129
-
130
- # A structure holding the optional attributes that can be stored
131
- # on a User. These are generally less critical than the core User fields.
132
- #
133
- # <dl>
134
- # <dt>defaultLocationName</dt>
135
- # <dd>the location string that should be associated
136
- # with the user in order to determine where notes are taken if not otherwise
137
- # specified.<br/>
138
- # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
139
- # </dd>
140
- #
141
- # <dt>defaultLatitude</dt>
142
- # <dd>if set, this is the latitude that should be
143
- # assigned to any notes that have no other latitude information.
144
- # </dd>
145
- #
146
- # <dt>defaultLongitude</dt>
147
- # <dd>if set, this is the longitude that should be
148
- # assigned to any notes that have no other longitude information.
149
- # </dd>
150
- #
151
- # <dt>preactivation</dt>
152
- # <dd>if set, the user account is not yet confirmed for
153
- # login. I.e. the account has been created, but we are still waiting for
154
- # the user to complete the activation step.
155
- # </dd>
156
- #
157
- # <dt>viewedPromotions</dt>
158
- # <dd>a list of promotions the user has seen.
159
- # This list may occasionally be modified by the system when promotions are
160
- # no longer available.<br/>
161
- # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
162
- # </dd>
163
- #
164
- # <dt>incomingEmailAddress</dt>
165
- # <dd>if set, this is the email address that the
166
- # user may send email to in order to add an email note directly into the
167
- # account via the SMTP email gateway. This is the part of the email
168
- # address before the '@' symbol ... our domain is not included.
169
- # If this is not set, the user may not add notes via the gateway.<br/>
170
- # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
171
- # </dd>
172
- #
173
- # <dt>recentMailedAddresses</dt>
174
- # <dd>if set, this will contain a list of email
175
- # addresses that have recently been used as recipients
176
- # of outbound emails by the user. This can be used to pre-populate a
177
- # list of possible destinations when a user wishes to send a note via
178
- # email.<br/>
179
- # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX each<br/>
180
- # Max: EDAM_USER_RECENT_MAILED_ADDRESSES_MAX entries
181
- # </dd>
182
- #
183
- # <dt>comments</dt>
184
- # <dd>Free-form text field that may hold general support
185
- # information, etc.<br/>
186
- # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
187
- # </dd>
188
- #
189
- # <dt>dateAgreedToTermsOfService</dt>
190
- # <dd>The date/time when the user agreed to
191
- # the terms of service. This can be used as the effective "start date"
192
- # for the account.
193
- # </dd>
194
- #
195
- # <dt>maxReferrals</dt>
196
- # <dd>The number of referrals that the user is permitted
197
- # to make.
198
- # </dd>
199
- #
200
- # <dt>referralCount</dt>
201
- # <dd>The number of referrals sent from this account.
202
- # </dd>
203
- #
204
- # <dt>refererCode</dt>
205
- # <dd>A code indicating where the user was sent from. AKA
206
- # promotion code
207
- # </dd>
208
- #
209
- # <dt>sentEmailDate</dt>
210
- # <dd>The most recent date when the user sent outbound
211
- # emails from the service. Used with sentEmailCount to limit the number
212
- # of emails that can be sent per day.
213
- # </dd>
214
- #
215
- # <dt>sentEmailCount</dt>
216
- # <dd>The number of emails that were sent from the user
217
- # via the service on sentEmailDate. Used to enforce a limit on the number
218
- # of emails per user per day to prevent spamming.
219
- # </dd>
220
- #
221
- # <dt>dailyEmailLimit</dt>
222
- # <dd>If set, this is the maximum number of emails that
223
- # may be sent in a given day from this account. If unset, the server will
224
- # use the configured default limit.
225
- # </dd>
226
- #
227
- # <dt>emailOptOutDate</dt>
228
- # <dd>If set, this is the date when the user asked
229
- # to be excluded from offers and promotions sent by Evernote. If not set,
230
- # then the user currently agrees to receive these messages.
231
- # </dd>
232
- #
233
- # <dt>partnerEmailOptInDate</dt>
234
- # <dd>If set, this is the date when the user asked
235
- # to be included in offers and promotions sent by Evernote's partners.
236
- # If not sent, then the user currently does not agree to receive these
237
- # emails.
238
- # </dd>
239
- #
240
- # <dt>preferredLanguage</dt>
241
- # <dd>a 2 character language codes based on:
242
- # http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt used for
243
- # localization purposes to determine what language to use for the web
244
- # interface and for other direct communication (e.g. emails).
245
- # </dd>
246
- #
247
- # <dt>preferredCountry</dt>
248
- # <dd>Preferred country code based on ISO 3166-1-alpha-2 indicating the
249
- # users preferred country</dd>
250
- #
251
- # <dt>clipFullPage</dt>
252
- # <dd>Boolean flag set to true if the user wants to clip full pages by
253
- # default when they use the web clipper without a selection.</dd>
254
- #
255
- # <dt>twitterUserName</dt>
256
- # <dd>The username of the account of someone who has chosen to enable
257
- # Twittering into Evernote. This value is subject to change, since users
258
- # may change their Twitter user name.</dd>
259
- #
260
- # <dt>twitterId</dt>
261
- # <dd>The unique identifier of the user's Twitter account if that user
262
- # has chosen to enable Twittering into Evernote.</dd>
263
- #
264
- # <dt>groupName</dt>
265
- # <dd>A name identifier used to identify a particular set of branding and
266
- # light customization.</dd>
267
- #
268
- # <dt>recognitionLanguage</dt>
269
- # <dd>a 2 character language codes based on:
270
- # http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt
271
- # If set, this is used to determine the language that should be used
272
- # when processing images and PDF files to find text.
273
- # If not set, then the 'preferredLanguage' will be used.
274
- # </dd>
275
- #
276
- # <dt>customerProfileId</dt>
277
- # <dd>a numeric identified which provides a linkage between the user record
278
- # and the direct credit card payment creditcard profile.
279
- # </dd>
280
- #
281
- # <dt>educationalInstitution</dt>
282
- # <dd>a flag indicating that the user is part of an educational institution which
283
- # makes them eligible for discounts on bulk purchases
284
- # </dd>
285
- #
286
- # <dt>businessAddress</dt>
287
- # <dd>A string recording the business address of a Sponsored Account user who has requested invoicing.
288
- # </dd>
289
- # </dl>
290
- #
291
- # <dt>hideSponsorBilling</dt>
292
- # <dd>A flag indicating whether to hide the billing information on a sponsored
293
- # account owner's settings page
294
- # </dd>
295
- # </dl>
296
- #
297
- # <dt>taxExempt</dt>
298
- # <dd>A flag indicating the user's sponsored group is exempt from sale tax
299
- # </dd>
300
- # </dl>
301
- class UserAttributes
302
- include ::Thrift::Struct, ::Thrift::Struct_Union
303
- DEFAULTLOCATIONNAME = 1
304
- DEFAULTLATITUDE = 2
305
- DEFAULTLONGITUDE = 3
306
- PREACTIVATION = 4
307
- VIEWEDPROMOTIONS = 5
308
- INCOMINGEMAILADDRESS = 6
309
- RECENTMAILEDADDRESSES = 7
310
- COMMENTS = 9
311
- DATEAGREEDTOTERMSOFSERVICE = 11
312
- MAXREFERRALS = 12
313
- REFERRALCOUNT = 13
314
- REFERERCODE = 14
315
- SENTEMAILDATE = 15
316
- SENTEMAILCOUNT = 16
317
- DAILYEMAILLIMIT = 17
318
- EMAILOPTOUTDATE = 18
319
- PARTNEREMAILOPTINDATE = 19
320
- PREFERREDLANGUAGE = 20
321
- PREFERREDCOUNTRY = 21
322
- CLIPFULLPAGE = 22
323
- TWITTERUSERNAME = 23
324
- TWITTERID = 24
325
- GROUPNAME = 25
326
- RECOGNITIONLANGUAGE = 26
327
- CUSTOMERPROFILEID = 27
328
- REFERRALPROOF = 28
329
- EDUCATIONALDISCOUNT = 29
330
- BUSINESSADDRESS = 30
331
- HIDESPONSORBILLING = 31
332
- TAXEXEMPT = 32
333
-
334
- FIELDS = {
335
- DEFAULTLOCATIONNAME => {:type => ::Thrift::Types::STRING, :name => 'defaultLocationName', :optional => true},
336
- DEFAULTLATITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'defaultLatitude', :optional => true},
337
- DEFAULTLONGITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'defaultLongitude', :optional => true},
338
- PREACTIVATION => {:type => ::Thrift::Types::BOOL, :name => 'preactivation', :optional => true},
339
- VIEWEDPROMOTIONS => {:type => ::Thrift::Types::LIST, :name => 'viewedPromotions', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
340
- INCOMINGEMAILADDRESS => {:type => ::Thrift::Types::STRING, :name => 'incomingEmailAddress', :optional => true},
341
- RECENTMAILEDADDRESSES => {:type => ::Thrift::Types::LIST, :name => 'recentMailedAddresses', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
342
- COMMENTS => {:type => ::Thrift::Types::STRING, :name => 'comments', :optional => true},
343
- DATEAGREEDTOTERMSOFSERVICE => {:type => ::Thrift::Types::I64, :name => 'dateAgreedToTermsOfService', :optional => true},
344
- MAXREFERRALS => {:type => ::Thrift::Types::I32, :name => 'maxReferrals', :optional => true},
345
- REFERRALCOUNT => {:type => ::Thrift::Types::I32, :name => 'referralCount', :optional => true},
346
- REFERERCODE => {:type => ::Thrift::Types::STRING, :name => 'refererCode', :optional => true},
347
- SENTEMAILDATE => {:type => ::Thrift::Types::I64, :name => 'sentEmailDate', :optional => true},
348
- SENTEMAILCOUNT => {:type => ::Thrift::Types::I32, :name => 'sentEmailCount', :optional => true},
349
- DAILYEMAILLIMIT => {:type => ::Thrift::Types::I32, :name => 'dailyEmailLimit', :optional => true},
350
- EMAILOPTOUTDATE => {:type => ::Thrift::Types::I64, :name => 'emailOptOutDate', :optional => true},
351
- PARTNEREMAILOPTINDATE => {:type => ::Thrift::Types::I64, :name => 'partnerEmailOptInDate', :optional => true},
352
- PREFERREDLANGUAGE => {:type => ::Thrift::Types::STRING, :name => 'preferredLanguage', :optional => true},
353
- PREFERREDCOUNTRY => {:type => ::Thrift::Types::STRING, :name => 'preferredCountry', :optional => true},
354
- CLIPFULLPAGE => {:type => ::Thrift::Types::BOOL, :name => 'clipFullPage', :optional => true},
355
- TWITTERUSERNAME => {:type => ::Thrift::Types::STRING, :name => 'twitterUserName', :optional => true},
356
- TWITTERID => {:type => ::Thrift::Types::STRING, :name => 'twitterId', :optional => true},
357
- GROUPNAME => {:type => ::Thrift::Types::STRING, :name => 'groupName', :optional => true},
358
- RECOGNITIONLANGUAGE => {:type => ::Thrift::Types::STRING, :name => 'recognitionLanguage', :optional => true},
359
- CUSTOMERPROFILEID => {:type => ::Thrift::Types::I64, :name => 'customerProfileId', :optional => true},
360
- REFERRALPROOF => {:type => ::Thrift::Types::STRING, :name => 'referralProof', :optional => true},
361
- EDUCATIONALDISCOUNT => {:type => ::Thrift::Types::BOOL, :name => 'educationalDiscount', :optional => true},
362
- BUSINESSADDRESS => {:type => ::Thrift::Types::STRING, :name => 'businessAddress', :optional => true},
363
- HIDESPONSORBILLING => {:type => ::Thrift::Types::BOOL, :name => 'hideSponsorBilling', :optional => true},
364
- TAXEXEMPT => {:type => ::Thrift::Types::BOOL, :name => 'taxExempt', :optional => true}
365
- }
366
-
367
- def struct_fields; FIELDS; end
368
-
369
- def validate
370
- end
371
-
372
- ::Thrift::Struct.generate_accessors self
373
- end
374
-
375
- # This represents the bookkeeping information for the user's subscription.
376
- #
377
- # <dl>
378
- # <dt>uploadLimit</dt>
379
- # <dd>The number of bytes that can be uploaded to the account
380
- # in the current month. For new notes that are created, this is the length
381
- # of the note content (in Unicode characters) plus the size of each resource
382
- # (in bytes). For edited notes, this is the the difference between the old
383
- # length and the new length (if this is greater than 0) plus the size of
384
- # each new resource.
385
- # </dd>
386
- # <dt>uploadLimitEnd</dt>
387
- # <dd>The date and time when the current upload limit
388
- # expires. At this time, the monthly upload count reverts to 0 and a new
389
- # limit is imposed. This date and time is exclusive, so this is effectively
390
- # the start of the new month.
391
- # </dd>
392
- # <dt>uploadLimitNextMonth</dt>
393
- # <dd> When uploadLimitEnd is reached, the service
394
- # will change uploadLimit to uploadLimitNextMonth. If a premium account is
395
- # canceled, this mechanism will reset the quota appropriately.
396
- # </dd>
397
- # <dt>premiumServiceStatus</dt>
398
- # <dd>Indicates the phases of a premium account
399
- # during the billing process.
400
- # </dd>
401
- # <dt>premiumOrderNumber</dt>
402
- # <dd>The order number used by the commerce system to
403
- # process recurring payments
404
- # </dd>
405
- # <dt>premiumServiceStart</dt>
406
- # <dd>The start date when this premium promotion
407
- # began (this number will get overwritten if a premium service is canceled
408
- # and then re-activated).
409
- # </dd>
410
- # <dt>premiumCommerceService</dt>
411
- # <dd>The commerce system used (paypal, Google
412
- # checkout, etc)
413
- # </dd>
414
- # <dt>premiumServiceSKU</dt>
415
- # <dd>The code associated with the purchase eg. monthly
416
- # or annual purchase. Clients should interpret this value and localize it.
417
- # </dd>
418
- # <dt>lastSuccessfulCharge</dt>
419
- # <dd>Date the last time the user was charged.
420
- # Null if never charged.
421
- # </dd>
422
- # <dt>lastFailedCharge</dt>
423
- # <dd>Date the last time a charge was attempted and
424
- # failed.
425
- # </dd>
426
- # <dt>lastFailedChargeReason</dt>
427
- # <dd>Reason provided for the charge failure
428
- # </dd>
429
- # <dt>nextPaymentDue</dt>
430
- # <dd>The end of the billing cycle. This could be in the
431
- # past if there are failed charges.
432
- # </dd>
433
- # <dt>premiumLockUntil</dt>
434
- # <dd>An internal variable to manage locking operations
435
- # on the commerce variables.
436
- # </dd>
437
- # <dt>updated</dt>
438
- # <dd>The date any modification where made to this record.
439
- # </dd>
440
- # <dt>premiumSubscriptionNumber</dt>
441
- # <dd>The number number identifying the
442
- # recurring subscription used to make the recurring charges.
443
- # </dd>
444
- # <dt>lastRequestedCharge</dt>
445
- # <dd>Date charge last attempted</dd>
446
- # <dt>currency</dt>
447
- # <dd>ISO 4217 currency code</dd>
448
- # <dt>unitPrice</dt>
449
- # <dd>charge in the smallest unit of the currency (e.g. cents for USD)</dd>
450
- # <dt>businessId</dt>
451
- # <dd>If set, the ID of the Evernote Business account that the user is a
452
- # member of. If not set, the user is not a member of a business.</dd>
453
- # <dt>businessName</dt>
454
- # <dd>The human-readable name of the Evernote Business account that
455
- # the user is a member of.</dd>
456
- # <dt>businessRole</dt>
457
- # <dd>If set, the role of the user within the Evernote Business account
458
- # that they are a member of.</dd>
459
- # </dl>
460
- class Accounting
461
- include ::Thrift::Struct, ::Thrift::Struct_Union
462
- UPLOADLIMIT = 1
463
- UPLOADLIMITEND = 2
464
- UPLOADLIMITNEXTMONTH = 3
465
- PREMIUMSERVICESTATUS = 4
466
- PREMIUMORDERNUMBER = 5
467
- PREMIUMCOMMERCESERVICE = 6
468
- PREMIUMSERVICESTART = 7
469
- PREMIUMSERVICESKU = 8
470
- LASTSUCCESSFULCHARGE = 9
471
- LASTFAILEDCHARGE = 10
472
- LASTFAILEDCHARGEREASON = 11
473
- NEXTPAYMENTDUE = 12
474
- PREMIUMLOCKUNTIL = 13
475
- UPDATED = 14
476
- PREMIUMSUBSCRIPTIONNUMBER = 16
477
- LASTREQUESTEDCHARGE = 17
478
- CURRENCY = 18
479
- UNITPRICE = 19
480
- BUSINESSID = 20
481
- BUSINESSNAME = 21
482
- BUSINESSROLE = 22
483
-
484
- FIELDS = {
485
- UPLOADLIMIT => {:type => ::Thrift::Types::I64, :name => 'uploadLimit', :optional => true},
486
- UPLOADLIMITEND => {:type => ::Thrift::Types::I64, :name => 'uploadLimitEnd', :optional => true},
487
- UPLOADLIMITNEXTMONTH => {:type => ::Thrift::Types::I64, :name => 'uploadLimitNextMonth', :optional => true},
488
- PREMIUMSERVICESTATUS => {:type => ::Thrift::Types::I32, :name => 'premiumServiceStatus', :optional => true, :enum_class => Evernote::EDAM::Type::PremiumOrderStatus},
489
- PREMIUMORDERNUMBER => {:type => ::Thrift::Types::STRING, :name => 'premiumOrderNumber', :optional => true},
490
- PREMIUMCOMMERCESERVICE => {:type => ::Thrift::Types::STRING, :name => 'premiumCommerceService', :optional => true},
491
- PREMIUMSERVICESTART => {:type => ::Thrift::Types::I64, :name => 'premiumServiceStart', :optional => true},
492
- PREMIUMSERVICESKU => {:type => ::Thrift::Types::STRING, :name => 'premiumServiceSKU', :optional => true},
493
- LASTSUCCESSFULCHARGE => {:type => ::Thrift::Types::I64, :name => 'lastSuccessfulCharge', :optional => true},
494
- LASTFAILEDCHARGE => {:type => ::Thrift::Types::I64, :name => 'lastFailedCharge', :optional => true},
495
- LASTFAILEDCHARGEREASON => {:type => ::Thrift::Types::STRING, :name => 'lastFailedChargeReason', :optional => true},
496
- NEXTPAYMENTDUE => {:type => ::Thrift::Types::I64, :name => 'nextPaymentDue', :optional => true},
497
- PREMIUMLOCKUNTIL => {:type => ::Thrift::Types::I64, :name => 'premiumLockUntil', :optional => true},
498
- UPDATED => {:type => ::Thrift::Types::I64, :name => 'updated', :optional => true},
499
- PREMIUMSUBSCRIPTIONNUMBER => {:type => ::Thrift::Types::STRING, :name => 'premiumSubscriptionNumber', :optional => true},
500
- LASTREQUESTEDCHARGE => {:type => ::Thrift::Types::I64, :name => 'lastRequestedCharge', :optional => true},
501
- CURRENCY => {:type => ::Thrift::Types::STRING, :name => 'currency', :optional => true},
502
- UNITPRICE => {:type => ::Thrift::Types::I32, :name => 'unitPrice', :optional => true},
503
- BUSINESSID => {:type => ::Thrift::Types::I32, :name => 'businessId', :optional => true},
504
- BUSINESSNAME => {:type => ::Thrift::Types::STRING, :name => 'businessName', :optional => true},
505
- BUSINESSROLE => {:type => ::Thrift::Types::I32, :name => 'businessRole', :optional => true, :enum_class => Evernote::EDAM::Type::BusinessUserRole}
506
- }
507
-
508
- def struct_fields; FIELDS; end
509
-
510
- def validate
511
- unless @premiumServiceStatus.nil? || Evernote::EDAM::Type::PremiumOrderStatus::VALID_VALUES.include?(@premiumServiceStatus)
512
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field premiumServiceStatus!')
513
- end
514
- unless @businessRole.nil? || Evernote::EDAM::Type::BusinessUserRole::VALID_VALUES.include?(@businessRole)
515
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field businessRole!')
516
- end
517
- end
518
-
519
- ::Thrift::Struct.generate_accessors self
520
- end
521
-
522
- # This structure is used to provide information about a user's Premium account.
523
- # <dl>
524
- # <dt>currentTime</dt>
525
- # <dd>
526
- # The server-side date and time when this data was generated.
527
- # </dd>
528
- # <dt>premium</dt>
529
- # <dd>
530
- # True if the user's account is Premium.
531
- # </dd>
532
- # <dt>premiumRecurring</dt>
533
- # <dd>
534
- # True if the user's account is Premium and has a recurring payment method.
535
- # </dd>
536
- # <dt>premiumExpirationDate</dt>
537
- # <dd>
538
- # The date when the user's Premium account expires, or the date when the
539
- # user's account will be charged if it has a recurring payment method.
540
- # </dd>
541
- # <dt>premiumExtendable</dt>
542
- # <dd>
543
- # True if the user is eligible for purchasing Premium account extensions.
544
- # </dd>
545
- # <dt>premiumPending</dt>
546
- # <dd>
547
- # True if the user's Premium account is pending payment confirmation
548
- # </dd>
549
- # <dt>premiumCancellationPending</dt>
550
- # <dd>
551
- # True if the user has requested that no further charges to be made; the
552
- # Premium account will remain active until it expires.
553
- # </dd>
554
- # <dt>canPurchaseUploadAllowance</dt>
555
- # <dd>
556
- # True if the user is eligible for purchasing additional upload allowance.
557
- # </dd>
558
- # <dt>sponsoredGroupName</dt>
559
- # <dd>
560
- # The name of the sponsored group that the user is part of.
561
- # </dd>
562
- # <dt>sponsoredGroupRole</dt>
563
- # <dd>
564
- # DEPRECATED - will be removed in a future update.
565
- # </dd>
566
- # </dl>
567
- class PremiumInfo
568
- include ::Thrift::Struct, ::Thrift::Struct_Union
569
- CURRENTTIME = 1
570
- PREMIUM = 2
571
- PREMIUMRECURRING = 3
572
- PREMIUMEXPIRATIONDATE = 4
573
- PREMIUMEXTENDABLE = 5
574
- PREMIUMPENDING = 6
575
- PREMIUMCANCELLATIONPENDING = 7
576
- CANPURCHASEUPLOADALLOWANCE = 8
577
- SPONSOREDGROUPNAME = 9
578
- SPONSOREDGROUPROLE = 10
579
-
580
- FIELDS = {
581
- CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'},
582
- PREMIUM => {:type => ::Thrift::Types::BOOL, :name => 'premium'},
583
- PREMIUMRECURRING => {:type => ::Thrift::Types::BOOL, :name => 'premiumRecurring'},
584
- PREMIUMEXPIRATIONDATE => {:type => ::Thrift::Types::I64, :name => 'premiumExpirationDate', :optional => true},
585
- PREMIUMEXTENDABLE => {:type => ::Thrift::Types::BOOL, :name => 'premiumExtendable'},
586
- PREMIUMPENDING => {:type => ::Thrift::Types::BOOL, :name => 'premiumPending'},
587
- PREMIUMCANCELLATIONPENDING => {:type => ::Thrift::Types::BOOL, :name => 'premiumCancellationPending'},
588
- CANPURCHASEUPLOADALLOWANCE => {:type => ::Thrift::Types::BOOL, :name => 'canPurchaseUploadAllowance'},
589
- SPONSOREDGROUPNAME => {:type => ::Thrift::Types::STRING, :name => 'sponsoredGroupName', :optional => true},
590
- SPONSOREDGROUPROLE => {:type => ::Thrift::Types::I32, :name => 'sponsoredGroupRole', :optional => true, :enum_class => Evernote::EDAM::Type::SponsoredGroupRole}
591
- }
592
-
593
- def struct_fields; FIELDS; end
594
-
595
- def validate
596
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field currentTime is unset!') unless @currentTime
597
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premium is unset!') if @premium.nil?
598
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumRecurring is unset!') if @premiumRecurring.nil?
599
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumExtendable is unset!') if @premiumExtendable.nil?
600
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumPending is unset!') if @premiumPending.nil?
601
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumCancellationPending is unset!') if @premiumCancellationPending.nil?
602
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field canPurchaseUploadAllowance is unset!') if @canPurchaseUploadAllowance.nil?
603
- unless @sponsoredGroupRole.nil? || Evernote::EDAM::Type::SponsoredGroupRole::VALID_VALUES.include?(@sponsoredGroupRole)
604
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field sponsoredGroupRole!')
605
- end
606
- end
607
-
608
- ::Thrift::Struct.generate_accessors self
609
- end
610
-
611
- # This represents the information about a single user account.
612
- # <dl>
613
- # <dt>id</dt>
614
- # <dd>The unique numeric identifier for the account, which will not
615
- # change for the lifetime of the account.
616
- # </dd>
617
- #
618
- # <dt>username</dt>
619
- # <dd>The name that uniquely identifies a single user account. This name
620
- # may be presented by the user, along with their password, to log into
621
- # their account.
622
- # May only contain a-z, 0-9, or '-', and may not start or end with the '-'
623
- # <br/>
624
- # Length: EDAM_USER_USERNAME_LEN_MIN - EDAM_USER_USERNAME_LEN_MAX
625
- # <br/>
626
- # Regex: EDAM_USER_USERNAME_REGEX
627
- # </dd>
628
- #
629
- # <dt>email</dt>
630
- # <dd>The email address registered for the user. Must comply with
631
- # RFC 2821 and RFC 2822.<br/>
632
- # For privacy reasons, this field may not be populated when a User
633
- # is retrieved via a call to UserStore.getUser().
634
- # Length: EDAM_EMAIL_LEN_MIN - EDAM_EMAIL_LEN_MAX
635
- # <br/>
636
- # Regex: EDAM_EMAIL_REGEX
637
- # </dd>
638
- #
639
- # <dt>name</dt>
640
- # <dd>The printable name of the user, which may be a combination
641
- # of given and family names. This is used instead of separate "first"
642
- # and "last" names due to variations in international name format/order.
643
- # May not start or end with a whitespace character. May contain any
644
- # character but carriage return or newline (Unicode classes Zl and Zp).
645
- # <br/>
646
- # Length: EDAM_USER_NAME_LEN_MIN - EDAM_USER_NAME_LEN_MAX
647
- # <br/>
648
- # Regex: EDAM_USER_NAME_REGEX
649
- # </dd>
650
- #
651
- # <dt>timezone</dt>
652
- # <dd>The zone ID for the user's default location. If present,
653
- # this may be used to localize the display of any timestamp for which no
654
- # other timezone is available.
655
- # The format must be encoded as a standard zone ID such as
656
- # "America/Los_Angeles" or "GMT+08:00"
657
- # <br/>
658
- # Length: EDAM_TIMEZONE_LEN_MIN - EDAM_TIMEZONE_LEN_MAX
659
- # <br/>
660
- # Regex: EDAM_TIMEZONE_REGEX
661
- # </dd>
662
- #
663
- # <dt>privilege</dt>
664
- # <dd>The level of access permitted for the user.
665
- # </dd>
666
- #
667
- # <dt>created</dt>
668
- # <dd>The date and time when this user account was created in the
669
- # service.
670
- # </dd>
671
- #
672
- # <dt>updated</dt>
673
- # <dd>The date and time when this user account was last modified
674
- # in the service.
675
- # </dd>
676
- #
677
- # <dt>deleted</dt>
678
- # <dd>If the account has been deleted from the system (e.g. as
679
- # the result of a legal request by the user), the date and time of the
680
- # deletion will be represented here. If not, this value will not be set.
681
- # </dd>
682
- #
683
- # <dt>active</dt>
684
- # <dd>If the user account is available for login and
685
- # synchronization, this flag will be set to true.
686
- # </dd>
687
- #
688
- # <dt>shardId</dt>
689
- # <dd>DEPRECATED - Client applications should have no need to use this field.
690
- # </dd>
691
- #
692
- # <dt>attributes</dt>
693
- # <dd>If present, this will contain a list of the attributes
694
- # for this user account.
695
- # </dd>
696
- #
697
- # <dt>accounting</dt>
698
- # <dd>Bookkeeping information for the user's subscription.
699
- # </dd>
700
- #
701
- # <dt>premiumInfo</dt>
702
- # <dd>If present, this will contain a set of commerce information
703
- # relating to the user's premium service level.
704
- # </dd>
705
- # </dl>
706
- class User
707
- include ::Thrift::Struct, ::Thrift::Struct_Union
708
- ID = 1
709
- USERNAME = 2
710
- EMAIL = 3
711
- NAME = 4
712
- TIMEZONE = 6
713
- PRIVILEGE = 7
714
- CREATED = 9
715
- UPDATED = 10
716
- DELETED = 11
717
- ACTIVE = 13
718
- SHARDID = 14
719
- ATTRIBUTES = 15
720
- ACCOUNTING = 16
721
- PREMIUMINFO = 17
722
-
723
- FIELDS = {
724
- ID => {:type => ::Thrift::Types::I32, :name => 'id', :optional => true},
725
- USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
726
- EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email', :optional => true},
727
- NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
728
- TIMEZONE => {:type => ::Thrift::Types::STRING, :name => 'timezone', :optional => true},
729
- PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => Evernote::EDAM::Type::PrivilegeLevel},
730
- CREATED => {:type => ::Thrift::Types::I64, :name => 'created', :optional => true},
731
- UPDATED => {:type => ::Thrift::Types::I64, :name => 'updated', :optional => true},
732
- DELETED => {:type => ::Thrift::Types::I64, :name => 'deleted', :optional => true},
733
- ACTIVE => {:type => ::Thrift::Types::BOOL, :name => 'active', :optional => true},
734
- SHARDID => {:type => ::Thrift::Types::STRING, :name => 'shardId', :optional => true},
735
- ATTRIBUTES => {:type => ::Thrift::Types::STRUCT, :name => 'attributes', :class => Evernote::EDAM::Type::UserAttributes, :optional => true},
736
- ACCOUNTING => {:type => ::Thrift::Types::STRUCT, :name => 'accounting', :class => Evernote::EDAM::Type::Accounting, :optional => true},
737
- PREMIUMINFO => {:type => ::Thrift::Types::STRUCT, :name => 'premiumInfo', :class => Evernote::EDAM::Type::PremiumInfo, :optional => true}
738
- }
739
-
740
- def struct_fields; FIELDS; end
741
-
742
- def validate
743
- unless @privilege.nil? || Evernote::EDAM::Type::PrivilegeLevel::VALID_VALUES.include?(@privilege)
744
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field privilege!')
745
- end
746
- end
747
-
748
- ::Thrift::Struct.generate_accessors self
749
- end
750
-
751
- # A tag within a user's account is a unique name which may be organized
752
- # a simple hierarchy.
753
- # <dl>
754
- # <dt>guid</dt>
755
- # <dd>The unique identifier of this tag. Will be set by the service,
756
- # so may be omitted by the client when creating the Tag.
757
- # <br/>
758
- # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
759
- # <br/>
760
- # Regex: EDAM_GUID_REGEX
761
- # </dd>
762
- #
763
- # <dt>name</dt>
764
- # <dd>A sequence of characters representing the tag's identifier.
765
- # Case is preserved, but is ignored for comparisons.
766
- # This means that an account may only have one tag with a given name, via
767
- # case-insensitive comparison, so an account may not have both "food" and
768
- # "Food" tags.
769
- # May not contain a comma (','), and may not begin or end with a space.
770
- # <br/>
771
- # Length: EDAM_TAG_NAME_LEN_MIN - EDAM_TAG_NAME_LEN_MAX
772
- # <br/>
773
- # Regex: EDAM_TAG_NAME_REGEX
774
- # </dd>
775
- #
776
- # <dt>parentGuid</dt>
777
- # <dd>If this is set, then this is the GUID of the tag that
778
- # holds this tag within the tag organizational hierarchy. If this is
779
- # not set, then the tag has no parent and it is a "top level" tag.
780
- # Cycles are not allowed (e.g. a->parent->parent == a) and will be
781
- # rejected by the service.
782
- # <br/>
783
- # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
784
- # <br/>
785
- # Regex: EDAM_GUID_REGEX
786
- # </dd>
787
- #
788
- # <dt>updateSequenceNum</dt>
789
- # <dd>A number identifying the last transaction to
790
- # modify the state of this object. The USN values are sequential within an
791
- # account, and can be used to compare the order of modifications within the
792
- # service.
793
- # </dd>
794
- # </dl>
795
- class Tag
796
- include ::Thrift::Struct, ::Thrift::Struct_Union
797
- GUID = 1
798
- NAME = 2
799
- PARENTGUID = 3
800
- UPDATESEQUENCENUM = 4
801
-
802
- FIELDS = {
803
- GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
804
- NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
805
- PARENTGUID => {:type => ::Thrift::Types::STRING, :name => 'parentGuid', :optional => true},
806
- UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true}
807
- }
808
-
809
- def struct_fields; FIELDS; end
810
-
811
- def validate
812
- end
813
-
814
- ::Thrift::Struct.generate_accessors self
815
- end
816
-
817
- # A structure that wraps a map of name/value pairs whose values are not
818
- # always present in the structure in order to reduce space when obtaining
819
- # batches of entities that contain the map.
820
- #
821
- # When the server provides the client with a LazyMap, it will fill in either
822
- # the keysOnly field or the fullMap field, but never both, based on the API
823
- # and parameters.
824
- #
825
- # When a client provides a LazyMap to the server as part of an update to
826
- # an object, the server will only update the LazyMap if the fullMap field is
827
- # set. If the fullMap field is not set, the server will not make any changes
828
- # to the map.
829
- #
830
- # Check the API documentation of the individual calls involving the LazyMap
831
- # for full details including the constraints of the names and values of the
832
- # map.
833
- #
834
- # <dl>
835
- # <dt>keysOnly</dt>
836
- # <dd>The set of keys for the map. This field is ignored by the
837
- # server when set.
838
- # </dd>
839
- #
840
- # <dt>fullMap</dt>
841
- # <dd>The complete map, including all keys and values.
842
- # </dd>
843
- # </dl>
844
- class LazyMap
845
- include ::Thrift::Struct, ::Thrift::Struct_Union
846
- KEYSONLY = 1
847
- FULLMAP = 2
848
-
849
- FIELDS = {
850
- KEYSONLY => {:type => ::Thrift::Types::SET, :name => 'keysOnly', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
851
- FULLMAP => {:type => ::Thrift::Types::MAP, :name => 'fullMap', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
852
- }
853
-
854
- def struct_fields; FIELDS; end
855
-
856
- def validate
857
- end
858
-
859
- ::Thrift::Struct.generate_accessors self
860
- end
861
-
862
- # Structure holding the optional attributes of a Resource
863
- # <dl>
864
- # <dt>sourceURL</dt>
865
- # <dd>the original location where the resource was hosted
866
- # <br/>
867
- # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
868
- # </dd>
869
- #
870
- # <dt>timestamp</dt>
871
- # <dd>the date and time that is associated with this resource
872
- # (e.g. the time embedded in an image from a digital camera with a clock)
873
- # </dd>
874
- #
875
- # <dt>latitude</dt>
876
- # <dd>the latitude where the resource was captured
877
- # </dd>
878
- #
879
- # <dt>longitude</dt>
880
- # <dd>the longitude where the resource was captured
881
- # </dd>
882
- #
883
- # <dt>altitude</dt>
884
- # <dd>the altitude where the resource was captured
885
- # </dd>
886
- #
887
- # <dt>cameraMake</dt>
888
- # <dd>information about an image's camera, e.g. as embedded in
889
- # the image's EXIF data
890
- # <br/>
891
- # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
892
- # </dd>
893
- #
894
- # <dt>cameraModel</dt>
895
- # <dd>information about an image's camera, e.g. as embedded
896
- # in the image's EXIF data
897
- # <br/>
898
- # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
899
- # </dd>
900
- #
901
- # <dt>clientWillIndex</dt>
902
- # <dd>if true, then the original client that submitted
903
- # the resource plans to submit the recognition index for this resource at a
904
- # later time.
905
- # </dd>
906
- #
907
- # <dt>recoType</dt>
908
- # <dd>DEPRECATED - this field is no longer set by the service, so should
909
- # be ignored.
910
- # </dd>
911
- #
912
- # <dt>fileName</dt>
913
- # <dd>if the resource came from a source that provided an
914
- # explicit file name, the original name will be stored here. Many resources
915
- # come from unnamed sources, so this will not always be set.
916
- # </dd>
917
- #
918
- # <dt>attachment</dt>
919
- # <dd>this will be true if the resource should be displayed as an attachment,
920
- # or false if the resource should be displayed inline (if possible).
921
- # </dd>
922
- #
923
- # <dt>applicationData</dt>
924
- # <dd>Provides a location for applications to store a relatively small
925
- # (4kb) blob of data associated with a Resource that is not visible to the user
926
- # and that is opaque to the Evernote service. A single application may use at most
927
- # one entry in this map, using its API consumer key as the map key. See the
928
- # documentation for LazyMap for a description of when the actual map values
929
- # are returned by the service.
930
- # <p>To safely add or modify your application's entry in the map, use
931
- # NoteStore.setResourceApplicationDataEntry. To safely remove your application's
932
- # entry from the map, use NoteStore.unsetResourceApplicationDataEntry.</p>
933
- # Minimum length of a name (key): EDAM_APPLICATIONDATA_NAME_LEN_MIN
934
- # <br/>
935
- # Sum max size of key and value: EDAM_APPLICATIONDATA_ENTRY_LEN_MAX
936
- # <br/>
937
- # Syntax regex for name (key): EDAM_APPLICATIONDATA_NAME_REGEX
938
- # </dd>
939
- #
940
- # </dl>
941
- class ResourceAttributes
942
- include ::Thrift::Struct, ::Thrift::Struct_Union
943
- SOURCEURL = 1
944
- TIMESTAMP = 2
945
- LATITUDE = 3
946
- LONGITUDE = 4
947
- ALTITUDE = 5
948
- CAMERAMAKE = 6
949
- CAMERAMODEL = 7
950
- CLIENTWILLINDEX = 8
951
- RECOTYPE = 9
952
- FILENAME = 10
953
- ATTACHMENT = 11
954
- APPLICATIONDATA = 12
955
-
956
- FIELDS = {
957
- SOURCEURL => {:type => ::Thrift::Types::STRING, :name => 'sourceURL', :optional => true},
958
- TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true},
959
- LATITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'latitude', :optional => true},
960
- LONGITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'longitude', :optional => true},
961
- ALTITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'altitude', :optional => true},
962
- CAMERAMAKE => {:type => ::Thrift::Types::STRING, :name => 'cameraMake', :optional => true},
963
- CAMERAMODEL => {:type => ::Thrift::Types::STRING, :name => 'cameraModel', :optional => true},
964
- CLIENTWILLINDEX => {:type => ::Thrift::Types::BOOL, :name => 'clientWillIndex', :optional => true},
965
- RECOTYPE => {:type => ::Thrift::Types::STRING, :name => 'recoType', :optional => true},
966
- FILENAME => {:type => ::Thrift::Types::STRING, :name => 'fileName', :optional => true},
967
- ATTACHMENT => {:type => ::Thrift::Types::BOOL, :name => 'attachment', :optional => true},
968
- APPLICATIONDATA => {:type => ::Thrift::Types::STRUCT, :name => 'applicationData', :class => Evernote::EDAM::Type::LazyMap, :optional => true}
969
- }
970
-
971
- def struct_fields; FIELDS; end
972
-
973
- def validate
974
- end
975
-
976
- ::Thrift::Struct.generate_accessors self
977
- end
978
-
979
- # Every media file that is embedded or attached to a note is represented
980
- # through a Resource entry.
981
- # <dl>
982
- # <dt>guid</dt>
983
- # <dd>The unique identifier of this resource. Will be set whenever
984
- # a resource is retrieved from the service, but may be null when a client
985
- # is creating a resource.
986
- # <br/>
987
- # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
988
- # <br/>
989
- # Regex: EDAM_GUID_REGEX
990
- # </dd>
991
- #
992
- # <dt>noteGuid</dt>
993
- # <dd>The unique identifier of the Note that holds this
994
- # Resource. Will be set whenever the resource is retrieved from the service,
995
- # but may be null when a client is creating a resource.
996
- # <br/>
997
- # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
998
- # <br/>
999
- # Regex: EDAM_GUID_REGEX
1000
- # </dd>
1001
- #
1002
- # <dt>data</dt>
1003
- # <dd>The contents of the resource.
1004
- # Maximum length: The data.body is limited to EDAM_RESOURCE_SIZE_MAX_FREE
1005
- # for free accounts and EDAM_RESOURCE_SIZE_MAX_PREMIUM for premium accounts.
1006
- # </dd>
1007
- #
1008
- # <dt>mime</dt>
1009
- # <dd>The MIME type for the embedded resource. E.g. "image/gif"
1010
- # <br/>
1011
- # Length: EDAM_MIME_LEN_MIN - EDAM_MIME_LEN_MAX
1012
- # <br/>
1013
- # Regex: EDAM_MIME_REGEX
1014
- # </dd>
1015
- #
1016
- # <dt>width</dt>
1017
- # <dd>If set, this contains the display width of this resource, in
1018
- # pixels.
1019
- # </dd>
1020
- #
1021
- # <dt>height</dt>
1022
- # <dd>If set, this contains the display height of this resource,
1023
- # in pixels.
1024
- # </dd>
1025
- #
1026
- # <dt>duration</dt>
1027
- # <dd>DEPRECATED: ignored.
1028
- # </dd>
1029
- #
1030
- # <dt>active</dt>
1031
- # <dd>DEPRECATED: ignored.
1032
- # </dd>
1033
- #
1034
- # <dt>recognition</dt>
1035
- # <dd>If set, this will hold the encoded data that provides
1036
- # information on search and recognition within this resource.
1037
- # </dd>
1038
- #
1039
- # <dt>attributes</dt>
1040
- # <dd>A list of the attributes for this resource.
1041
- # </dd>
1042
- #
1043
- # <dt>updateSequenceNum</dt>
1044
- # <dd>A number identifying the last transaction to
1045
- # modify the state of this object. The USN values are sequential within an
1046
- # account, and can be used to compare the order of modifications within the
1047
- # service.
1048
- # </dd>
1049
- #
1050
- # <dt>alternateData</dt>
1051
- # <dd>Some Resources may be assigned an alternate data format by the service
1052
- # which may be more appropriate for indexing or rendering than the original
1053
- # data provided by the user. In these cases, the alternate data form will
1054
- # be available via this Data element. If a Resource has no alternate form,
1055
- # this field will be unset.</dd>
1056
- # </dl>
1057
- class Resource
1058
- include ::Thrift::Struct, ::Thrift::Struct_Union
1059
- GUID = 1
1060
- NOTEGUID = 2
1061
- DATA = 3
1062
- MIME = 4
1063
- WIDTH = 5
1064
- HEIGHT = 6
1065
- DURATION = 7
1066
- ACTIVE = 8
1067
- RECOGNITION = 9
1068
- ATTRIBUTES = 11
1069
- UPDATESEQUENCENUM = 12
1070
- ALTERNATEDATA = 13
1071
-
1072
- FIELDS = {
1073
- GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1074
- NOTEGUID => {:type => ::Thrift::Types::STRING, :name => 'noteGuid', :optional => true},
1075
- DATA => {:type => ::Thrift::Types::STRUCT, :name => 'data', :class => Evernote::EDAM::Type::Data, :optional => true},
1076
- MIME => {:type => ::Thrift::Types::STRING, :name => 'mime', :optional => true},
1077
- WIDTH => {:type => ::Thrift::Types::I16, :name => 'width', :optional => true},
1078
- HEIGHT => {:type => ::Thrift::Types::I16, :name => 'height', :optional => true},
1079
- DURATION => {:type => ::Thrift::Types::I16, :name => 'duration', :optional => true},
1080
- ACTIVE => {:type => ::Thrift::Types::BOOL, :name => 'active', :optional => true},
1081
- RECOGNITION => {:type => ::Thrift::Types::STRUCT, :name => 'recognition', :class => Evernote::EDAM::Type::Data, :optional => true},
1082
- ATTRIBUTES => {:type => ::Thrift::Types::STRUCT, :name => 'attributes', :class => Evernote::EDAM::Type::ResourceAttributes, :optional => true},
1083
- UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
1084
- ALTERNATEDATA => {:type => ::Thrift::Types::STRUCT, :name => 'alternateData', :class => Evernote::EDAM::Type::Data, :optional => true}
1085
- }
1086
-
1087
- def struct_fields; FIELDS; end
1088
-
1089
- def validate
1090
- end
1091
-
1092
- ::Thrift::Struct.generate_accessors self
1093
- end
1094
-
1095
- # The list of optional attributes that can be stored on a note.
1096
- # <dl>
1097
- # <dt>subjectDate</dt>
1098
- # <dd>time that the note refers to
1099
- # </dd>
1100
- #
1101
- # <dt>latitude</dt>
1102
- # <dd>the latitude where the note was taken
1103
- # </dd>
1104
- #
1105
- # <dt>longitude</dt>
1106
- # <dd>the longitude where the note was taken
1107
- # </dd>
1108
- #
1109
- # <dt>altitude</dt>
1110
- # <dd>the altitude where the note was taken
1111
- # </dd>
1112
- #
1113
- # <dt>author</dt>
1114
- # <dd>the author of the content of the note
1115
- # <br/>
1116
- # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
1117
- # </dd>
1118
- #
1119
- # <dt>source</dt>
1120
- # <dd>the method that the note was added to the account, if the
1121
- # note wasn't directly authored in an Evernote desktop client.
1122
- # <br/>
1123
- # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
1124
- # </dd>
1125
- #
1126
- # <dt>sourceURL</dt>
1127
- # <dd>the original location where the resource was hosted. For web clips,
1128
- # this will be the URL of the page that was clipped.
1129
- # <br/>
1130
- # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
1131
- # </dd>
1132
- #
1133
- # <dt>sourceApplication</dt>
1134
- # <dd>an identifying string for the application that
1135
- # created this note. This string does not have a guaranteed syntax or
1136
- # structure -- it is intended for human inspection and tracking.
1137
- # <br/>
1138
- # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
1139
- # </dd>
1140
- #
1141
- # <dt>shareDate</dt>
1142
- # <dd>The date and time when this note was directly shared via its own URL.
1143
- # This is only set on notes that were individually shared - it is independent
1144
- # of any notebook-level sharing of the containing notepbook. This field
1145
- # is treated as "read-only" for clients; the server will ignore changes
1146
- # to this field from an external client.
1147
- # </dd>
1148
- #
1149
- # <dt>placeName</dt>
1150
- # <dd>Allows the user to assign a human-readable location name associated
1151
- # with a note. Users may assign values like 'Home' and 'Work'. Place
1152
- # names may also be populated with values from geonames database
1153
- # (e.g., a restaurant name). Applications are encouraged to normalize values
1154
- # so that grouping values by place name provides a useful result. Applications
1155
- # MUST NOT automatically add place name values based on geolocation without
1156
- # confirmation from the user; that is, the value in this field should be
1157
- # more useful than a simple automated lookup based on the note's latitude
1158
- # and longitude.</dd>
1159
- #
1160
- # <dt>contentClass</dt>
1161
- # <dd>The class (or type) of note. This field is used to indicate to
1162
- # clients that special structured information is represented within
1163
- # the note such that special rules apply when making
1164
- # modifications. If contentClass is set and the client
1165
- # application does not specifically support the specified class,
1166
- # the client MUST treat the note as read-only. In this case, the
1167
- # client MAY modify the note's notebook and tags via the
1168
- # Note.notebookGuid and Note.tagGuids fields.
1169
- # <p>Applications should set contentClass only when they are creating notes
1170
- # that contain structured information that needs to be maintained in order
1171
- # for the user to be able to use the note within that application.
1172
- # Setting contentClass makes a note read-only in other applications, so
1173
- # there is a trade-off when an application chooses to use contentClass.
1174
- # Applications that set contentClass when creating notes must use a contentClass
1175
- # string of the form <i>CompanyName.ApplicationName</i> to ensure uniqueness.</p>
1176
- # Length restrictions: EDAM_NOTE_CONTENT_CLASS_LEN_MIN, EDAM_NOTE_CONTENT_CLASS_LEN_MAX
1177
- # <br/>
1178
- # Regex: EDAM_NOTE_CONTENT_CLASS_REGEX
1179
- # </dd>
1180
- #
1181
- # <dt>applicationData</dt>
1182
- # <dd>Provides a location for applications to store a relatively small
1183
- # (4kb) blob of data that is not meant to be visible to the user and
1184
- # that is opaque to the Evernote service. A single application may use at most
1185
- # one entry in this map, using its API consumer key as the map key. See the
1186
- # documentation for LazyMap for a description of when the actual map values
1187
- # are returned by the service.
1188
- # <p>To safely add or modify your application's entry in the map, use
1189
- # NoteStore.setNoteApplicationDataEntry. To safely remove your application's
1190
- # entry from the map, use NoteStore.unsetNoteApplicationDataEntry.</p>
1191
- # Minimum length of a name (key): EDAM_APPLICATIONDATA_NAME_LEN_MIN
1192
- # <br/>
1193
- # Sum max size of key and value: EDAM_APPLICATIONDATA_ENTRY_LEN_MAX
1194
- # <br/>
1195
- # Syntax regex for name (key): EDAM_APPLICATIONDATA_NAME_REGEX
1196
- # </dd>
1197
- #
1198
- # <dt>lastEditedBy</dt>
1199
- # <dd>An indication of who made the last change to the note. If you are
1200
- # accessing the note via a shared notebook to which you have modification
1201
- # rights, or if you are the owner of the notebook to which the note belongs,
1202
- # then you have access to the value. In this case, the value will be
1203
- # unset if the owner of the notebook containing the note was the last to
1204
- # make the modification, else it will be a string describing the
1205
- # guest who made the last edit. If you do not have access to this value,
1206
- # it will be left unset. This field is read-only by clients. The server
1207
- # will ignore all values set by clients into this field.</dd>
1208
- #
1209
- # <dt>classifications</dt>
1210
- # <dd>A map of classifications applied to the note by clients or by the
1211
- # Evernote service. The key is the string name of the classification type,
1212
- # and the value is a constant that begins with CLASSIFICATION_.</dd>
1213
- #
1214
- # </dl>
1215
- class NoteAttributes
1216
- include ::Thrift::Struct, ::Thrift::Struct_Union
1217
- SUBJECTDATE = 1
1218
- LATITUDE = 10
1219
- LONGITUDE = 11
1220
- ALTITUDE = 12
1221
- AUTHOR = 13
1222
- SOURCE = 14
1223
- SOURCEURL = 15
1224
- SOURCEAPPLICATION = 16
1225
- SHAREDATE = 17
1226
- PLACENAME = 21
1227
- CONTENTCLASS = 22
1228
- APPLICATIONDATA = 23
1229
- LASTEDITEDBY = 24
1230
- CLASSIFICATIONS = 26
1231
-
1232
- FIELDS = {
1233
- SUBJECTDATE => {:type => ::Thrift::Types::I64, :name => 'subjectDate', :optional => true},
1234
- LATITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'latitude', :optional => true},
1235
- LONGITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'longitude', :optional => true},
1236
- ALTITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'altitude', :optional => true},
1237
- AUTHOR => {:type => ::Thrift::Types::STRING, :name => 'author', :optional => true},
1238
- SOURCE => {:type => ::Thrift::Types::STRING, :name => 'source', :optional => true},
1239
- SOURCEURL => {:type => ::Thrift::Types::STRING, :name => 'sourceURL', :optional => true},
1240
- SOURCEAPPLICATION => {:type => ::Thrift::Types::STRING, :name => 'sourceApplication', :optional => true},
1241
- SHAREDATE => {:type => ::Thrift::Types::I64, :name => 'shareDate', :optional => true},
1242
- PLACENAME => {:type => ::Thrift::Types::STRING, :name => 'placeName', :optional => true},
1243
- CONTENTCLASS => {:type => ::Thrift::Types::STRING, :name => 'contentClass', :optional => true},
1244
- APPLICATIONDATA => {:type => ::Thrift::Types::STRUCT, :name => 'applicationData', :class => Evernote::EDAM::Type::LazyMap, :optional => true},
1245
- LASTEDITEDBY => {:type => ::Thrift::Types::STRING, :name => 'lastEditedBy', :optional => true},
1246
- CLASSIFICATIONS => {:type => ::Thrift::Types::MAP, :name => 'classifications', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
1247
- }
1248
-
1249
- def struct_fields; FIELDS; end
1250
-
1251
- def validate
1252
- end
1253
-
1254
- ::Thrift::Struct.generate_accessors self
1255
- end
1256
-
1257
- # Represents a single note in the user's account.
1258
- #
1259
- # <dl>
1260
- # <dt>guid</dt>
1261
- # <dd>The unique identifier of this note. Will be set by the
1262
- # server, but will be omitted by clients calling NoteStore.createNote()
1263
- # <br/>
1264
- # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
1265
- # <br/>
1266
- # Regex: EDAM_GUID_REGEX
1267
- # </dd>
1268
- #
1269
- # <dt>title</dt>
1270
- # <dd>The subject of the note. Can't begin or end with a space.
1271
- # <br/>
1272
- # Length: EDAM_NOTE_TITLE_LEN_MIN - EDAM_NOTE_TITLE_LEN_MAX
1273
- # <br/>
1274
- # Regex: EDAM_NOTE_TITLE_REGEX
1275
- # </dd>
1276
- #
1277
- # <dt>content</dt>
1278
- # <dd>The XHTML block that makes up the note. This is
1279
- # the canonical form of the note's contents, so will include abstract
1280
- # Evernote tags for internal resource references. A client may create
1281
- # a separate transformed version of this content for internal presentation,
1282
- # but the same canonical bytes should be used for transmission and
1283
- # comparison unless the user chooses to modify their content.
1284
- # <br/>
1285
- # Length: EDAM_NOTE_CONTENT_LEN_MIN - EDAM_NOTE_CONTENT_LEN_MAX
1286
- # </dd>
1287
- #
1288
- # <dt>contentHash</dt>
1289
- # <dd>The binary MD5 checksum of the UTF-8 encoded content
1290
- # body. This will always be set by the server, but clients may choose to omit
1291
- # this when they submit a note with content.
1292
- # <br/>
1293
- # Length: EDAM_HASH_LEN (exactly)
1294
- # </dd>
1295
- #
1296
- # <dt>contentLength</dt>
1297
- # <dd>The number of Unicode characters in the content of
1298
- # the note. This will always be set by the service, but clients may choose
1299
- # to omit this value when they submit a Note.
1300
- # </dd>
1301
- #
1302
- # <dt>created</dt>
1303
- # <dd>The date and time when the note was created in one of the
1304
- # clients. In most cases, this will match the user's sense of when
1305
- # the note was created, and ordering between notes will be based on
1306
- # ordering of this field. However, this is not a "reliable" timestamp
1307
- # if a client has an incorrect clock, so it cannot provide a true absolute
1308
- # ordering between notes. Notes created directly through the service
1309
- # (e.g. via the web GUI) will have an absolutely ordered "created" value.
1310
- # </dd>
1311
- #
1312
- # <dt>updated</dt>
1313
- # <dd>The date and time when the note was last modified in one of
1314
- # the clients. In most cases, this will match the user's sense of when
1315
- # the note was modified, but this field may not be absolutely reliable
1316
- # due to the possibility of client clock errors.
1317
- # </dd>
1318
- #
1319
- # <dt>deleted</dt>
1320
- # <dd>If present, the note is considered "deleted", and this
1321
- # stores the date and time when the note was deleted by one of the clients.
1322
- # In most cases, this will match the user's sense of when the note was
1323
- # deleted, but this field may be unreliable due to the possibility of
1324
- # client clock errors.
1325
- # </dd>
1326
- #
1327
- # <dt>active</dt>
1328
- # <dd>If the note is available for normal actions and viewing,
1329
- # this flag will be set to true.
1330
- # </dd>
1331
- #
1332
- # <dt>updateSequenceNum</dt>
1333
- # <dd>A number identifying the last transaction to
1334
- # modify the state of this note (including changes to the note's attributes
1335
- # or resources). The USN values are sequential within an account,
1336
- # and can be used to compare the order of modifications within the service.
1337
- # </dd>
1338
- #
1339
- # <dt>notebookGuid</dt>
1340
- # <dd>The unique identifier of the notebook that contains
1341
- # this note. If no notebookGuid is provided on a call to createNote(), the
1342
- # default notebook will be used instead.
1343
- # <br/>
1344
- # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
1345
- # <br/>
1346
- # Regex: EDAM_GUID_REGEX
1347
- # </dd>
1348
- #
1349
- # <dt>tagGuids</dt>
1350
- # <dd>A list of the GUID identifiers for tags that are applied to this note.
1351
- # This may be provided in a call to createNote() to unambiguously declare
1352
- # the tags that should be assigned to the new note. Alternately, clients
1353
- # may pass the names of desired tags via the 'tagNames' field during
1354
- # note creation.
1355
- # If the list of tags are omitted on a call to createNote(), then
1356
- # the server will assume that no changes have been made to the resources.
1357
- # Maximum: EDAM_NOTE_TAGS_MAX tags per note
1358
- # </dd>
1359
- #
1360
- # <dt>resources</dt>
1361
- # <dd>The list of resources that are embedded within this note.
1362
- # If the list of resources are omitted on a call to updateNote(), then
1363
- # the server will assume that no changes have been made to the resources.
1364
- # The binary contents of the resources must be provided when the resource
1365
- # is first sent to the service, but it will be omitted by the service when
1366
- # the Note is returned in the future.
1367
- # Maximum: EDAM_NOTE_RESOURCES_MAX resources per note
1368
- # </dd>
1369
- #
1370
- # <dt>attributes</dt>
1371
- # <dd>A list of the attributes for this note.
1372
- # If the list of attributes are omitted on a call to updateNote(), then
1373
- # the server will assume that no changes have been made to the resources.
1374
- # </dd>
1375
- #
1376
- # <dt>tagNames</dt>
1377
- # <dd>May be provided by clients during calls to createNote() as an
1378
- # alternative to providing the tagGuids of existing tags. If any tagNames
1379
- # are provided during createNote(), these will be found, or created if they
1380
- # don't already exist. Created tags will have no parent (they will be at
1381
- # the top level of the tag panel).
1382
- # </dd>
1383
- # </dl>
1384
- class Note
1385
- include ::Thrift::Struct, ::Thrift::Struct_Union
1386
- GUID = 1
1387
- TITLE = 2
1388
- CONTENT = 3
1389
- CONTENTHASH = 4
1390
- CONTENTLENGTH = 5
1391
- CREATED = 6
1392
- UPDATED = 7
1393
- DELETED = 8
1394
- ACTIVE = 9
1395
- UPDATESEQUENCENUM = 10
1396
- NOTEBOOKGUID = 11
1397
- TAGGUIDS = 12
1398
- RESOURCES = 13
1399
- ATTRIBUTES = 14
1400
- TAGNAMES = 15
1401
-
1402
- FIELDS = {
1403
- GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1404
- TITLE => {:type => ::Thrift::Types::STRING, :name => 'title', :optional => true},
1405
- CONTENT => {:type => ::Thrift::Types::STRING, :name => 'content', :optional => true},
1406
- CONTENTHASH => {:type => ::Thrift::Types::STRING, :name => 'contentHash', :binary => true, :optional => true},
1407
- CONTENTLENGTH => {:type => ::Thrift::Types::I32, :name => 'contentLength', :optional => true},
1408
- CREATED => {:type => ::Thrift::Types::I64, :name => 'created', :optional => true},
1409
- UPDATED => {:type => ::Thrift::Types::I64, :name => 'updated', :optional => true},
1410
- DELETED => {:type => ::Thrift::Types::I64, :name => 'deleted', :optional => true},
1411
- ACTIVE => {:type => ::Thrift::Types::BOOL, :name => 'active', :optional => true},
1412
- UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
1413
- NOTEBOOKGUID => {:type => ::Thrift::Types::STRING, :name => 'notebookGuid', :optional => true},
1414
- TAGGUIDS => {:type => ::Thrift::Types::LIST, :name => 'tagGuids', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
1415
- RESOURCES => {:type => ::Thrift::Types::LIST, :name => 'resources', :element => {:type => ::Thrift::Types::STRUCT, :class => Evernote::EDAM::Type::Resource}, :optional => true},
1416
- ATTRIBUTES => {:type => ::Thrift::Types::STRUCT, :name => 'attributes', :class => Evernote::EDAM::Type::NoteAttributes, :optional => true},
1417
- TAGNAMES => {:type => ::Thrift::Types::LIST, :name => 'tagNames', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
1418
- }
1419
-
1420
- def struct_fields; FIELDS; end
1421
-
1422
- def validate
1423
- end
1424
-
1425
- ::Thrift::Struct.generate_accessors self
1426
- end
1427
-
1428
- # If a Notebook has been opened to the public, the Notebook will have a
1429
- # reference to one of these structures, which gives the location and optional
1430
- # description of the externally-visible public Notebook.
1431
- # <dl>
1432
- # <dt>uri</dt>
1433
- # <dd>If this field is present, then the notebook is published for
1434
- # mass consumption on the Internet under the provided URI, which is
1435
- # relative to a defined base publishing URI defined by the service.
1436
- # This field can only be modified via the web service GUI ... publishing
1437
- # cannot be modified via an offline client.
1438
- # <br/>
1439
- # Length: EDAM_PUBLISHING_URI_LEN_MIN - EDAM_PUBLISHING_URI_LEN_MAX
1440
- # <br/>
1441
- # Regex: EDAM_PUBLISHING_URI_REGEX
1442
- # </dd>
1443
- #
1444
- # <dt>order</dt>
1445
- # <dd>When the notes are publicly displayed, they will be sorted
1446
- # based on the requested criteria.
1447
- # </dd>
1448
- #
1449
- # <dt>ascending</dt>
1450
- # <dd>If this is set to true, then the public notes will be
1451
- # displayed in ascending order (e.g. from oldest to newest). Otherwise,
1452
- # the notes will be displayed in descending order (e.g. newest to oldest).
1453
- # </dd>
1454
- #
1455
- # <dt>publicDescription</dt>
1456
- # <dd>This field may be used to provide a short
1457
- # description of the notebook, which may be displayed when (e.g.) the
1458
- # notebook is shown in a public view. Can't begin or end with a space.
1459
- # <br/>
1460
- # Length: EDAM_PUBLISHING_DESCRIPTION_LEN_MIN -
1461
- # EDAM_PUBLISHING_DESCRIPTION_LEN_MAX
1462
- # <br/>
1463
- # Regex: EDAM_PUBLISHING_DESCRIPTION_REGEX
1464
- # </dd>
1465
- #
1466
- # </dl>
1467
- class Publishing
1468
- include ::Thrift::Struct, ::Thrift::Struct_Union
1469
- URI = 1
1470
- ORDER = 2
1471
- ASCENDING = 3
1472
- PUBLICDESCRIPTION = 4
1473
-
1474
- FIELDS = {
1475
- URI => {:type => ::Thrift::Types::STRING, :name => 'uri', :optional => true},
1476
- ORDER => {:type => ::Thrift::Types::I32, :name => 'order', :optional => true, :enum_class => Evernote::EDAM::Type::NoteSortOrder},
1477
- ASCENDING => {:type => ::Thrift::Types::BOOL, :name => 'ascending', :optional => true},
1478
- PUBLICDESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'publicDescription', :optional => true}
1479
- }
1480
-
1481
- def struct_fields; FIELDS; end
1482
-
1483
- def validate
1484
- unless @order.nil? || Evernote::EDAM::Type::NoteSortOrder::VALID_VALUES.include?(@order)
1485
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field order!')
1486
- end
1487
- end
1488
-
1489
- ::Thrift::Struct.generate_accessors self
1490
- end
1491
-
1492
- # If a Notebook contained in an Evernote Business account has been published
1493
- # the to business library, the Notebook will have a reference to one of these
1494
- # structures, which specifies how the Notebook will be represented in the
1495
- # library.
1496
- #
1497
- # <dl>
1498
- # <dt>notebookDescription</dt>
1499
- # <dd>A short description of the notebook's content that will be displayed
1500
- # in the business library user interface. The description may not begin
1501
- # or end with whitespace.
1502
- # <br/>
1503
- # Length: EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_LEN_MIN -
1504
- # EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_LEN_MAX
1505
- # <br/>
1506
- # Regex: EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_REGEX
1507
- # </dd>
1508
- #
1509
- # <dt>privilege</dt>
1510
- # <dd>The privileges that will be granted to users who join the notebook through
1511
- # the business library.
1512
- # </dd>
1513
- #
1514
- # <dt>recommended</dt>
1515
- # <dd>Whether the notebook should be "recommended" when displayed in the business
1516
- # library user interface.
1517
- # </dd>
1518
- # </dl>
1519
- class BusinessNotebook
1520
- include ::Thrift::Struct, ::Thrift::Struct_Union
1521
- NOTEBOOKDESCRIPTION = 1
1522
- PRIVILEGE = 2
1523
- RECOMMENDED = 3
1524
-
1525
- FIELDS = {
1526
- NOTEBOOKDESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'notebookDescription', :optional => true},
1527
- PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => Evernote::EDAM::Type::SharedNotebookPrivilegeLevel},
1528
- RECOMMENDED => {:type => ::Thrift::Types::BOOL, :name => 'recommended', :optional => true}
1529
- }
1530
-
1531
- def struct_fields; FIELDS; end
1532
-
1533
- def validate
1534
- unless @privilege.nil? || Evernote::EDAM::Type::SharedNotebookPrivilegeLevel::VALID_VALUES.include?(@privilege)
1535
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field privilege!')
1536
- end
1537
- end
1538
-
1539
- ::Thrift::Struct.generate_accessors self
1540
- end
1541
-
1542
- # A named search associated with the account that can be quickly re-used.
1543
- # <dl>
1544
- # <dt>guid</dt>
1545
- # <dd>The unique identifier of this search. Will be set by the
1546
- # service, so may be omitted by the client when creating.
1547
- # <br/>
1548
- # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
1549
- # <br/>
1550
- # Regex: EDAM_GUID_REGEX
1551
- # </dd>
1552
- #
1553
- # <dt>name</dt>
1554
- # <dd>The name of the saved search to display in the GUI. The
1555
- # account may only contain one search with a given name (case-insensitive
1556
- # compare). Can't begin or end with a space.
1557
- # <br/>
1558
- # Length: EDAM_SAVED_SEARCH_NAME_LEN_MIN - EDAM_SAVED_SEARCH_NAME_LEN_MAX
1559
- # <br/>
1560
- # Regex: EDAM_SAVED_SEARCH_NAME_REGEX
1561
- # </dd>
1562
- #
1563
- # <dt>query</dt>
1564
- # <dd>A string expressing the search to be performed.
1565
- # <br/>
1566
- # Length: EDAM_SAVED_SEARCH_QUERY_LEN_MIN - EDAM_SAVED_SEARCH_QUERY_LEN_MAX
1567
- # </dd>
1568
- #
1569
- # <dt>format</dt>
1570
- # <dd>The format of the query string, to determine how to parse
1571
- # and process it.
1572
- # </dd>
1573
- #
1574
- # <dt>updateSequenceNum</dt>
1575
- # <dd>A number identifying the last transaction to
1576
- # modify the state of this object. The USN values are sequential within an
1577
- # account, and can be used to compare the order of modifications within the
1578
- # service.
1579
- # </dd>
1580
- # </dl>
1581
- class SavedSearch
1582
- include ::Thrift::Struct, ::Thrift::Struct_Union
1583
- GUID = 1
1584
- NAME = 2
1585
- QUERY = 3
1586
- FORMAT = 4
1587
- UPDATESEQUENCENUM = 5
1588
-
1589
- FIELDS = {
1590
- GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1591
- NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
1592
- QUERY => {:type => ::Thrift::Types::STRING, :name => 'query', :optional => true},
1593
- FORMAT => {:type => ::Thrift::Types::I32, :name => 'format', :optional => true, :enum_class => Evernote::EDAM::Type::QueryFormat},
1594
- UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true}
1595
- }
1596
-
1597
- def struct_fields; FIELDS; end
1598
-
1599
- def validate
1600
- unless @format.nil? || Evernote::EDAM::Type::QueryFormat::VALID_VALUES.include?(@format)
1601
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field format!')
1602
- end
1603
- end
1604
-
1605
- ::Thrift::Struct.generate_accessors self
1606
- end
1607
-
1608
- # Shared notebooks represent a relationship between a notebook and a single
1609
- # share invitation recipient.
1610
- # <dl>
1611
- # <dt>id</dt>
1612
- # <dd>the primary identifier of the share</dd>
1613
- #
1614
- # <dt>userId</dt>
1615
- # <dd>the user id of the owner of the notebook</dd>
1616
- #
1617
- # <dt>notebookGuid</dt>
1618
- # <dd>the GUID of the associated notebook shared.</dd>
1619
- #
1620
- # <dt>email</dt>
1621
- # <dd>the email address of the recipient - used by the notebook
1622
- # owner to identify who they shared with.</dd>
1623
- #
1624
- # <dt>notebookModifiable</dt>
1625
- # <dd>(DEPRECATED) a flag indicating the share is read/write -otherwise it's read
1626
- # only. This field is deprecated in favor of the new "privilege" field.</dd>
1627
- #
1628
- # <dt>requireLogin</dt>
1629
- # <dd>(DEPRECATED) indicates that a user must login to access the share. This
1630
- # field is deprecated and will be "true" for all new shared notebooks. It
1631
- # is read-only and ignored when creating or modifying a shared notebook,
1632
- # except that a shared notebook can be modified to require login.
1633
- # See "allowPreview" for information on privileges and shared notebooks.</dd>
1634
- #
1635
- # <dt>serviceCreated</dt>
1636
- # <dd>the date the owner first created the share with the specific email
1637
- # address</dd>
1638
- #
1639
- # <dt>serviceUpdated</dt>
1640
- # <dd>the date the shared notebook was last updated on the service. This
1641
- # will be updated when authenticateToSharedNotebook is called the first
1642
- # time with a shared notebook requiring login (i.e. when the username is
1643
- # bound to that shared notebook).</dd>
1644
- #
1645
- # <dt>username</dt>
1646
- # <dd>the username of the user who can access this share.
1647
- # Once it's assigned it cannot be changed.</dd>
1648
- #
1649
- # <dt>privilege</dt>
1650
- # <dd>The privilege level granted to the notebook, activity stream, and
1651
- # invitations. See the corresponding enumeration for details.</dd>
1652
- #
1653
- # <dt>allowPreview</dt>
1654
- # <dd>Whether or not to grant "READ_NOTEBOOK" privilege without an
1655
- # authentication token, for authenticateToSharedNotebook(...). With
1656
- # the change to "requireLogin" always being true for new shared
1657
- # notebooks, this is the only way to access a shared notebook without
1658
- # an authorization token. This setting expires after the first use
1659
- # of authenticateToSharedNotebook(...) with a valid authentication
1660
- # token.</dd>
1661
- # </dl>
1662
- class SharedNotebook
1663
- include ::Thrift::Struct, ::Thrift::Struct_Union
1664
- ID = 1
1665
- USERID = 2
1666
- NOTEBOOKGUID = 3
1667
- EMAIL = 4
1668
- NOTEBOOKMODIFIABLE = 5
1669
- REQUIRELOGIN = 6
1670
- SERVICECREATED = 7
1671
- SERVICEUPDATED = 10
1672
- SHAREKEY = 8
1673
- USERNAME = 9
1674
- PRIVILEGE = 11
1675
- ALLOWPREVIEW = 12
1676
-
1677
- FIELDS = {
1678
- ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true},
1679
- USERID => {:type => ::Thrift::Types::I32, :name => 'userId', :optional => true},
1680
- NOTEBOOKGUID => {:type => ::Thrift::Types::STRING, :name => 'notebookGuid', :optional => true},
1681
- EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email', :optional => true},
1682
- NOTEBOOKMODIFIABLE => {:type => ::Thrift::Types::BOOL, :name => 'notebookModifiable', :optional => true},
1683
- REQUIRELOGIN => {:type => ::Thrift::Types::BOOL, :name => 'requireLogin', :optional => true},
1684
- SERVICECREATED => {:type => ::Thrift::Types::I64, :name => 'serviceCreated', :optional => true},
1685
- SERVICEUPDATED => {:type => ::Thrift::Types::I64, :name => 'serviceUpdated', :optional => true},
1686
- SHAREKEY => {:type => ::Thrift::Types::STRING, :name => 'shareKey', :optional => true},
1687
- USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
1688
- PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => Evernote::EDAM::Type::SharedNotebookPrivilegeLevel},
1689
- ALLOWPREVIEW => {:type => ::Thrift::Types::BOOL, :name => 'allowPreview', :optional => true}
1690
- }
1691
-
1692
- def struct_fields; FIELDS; end
1693
-
1694
- def validate
1695
- unless @privilege.nil? || Evernote::EDAM::Type::SharedNotebookPrivilegeLevel::VALID_VALUES.include?(@privilege)
1696
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field privilege!')
1697
- end
1698
- end
1699
-
1700
- ::Thrift::Struct.generate_accessors self
1701
- end
1702
-
1703
- # This structure captures information about the types of operations
1704
- # that cannot be performed on a given notebook with a type of
1705
- # authenticated access and credentials. The values filled into this
1706
- # structure are based on then-current values in the server database
1707
- # for shared notebooks and notebook publishing records, as well as
1708
- # information related to the authentication token. Information from
1709
- # the authentication token includes the application that is accessing
1710
- # the server, as defined by the permissions granted by consumer (api)
1711
- # key, and the method used to obtain the token, for example via
1712
- # authenticateToSharedNotebook, authenticateToBusiness, etc. Note
1713
- # that changes to values in this structure that are the result of
1714
- # shared notebook or publishing record changes are communicated to
1715
- # the client via a change in the notebook USN during sync. It is
1716
- # important to use the same access method, parameters, and consumer
1717
- # key in order obtain correct results from the sync engine.
1718
- #
1719
- # The server has the final say on what is allowed as values may
1720
- # change between calls to obtain NotebookRestrictions instances
1721
- # and to operate on data on the service.
1722
- #
1723
- # If the following are set and true, then the given restriction is
1724
- # in effect, as accessed by the same authentication token from which
1725
- # the values were obtained.
1726
- #
1727
- # <dt>noReadNotes</dt>
1728
- # <dd>The client is not able to read notes from the service and
1729
- # the notebook is write-only.
1730
- # </dd>
1731
- # <dt>noCreateNotes</dt>
1732
- # <dd>The client may not create new notes in the notebook.
1733
- # </dd>
1734
- # <dt>noUpdateNotes</dt>
1735
- # <dd>The client may not update notes currently in the notebook.
1736
- # </dd>
1737
- # <dt>noExpungeNotes</dt>
1738
- # <dd>The client may not expunge notes currently in the notebook.
1739
- # </dd>
1740
- # <dt>noShareNotes</dt>
1741
- # <dd>The client may not share notes in the notebook via the
1742
- # shareNote method.
1743
- # </dd>
1744
- # <dt>noEmailNotes</dt>
1745
- # <dd>The client may not e-mail notes via the Evernote service by
1746
- # using the emailNote method.
1747
- # </dd>
1748
- # <dt>noSendMessageToRecipients</dt>
1749
- # <dd>The client may not send messages to the share recipients of
1750
- # the notebook.
1751
- # </dd>
1752
- # <dt>noUpdateNotebook</dt>
1753
- # <dd>The client may not update the Notebook object itself, for
1754
- # example, via the updateNotebook method.
1755
- # </dd>
1756
- # <dt>noExpungeNotebook</dt>
1757
- # <dd>The client may not expunge the Notebook object itself, for
1758
- # example, via the expungeNotebook method.
1759
- # </dd>
1760
- # <dt>noSetDefaultNotebook</dt>
1761
- # <dd>The client may not set this notebook to be the default notebook.
1762
- # The caller should leave Notebook.defaultNotebook unset.
1763
- # </dd>
1764
- # <dt>noSetNotebookStack</dt>
1765
- # <dd>If the client is able to update the Notebook, the Notebook.stack
1766
- # value may not be set.
1767
- # </dd>
1768
- # <dt>noPublishToPublic</dt>
1769
- # <dd>The client may not change the publish the notebook to the public.
1770
- # For example, business notebooks may not be shared publicly.
1771
- # </dd>
1772
- # <dt>noPublishToBusinessLibrary</dt>
1773
- # <dd>The client may not publish the notebook to the business library.
1774
- # </dd>
1775
- # <dt>noCreateTags</dt>
1776
- # <dd>The client may not complete an operation that results in a new tag
1777
- # being created in the owner's account.
1778
- # </dd>
1779
- # <dt>noUpdateTags</dt>
1780
- # <dd>The client may not update tags in the owner's account.
1781
- # </dd>
1782
- # <dt>noExpungeTags</dt>
1783
- # <dd>The client may not expunge tags in the owner's account.
1784
- # </dd>
1785
- # <dt>noSetParentTag</dt>
1786
- # <dd>If the client is able to create or update tags in the owner's account,
1787
- # then they will not be able to set the parent tag. Leave the value unset.
1788
- # </dd>
1789
- # <dt>noCreateSharedNotebooks</dt>
1790
- # <dd>The client is unable to create shared notebooks for the notebook.
1791
- # </dd>
1792
- # <dt>updateWhichSharedNotebookRestrictions</dt>
1793
- # <dd>Restrictions on which shared notebook instances can be updated. If the
1794
- # value is not set or null, then the client can update any of the shared notebooks
1795
- # associated with the notebook on which the NotebookRestrictions are defined.
1796
- # See the enumeration for further details.
1797
- # </dd>
1798
- # <dt>expungeWhichSharedNotebookRestrictions</dt>
1799
- # <dd>Restrictions on which shared notebook instances can be expunged. If the
1800
- # value is not set or null, then the client can expunge any of the shared notebooks
1801
- # associated with the notebook on which the NotebookRestrictions are defined.
1802
- # See the enumeration for further details.
1803
- # </dd>
1804
- class NotebookRestrictions
1805
- include ::Thrift::Struct, ::Thrift::Struct_Union
1806
- NOREADNOTES = 1
1807
- NOCREATENOTES = 2
1808
- NOUPDATENOTES = 3
1809
- NOEXPUNGENOTES = 4
1810
- NOSHARENOTES = 5
1811
- NOEMAILNOTES = 6
1812
- NOSENDMESSAGETORECIPIENTS = 7
1813
- NOUPDATENOTEBOOK = 8
1814
- NOEXPUNGENOTEBOOK = 9
1815
- NOSETDEFAULTNOTEBOOK = 10
1816
- NOSETNOTEBOOKSTACK = 11
1817
- NOPUBLISHTOPUBLIC = 12
1818
- NOPUBLISHTOBUSINESSLIBRARY = 13
1819
- NOCREATETAGS = 14
1820
- NOUPDATETAGS = 15
1821
- NOEXPUNGETAGS = 16
1822
- NOSETPARENTTAG = 17
1823
- NOCREATESHAREDNOTEBOOKS = 18
1824
- UPDATEWHICHSHAREDNOTEBOOKRESTRICTIONS = 19
1825
- EXPUNGEWHICHSHAREDNOTEBOOKRESTRICTIONS = 20
1826
-
1827
- FIELDS = {
1828
- NOREADNOTES => {:type => ::Thrift::Types::BOOL, :name => 'noReadNotes', :optional => true},
1829
- NOCREATENOTES => {:type => ::Thrift::Types::BOOL, :name => 'noCreateNotes', :optional => true},
1830
- NOUPDATENOTES => {:type => ::Thrift::Types::BOOL, :name => 'noUpdateNotes', :optional => true},
1831
- NOEXPUNGENOTES => {:type => ::Thrift::Types::BOOL, :name => 'noExpungeNotes', :optional => true},
1832
- NOSHARENOTES => {:type => ::Thrift::Types::BOOL, :name => 'noShareNotes', :optional => true},
1833
- NOEMAILNOTES => {:type => ::Thrift::Types::BOOL, :name => 'noEmailNotes', :optional => true},
1834
- NOSENDMESSAGETORECIPIENTS => {:type => ::Thrift::Types::BOOL, :name => 'noSendMessageToRecipients', :optional => true},
1835
- NOUPDATENOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'noUpdateNotebook', :optional => true},
1836
- NOEXPUNGENOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'noExpungeNotebook', :optional => true},
1837
- NOSETDEFAULTNOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'noSetDefaultNotebook', :optional => true},
1838
- NOSETNOTEBOOKSTACK => {:type => ::Thrift::Types::BOOL, :name => 'noSetNotebookStack', :optional => true},
1839
- NOPUBLISHTOPUBLIC => {:type => ::Thrift::Types::BOOL, :name => 'noPublishToPublic', :optional => true},
1840
- NOPUBLISHTOBUSINESSLIBRARY => {:type => ::Thrift::Types::BOOL, :name => 'noPublishToBusinessLibrary', :optional => true},
1841
- NOCREATETAGS => {:type => ::Thrift::Types::BOOL, :name => 'noCreateTags', :optional => true},
1842
- NOUPDATETAGS => {:type => ::Thrift::Types::BOOL, :name => 'noUpdateTags', :optional => true},
1843
- NOEXPUNGETAGS => {:type => ::Thrift::Types::BOOL, :name => 'noExpungeTags', :optional => true},
1844
- NOSETPARENTTAG => {:type => ::Thrift::Types::BOOL, :name => 'noSetParentTag', :optional => true},
1845
- NOCREATESHAREDNOTEBOOKS => {:type => ::Thrift::Types::BOOL, :name => 'noCreateSharedNotebooks', :optional => true},
1846
- UPDATEWHICHSHAREDNOTEBOOKRESTRICTIONS => {:type => ::Thrift::Types::I32, :name => 'updateWhichSharedNotebookRestrictions', :optional => true, :enum_class => Evernote::EDAM::Type::SharedNotebookInstanceRestrictions},
1847
- EXPUNGEWHICHSHAREDNOTEBOOKRESTRICTIONS => {:type => ::Thrift::Types::I32, :name => 'expungeWhichSharedNotebookRestrictions', :optional => true, :enum_class => Evernote::EDAM::Type::SharedNotebookInstanceRestrictions}
1848
- }
1849
-
1850
- def struct_fields; FIELDS; end
1851
-
1852
- def validate
1853
- unless @updateWhichSharedNotebookRestrictions.nil? || Evernote::EDAM::Type::SharedNotebookInstanceRestrictions::VALID_VALUES.include?(@updateWhichSharedNotebookRestrictions)
1854
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field updateWhichSharedNotebookRestrictions!')
1855
- end
1856
- unless @expungeWhichSharedNotebookRestrictions.nil? || Evernote::EDAM::Type::SharedNotebookInstanceRestrictions::VALID_VALUES.include?(@expungeWhichSharedNotebookRestrictions)
1857
- raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field expungeWhichSharedNotebookRestrictions!')
1858
- end
1859
- end
1860
-
1861
- ::Thrift::Struct.generate_accessors self
1862
- end
1863
-
1864
- # A unique container for a set of notes.
1865
- # <dl>
1866
- # <dt>guid</dt>
1867
- # <dd>The unique identifier of this notebook.
1868
- # <br/>
1869
- # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
1870
- # <br/>
1871
- # Regex: EDAM_GUID_REGEX
1872
- # </dd>
1873
- #
1874
- # <dt>name</dt>
1875
- # <dd>A sequence of characters representing the name of the
1876
- # notebook. May be changed by clients, but the account may not contain two
1877
- # notebooks with names that are equal via a case-insensitive comparison.
1878
- # Can't begin or end with a space.
1879
- # <br/>
1880
- # Length: EDAM_NOTEBOOK_NAME_LEN_MIN - EDAM_NOTEBOOK_NAME_LEN_MAX
1881
- # <br/>
1882
- # Regex: EDAM_NOTEBOOK_NAME_REGEX
1883
- # </dd>
1884
- #
1885
- # <dt>updateSequenceNum</dt>
1886
- # <dd>A number identifying the last transaction to
1887
- # modify the state of this object. The USN values are sequential within an
1888
- # account, and can be used to compare the order of modifications within the
1889
- # service.
1890
- # </dd>
1891
- #
1892
- # <dt>defaultNotebook</dt>
1893
- # <dd>If true, this notebook should be used for new notes
1894
- # whenever the user has not (or cannot) specify a desired target notebook.
1895
- # For example, if a note is submitted via SMTP email.
1896
- # The service will maintain at most one defaultNotebook per account.
1897
- # If a second notebook is created or updated with defaultNotebook set to
1898
- # true, the service will automatically update the prior notebook's
1899
- # defaultNotebook field to false. If the default notebook is deleted
1900
- # (i.e. "active" set to false), the "defaultNotebook" field will be
1901
- # set to false by the service. If the account has no default notebook
1902
- # set, the service will use the most recent notebook as the default.
1903
- # </dd>
1904
- #
1905
- # <dt>serviceCreated</dt>
1906
- # <dd>The time when this notebook was created on the
1907
- # service. This will be set on the service during creation, and the service
1908
- # will provide this value when it returns a Notebook to a client.
1909
- # The service will ignore this value if it is sent by clients.
1910
- # </dd>
1911
- #
1912
- # <dt>serviceUpdated</dt>
1913
- # <dd>The time when this notebook was last modified on the
1914
- # service. This will be set on the service during creation, and the service
1915
- # will provide this value when it returns a Notebook to a client.
1916
- # The service will ignore this value if it is sent by clients.
1917
- # </dd>
1918
- #
1919
- # <dt>publishing</dt>
1920
- # <dd>If the Notebook has been opened for public access, or
1921
- # business users shared with their business (i.e. if 'published' is
1922
- # set to true), then this will point to the set of publishing
1923
- # information for the Notebook (URI, description, etc.). A
1924
- # Notebook cannot be published without providing this information,
1925
- # but it will persist for later use if publishing is ever disabled
1926
- # on the Notebook. Clients that do not wish to change the
1927
- # publishing behavior of a Notebook should not set this value when
1928
- # calling NoteStore.updateNotebook().
1929
- # </dd>
1930
- #
1931
- # <dt>published</dt>
1932
- # <dd>If this is set to true, then the Notebook will be
1933
- # accessible either to the public, or for business users to their business,
1934
- # via the 'publishing' specification, which must also be set. If this is set
1935
- # to false, the Notebook will not be available to the public (or business).
1936
- # Clients that do not wish to change the publishing behavior of a Notebook
1937
- # should not set this value when calling NoteStore.updateNotebook().
1938
- # </dd>
1939
- #
1940
- # <dt>stack</dt>
1941
- # <dd>If this is set, then the notebook is visually contained within a stack
1942
- # of notebooks with this name. All notebooks in the same account with the
1943
- # same 'stack' field are considered to be in the same stack.
1944
- # Notebooks with no stack set are "top level" and not contained within a
1945
- # stack.
1946
- # </dd>
1947
- #
1948
- # <dt>sharedNotebookIds</dt>
1949
- # <dd><i>DEPRECATED</i> - replaced by sharedNotebooks.</dd>
1950
- #
1951
- # <dt>sharedNotebooks</dt>
1952
- # <dd>The list of recipients to whom this notebook has been shared
1953
- # (one SharedNotebook object per recipient email address). This field will
1954
- # be unset if you do not have permission to access this data. If you are
1955
- # accessing the notebook as the owner or via a shared notebook that is
1956
- # modifiable, then you have access to this data and the value will be set.
1957
- # This field is read-only. Clients may not make changes to shared notebooks
1958
- # via this field.
1959
- # </dd>
1960
- #
1961
- # <dt>businessNotebook</dt>
1962
- # <dd>If the notebook is part of a business account and has been published to the
1963
- # business library, this will contain information for the library listing.
1964
- # The presence or absence of this field is not a reliable test of whether a given
1965
- # notebook is in fact a business notebook - the field is only used when a notebook is or
1966
- # has been published to the business library.
1967
- # </dd>
1968
- #
1969
- # <dt>contact</dt>
1970
- # <dd>Intended for use with Business accounts, this field identifies the user who
1971
- # has been designated as the "contact". For notebooks created in business
1972
- # accounts, the server will automatically set this value to the user who created
1973
- # the notebook unless Notebook.contact.username has been set, in which that value
1974
- # will be used. When updating a notebook, it is common to leave Notebook.contact
1975
- # field unset, indicating that no change to the value is being requested and that
1976
- # the existing value, if any, should be preserved.
1977
- # </dd>
1978
- #
1979
- # </dl>
1980
- class Notebook
1981
- include ::Thrift::Struct, ::Thrift::Struct_Union
1982
- GUID = 1
1983
- NAME = 2
1984
- UPDATESEQUENCENUM = 5
1985
- DEFAULTNOTEBOOK = 6
1986
- SERVICECREATED = 7
1987
- SERVICEUPDATED = 8
1988
- PUBLISHING = 10
1989
- PUBLISHED = 11
1990
- STACK = 12
1991
- SHAREDNOTEBOOKIDS = 13
1992
- SHAREDNOTEBOOKS = 14
1993
- BUSINESSNOTEBOOK = 15
1994
- CONTACT = 16
1995
- RESTRICTIONS = 17
1996
-
1997
- FIELDS = {
1998
- GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1999
- NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
2000
- UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
2001
- DEFAULTNOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'defaultNotebook', :optional => true},
2002
- SERVICECREATED => {:type => ::Thrift::Types::I64, :name => 'serviceCreated', :optional => true},
2003
- SERVICEUPDATED => {:type => ::Thrift::Types::I64, :name => 'serviceUpdated', :optional => true},
2004
- PUBLISHING => {:type => ::Thrift::Types::STRUCT, :name => 'publishing', :class => Evernote::EDAM::Type::Publishing, :optional => true},
2005
- PUBLISHED => {:type => ::Thrift::Types::BOOL, :name => 'published', :optional => true},
2006
- STACK => {:type => ::Thrift::Types::STRING, :name => 'stack', :optional => true},
2007
- SHAREDNOTEBOOKIDS => {:type => ::Thrift::Types::LIST, :name => 'sharedNotebookIds', :element => {:type => ::Thrift::Types::I64}, :optional => true},
2008
- SHAREDNOTEBOOKS => {:type => ::Thrift::Types::LIST, :name => 'sharedNotebooks', :element => {:type => ::Thrift::Types::STRUCT, :class => Evernote::EDAM::Type::SharedNotebook}, :optional => true},
2009
- BUSINESSNOTEBOOK => {:type => ::Thrift::Types::STRUCT, :name => 'businessNotebook', :class => Evernote::EDAM::Type::BusinessNotebook, :optional => true},
2010
- CONTACT => {:type => ::Thrift::Types::STRUCT, :name => 'contact', :class => Evernote::EDAM::Type::User, :optional => true},
2011
- RESTRICTIONS => {:type => ::Thrift::Types::STRUCT, :name => 'restrictions', :class => Evernote::EDAM::Type::NotebookRestrictions, :optional => true}
2012
- }
2013
-
2014
- def struct_fields; FIELDS; end
2015
-
2016
- def validate
2017
- end
2018
-
2019
- ::Thrift::Struct.generate_accessors self
2020
- end
2021
-
2022
- # A link in an users account that refers them to a public or individual share in
2023
- # another user's account.
2024
- #
2025
- # <dl>
2026
- # <dt>shareName</dt>
2027
- # <dd>the display name of the shared notebook.
2028
- # The link owner can change this.</dd>
2029
- #
2030
- # <dt>username</dt>
2031
- # <dd>the username of the user who owns the shared or public notebook</dd>
2032
- #
2033
- # <dt>shardId</dt>
2034
- # <dd>the shard ID of the notebook if the notebook is not public</dt>
2035
- #
2036
- # <dt>shareKey</dt>
2037
- # <dd>the secret key that provides access to the shared notebook</dd>
2038
- #
2039
- # <dt>uri</dt>
2040
- # <dd>the identifier of the public notebook</dd>
2041
- #
2042
- # <dt>guid</dt>
2043
- # <dd>The unique identifier of this linked notebook. Will be set whenever
2044
- # a linked notebook is retrieved from the service, but may be null when a client
2045
- # is creating a linked notebook.
2046
- # <br/>
2047
- # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
2048
- # <br/>
2049
- # Regex: EDAM_GUID_REGEX
2050
- # </dd>
2051
- #
2052
- # <dt>updateSequenceNum</dt>
2053
- # <dd>A number identifying the last transaction to
2054
- # modify the state of this object. The USN values are sequential within an
2055
- # account, and can be used to compare the order of modifications within the
2056
- # service.
2057
- # </dd>
2058
- #
2059
- # <dt>noteStoreUrl</dt>
2060
- # <dd>
2061
- # This field will contain the full URL that clients should use to make
2062
- # NoteStore requests to the server shard that contains that notebook's data.
2063
- # I.e. this is the URL that should be used to create the Thrift HTTP client
2064
- # transport to send messages to the NoteStore service for the account.
2065
- # </dd>
2066
- #
2067
- # <dt>webApiUrlPrefix:</dt>
2068
- # <dd>
2069
- # This field will contain the initial part of the URLs that should be used
2070
- # to make requests to Evernote's thin client "web API", which provide
2071
- # optimized operations for clients that aren't capable of manipulating
2072
- # the full contents of accounts via the full Thrift data model. Clients
2073
- # should concatenate the relative path for the various servlets onto the
2074
- # end of this string to construct the full URL, as documented on our
2075
- # developer web site.
2076
- # </dd>
2077
- #
2078
- # <dt>stack</dt>
2079
- # <dd>If this is set, then the notebook is visually contained within a stack
2080
- # of notebooks with this name. All notebooks in the same account with the
2081
- # same 'stack' field are considered to be in the same stack.
2082
- # Notebooks with no stack set are "top level" and not contained within a
2083
- # stack. The link owner can change this and this field is for the benefit
2084
- # of the link owner.
2085
- # </dd>
2086
- #
2087
- # <dt>businessId</dt>
2088
- # <dd>If set, this will be the unique identifier for the business that owns
2089
- # the notebook to which the linked notebook refers.
2090
- #
2091
- # </dl>
2092
- class LinkedNotebook
2093
- include ::Thrift::Struct, ::Thrift::Struct_Union
2094
- SHARENAME = 2
2095
- USERNAME = 3
2096
- SHARDID = 4
2097
- SHAREKEY = 5
2098
- URI = 6
2099
- GUID = 7
2100
- UPDATESEQUENCENUM = 8
2101
- NOTESTOREURL = 9
2102
- WEBAPIURLPREFIX = 10
2103
- STACK = 11
2104
- BUSINESSID = 12
2105
-
2106
- FIELDS = {
2107
- SHARENAME => {:type => ::Thrift::Types::STRING, :name => 'shareName', :optional => true},
2108
- USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
2109
- SHARDID => {:type => ::Thrift::Types::STRING, :name => 'shardId', :optional => true},
2110
- SHAREKEY => {:type => ::Thrift::Types::STRING, :name => 'shareKey', :optional => true},
2111
- URI => {:type => ::Thrift::Types::STRING, :name => 'uri', :optional => true},
2112
- GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
2113
- UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
2114
- NOTESTOREURL => {:type => ::Thrift::Types::STRING, :name => 'noteStoreUrl', :optional => true},
2115
- WEBAPIURLPREFIX => {:type => ::Thrift::Types::STRING, :name => 'webApiUrlPrefix', :optional => true},
2116
- STACK => {:type => ::Thrift::Types::STRING, :name => 'stack', :optional => true},
2117
- BUSINESSID => {:type => ::Thrift::Types::I32, :name => 'businessId', :optional => true}
2118
- }
2119
-
2120
- def struct_fields; FIELDS; end
2121
-
2122
- def validate
2123
- end
2124
-
2125
- ::Thrift::Struct.generate_accessors self
2126
- end
2127
-
2128
- # A structure that describes a notebook or a user's relationship with
2129
- # a notebook. NotebookDescriptor is expected to remain a lighter-weight
2130
- # structure when compared to Notebook.
2131
- # <dl>
2132
- # <dt>guid</dt>
2133
- # <dd>The unique identifier of the notebook.
2134
- # </dd>
2135
- #
2136
- # <dt>notebookDisplayName</dt>
2137
- # <dd>A sequence of characters representing the name of the
2138
- # notebook.
2139
- # </dd>
2140
- #
2141
- # <dt>contactName</dt>
2142
- # <dd>The User.name value of the notebook's "contact".
2143
- # </dd>
2144
- #
2145
- # <dt>hasSharedNotebook</dt>
2146
- # <dd>Whether a SharedNotebook record exists between the calling user and this
2147
- # notebook.
2148
- # </dd>
2149
- #
2150
- # <dt>joinedUserCount</dt>
2151
- # <dd>The number of users who have joined this notebook.
2152
- # </dd>
2153
- #
2154
- # </dl>
2155
- class NotebookDescriptor
2156
- include ::Thrift::Struct, ::Thrift::Struct_Union
2157
- GUID = 1
2158
- NOTEBOOKDISPLAYNAME = 2
2159
- CONTACTNAME = 3
2160
- HASSHAREDNOTEBOOK = 4
2161
- JOINEDUSERCOUNT = 5
2162
-
2163
- FIELDS = {
2164
- GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
2165
- NOTEBOOKDISPLAYNAME => {:type => ::Thrift::Types::STRING, :name => 'notebookDisplayName', :optional => true},
2166
- CONTACTNAME => {:type => ::Thrift::Types::STRING, :name => 'contactName', :optional => true},
2167
- HASSHAREDNOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'hasSharedNotebook', :optional => true},
2168
- JOINEDUSERCOUNT => {:type => ::Thrift::Types::I32, :name => 'joinedUserCount', :optional => true}
2169
- }
2170
-
2171
- def struct_fields; FIELDS; end
2172
-
2173
- def validate
2174
- end
2175
-
2176
- ::Thrift::Struct.generate_accessors self
2177
- end
14
+ module PrivilegeLevel
15
+ NORMAL = 1
16
+ PREMIUM = 3
17
+ MANAGER = 7
18
+ SUPPORT = 8
19
+ ADMIN = 9
20
+ VALUE_MAP = {1 => "NORMAL", 3 => "PREMIUM", 7 => "MANAGER", 8 => "SUPPORT", 9 => "ADMIN"}
21
+ VALID_VALUES = Set.new([NORMAL, PREMIUM, MANAGER, SUPPORT, ADMIN]).freeze
22
+ end
23
+
24
+ module QueryFormat
25
+ USER = 1
26
+ SEXP = 2
27
+ VALUE_MAP = {1 => "USER", 2 => "SEXP"}
28
+ VALID_VALUES = Set.new([USER, SEXP]).freeze
29
+ end
30
+
31
+ module NoteSortOrder
32
+ CREATED = 1
33
+ UPDATED = 2
34
+ RELEVANCE = 3
35
+ UPDATE_SEQUENCE_NUMBER = 4
36
+ TITLE = 5
37
+ VALUE_MAP = {1 => "CREATED", 2 => "UPDATED", 3 => "RELEVANCE", 4 => "UPDATE_SEQUENCE_NUMBER", 5 => "TITLE"}
38
+ VALID_VALUES = Set.new([CREATED, UPDATED, RELEVANCE, UPDATE_SEQUENCE_NUMBER, TITLE]).freeze
39
+ end
40
+
41
+ module PremiumOrderStatus
42
+ NONE = 0
43
+ PENDING = 1
44
+ ACTIVE = 2
45
+ FAILED = 3
46
+ CANCELLATION_PENDING = 4
47
+ CANCELED = 5
48
+ VALUE_MAP = {0 => "NONE", 1 => "PENDING", 2 => "ACTIVE", 3 => "FAILED", 4 => "CANCELLATION_PENDING", 5 => "CANCELED"}
49
+ VALID_VALUES = Set.new([NONE, PENDING, ACTIVE, FAILED, CANCELLATION_PENDING, CANCELED]).freeze
50
+ end
51
+
52
+ module SharedNotebookPrivilegeLevel
53
+ READ_NOTEBOOK = 0
54
+ MODIFY_NOTEBOOK_PLUS_ACTIVITY = 1
55
+ READ_NOTEBOOK_PLUS_ACTIVITY = 2
56
+ GROUP = 3
57
+ FULL_ACCESS = 4
58
+ BUSINESS_FULL_ACCESS = 5
59
+ VALUE_MAP = {0 => "READ_NOTEBOOK", 1 => "MODIFY_NOTEBOOK_PLUS_ACTIVITY", 2 => "READ_NOTEBOOK_PLUS_ACTIVITY", 3 => "GROUP", 4 => "FULL_ACCESS", 5 => "BUSINESS_FULL_ACCESS"}
60
+ VALID_VALUES = Set.new([READ_NOTEBOOK, MODIFY_NOTEBOOK_PLUS_ACTIVITY, READ_NOTEBOOK_PLUS_ACTIVITY, GROUP, FULL_ACCESS, BUSINESS_FULL_ACCESS]).freeze
61
+ end
62
+
63
+ module SponsoredGroupRole
64
+ GROUP_MEMBER = 1
65
+ GROUP_ADMIN = 2
66
+ GROUP_OWNER = 3
67
+ VALUE_MAP = {1 => "GROUP_MEMBER", 2 => "GROUP_ADMIN", 3 => "GROUP_OWNER"}
68
+ VALID_VALUES = Set.new([GROUP_MEMBER, GROUP_ADMIN, GROUP_OWNER]).freeze
69
+ end
70
+
71
+ module BusinessUserRole
72
+ ADMIN = 1
73
+ NORMAL = 2
74
+ VALUE_MAP = {1 => "ADMIN", 2 => "NORMAL"}
75
+ VALID_VALUES = Set.new([ADMIN, NORMAL]).freeze
76
+ end
77
+
78
+ module SharedNotebookInstanceRestrictions
79
+ ONLY_JOINED_OR_PREVIEW = 1
80
+ NO_SHARED_NOTEBOOKS = 2
81
+ VALUE_MAP = {1 => "ONLY_JOINED_OR_PREVIEW", 2 => "NO_SHARED_NOTEBOOKS"}
82
+ VALID_VALUES = Set.new([ONLY_JOINED_OR_PREVIEW, NO_SHARED_NOTEBOOKS]).freeze
83
+ end
84
+
85
+ # In several places, EDAM exchanges blocks of bytes of data for a component
86
+ # which may be relatively large. For example: the contents of a clipped
87
+ # HTML note, the bytes of an embedded image, or the recognition XML for
88
+ # a large image. This structure is used in the protocol to represent
89
+ # any of those large blocks of data when they are transmitted or when
90
+ # they are only referenced their metadata.
91
+ #
92
+ # <dl>
93
+ # <dt>bodyHash</dt>
94
+ # <dd>This field carries a one-way hash of the contents of the
95
+ # data body, in binary form. The hash function is MD5<br/>
96
+ # Length: EDAM_HASH_LEN (exactly)
97
+ # </dd>
98
+ #
99
+ # <dt>size</dt>
100
+ # <dd>The length, in bytes, of the data body.
101
+ # </dd>
102
+ #
103
+ # <dt>body</dt>
104
+ # <dd>This field is set to contain the binary contents of the data
105
+ # whenever the resource is being transferred. If only metadata is
106
+ # being exchanged, this field will be empty. For example, a client could
107
+ # notify the service about the change to an attribute for a resource
108
+ # without transmitting the binary resource contents.
109
+ # </dd>
110
+ # </dl>
111
+ class Data
112
+ include ::Thrift::Struct, ::Thrift::Struct_Union
113
+ BODYHASH = 1
114
+ SIZE = 2
115
+ BODY = 3
116
+
117
+ FIELDS = {
118
+ BODYHASH => {:type => ::Thrift::Types::STRING, :name => 'bodyHash', :binary => true, :optional => true},
119
+ SIZE => {:type => ::Thrift::Types::I32, :name => 'size', :optional => true},
120
+ BODY => {:type => ::Thrift::Types::STRING, :name => 'body', :binary => true, :optional => true}
121
+ }
122
+
123
+ def struct_fields; FIELDS; end
124
+
125
+ def validate
126
+ end
127
+
128
+ ::Thrift::Struct.generate_accessors self
129
+ end
130
+
131
+ # A structure holding the optional attributes that can be stored
132
+ # on a User. These are generally less critical than the core User fields.
133
+ #
134
+ # <dl>
135
+ # <dt>defaultLocationName</dt>
136
+ # <dd>the location string that should be associated
137
+ # with the user in order to determine where notes are taken if not otherwise
138
+ # specified.<br/>
139
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
140
+ # </dd>
141
+ #
142
+ # <dt>defaultLatitude</dt>
143
+ # <dd>if set, this is the latitude that should be
144
+ # assigned to any notes that have no other latitude information.
145
+ # </dd>
146
+ #
147
+ # <dt>defaultLongitude</dt>
148
+ # <dd>if set, this is the longitude that should be
149
+ # assigned to any notes that have no other longitude information.
150
+ # </dd>
151
+ #
152
+ # <dt>preactivation</dt>
153
+ # <dd>if set, the user account is not yet confirmed for
154
+ # login. I.e. the account has been created, but we are still waiting for
155
+ # the user to complete the activation step.
156
+ # </dd>
157
+ #
158
+ # <dt>viewedPromotions</dt>
159
+ # <dd>a list of promotions the user has seen.
160
+ # This list may occasionally be modified by the system when promotions are
161
+ # no longer available.<br/>
162
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
163
+ # </dd>
164
+ #
165
+ # <dt>incomingEmailAddress</dt>
166
+ # <dd>if set, this is the email address that the
167
+ # user may send email to in order to add an email note directly into the
168
+ # account via the SMTP email gateway. This is the part of the email
169
+ # address before the '@' symbol ... our domain is not included.
170
+ # If this is not set, the user may not add notes via the gateway.<br/>
171
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
172
+ # </dd>
173
+ #
174
+ # <dt>recentMailedAddresses</dt>
175
+ # <dd>if set, this will contain a list of email
176
+ # addresses that have recently been used as recipients
177
+ # of outbound emails by the user. This can be used to pre-populate a
178
+ # list of possible destinations when a user wishes to send a note via
179
+ # email.<br/>
180
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX each<br/>
181
+ # Max: EDAM_USER_RECENT_MAILED_ADDRESSES_MAX entries
182
+ # </dd>
183
+ #
184
+ # <dt>comments</dt>
185
+ # <dd>Free-form text field that may hold general support
186
+ # information, etc.<br/>
187
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
188
+ # </dd>
189
+ #
190
+ # <dt>dateAgreedToTermsOfService</dt>
191
+ # <dd>The date/time when the user agreed to
192
+ # the terms of service. This can be used as the effective "start date"
193
+ # for the account.
194
+ # </dd>
195
+ #
196
+ # <dt>maxReferrals</dt>
197
+ # <dd>The number of referrals that the user is permitted
198
+ # to make.
199
+ # </dd>
200
+ #
201
+ # <dt>referralCount</dt>
202
+ # <dd>The number of referrals sent from this account.
203
+ # </dd>
204
+ #
205
+ # <dt>refererCode</dt>
206
+ # <dd>A code indicating where the user was sent from. AKA
207
+ # promotion code
208
+ # </dd>
209
+ #
210
+ # <dt>sentEmailDate</dt>
211
+ # <dd>The most recent date when the user sent outbound
212
+ # emails from the service. Used with sentEmailCount to limit the number
213
+ # of emails that can be sent per day.
214
+ # </dd>
215
+ #
216
+ # <dt>sentEmailCount</dt>
217
+ # <dd>The number of emails that were sent from the user
218
+ # via the service on sentEmailDate. Used to enforce a limit on the number
219
+ # of emails per user per day to prevent spamming.
220
+ # </dd>
221
+ #
222
+ # <dt>dailyEmailLimit</dt>
223
+ # <dd>If set, this is the maximum number of emails that
224
+ # may be sent in a given day from this account. If unset, the server will
225
+ # use the configured default limit.
226
+ # </dd>
227
+ #
228
+ # <dt>emailOptOutDate</dt>
229
+ # <dd>If set, this is the date when the user asked
230
+ # to be excluded from offers and promotions sent by Evernote. If not set,
231
+ # then the user currently agrees to receive these messages.
232
+ # </dd>
233
+ #
234
+ # <dt>partnerEmailOptInDate</dt>
235
+ # <dd>If set, this is the date when the user asked
236
+ # to be included in offers and promotions sent by Evernote's partners.
237
+ # If not sent, then the user currently does not agree to receive these
238
+ # emails.
239
+ # </dd>
240
+ #
241
+ # <dt>preferredLanguage</dt>
242
+ # <dd>a 2 character language codes based on:
243
+ # http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt used for
244
+ # localization purposes to determine what language to use for the web
245
+ # interface and for other direct communication (e.g. emails).
246
+ # </dd>
247
+ #
248
+ # <dt>preferredCountry</dt>
249
+ # <dd>Preferred country code based on ISO 3166-1-alpha-2 indicating the
250
+ # users preferred country</dd>
251
+ #
252
+ # <dt>clipFullPage</dt>
253
+ # <dd>Boolean flag set to true if the user wants to clip full pages by
254
+ # default when they use the web clipper without a selection.</dd>
255
+ #
256
+ # <dt>twitterUserName</dt>
257
+ # <dd>The username of the account of someone who has chosen to enable
258
+ # Twittering into Evernote. This value is subject to change, since users
259
+ # may change their Twitter user name.</dd>
260
+ #
261
+ # <dt>twitterId</dt>
262
+ # <dd>The unique identifier of the user's Twitter account if that user
263
+ # has chosen to enable Twittering into Evernote.</dd>
264
+ #
265
+ # <dt>groupName</dt>
266
+ # <dd>A name identifier used to identify a particular set of branding and
267
+ # light customization.</dd>
268
+ #
269
+ # <dt>recognitionLanguage</dt>
270
+ # <dd>a 2 character language codes based on:
271
+ # http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt
272
+ # If set, this is used to determine the language that should be used
273
+ # when processing images and PDF files to find text.
274
+ # If not set, then the 'preferredLanguage' will be used.
275
+ # </dd>
276
+ #
277
+ # <dt>customerProfileId</dt>
278
+ # <dd>a numeric identified which provides a linkage between the user record
279
+ # and the direct credit card payment creditcard profile.
280
+ # </dd>
281
+ #
282
+ # <dt>educationalInstitution</dt>
283
+ # <dd>a flag indicating that the user is part of an educational institution which
284
+ # makes them eligible for discounts on bulk purchases
285
+ # </dd>
286
+ #
287
+ # <dt>businessAddress</dt>
288
+ # <dd>A string recording the business address of a Sponsored Account user who has requested invoicing.
289
+ # </dd>
290
+ # </dl>
291
+ #
292
+ # <dt>hideSponsorBilling</dt>
293
+ # <dd>A flag indicating whether to hide the billing information on a sponsored
294
+ # account owner's settings page
295
+ # </dd>
296
+ # </dl>
297
+ #
298
+ # <dt>taxExempt</dt>
299
+ # <dd>A flag indicating the user's sponsored group is exempt from sale tax
300
+ # </dd>
301
+ # </dl>
302
+ class UserAttributes
303
+ include ::Thrift::Struct, ::Thrift::Struct_Union
304
+ DEFAULTLOCATIONNAME = 1
305
+ DEFAULTLATITUDE = 2
306
+ DEFAULTLONGITUDE = 3
307
+ PREACTIVATION = 4
308
+ VIEWEDPROMOTIONS = 5
309
+ INCOMINGEMAILADDRESS = 6
310
+ RECENTMAILEDADDRESSES = 7
311
+ COMMENTS = 9
312
+ DATEAGREEDTOTERMSOFSERVICE = 11
313
+ MAXREFERRALS = 12
314
+ REFERRALCOUNT = 13
315
+ REFERERCODE = 14
316
+ SENTEMAILDATE = 15
317
+ SENTEMAILCOUNT = 16
318
+ DAILYEMAILLIMIT = 17
319
+ EMAILOPTOUTDATE = 18
320
+ PARTNEREMAILOPTINDATE = 19
321
+ PREFERREDLANGUAGE = 20
322
+ PREFERREDCOUNTRY = 21
323
+ CLIPFULLPAGE = 22
324
+ TWITTERUSERNAME = 23
325
+ TWITTERID = 24
326
+ GROUPNAME = 25
327
+ RECOGNITIONLANGUAGE = 26
328
+ CUSTOMERPROFILEID = 27
329
+ REFERRALPROOF = 28
330
+ EDUCATIONALDISCOUNT = 29
331
+ BUSINESSADDRESS = 30
332
+ HIDESPONSORBILLING = 31
333
+ TAXEXEMPT = 32
334
+
335
+ FIELDS = {
336
+ DEFAULTLOCATIONNAME => {:type => ::Thrift::Types::STRING, :name => 'defaultLocationName', :optional => true},
337
+ DEFAULTLATITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'defaultLatitude', :optional => true},
338
+ DEFAULTLONGITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'defaultLongitude', :optional => true},
339
+ PREACTIVATION => {:type => ::Thrift::Types::BOOL, :name => 'preactivation', :optional => true},
340
+ VIEWEDPROMOTIONS => {:type => ::Thrift::Types::LIST, :name => 'viewedPromotions', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
341
+ INCOMINGEMAILADDRESS => {:type => ::Thrift::Types::STRING, :name => 'incomingEmailAddress', :optional => true},
342
+ RECENTMAILEDADDRESSES => {:type => ::Thrift::Types::LIST, :name => 'recentMailedAddresses', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
343
+ COMMENTS => {:type => ::Thrift::Types::STRING, :name => 'comments', :optional => true},
344
+ DATEAGREEDTOTERMSOFSERVICE => {:type => ::Thrift::Types::I64, :name => 'dateAgreedToTermsOfService', :optional => true},
345
+ MAXREFERRALS => {:type => ::Thrift::Types::I32, :name => 'maxReferrals', :optional => true},
346
+ REFERRALCOUNT => {:type => ::Thrift::Types::I32, :name => 'referralCount', :optional => true},
347
+ REFERERCODE => {:type => ::Thrift::Types::STRING, :name => 'refererCode', :optional => true},
348
+ SENTEMAILDATE => {:type => ::Thrift::Types::I64, :name => 'sentEmailDate', :optional => true},
349
+ SENTEMAILCOUNT => {:type => ::Thrift::Types::I32, :name => 'sentEmailCount', :optional => true},
350
+ DAILYEMAILLIMIT => {:type => ::Thrift::Types::I32, :name => 'dailyEmailLimit', :optional => true},
351
+ EMAILOPTOUTDATE => {:type => ::Thrift::Types::I64, :name => 'emailOptOutDate', :optional => true},
352
+ PARTNEREMAILOPTINDATE => {:type => ::Thrift::Types::I64, :name => 'partnerEmailOptInDate', :optional => true},
353
+ PREFERREDLANGUAGE => {:type => ::Thrift::Types::STRING, :name => 'preferredLanguage', :optional => true},
354
+ PREFERREDCOUNTRY => {:type => ::Thrift::Types::STRING, :name => 'preferredCountry', :optional => true},
355
+ CLIPFULLPAGE => {:type => ::Thrift::Types::BOOL, :name => 'clipFullPage', :optional => true},
356
+ TWITTERUSERNAME => {:type => ::Thrift::Types::STRING, :name => 'twitterUserName', :optional => true},
357
+ TWITTERID => {:type => ::Thrift::Types::STRING, :name => 'twitterId', :optional => true},
358
+ GROUPNAME => {:type => ::Thrift::Types::STRING, :name => 'groupName', :optional => true},
359
+ RECOGNITIONLANGUAGE => {:type => ::Thrift::Types::STRING, :name => 'recognitionLanguage', :optional => true},
360
+ CUSTOMERPROFILEID => {:type => ::Thrift::Types::I64, :name => 'customerProfileId', :optional => true},
361
+ REFERRALPROOF => {:type => ::Thrift::Types::STRING, :name => 'referralProof', :optional => true},
362
+ EDUCATIONALDISCOUNT => {:type => ::Thrift::Types::BOOL, :name => 'educationalDiscount', :optional => true},
363
+ BUSINESSADDRESS => {:type => ::Thrift::Types::STRING, :name => 'businessAddress', :optional => true},
364
+ HIDESPONSORBILLING => {:type => ::Thrift::Types::BOOL, :name => 'hideSponsorBilling', :optional => true},
365
+ TAXEXEMPT => {:type => ::Thrift::Types::BOOL, :name => 'taxExempt', :optional => true}
366
+ }
367
+
368
+ def struct_fields; FIELDS; end
369
+
370
+ def validate
371
+ end
372
+
373
+ ::Thrift::Struct.generate_accessors self
374
+ end
375
+
376
+ # This represents the bookkeeping information for the user's subscription.
377
+ #
378
+ # <dl>
379
+ # <dt>uploadLimit</dt>
380
+ # <dd>The number of bytes that can be uploaded to the account
381
+ # in the current month. For new notes that are created, this is the length
382
+ # of the note content (in Unicode characters) plus the size of each resource
383
+ # (in bytes). For edited notes, this is the the difference between the old
384
+ # length and the new length (if this is greater than 0) plus the size of
385
+ # each new resource.
386
+ # </dd>
387
+ # <dt>uploadLimitEnd</dt>
388
+ # <dd>The date and time when the current upload limit
389
+ # expires. At this time, the monthly upload count reverts to 0 and a new
390
+ # limit is imposed. This date and time is exclusive, so this is effectively
391
+ # the start of the new month.
392
+ # </dd>
393
+ # <dt>uploadLimitNextMonth</dt>
394
+ # <dd> When uploadLimitEnd is reached, the service
395
+ # will change uploadLimit to uploadLimitNextMonth. If a premium account is
396
+ # canceled, this mechanism will reset the quota appropriately.
397
+ # </dd>
398
+ # <dt>premiumServiceStatus</dt>
399
+ # <dd>Indicates the phases of a premium account
400
+ # during the billing process.
401
+ # </dd>
402
+ # <dt>premiumOrderNumber</dt>
403
+ # <dd>The order number used by the commerce system to
404
+ # process recurring payments
405
+ # </dd>
406
+ # <dt>premiumServiceStart</dt>
407
+ # <dd>The start date when this premium promotion
408
+ # began (this number will get overwritten if a premium service is canceled
409
+ # and then re-activated).
410
+ # </dd>
411
+ # <dt>premiumCommerceService</dt>
412
+ # <dd>The commerce system used (paypal, Google
413
+ # checkout, etc)
414
+ # </dd>
415
+ # <dt>premiumServiceSKU</dt>
416
+ # <dd>The code associated with the purchase eg. monthly
417
+ # or annual purchase. Clients should interpret this value and localize it.
418
+ # </dd>
419
+ # <dt>lastSuccessfulCharge</dt>
420
+ # <dd>Date the last time the user was charged.
421
+ # Null if never charged.
422
+ # </dd>
423
+ # <dt>lastFailedCharge</dt>
424
+ # <dd>Date the last time a charge was attempted and
425
+ # failed.
426
+ # </dd>
427
+ # <dt>lastFailedChargeReason</dt>
428
+ # <dd>Reason provided for the charge failure
429
+ # </dd>
430
+ # <dt>nextPaymentDue</dt>
431
+ # <dd>The end of the billing cycle. This could be in the
432
+ # past if there are failed charges.
433
+ # </dd>
434
+ # <dt>premiumLockUntil</dt>
435
+ # <dd>An internal variable to manage locking operations
436
+ # on the commerce variables.
437
+ # </dd>
438
+ # <dt>updated</dt>
439
+ # <dd>The date any modification where made to this record.
440
+ # </dd>
441
+ # <dt>premiumSubscriptionNumber</dt>
442
+ # <dd>The number number identifying the
443
+ # recurring subscription used to make the recurring charges.
444
+ # </dd>
445
+ # <dt>lastRequestedCharge</dt>
446
+ # <dd>Date charge last attempted</dd>
447
+ # <dt>currency</dt>
448
+ # <dd>ISO 4217 currency code</dd>
449
+ # <dt>unitPrice</dt>
450
+ # <dd>charge in the smallest unit of the currency (e.g. cents for USD)</dd>
451
+ # <dt>businessId</dt>
452
+ # <dd>If set, the ID of the Evernote Business account that the user is a
453
+ # member of. If not set, the user is not a member of a business.</dd>
454
+ # <dt>businessName</dt>
455
+ # <dd>The human-readable name of the Evernote Business account that
456
+ # the user is a member of.</dd>
457
+ # <dt>businessRole</dt>
458
+ # <dd>If set, the role of the user within the Evernote Business account
459
+ # that they are a member of.</dd>
460
+ # </dl>
461
+ class Accounting
462
+ include ::Thrift::Struct, ::Thrift::Struct_Union
463
+ UPLOADLIMIT = 1
464
+ UPLOADLIMITEND = 2
465
+ UPLOADLIMITNEXTMONTH = 3
466
+ PREMIUMSERVICESTATUS = 4
467
+ PREMIUMORDERNUMBER = 5
468
+ PREMIUMCOMMERCESERVICE = 6
469
+ PREMIUMSERVICESTART = 7
470
+ PREMIUMSERVICESKU = 8
471
+ LASTSUCCESSFULCHARGE = 9
472
+ LASTFAILEDCHARGE = 10
473
+ LASTFAILEDCHARGEREASON = 11
474
+ NEXTPAYMENTDUE = 12
475
+ PREMIUMLOCKUNTIL = 13
476
+ UPDATED = 14
477
+ PREMIUMSUBSCRIPTIONNUMBER = 16
478
+ LASTREQUESTEDCHARGE = 17
479
+ CURRENCY = 18
480
+ UNITPRICE = 19
481
+ BUSINESSID = 20
482
+ BUSINESSNAME = 21
483
+ BUSINESSROLE = 22
484
+
485
+ FIELDS = {
486
+ UPLOADLIMIT => {:type => ::Thrift::Types::I64, :name => 'uploadLimit', :optional => true},
487
+ UPLOADLIMITEND => {:type => ::Thrift::Types::I64, :name => 'uploadLimitEnd', :optional => true},
488
+ UPLOADLIMITNEXTMONTH => {:type => ::Thrift::Types::I64, :name => 'uploadLimitNextMonth', :optional => true},
489
+ PREMIUMSERVICESTATUS => {:type => ::Thrift::Types::I32, :name => 'premiumServiceStatus', :optional => true, :enum_class => ::Evernote::EDAM::Type::PremiumOrderStatus},
490
+ PREMIUMORDERNUMBER => {:type => ::Thrift::Types::STRING, :name => 'premiumOrderNumber', :optional => true},
491
+ PREMIUMCOMMERCESERVICE => {:type => ::Thrift::Types::STRING, :name => 'premiumCommerceService', :optional => true},
492
+ PREMIUMSERVICESTART => {:type => ::Thrift::Types::I64, :name => 'premiumServiceStart', :optional => true},
493
+ PREMIUMSERVICESKU => {:type => ::Thrift::Types::STRING, :name => 'premiumServiceSKU', :optional => true},
494
+ LASTSUCCESSFULCHARGE => {:type => ::Thrift::Types::I64, :name => 'lastSuccessfulCharge', :optional => true},
495
+ LASTFAILEDCHARGE => {:type => ::Thrift::Types::I64, :name => 'lastFailedCharge', :optional => true},
496
+ LASTFAILEDCHARGEREASON => {:type => ::Thrift::Types::STRING, :name => 'lastFailedChargeReason', :optional => true},
497
+ NEXTPAYMENTDUE => {:type => ::Thrift::Types::I64, :name => 'nextPaymentDue', :optional => true},
498
+ PREMIUMLOCKUNTIL => {:type => ::Thrift::Types::I64, :name => 'premiumLockUntil', :optional => true},
499
+ UPDATED => {:type => ::Thrift::Types::I64, :name => 'updated', :optional => true},
500
+ PREMIUMSUBSCRIPTIONNUMBER => {:type => ::Thrift::Types::STRING, :name => 'premiumSubscriptionNumber', :optional => true},
501
+ LASTREQUESTEDCHARGE => {:type => ::Thrift::Types::I64, :name => 'lastRequestedCharge', :optional => true},
502
+ CURRENCY => {:type => ::Thrift::Types::STRING, :name => 'currency', :optional => true},
503
+ UNITPRICE => {:type => ::Thrift::Types::I32, :name => 'unitPrice', :optional => true},
504
+ BUSINESSID => {:type => ::Thrift::Types::I32, :name => 'businessId', :optional => true},
505
+ BUSINESSNAME => {:type => ::Thrift::Types::STRING, :name => 'businessName', :optional => true},
506
+ BUSINESSROLE => {:type => ::Thrift::Types::I32, :name => 'businessRole', :optional => true, :enum_class => ::Evernote::EDAM::Type::BusinessUserRole}
507
+ }
508
+
509
+ def struct_fields; FIELDS; end
510
+
511
+ def validate
512
+ unless @premiumServiceStatus.nil? || ::Evernote::EDAM::Type::PremiumOrderStatus::VALID_VALUES.include?(@premiumServiceStatus)
513
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field premiumServiceStatus!')
514
+ end
515
+ unless @businessRole.nil? || ::Evernote::EDAM::Type::BusinessUserRole::VALID_VALUES.include?(@businessRole)
516
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field businessRole!')
517
+ end
518
+ end
519
+
520
+ ::Thrift::Struct.generate_accessors self
521
+ end
522
+
523
+ # This structure is used to provide information about a user's Premium account.
524
+ # <dl>
525
+ # <dt>currentTime</dt>
526
+ # <dd>
527
+ # The server-side date and time when this data was generated.
528
+ # </dd>
529
+ # <dt>premium</dt>
530
+ # <dd>
531
+ # True if the user's account is Premium.
532
+ # </dd>
533
+ # <dt>premiumRecurring</dt>
534
+ # <dd>
535
+ # True if the user's account is Premium and has a recurring payment method.
536
+ # </dd>
537
+ # <dt>premiumExpirationDate</dt>
538
+ # <dd>
539
+ # The date when the user's Premium account expires, or the date when the
540
+ # user's account will be charged if it has a recurring payment method.
541
+ # </dd>
542
+ # <dt>premiumExtendable</dt>
543
+ # <dd>
544
+ # True if the user is eligible for purchasing Premium account extensions.
545
+ # </dd>
546
+ # <dt>premiumPending</dt>
547
+ # <dd>
548
+ # True if the user's Premium account is pending payment confirmation
549
+ # </dd>
550
+ # <dt>premiumCancellationPending</dt>
551
+ # <dd>
552
+ # True if the user has requested that no further charges to be made; the
553
+ # Premium account will remain active until it expires.
554
+ # </dd>
555
+ # <dt>canPurchaseUploadAllowance</dt>
556
+ # <dd>
557
+ # True if the user is eligible for purchasing additional upload allowance.
558
+ # </dd>
559
+ # <dt>sponsoredGroupName</dt>
560
+ # <dd>
561
+ # The name of the sponsored group that the user is part of.
562
+ # </dd>
563
+ # <dt>sponsoredGroupRole</dt>
564
+ # <dd>
565
+ # DEPRECATED - will be removed in a future update.
566
+ # </dd>
567
+ # </dl>
568
+ class PremiumInfo
569
+ include ::Thrift::Struct, ::Thrift::Struct_Union
570
+ CURRENTTIME = 1
571
+ PREMIUM = 2
572
+ PREMIUMRECURRING = 3
573
+ PREMIUMEXPIRATIONDATE = 4
574
+ PREMIUMEXTENDABLE = 5
575
+ PREMIUMPENDING = 6
576
+ PREMIUMCANCELLATIONPENDING = 7
577
+ CANPURCHASEUPLOADALLOWANCE = 8
578
+ SPONSOREDGROUPNAME = 9
579
+ SPONSOREDGROUPROLE = 10
580
+
581
+ FIELDS = {
582
+ CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'},
583
+ PREMIUM => {:type => ::Thrift::Types::BOOL, :name => 'premium'},
584
+ PREMIUMRECURRING => {:type => ::Thrift::Types::BOOL, :name => 'premiumRecurring'},
585
+ PREMIUMEXPIRATIONDATE => {:type => ::Thrift::Types::I64, :name => 'premiumExpirationDate', :optional => true},
586
+ PREMIUMEXTENDABLE => {:type => ::Thrift::Types::BOOL, :name => 'premiumExtendable'},
587
+ PREMIUMPENDING => {:type => ::Thrift::Types::BOOL, :name => 'premiumPending'},
588
+ PREMIUMCANCELLATIONPENDING => {:type => ::Thrift::Types::BOOL, :name => 'premiumCancellationPending'},
589
+ CANPURCHASEUPLOADALLOWANCE => {:type => ::Thrift::Types::BOOL, :name => 'canPurchaseUploadAllowance'},
590
+ SPONSOREDGROUPNAME => {:type => ::Thrift::Types::STRING, :name => 'sponsoredGroupName', :optional => true},
591
+ SPONSOREDGROUPROLE => {:type => ::Thrift::Types::I32, :name => 'sponsoredGroupRole', :optional => true, :enum_class => ::Evernote::EDAM::Type::SponsoredGroupRole}
592
+ }
593
+
594
+ def struct_fields; FIELDS; end
595
+
596
+ def validate
597
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field currentTime is unset!') unless @currentTime
598
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premium is unset!') if @premium.nil?
599
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumRecurring is unset!') if @premiumRecurring.nil?
600
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumExtendable is unset!') if @premiumExtendable.nil?
601
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumPending is unset!') if @premiumPending.nil?
602
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumCancellationPending is unset!') if @premiumCancellationPending.nil?
603
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field canPurchaseUploadAllowance is unset!') if @canPurchaseUploadAllowance.nil?
604
+ unless @sponsoredGroupRole.nil? || ::Evernote::EDAM::Type::SponsoredGroupRole::VALID_VALUES.include?(@sponsoredGroupRole)
605
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field sponsoredGroupRole!')
606
+ end
607
+ end
608
+
609
+ ::Thrift::Struct.generate_accessors self
610
+ end
611
+
612
+ # This represents the information about a single user account.
613
+ # <dl>
614
+ # <dt>id</dt>
615
+ # <dd>The unique numeric identifier for the account, which will not
616
+ # change for the lifetime of the account.
617
+ # </dd>
618
+ #
619
+ # <dt>username</dt>
620
+ # <dd>The name that uniquely identifies a single user account. This name
621
+ # may be presented by the user, along with their password, to log into
622
+ # their account.
623
+ # May only contain a-z, 0-9, or '-', and may not start or end with the '-'
624
+ # <br/>
625
+ # Length: EDAM_USER_USERNAME_LEN_MIN - EDAM_USER_USERNAME_LEN_MAX
626
+ # <br/>
627
+ # Regex: EDAM_USER_USERNAME_REGEX
628
+ # </dd>
629
+ #
630
+ # <dt>email</dt>
631
+ # <dd>The email address registered for the user. Must comply with
632
+ # RFC 2821 and RFC 2822.<br/>
633
+ # For privacy reasons, this field may not be populated when a User
634
+ # is retrieved via a call to UserStore.getUser().
635
+ # Length: EDAM_EMAIL_LEN_MIN - EDAM_EMAIL_LEN_MAX
636
+ # <br/>
637
+ # Regex: EDAM_EMAIL_REGEX
638
+ # </dd>
639
+ #
640
+ # <dt>name</dt>
641
+ # <dd>The printable name of the user, which may be a combination
642
+ # of given and family names. This is used instead of separate "first"
643
+ # and "last" names due to variations in international name format/order.
644
+ # May not start or end with a whitespace character. May contain any
645
+ # character but carriage return or newline (Unicode classes Zl and Zp).
646
+ # <br/>
647
+ # Length: EDAM_USER_NAME_LEN_MIN - EDAM_USER_NAME_LEN_MAX
648
+ # <br/>
649
+ # Regex: EDAM_USER_NAME_REGEX
650
+ # </dd>
651
+ #
652
+ # <dt>timezone</dt>
653
+ # <dd>The zone ID for the user's default location. If present,
654
+ # this may be used to localize the display of any timestamp for which no
655
+ # other timezone is available.
656
+ # The format must be encoded as a standard zone ID such as
657
+ # "America/Los_Angeles" or "GMT+08:00"
658
+ # <br/>
659
+ # Length: EDAM_TIMEZONE_LEN_MIN - EDAM_TIMEZONE_LEN_MAX
660
+ # <br/>
661
+ # Regex: EDAM_TIMEZONE_REGEX
662
+ # </dd>
663
+ #
664
+ # <dt>privilege</dt>
665
+ # <dd>The level of access permitted for the user.
666
+ # </dd>
667
+ #
668
+ # <dt>created</dt>
669
+ # <dd>The date and time when this user account was created in the
670
+ # service.
671
+ # </dd>
672
+ #
673
+ # <dt>updated</dt>
674
+ # <dd>The date and time when this user account was last modified
675
+ # in the service.
676
+ # </dd>
677
+ #
678
+ # <dt>deleted</dt>
679
+ # <dd>If the account has been deleted from the system (e.g. as
680
+ # the result of a legal request by the user), the date and time of the
681
+ # deletion will be represented here. If not, this value will not be set.
682
+ # </dd>
683
+ #
684
+ # <dt>active</dt>
685
+ # <dd>If the user account is available for login and
686
+ # synchronization, this flag will be set to true.
687
+ # </dd>
688
+ #
689
+ # <dt>shardId</dt>
690
+ # <dd>DEPRECATED - Client applications should have no need to use this field.
691
+ # </dd>
692
+ #
693
+ # <dt>attributes</dt>
694
+ # <dd>If present, this will contain a list of the attributes
695
+ # for this user account.
696
+ # </dd>
697
+ #
698
+ # <dt>accounting</dt>
699
+ # <dd>Bookkeeping information for the user's subscription.
700
+ # </dd>
701
+ #
702
+ # <dt>premiumInfo</dt>
703
+ # <dd>If present, this will contain a set of commerce information
704
+ # relating to the user's premium service level.
705
+ # </dd>
706
+ # </dl>
707
+ class User
708
+ include ::Thrift::Struct, ::Thrift::Struct_Union
709
+ ID = 1
710
+ USERNAME = 2
711
+ EMAIL = 3
712
+ NAME = 4
713
+ TIMEZONE = 6
714
+ PRIVILEGE = 7
715
+ CREATED = 9
716
+ UPDATED = 10
717
+ DELETED = 11
718
+ ACTIVE = 13
719
+ SHARDID = 14
720
+ ATTRIBUTES = 15
721
+ ACCOUNTING = 16
722
+ PREMIUMINFO = 17
723
+
724
+ FIELDS = {
725
+ ID => {:type => ::Thrift::Types::I32, :name => 'id', :optional => true},
726
+ USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
727
+ EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email', :optional => true},
728
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
729
+ TIMEZONE => {:type => ::Thrift::Types::STRING, :name => 'timezone', :optional => true},
730
+ PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => ::Evernote::EDAM::Type::PrivilegeLevel},
731
+ CREATED => {:type => ::Thrift::Types::I64, :name => 'created', :optional => true},
732
+ UPDATED => {:type => ::Thrift::Types::I64, :name => 'updated', :optional => true},
733
+ DELETED => {:type => ::Thrift::Types::I64, :name => 'deleted', :optional => true},
734
+ ACTIVE => {:type => ::Thrift::Types::BOOL, :name => 'active', :optional => true},
735
+ SHARDID => {:type => ::Thrift::Types::STRING, :name => 'shardId', :optional => true},
736
+ ATTRIBUTES => {:type => ::Thrift::Types::STRUCT, :name => 'attributes', :class => ::Evernote::EDAM::Type::UserAttributes, :optional => true},
737
+ ACCOUNTING => {:type => ::Thrift::Types::STRUCT, :name => 'accounting', :class => ::Evernote::EDAM::Type::Accounting, :optional => true},
738
+ PREMIUMINFO => {:type => ::Thrift::Types::STRUCT, :name => 'premiumInfo', :class => ::Evernote::EDAM::Type::PremiumInfo, :optional => true}
739
+ }
740
+
741
+ def struct_fields; FIELDS; end
742
+
743
+ def validate
744
+ unless @privilege.nil? || ::Evernote::EDAM::Type::PrivilegeLevel::VALID_VALUES.include?(@privilege)
745
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field privilege!')
746
+ end
747
+ end
748
+
749
+ ::Thrift::Struct.generate_accessors self
750
+ end
751
+
752
+ # A tag within a user's account is a unique name which may be organized
753
+ # a simple hierarchy.
754
+ # <dl>
755
+ # <dt>guid</dt>
756
+ # <dd>The unique identifier of this tag. Will be set by the service,
757
+ # so may be omitted by the client when creating the Tag.
758
+ # <br/>
759
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
760
+ # <br/>
761
+ # Regex: EDAM_GUID_REGEX
762
+ # </dd>
763
+ #
764
+ # <dt>name</dt>
765
+ # <dd>A sequence of characters representing the tag's identifier.
766
+ # Case is preserved, but is ignored for comparisons.
767
+ # This means that an account may only have one tag with a given name, via
768
+ # case-insensitive comparison, so an account may not have both "food" and
769
+ # "Food" tags.
770
+ # May not contain a comma (','), and may not begin or end with a space.
771
+ # <br/>
772
+ # Length: EDAM_TAG_NAME_LEN_MIN - EDAM_TAG_NAME_LEN_MAX
773
+ # <br/>
774
+ # Regex: EDAM_TAG_NAME_REGEX
775
+ # </dd>
776
+ #
777
+ # <dt>parentGuid</dt>
778
+ # <dd>If this is set, then this is the GUID of the tag that
779
+ # holds this tag within the tag organizational hierarchy. If this is
780
+ # not set, then the tag has no parent and it is a "top level" tag.
781
+ # Cycles are not allowed (e.g. a->parent->parent == a) and will be
782
+ # rejected by the service.
783
+ # <br/>
784
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
785
+ # <br/>
786
+ # Regex: EDAM_GUID_REGEX
787
+ # </dd>
788
+ #
789
+ # <dt>updateSequenceNum</dt>
790
+ # <dd>A number identifying the last transaction to
791
+ # modify the state of this object. The USN values are sequential within an
792
+ # account, and can be used to compare the order of modifications within the
793
+ # service.
794
+ # </dd>
795
+ # </dl>
796
+ class Tag
797
+ include ::Thrift::Struct, ::Thrift::Struct_Union
798
+ GUID = 1
799
+ NAME = 2
800
+ PARENTGUID = 3
801
+ UPDATESEQUENCENUM = 4
802
+
803
+ FIELDS = {
804
+ GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
805
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
806
+ PARENTGUID => {:type => ::Thrift::Types::STRING, :name => 'parentGuid', :optional => true},
807
+ UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true}
808
+ }
809
+
810
+ def struct_fields; FIELDS; end
811
+
812
+ def validate
813
+ end
814
+
815
+ ::Thrift::Struct.generate_accessors self
816
+ end
817
+
818
+ # A structure that wraps a map of name/value pairs whose values are not
819
+ # always present in the structure in order to reduce space when obtaining
820
+ # batches of entities that contain the map.
821
+ #
822
+ # When the server provides the client with a LazyMap, it will fill in either
823
+ # the keysOnly field or the fullMap field, but never both, based on the API
824
+ # and parameters.
825
+ #
826
+ # When a client provides a LazyMap to the server as part of an update to
827
+ # an object, the server will only update the LazyMap if the fullMap field is
828
+ # set. If the fullMap field is not set, the server will not make any changes
829
+ # to the map.
830
+ #
831
+ # Check the API documentation of the individual calls involving the LazyMap
832
+ # for full details including the constraints of the names and values of the
833
+ # map.
834
+ #
835
+ # <dl>
836
+ # <dt>keysOnly</dt>
837
+ # <dd>The set of keys for the map. This field is ignored by the
838
+ # server when set.
839
+ # </dd>
840
+ #
841
+ # <dt>fullMap</dt>
842
+ # <dd>The complete map, including all keys and values.
843
+ # </dd>
844
+ # </dl>
845
+ class LazyMap
846
+ include ::Thrift::Struct, ::Thrift::Struct_Union
847
+ KEYSONLY = 1
848
+ FULLMAP = 2
849
+
850
+ FIELDS = {
851
+ KEYSONLY => {:type => ::Thrift::Types::SET, :name => 'keysOnly', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
852
+ FULLMAP => {:type => ::Thrift::Types::MAP, :name => 'fullMap', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
853
+ }
854
+
855
+ def struct_fields; FIELDS; end
856
+
857
+ def validate
858
+ end
859
+
860
+ ::Thrift::Struct.generate_accessors self
861
+ end
862
+
863
+ # Structure holding the optional attributes of a Resource
864
+ # <dl>
865
+ # <dt>sourceURL</dt>
866
+ # <dd>the original location where the resource was hosted
867
+ # <br/>
868
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
869
+ # </dd>
870
+ #
871
+ # <dt>timestamp</dt>
872
+ # <dd>the date and time that is associated with this resource
873
+ # (e.g. the time embedded in an image from a digital camera with a clock)
874
+ # </dd>
875
+ #
876
+ # <dt>latitude</dt>
877
+ # <dd>the latitude where the resource was captured
878
+ # </dd>
879
+ #
880
+ # <dt>longitude</dt>
881
+ # <dd>the longitude where the resource was captured
882
+ # </dd>
883
+ #
884
+ # <dt>altitude</dt>
885
+ # <dd>the altitude where the resource was captured
886
+ # </dd>
887
+ #
888
+ # <dt>cameraMake</dt>
889
+ # <dd>information about an image's camera, e.g. as embedded in
890
+ # the image's EXIF data
891
+ # <br/>
892
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
893
+ # </dd>
894
+ #
895
+ # <dt>cameraModel</dt>
896
+ # <dd>information about an image's camera, e.g. as embedded
897
+ # in the image's EXIF data
898
+ # <br/>
899
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
900
+ # </dd>
901
+ #
902
+ # <dt>clientWillIndex</dt>
903
+ # <dd>if true, then the original client that submitted
904
+ # the resource plans to submit the recognition index for this resource at a
905
+ # later time.
906
+ # </dd>
907
+ #
908
+ # <dt>recoType</dt>
909
+ # <dd>DEPRECATED - this field is no longer set by the service, so should
910
+ # be ignored.
911
+ # </dd>
912
+ #
913
+ # <dt>fileName</dt>
914
+ # <dd>if the resource came from a source that provided an
915
+ # explicit file name, the original name will be stored here. Many resources
916
+ # come from unnamed sources, so this will not always be set.
917
+ # </dd>
918
+ #
919
+ # <dt>attachment</dt>
920
+ # <dd>this will be true if the resource should be displayed as an attachment,
921
+ # or false if the resource should be displayed inline (if possible).
922
+ # </dd>
923
+ #
924
+ # <dt>applicationData</dt>
925
+ # <dd>Provides a location for applications to store a relatively small
926
+ # (4kb) blob of data associated with a Resource that is not visible to the user
927
+ # and that is opaque to the Evernote service. A single application may use at most
928
+ # one entry in this map, using its API consumer key as the map key. See the
929
+ # documentation for LazyMap for a description of when the actual map values
930
+ # are returned by the service.
931
+ # <p>To safely add or modify your application's entry in the map, use
932
+ # NoteStore.setResourceApplicationDataEntry. To safely remove your application's
933
+ # entry from the map, use NoteStore.unsetResourceApplicationDataEntry.</p>
934
+ # Minimum length of a name (key): EDAM_APPLICATIONDATA_NAME_LEN_MIN
935
+ # <br/>
936
+ # Sum max size of key and value: EDAM_APPLICATIONDATA_ENTRY_LEN_MAX
937
+ # <br/>
938
+ # Syntax regex for name (key): EDAM_APPLICATIONDATA_NAME_REGEX
939
+ # </dd>
940
+ #
941
+ # </dl>
942
+ class ResourceAttributes
943
+ include ::Thrift::Struct, ::Thrift::Struct_Union
944
+ SOURCEURL = 1
945
+ TIMESTAMP = 2
946
+ LATITUDE = 3
947
+ LONGITUDE = 4
948
+ ALTITUDE = 5
949
+ CAMERAMAKE = 6
950
+ CAMERAMODEL = 7
951
+ CLIENTWILLINDEX = 8
952
+ RECOTYPE = 9
953
+ FILENAME = 10
954
+ ATTACHMENT = 11
955
+ APPLICATIONDATA = 12
956
+
957
+ FIELDS = {
958
+ SOURCEURL => {:type => ::Thrift::Types::STRING, :name => 'sourceURL', :optional => true},
959
+ TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true},
960
+ LATITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'latitude', :optional => true},
961
+ LONGITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'longitude', :optional => true},
962
+ ALTITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'altitude', :optional => true},
963
+ CAMERAMAKE => {:type => ::Thrift::Types::STRING, :name => 'cameraMake', :optional => true},
964
+ CAMERAMODEL => {:type => ::Thrift::Types::STRING, :name => 'cameraModel', :optional => true},
965
+ CLIENTWILLINDEX => {:type => ::Thrift::Types::BOOL, :name => 'clientWillIndex', :optional => true},
966
+ RECOTYPE => {:type => ::Thrift::Types::STRING, :name => 'recoType', :optional => true},
967
+ FILENAME => {:type => ::Thrift::Types::STRING, :name => 'fileName', :optional => true},
968
+ ATTACHMENT => {:type => ::Thrift::Types::BOOL, :name => 'attachment', :optional => true},
969
+ APPLICATIONDATA => {:type => ::Thrift::Types::STRUCT, :name => 'applicationData', :class => ::Evernote::EDAM::Type::LazyMap, :optional => true}
970
+ }
971
+
972
+ def struct_fields; FIELDS; end
973
+
974
+ def validate
975
+ end
2178
976
 
977
+ ::Thrift::Struct.generate_accessors self
978
+ end
979
+
980
+ # Every media file that is embedded or attached to a note is represented
981
+ # through a Resource entry.
982
+ # <dl>
983
+ # <dt>guid</dt>
984
+ # <dd>The unique identifier of this resource. Will be set whenever
985
+ # a resource is retrieved from the service, but may be null when a client
986
+ # is creating a resource.
987
+ # <br/>
988
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
989
+ # <br/>
990
+ # Regex: EDAM_GUID_REGEX
991
+ # </dd>
992
+ #
993
+ # <dt>noteGuid</dt>
994
+ # <dd>The unique identifier of the Note that holds this
995
+ # Resource. Will be set whenever the resource is retrieved from the service,
996
+ # but may be null when a client is creating a resource.
997
+ # <br/>
998
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
999
+ # <br/>
1000
+ # Regex: EDAM_GUID_REGEX
1001
+ # </dd>
1002
+ #
1003
+ # <dt>data</dt>
1004
+ # <dd>The contents of the resource.
1005
+ # Maximum length: The data.body is limited to EDAM_RESOURCE_SIZE_MAX_FREE
1006
+ # for free accounts and EDAM_RESOURCE_SIZE_MAX_PREMIUM for premium accounts.
1007
+ # </dd>
1008
+ #
1009
+ # <dt>mime</dt>
1010
+ # <dd>The MIME type for the embedded resource. E.g. "image/gif"
1011
+ # <br/>
1012
+ # Length: EDAM_MIME_LEN_MIN - EDAM_MIME_LEN_MAX
1013
+ # <br/>
1014
+ # Regex: EDAM_MIME_REGEX
1015
+ # </dd>
1016
+ #
1017
+ # <dt>width</dt>
1018
+ # <dd>If set, this contains the display width of this resource, in
1019
+ # pixels.
1020
+ # </dd>
1021
+ #
1022
+ # <dt>height</dt>
1023
+ # <dd>If set, this contains the display height of this resource,
1024
+ # in pixels.
1025
+ # </dd>
1026
+ #
1027
+ # <dt>duration</dt>
1028
+ # <dd>DEPRECATED: ignored.
1029
+ # </dd>
1030
+ #
1031
+ # <dt>active</dt>
1032
+ # <dd>DEPRECATED: ignored.
1033
+ # </dd>
1034
+ #
1035
+ # <dt>recognition</dt>
1036
+ # <dd>If set, this will hold the encoded data that provides
1037
+ # information on search and recognition within this resource.
1038
+ # </dd>
1039
+ #
1040
+ # <dt>attributes</dt>
1041
+ # <dd>A list of the attributes for this resource.
1042
+ # </dd>
1043
+ #
1044
+ # <dt>updateSequenceNum</dt>
1045
+ # <dd>A number identifying the last transaction to
1046
+ # modify the state of this object. The USN values are sequential within an
1047
+ # account, and can be used to compare the order of modifications within the
1048
+ # service.
1049
+ # </dd>
1050
+ #
1051
+ # <dt>alternateData</dt>
1052
+ # <dd>Some Resources may be assigned an alternate data format by the service
1053
+ # which may be more appropriate for indexing or rendering than the original
1054
+ # data provided by the user. In these cases, the alternate data form will
1055
+ # be available via this Data element. If a Resource has no alternate form,
1056
+ # this field will be unset.</dd>
1057
+ # </dl>
1058
+ class Resource
1059
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1060
+ GUID = 1
1061
+ NOTEGUID = 2
1062
+ DATA = 3
1063
+ MIME = 4
1064
+ WIDTH = 5
1065
+ HEIGHT = 6
1066
+ DURATION = 7
1067
+ ACTIVE = 8
1068
+ RECOGNITION = 9
1069
+ ATTRIBUTES = 11
1070
+ UPDATESEQUENCENUM = 12
1071
+ ALTERNATEDATA = 13
1072
+
1073
+ FIELDS = {
1074
+ GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1075
+ NOTEGUID => {:type => ::Thrift::Types::STRING, :name => 'noteGuid', :optional => true},
1076
+ DATA => {:type => ::Thrift::Types::STRUCT, :name => 'data', :class => ::Evernote::EDAM::Type::Data, :optional => true},
1077
+ MIME => {:type => ::Thrift::Types::STRING, :name => 'mime', :optional => true},
1078
+ WIDTH => {:type => ::Thrift::Types::I16, :name => 'width', :optional => true},
1079
+ HEIGHT => {:type => ::Thrift::Types::I16, :name => 'height', :optional => true},
1080
+ DURATION => {:type => ::Thrift::Types::I16, :name => 'duration', :optional => true},
1081
+ ACTIVE => {:type => ::Thrift::Types::BOOL, :name => 'active', :optional => true},
1082
+ RECOGNITION => {:type => ::Thrift::Types::STRUCT, :name => 'recognition', :class => ::Evernote::EDAM::Type::Data, :optional => true},
1083
+ ATTRIBUTES => {:type => ::Thrift::Types::STRUCT, :name => 'attributes', :class => ::Evernote::EDAM::Type::ResourceAttributes, :optional => true},
1084
+ UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
1085
+ ALTERNATEDATA => {:type => ::Thrift::Types::STRUCT, :name => 'alternateData', :class => ::Evernote::EDAM::Type::Data, :optional => true}
1086
+ }
1087
+
1088
+ def struct_fields; FIELDS; end
1089
+
1090
+ def validate
1091
+ end
1092
+
1093
+ ::Thrift::Struct.generate_accessors self
1094
+ end
1095
+
1096
+ # The list of optional attributes that can be stored on a note.
1097
+ # <dl>
1098
+ # <dt>subjectDate</dt>
1099
+ # <dd>time that the note refers to
1100
+ # </dd>
1101
+ #
1102
+ # <dt>latitude</dt>
1103
+ # <dd>the latitude where the note was taken
1104
+ # </dd>
1105
+ #
1106
+ # <dt>longitude</dt>
1107
+ # <dd>the longitude where the note was taken
1108
+ # </dd>
1109
+ #
1110
+ # <dt>altitude</dt>
1111
+ # <dd>the altitude where the note was taken
1112
+ # </dd>
1113
+ #
1114
+ # <dt>author</dt>
1115
+ # <dd>the author of the content of the note
1116
+ # <br/>
1117
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
1118
+ # </dd>
1119
+ #
1120
+ # <dt>source</dt>
1121
+ # <dd>the method that the note was added to the account, if the
1122
+ # note wasn't directly authored in an Evernote desktop client.
1123
+ # <br/>
1124
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
1125
+ # </dd>
1126
+ #
1127
+ # <dt>sourceURL</dt>
1128
+ # <dd>the original location where the resource was hosted. For web clips,
1129
+ # this will be the URL of the page that was clipped.
1130
+ # <br/>
1131
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
1132
+ # </dd>
1133
+ #
1134
+ # <dt>sourceApplication</dt>
1135
+ # <dd>an identifying string for the application that
1136
+ # created this note. This string does not have a guaranteed syntax or
1137
+ # structure -- it is intended for human inspection and tracking.
1138
+ # <br/>
1139
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
1140
+ # </dd>
1141
+ #
1142
+ # <dt>shareDate</dt>
1143
+ # <dd>The date and time when this note was directly shared via its own URL.
1144
+ # This is only set on notes that were individually shared - it is independent
1145
+ # of any notebook-level sharing of the containing notepbook. This field
1146
+ # is treated as "read-only" for clients; the server will ignore changes
1147
+ # to this field from an external client.
1148
+ # </dd>
1149
+ #
1150
+ # <dt>taskDate</dt>
1151
+ # <dd>The date and time when a note was set to be a task. The value
1152
+ # is a read/write attirubte that is used by applications to define
1153
+ # the presentation order of notes that are treated as tasks. Clearing
1154
+ # the taskDate removes the task behaviors. Applications are
1155
+ # discouraged from displaying the time portion of a task.
1156
+ # </dd>
1157
+ #
1158
+ # <dt>taskCompleteDate</dt>
1159
+ # <dd>The date and time when a user marked a task note as
1160
+ # complete. Users typically do not manually set this value, but like
1161
+ # createDate, it is automatically set when the user marks the note as
1162
+ # complete. Once a task is marked as complete reminders associated
1163
+ # with due dates are no longer invoked.
1164
+ # </dd>
1165
+ #
1166
+ # <dt>taskDueDate</dt>
1167
+ # <dd>The date and time a user as selected for a note to be due. This
1168
+ # is an optional attribute of a task note (not all tasks need to have
1169
+ # a due date). Due dates trigger reminders and
1170
+ # notifications. Notifications and reminders are not tiggered if the
1171
+ # taskCompleteDate is set.</dd>
1172
+ #
1173
+ # <dt>placeName</dt>
1174
+ # <dd>Allows the user to assign a human-readable location name associated
1175
+ # with a note. Users may assign values like 'Home' and 'Work'. Place
1176
+ # names may also be populated with values from geonames database
1177
+ # (e.g., a restaurant name). Applications are encouraged to normalize values
1178
+ # so that grouping values by place name provides a useful result. Applications
1179
+ # MUST NOT automatically add place name values based on geolocation without
1180
+ # confirmation from the user; that is, the value in this field should be
1181
+ # more useful than a simple automated lookup based on the note's latitude
1182
+ # and longitude.</dd>
1183
+ #
1184
+ # <dt>contentClass</dt>
1185
+ # <dd>The class (or type) of note. This field is used to indicate to
1186
+ # clients that special structured information is represented within
1187
+ # the note such that special rules apply when making
1188
+ # modifications. If contentClass is set and the client
1189
+ # application does not specifically support the specified class,
1190
+ # the client MUST treat the note as read-only. In this case, the
1191
+ # client MAY modify the note's notebook and tags via the
1192
+ # Note.notebookGuid and Note.tagGuids fields.
1193
+ # <p>Applications should set contentClass only when they are creating notes
1194
+ # that contain structured information that needs to be maintained in order
1195
+ # for the user to be able to use the note within that application.
1196
+ # Setting contentClass makes a note read-only in other applications, so
1197
+ # there is a trade-off when an application chooses to use contentClass.
1198
+ # Applications that set contentClass when creating notes must use a contentClass
1199
+ # string of the form <i>CompanyName.ApplicationName</i> to ensure uniqueness.</p>
1200
+ # Length restrictions: EDAM_NOTE_CONTENT_CLASS_LEN_MIN, EDAM_NOTE_CONTENT_CLASS_LEN_MAX
1201
+ # <br/>
1202
+ # Regex: EDAM_NOTE_CONTENT_CLASS_REGEX
1203
+ # </dd>
1204
+ #
1205
+ # <dt>applicationData</dt>
1206
+ # <dd>Provides a location for applications to store a relatively small
1207
+ # (4kb) blob of data that is not meant to be visible to the user and
1208
+ # that is opaque to the Evernote service. A single application may use at most
1209
+ # one entry in this map, using its API consumer key as the map key. See the
1210
+ # documentation for LazyMap for a description of when the actual map values
1211
+ # are returned by the service.
1212
+ # <p>To safely add or modify your application's entry in the map, use
1213
+ # NoteStore.setNoteApplicationDataEntry. To safely remove your application's
1214
+ # entry from the map, use NoteStore.unsetNoteApplicationDataEntry.</p>
1215
+ # Minimum length of a name (key): EDAM_APPLICATIONDATA_NAME_LEN_MIN
1216
+ # <br/>
1217
+ # Sum max size of key and value: EDAM_APPLICATIONDATA_ENTRY_LEN_MAX
1218
+ # <br/>
1219
+ # Syntax regex for name (key): EDAM_APPLICATIONDATA_NAME_REGEX
1220
+ # </dd>
1221
+ #
1222
+ # <dt>lastEditedBy</dt>
1223
+ # <dd>An indication of who made the last change to the note. If you are
1224
+ # accessing the note via a shared notebook to which you have modification
1225
+ # rights, or if you are the owner of the notebook to which the note belongs,
1226
+ # then you have access to the value. In this case, the value will be
1227
+ # unset if the owner of the notebook containing the note was the last to
1228
+ # make the modification, else it will be a string describing the
1229
+ # guest who made the last edit. If you do not have access to this value,
1230
+ # it will be left unset. This field is read-only by clients. The server
1231
+ # will ignore all values set by clients into this field.</dd>
1232
+ #
1233
+ # <dt>classifications</dt>
1234
+ # <dd>A map of classifications applied to the note by clients or by the
1235
+ # Evernote service. The key is the string name of the classification type,
1236
+ # and the value is a constant that begins with CLASSIFICATION_.</dd>
1237
+ #
1238
+ # </dl>
1239
+ class NoteAttributes
1240
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1241
+ SUBJECTDATE = 1
1242
+ LATITUDE = 10
1243
+ LONGITUDE = 11
1244
+ ALTITUDE = 12
1245
+ AUTHOR = 13
1246
+ SOURCE = 14
1247
+ SOURCEURL = 15
1248
+ SOURCEAPPLICATION = 16
1249
+ SHAREDATE = 17
1250
+ TASKDATE = 18
1251
+ TASKCOMPLETEDATE = 19
1252
+ TASKDUEDATE = 20
1253
+ PLACENAME = 21
1254
+ CONTENTCLASS = 22
1255
+ APPLICATIONDATA = 23
1256
+ LASTEDITEDBY = 24
1257
+ CLASSIFICATIONS = 26
1258
+
1259
+ FIELDS = {
1260
+ SUBJECTDATE => {:type => ::Thrift::Types::I64, :name => 'subjectDate', :optional => true},
1261
+ LATITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'latitude', :optional => true},
1262
+ LONGITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'longitude', :optional => true},
1263
+ ALTITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'altitude', :optional => true},
1264
+ AUTHOR => {:type => ::Thrift::Types::STRING, :name => 'author', :optional => true},
1265
+ SOURCE => {:type => ::Thrift::Types::STRING, :name => 'source', :optional => true},
1266
+ SOURCEURL => {:type => ::Thrift::Types::STRING, :name => 'sourceURL', :optional => true},
1267
+ SOURCEAPPLICATION => {:type => ::Thrift::Types::STRING, :name => 'sourceApplication', :optional => true},
1268
+ SHAREDATE => {:type => ::Thrift::Types::I64, :name => 'shareDate', :optional => true},
1269
+ TASKDATE => {:type => ::Thrift::Types::I64, :name => 'taskDate', :optional => true},
1270
+ TASKCOMPLETEDATE => {:type => ::Thrift::Types::I64, :name => 'taskCompleteDate', :optional => true},
1271
+ TASKDUEDATE => {:type => ::Thrift::Types::I64, :name => 'taskDueDate', :optional => true},
1272
+ PLACENAME => {:type => ::Thrift::Types::STRING, :name => 'placeName', :optional => true},
1273
+ CONTENTCLASS => {:type => ::Thrift::Types::STRING, :name => 'contentClass', :optional => true},
1274
+ APPLICATIONDATA => {:type => ::Thrift::Types::STRUCT, :name => 'applicationData', :class => ::Evernote::EDAM::Type::LazyMap, :optional => true},
1275
+ LASTEDITEDBY => {:type => ::Thrift::Types::STRING, :name => 'lastEditedBy', :optional => true},
1276
+ CLASSIFICATIONS => {:type => ::Thrift::Types::MAP, :name => 'classifications', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
1277
+ }
1278
+
1279
+ def struct_fields; FIELDS; end
1280
+
1281
+ def validate
1282
+ end
1283
+
1284
+ ::Thrift::Struct.generate_accessors self
1285
+ end
1286
+
1287
+ # Represents a single note in the user's account.
1288
+ #
1289
+ # <dl>
1290
+ # <dt>guid</dt>
1291
+ # <dd>The unique identifier of this note. Will be set by the
1292
+ # server, but will be omitted by clients calling NoteStore.createNote()
1293
+ # <br/>
1294
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
1295
+ # <br/>
1296
+ # Regex: EDAM_GUID_REGEX
1297
+ # </dd>
1298
+ #
1299
+ # <dt>title</dt>
1300
+ # <dd>The subject of the note. Can't begin or end with a space.
1301
+ # <br/>
1302
+ # Length: EDAM_NOTE_TITLE_LEN_MIN - EDAM_NOTE_TITLE_LEN_MAX
1303
+ # <br/>
1304
+ # Regex: EDAM_NOTE_TITLE_REGEX
1305
+ # </dd>
1306
+ #
1307
+ # <dt>content</dt>
1308
+ # <dd>The XHTML block that makes up the note. This is
1309
+ # the canonical form of the note's contents, so will include abstract
1310
+ # Evernote tags for internal resource references. A client may create
1311
+ # a separate transformed version of this content for internal presentation,
1312
+ # but the same canonical bytes should be used for transmission and
1313
+ # comparison unless the user chooses to modify their content.
1314
+ # <br/>
1315
+ # Length: EDAM_NOTE_CONTENT_LEN_MIN - EDAM_NOTE_CONTENT_LEN_MAX
1316
+ # </dd>
1317
+ #
1318
+ # <dt>contentHash</dt>
1319
+ # <dd>The binary MD5 checksum of the UTF-8 encoded content
1320
+ # body. This will always be set by the server, but clients may choose to omit
1321
+ # this when they submit a note with content.
1322
+ # <br/>
1323
+ # Length: EDAM_HASH_LEN (exactly)
1324
+ # </dd>
1325
+ #
1326
+ # <dt>contentLength</dt>
1327
+ # <dd>The number of Unicode characters in the content of
1328
+ # the note. This will always be set by the service, but clients may choose
1329
+ # to omit this value when they submit a Note.
1330
+ # </dd>
1331
+ #
1332
+ # <dt>created</dt>
1333
+ # <dd>The date and time when the note was created in one of the
1334
+ # clients. In most cases, this will match the user's sense of when
1335
+ # the note was created, and ordering between notes will be based on
1336
+ # ordering of this field. However, this is not a "reliable" timestamp
1337
+ # if a client has an incorrect clock, so it cannot provide a true absolute
1338
+ # ordering between notes. Notes created directly through the service
1339
+ # (e.g. via the web GUI) will have an absolutely ordered "created" value.
1340
+ # </dd>
1341
+ #
1342
+ # <dt>updated</dt>
1343
+ # <dd>The date and time when the note was last modified in one of
1344
+ # the clients. In most cases, this will match the user's sense of when
1345
+ # the note was modified, but this field may not be absolutely reliable
1346
+ # due to the possibility of client clock errors.
1347
+ # </dd>
1348
+ #
1349
+ # <dt>deleted</dt>
1350
+ # <dd>If present, the note is considered "deleted", and this
1351
+ # stores the date and time when the note was deleted by one of the clients.
1352
+ # In most cases, this will match the user's sense of when the note was
1353
+ # deleted, but this field may be unreliable due to the possibility of
1354
+ # client clock errors.
1355
+ # </dd>
1356
+ #
1357
+ # <dt>active</dt>
1358
+ # <dd>If the note is available for normal actions and viewing,
1359
+ # this flag will be set to true.
1360
+ # </dd>
1361
+ #
1362
+ # <dt>updateSequenceNum</dt>
1363
+ # <dd>A number identifying the last transaction to
1364
+ # modify the state of this note (including changes to the note's attributes
1365
+ # or resources). The USN values are sequential within an account,
1366
+ # and can be used to compare the order of modifications within the service.
1367
+ # </dd>
1368
+ #
1369
+ # <dt>notebookGuid</dt>
1370
+ # <dd>The unique identifier of the notebook that contains
1371
+ # this note. If no notebookGuid is provided on a call to createNote(), the
1372
+ # default notebook will be used instead.
1373
+ # <br/>
1374
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
1375
+ # <br/>
1376
+ # Regex: EDAM_GUID_REGEX
1377
+ # </dd>
1378
+ #
1379
+ # <dt>tagGuids</dt>
1380
+ # <dd>A list of the GUID identifiers for tags that are applied to this note.
1381
+ # This may be provided in a call to createNote() to unambiguously declare
1382
+ # the tags that should be assigned to the new note. Alternately, clients
1383
+ # may pass the names of desired tags via the 'tagNames' field during
1384
+ # note creation.
1385
+ # If the list of tags are omitted on a call to createNote(), then
1386
+ # the server will assume that no changes have been made to the resources.
1387
+ # Maximum: EDAM_NOTE_TAGS_MAX tags per note
1388
+ # </dd>
1389
+ #
1390
+ # <dt>resources</dt>
1391
+ # <dd>The list of resources that are embedded within this note.
1392
+ # If the list of resources are omitted on a call to updateNote(), then
1393
+ # the server will assume that no changes have been made to the resources.
1394
+ # The binary contents of the resources must be provided when the resource
1395
+ # is first sent to the service, but it will be omitted by the service when
1396
+ # the Note is returned in the future.
1397
+ # Maximum: EDAM_NOTE_RESOURCES_MAX resources per note
1398
+ # </dd>
1399
+ #
1400
+ # <dt>attributes</dt>
1401
+ # <dd>A list of the attributes for this note.
1402
+ # If the list of attributes are omitted on a call to updateNote(), then
1403
+ # the server will assume that no changes have been made to the resources.
1404
+ # </dd>
1405
+ #
1406
+ # <dt>tagNames</dt>
1407
+ # <dd>May be provided by clients during calls to createNote() as an
1408
+ # alternative to providing the tagGuids of existing tags. If any tagNames
1409
+ # are provided during createNote(), these will be found, or created if they
1410
+ # don't already exist. Created tags will have no parent (they will be at
1411
+ # the top level of the tag panel).
1412
+ # </dd>
1413
+ # </dl>
1414
+ class Note
1415
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1416
+ GUID = 1
1417
+ TITLE = 2
1418
+ CONTENT = 3
1419
+ CONTENTHASH = 4
1420
+ CONTENTLENGTH = 5
1421
+ CREATED = 6
1422
+ UPDATED = 7
1423
+ DELETED = 8
1424
+ ACTIVE = 9
1425
+ UPDATESEQUENCENUM = 10
1426
+ NOTEBOOKGUID = 11
1427
+ TAGGUIDS = 12
1428
+ RESOURCES = 13
1429
+ ATTRIBUTES = 14
1430
+ TAGNAMES = 15
1431
+
1432
+ FIELDS = {
1433
+ GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1434
+ TITLE => {:type => ::Thrift::Types::STRING, :name => 'title', :optional => true},
1435
+ CONTENT => {:type => ::Thrift::Types::STRING, :name => 'content', :optional => true},
1436
+ CONTENTHASH => {:type => ::Thrift::Types::STRING, :name => 'contentHash', :binary => true, :optional => true},
1437
+ CONTENTLENGTH => {:type => ::Thrift::Types::I32, :name => 'contentLength', :optional => true},
1438
+ CREATED => {:type => ::Thrift::Types::I64, :name => 'created', :optional => true},
1439
+ UPDATED => {:type => ::Thrift::Types::I64, :name => 'updated', :optional => true},
1440
+ DELETED => {:type => ::Thrift::Types::I64, :name => 'deleted', :optional => true},
1441
+ ACTIVE => {:type => ::Thrift::Types::BOOL, :name => 'active', :optional => true},
1442
+ UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
1443
+ NOTEBOOKGUID => {:type => ::Thrift::Types::STRING, :name => 'notebookGuid', :optional => true},
1444
+ TAGGUIDS => {:type => ::Thrift::Types::LIST, :name => 'tagGuids', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
1445
+ RESOURCES => {:type => ::Thrift::Types::LIST, :name => 'resources', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Evernote::EDAM::Type::Resource}, :optional => true},
1446
+ ATTRIBUTES => {:type => ::Thrift::Types::STRUCT, :name => 'attributes', :class => ::Evernote::EDAM::Type::NoteAttributes, :optional => true},
1447
+ TAGNAMES => {:type => ::Thrift::Types::LIST, :name => 'tagNames', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
1448
+ }
1449
+
1450
+ def struct_fields; FIELDS; end
1451
+
1452
+ def validate
1453
+ end
1454
+
1455
+ ::Thrift::Struct.generate_accessors self
1456
+ end
1457
+
1458
+ # If a Notebook has been opened to the public, the Notebook will have a
1459
+ # reference to one of these structures, which gives the location and optional
1460
+ # description of the externally-visible public Notebook.
1461
+ # <dl>
1462
+ # <dt>uri</dt>
1463
+ # <dd>If this field is present, then the notebook is published for
1464
+ # mass consumption on the Internet under the provided URI, which is
1465
+ # relative to a defined base publishing URI defined by the service.
1466
+ # This field can only be modified via the web service GUI ... publishing
1467
+ # cannot be modified via an offline client.
1468
+ # <br/>
1469
+ # Length: EDAM_PUBLISHING_URI_LEN_MIN - EDAM_PUBLISHING_URI_LEN_MAX
1470
+ # <br/>
1471
+ # Regex: EDAM_PUBLISHING_URI_REGEX
1472
+ # </dd>
1473
+ #
1474
+ # <dt>order</dt>
1475
+ # <dd>When the notes are publicly displayed, they will be sorted
1476
+ # based on the requested criteria.
1477
+ # </dd>
1478
+ #
1479
+ # <dt>ascending</dt>
1480
+ # <dd>If this is set to true, then the public notes will be
1481
+ # displayed in ascending order (e.g. from oldest to newest). Otherwise,
1482
+ # the notes will be displayed in descending order (e.g. newest to oldest).
1483
+ # </dd>
1484
+ #
1485
+ # <dt>publicDescription</dt>
1486
+ # <dd>This field may be used to provide a short
1487
+ # description of the notebook, which may be displayed when (e.g.) the
1488
+ # notebook is shown in a public view. Can't begin or end with a space.
1489
+ # <br/>
1490
+ # Length: EDAM_PUBLISHING_DESCRIPTION_LEN_MIN -
1491
+ # EDAM_PUBLISHING_DESCRIPTION_LEN_MAX
1492
+ # <br/>
1493
+ # Regex: EDAM_PUBLISHING_DESCRIPTION_REGEX
1494
+ # </dd>
1495
+ #
1496
+ # </dl>
1497
+ class Publishing
1498
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1499
+ URI = 1
1500
+ ORDER = 2
1501
+ ASCENDING = 3
1502
+ PUBLICDESCRIPTION = 4
1503
+
1504
+ FIELDS = {
1505
+ URI => {:type => ::Thrift::Types::STRING, :name => 'uri', :optional => true},
1506
+ ORDER => {:type => ::Thrift::Types::I32, :name => 'order', :optional => true, :enum_class => ::Evernote::EDAM::Type::NoteSortOrder},
1507
+ ASCENDING => {:type => ::Thrift::Types::BOOL, :name => 'ascending', :optional => true},
1508
+ PUBLICDESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'publicDescription', :optional => true}
1509
+ }
1510
+
1511
+ def struct_fields; FIELDS; end
1512
+
1513
+ def validate
1514
+ unless @order.nil? || ::Evernote::EDAM::Type::NoteSortOrder::VALID_VALUES.include?(@order)
1515
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field order!')
1516
+ end
1517
+ end
1518
+
1519
+ ::Thrift::Struct.generate_accessors self
1520
+ end
1521
+
1522
+ # If a Notebook contained in an Evernote Business account has been published
1523
+ # the to business library, the Notebook will have a reference to one of these
1524
+ # structures, which specifies how the Notebook will be represented in the
1525
+ # library.
1526
+ #
1527
+ # <dl>
1528
+ # <dt>notebookDescription</dt>
1529
+ # <dd>A short description of the notebook's content that will be displayed
1530
+ # in the business library user interface. The description may not begin
1531
+ # or end with whitespace.
1532
+ # <br/>
1533
+ # Length: EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_LEN_MIN -
1534
+ # EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_LEN_MAX
1535
+ # <br/>
1536
+ # Regex: EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_REGEX
1537
+ # </dd>
1538
+ #
1539
+ # <dt>privilege</dt>
1540
+ # <dd>The privileges that will be granted to users who join the notebook through
1541
+ # the business library.
1542
+ # </dd>
1543
+ #
1544
+ # <dt>recommended</dt>
1545
+ # <dd>Whether the notebook should be "recommended" when displayed in the business
1546
+ # library user interface.
1547
+ # </dd>
1548
+ # </dl>
1549
+ class BusinessNotebook
1550
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1551
+ NOTEBOOKDESCRIPTION = 1
1552
+ PRIVILEGE = 2
1553
+ RECOMMENDED = 3
1554
+
1555
+ FIELDS = {
1556
+ NOTEBOOKDESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'notebookDescription', :optional => true},
1557
+ PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => ::Evernote::EDAM::Type::SharedNotebookPrivilegeLevel},
1558
+ RECOMMENDED => {:type => ::Thrift::Types::BOOL, :name => 'recommended', :optional => true}
1559
+ }
1560
+
1561
+ def struct_fields; FIELDS; end
1562
+
1563
+ def validate
1564
+ unless @privilege.nil? || ::Evernote::EDAM::Type::SharedNotebookPrivilegeLevel::VALID_VALUES.include?(@privilege)
1565
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field privilege!')
2179
1566
  end
2180
1567
  end
1568
+
1569
+ ::Thrift::Struct.generate_accessors self
1570
+ end
1571
+
1572
+ # A named search associated with the account that can be quickly re-used.
1573
+ # <dl>
1574
+ # <dt>guid</dt>
1575
+ # <dd>The unique identifier of this search. Will be set by the
1576
+ # service, so may be omitted by the client when creating.
1577
+ # <br/>
1578
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
1579
+ # <br/>
1580
+ # Regex: EDAM_GUID_REGEX
1581
+ # </dd>
1582
+ #
1583
+ # <dt>name</dt>
1584
+ # <dd>The name of the saved search to display in the GUI. The
1585
+ # account may only contain one search with a given name (case-insensitive
1586
+ # compare). Can't begin or end with a space.
1587
+ # <br/>
1588
+ # Length: EDAM_SAVED_SEARCH_NAME_LEN_MIN - EDAM_SAVED_SEARCH_NAME_LEN_MAX
1589
+ # <br/>
1590
+ # Regex: EDAM_SAVED_SEARCH_NAME_REGEX
1591
+ # </dd>
1592
+ #
1593
+ # <dt>query</dt>
1594
+ # <dd>A string expressing the search to be performed.
1595
+ # <br/>
1596
+ # Length: EDAM_SAVED_SEARCH_QUERY_LEN_MIN - EDAM_SAVED_SEARCH_QUERY_LEN_MAX
1597
+ # </dd>
1598
+ #
1599
+ # <dt>format</dt>
1600
+ # <dd>The format of the query string, to determine how to parse
1601
+ # and process it.
1602
+ # </dd>
1603
+ #
1604
+ # <dt>updateSequenceNum</dt>
1605
+ # <dd>A number identifying the last transaction to
1606
+ # modify the state of this object. The USN values are sequential within an
1607
+ # account, and can be used to compare the order of modifications within the
1608
+ # service.
1609
+ # </dd>
1610
+ # </dl>
1611
+ class SavedSearch
1612
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1613
+ GUID = 1
1614
+ NAME = 2
1615
+ QUERY = 3
1616
+ FORMAT = 4
1617
+ UPDATESEQUENCENUM = 5
1618
+
1619
+ FIELDS = {
1620
+ GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1621
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
1622
+ QUERY => {:type => ::Thrift::Types::STRING, :name => 'query', :optional => true},
1623
+ FORMAT => {:type => ::Thrift::Types::I32, :name => 'format', :optional => true, :enum_class => ::Evernote::EDAM::Type::QueryFormat},
1624
+ UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true}
1625
+ }
1626
+
1627
+ def struct_fields; FIELDS; end
1628
+
1629
+ def validate
1630
+ unless @format.nil? || ::Evernote::EDAM::Type::QueryFormat::VALID_VALUES.include?(@format)
1631
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field format!')
1632
+ end
1633
+ end
1634
+
1635
+ ::Thrift::Struct.generate_accessors self
2181
1636
  end
1637
+
1638
+ # Shared notebooks represent a relationship between a notebook and a single
1639
+ # share invitation recipient.
1640
+ # <dl>
1641
+ # <dt>id</dt>
1642
+ # <dd>the primary identifier of the share</dd>
1643
+ #
1644
+ # <dt>userId</dt>
1645
+ # <dd>the user id of the owner of the notebook</dd>
1646
+ #
1647
+ # <dt>notebookGuid</dt>
1648
+ # <dd>the GUID of the associated notebook shared.</dd>
1649
+ #
1650
+ # <dt>email</dt>
1651
+ # <dd>the email address of the recipient - used by the notebook
1652
+ # owner to identify who they shared with.</dd>
1653
+ #
1654
+ # <dt>notebookModifiable</dt>
1655
+ # <dd>(DEPRECATED) a flag indicating the share is read/write -otherwise it's read
1656
+ # only. This field is deprecated in favor of the new "privilege" field.</dd>
1657
+ #
1658
+ # <dt>requireLogin</dt>
1659
+ # <dd>(DEPRECATED) indicates that a user must login to access the share. This
1660
+ # field is deprecated and will be "true" for all new shared notebooks. It
1661
+ # is read-only and ignored when creating or modifying a shared notebook,
1662
+ # except that a shared notebook can be modified to require login.
1663
+ # See "allowPreview" for information on privileges and shared notebooks.</dd>
1664
+ #
1665
+ # <dt>serviceCreated</dt>
1666
+ # <dd>the date the owner first created the share with the specific email
1667
+ # address</dd>
1668
+ #
1669
+ # <dt>serviceUpdated</dt>
1670
+ # <dd>the date the shared notebook was last updated on the service. This
1671
+ # will be updated when authenticateToSharedNotebook is called the first
1672
+ # time with a shared notebook requiring login (i.e. when the username is
1673
+ # bound to that shared notebook).</dd>
1674
+ #
1675
+ # <dt>username</dt>
1676
+ # <dd>the username of the user who can access this share.
1677
+ # Once it's assigned it cannot be changed.</dd>
1678
+ #
1679
+ # <dt>privilege</dt>
1680
+ # <dd>The privilege level granted to the notebook, activity stream, and
1681
+ # invitations. See the corresponding enumeration for details.</dd>
1682
+ #
1683
+ # <dt>allowPreview</dt>
1684
+ # <dd>Whether or not to grant "READ_NOTEBOOK" privilege without an
1685
+ # authentication token, for authenticateToSharedNotebook(...). With
1686
+ # the change to "requireLogin" always being true for new shared
1687
+ # notebooks, this is the only way to access a shared notebook without
1688
+ # an authorization token. This setting expires after the first use
1689
+ # of authenticateToSharedNotebook(...) with a valid authentication
1690
+ # token.</dd>
1691
+ # </dl>
1692
+ class SharedNotebook
1693
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1694
+ ID = 1
1695
+ USERID = 2
1696
+ NOTEBOOKGUID = 3
1697
+ EMAIL = 4
1698
+ NOTEBOOKMODIFIABLE = 5
1699
+ REQUIRELOGIN = 6
1700
+ SERVICECREATED = 7
1701
+ SERVICEUPDATED = 10
1702
+ SHAREKEY = 8
1703
+ USERNAME = 9
1704
+ PRIVILEGE = 11
1705
+ ALLOWPREVIEW = 12
1706
+
1707
+ FIELDS = {
1708
+ ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true},
1709
+ USERID => {:type => ::Thrift::Types::I32, :name => 'userId', :optional => true},
1710
+ NOTEBOOKGUID => {:type => ::Thrift::Types::STRING, :name => 'notebookGuid', :optional => true},
1711
+ EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email', :optional => true},
1712
+ NOTEBOOKMODIFIABLE => {:type => ::Thrift::Types::BOOL, :name => 'notebookModifiable', :optional => true},
1713
+ REQUIRELOGIN => {:type => ::Thrift::Types::BOOL, :name => 'requireLogin', :optional => true},
1714
+ SERVICECREATED => {:type => ::Thrift::Types::I64, :name => 'serviceCreated', :optional => true},
1715
+ SERVICEUPDATED => {:type => ::Thrift::Types::I64, :name => 'serviceUpdated', :optional => true},
1716
+ SHAREKEY => {:type => ::Thrift::Types::STRING, :name => 'shareKey', :optional => true},
1717
+ USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
1718
+ PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => ::Evernote::EDAM::Type::SharedNotebookPrivilegeLevel},
1719
+ ALLOWPREVIEW => {:type => ::Thrift::Types::BOOL, :name => 'allowPreview', :optional => true}
1720
+ }
1721
+
1722
+ def struct_fields; FIELDS; end
1723
+
1724
+ def validate
1725
+ unless @privilege.nil? || ::Evernote::EDAM::Type::SharedNotebookPrivilegeLevel::VALID_VALUES.include?(@privilege)
1726
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field privilege!')
1727
+ end
1728
+ end
1729
+
1730
+ ::Thrift::Struct.generate_accessors self
1731
+ end
1732
+
1733
+ # This structure captures information about the types of operations
1734
+ # that cannot be performed on a given notebook with a type of
1735
+ # authenticated access and credentials. The values filled into this
1736
+ # structure are based on then-current values in the server database
1737
+ # for shared notebooks and notebook publishing records, as well as
1738
+ # information related to the authentication token. Information from
1739
+ # the authentication token includes the application that is accessing
1740
+ # the server, as defined by the permissions granted by consumer (api)
1741
+ # key, and the method used to obtain the token, for example via
1742
+ # authenticateToSharedNotebook, authenticateToBusiness, etc. Note
1743
+ # that changes to values in this structure that are the result of
1744
+ # shared notebook or publishing record changes are communicated to
1745
+ # the client via a change in the notebook USN during sync. It is
1746
+ # important to use the same access method, parameters, and consumer
1747
+ # key in order obtain correct results from the sync engine.
1748
+ #
1749
+ # The server has the final say on what is allowed as values may
1750
+ # change between calls to obtain NotebookRestrictions instances
1751
+ # and to operate on data on the service.
1752
+ #
1753
+ # If the following are set and true, then the given restriction is
1754
+ # in effect, as accessed by the same authentication token from which
1755
+ # the values were obtained.
1756
+ #
1757
+ # <dt>noReadNotes</dt>
1758
+ # <dd>The client is not able to read notes from the service and
1759
+ # the notebook is write-only.
1760
+ # </dd>
1761
+ # <dt>noCreateNotes</dt>
1762
+ # <dd>The client may not create new notes in the notebook.
1763
+ # </dd>
1764
+ # <dt>noUpdateNotes</dt>
1765
+ # <dd>The client may not update notes currently in the notebook.
1766
+ # </dd>
1767
+ # <dt>noExpungeNotes</dt>
1768
+ # <dd>The client may not expunge notes currently in the notebook.
1769
+ # </dd>
1770
+ # <dt>noShareNotes</dt>
1771
+ # <dd>The client may not share notes in the notebook via the
1772
+ # shareNote method.
1773
+ # </dd>
1774
+ # <dt>noEmailNotes</dt>
1775
+ # <dd>The client may not e-mail notes via the Evernote service by
1776
+ # using the emailNote method.
1777
+ # </dd>
1778
+ # <dt>noSendMessageToRecipients</dt>
1779
+ # <dd>The client may not send messages to the share recipients of
1780
+ # the notebook.
1781
+ # </dd>
1782
+ # <dt>noUpdateNotebook</dt>
1783
+ # <dd>The client may not update the Notebook object itself, for
1784
+ # example, via the updateNotebook method.
1785
+ # </dd>
1786
+ # <dt>noExpungeNotebook</dt>
1787
+ # <dd>The client may not expunge the Notebook object itself, for
1788
+ # example, via the expungeNotebook method.
1789
+ # </dd>
1790
+ # <dt>noSetDefaultNotebook</dt>
1791
+ # <dd>The client may not set this notebook to be the default notebook.
1792
+ # The caller should leave Notebook.defaultNotebook unset.
1793
+ # </dd>
1794
+ # <dt>noSetNotebookStack</dt>
1795
+ # <dd>If the client is able to update the Notebook, the Notebook.stack
1796
+ # value may not be set.
1797
+ # </dd>
1798
+ # <dt>noPublishToPublic</dt>
1799
+ # <dd>The client may not change the publish the notebook to the public.
1800
+ # For example, business notebooks may not be shared publicly.
1801
+ # </dd>
1802
+ # <dt>noPublishToBusinessLibrary</dt>
1803
+ # <dd>The client may not publish the notebook to the business library.
1804
+ # </dd>
1805
+ # <dt>noCreateTags</dt>
1806
+ # <dd>The client may not complete an operation that results in a new tag
1807
+ # being created in the owner's account.
1808
+ # </dd>
1809
+ # <dt>noUpdateTags</dt>
1810
+ # <dd>The client may not update tags in the owner's account.
1811
+ # </dd>
1812
+ # <dt>noExpungeTags</dt>
1813
+ # <dd>The client may not expunge tags in the owner's account.
1814
+ # </dd>
1815
+ # <dt>noSetParentTag</dt>
1816
+ # <dd>If the client is able to create or update tags in the owner's account,
1817
+ # then they will not be able to set the parent tag. Leave the value unset.
1818
+ # </dd>
1819
+ # <dt>noCreateSharedNotebooks</dt>
1820
+ # <dd>The client is unable to create shared notebooks for the notebook.
1821
+ # </dd>
1822
+ # <dt>updateWhichSharedNotebookRestrictions</dt>
1823
+ # <dd>Restrictions on which shared notebook instances can be updated. If the
1824
+ # value is not set or null, then the client can update any of the shared notebooks
1825
+ # associated with the notebook on which the NotebookRestrictions are defined.
1826
+ # See the enumeration for further details.
1827
+ # </dd>
1828
+ # <dt>expungeWhichSharedNotebookRestrictions</dt>
1829
+ # <dd>Restrictions on which shared notebook instances can be expunged. If the
1830
+ # value is not set or null, then the client can expunge any of the shared notebooks
1831
+ # associated with the notebook on which the NotebookRestrictions are defined.
1832
+ # See the enumeration for further details.
1833
+ # </dd>
1834
+ class NotebookRestrictions
1835
+ include ::Thrift::Struct, ::Thrift::Struct_Union
1836
+ NOREADNOTES = 1
1837
+ NOCREATENOTES = 2
1838
+ NOUPDATENOTES = 3
1839
+ NOEXPUNGENOTES = 4
1840
+ NOSHARENOTES = 5
1841
+ NOEMAILNOTES = 6
1842
+ NOSENDMESSAGETORECIPIENTS = 7
1843
+ NOUPDATENOTEBOOK = 8
1844
+ NOEXPUNGENOTEBOOK = 9
1845
+ NOSETDEFAULTNOTEBOOK = 10
1846
+ NOSETNOTEBOOKSTACK = 11
1847
+ NOPUBLISHTOPUBLIC = 12
1848
+ NOPUBLISHTOBUSINESSLIBRARY = 13
1849
+ NOCREATETAGS = 14
1850
+ NOUPDATETAGS = 15
1851
+ NOEXPUNGETAGS = 16
1852
+ NOSETPARENTTAG = 17
1853
+ NOCREATESHAREDNOTEBOOKS = 18
1854
+ UPDATEWHICHSHAREDNOTEBOOKRESTRICTIONS = 19
1855
+ EXPUNGEWHICHSHAREDNOTEBOOKRESTRICTIONS = 20
1856
+
1857
+ FIELDS = {
1858
+ NOREADNOTES => {:type => ::Thrift::Types::BOOL, :name => 'noReadNotes', :optional => true},
1859
+ NOCREATENOTES => {:type => ::Thrift::Types::BOOL, :name => 'noCreateNotes', :optional => true},
1860
+ NOUPDATENOTES => {:type => ::Thrift::Types::BOOL, :name => 'noUpdateNotes', :optional => true},
1861
+ NOEXPUNGENOTES => {:type => ::Thrift::Types::BOOL, :name => 'noExpungeNotes', :optional => true},
1862
+ NOSHARENOTES => {:type => ::Thrift::Types::BOOL, :name => 'noShareNotes', :optional => true},
1863
+ NOEMAILNOTES => {:type => ::Thrift::Types::BOOL, :name => 'noEmailNotes', :optional => true},
1864
+ NOSENDMESSAGETORECIPIENTS => {:type => ::Thrift::Types::BOOL, :name => 'noSendMessageToRecipients', :optional => true},
1865
+ NOUPDATENOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'noUpdateNotebook', :optional => true},
1866
+ NOEXPUNGENOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'noExpungeNotebook', :optional => true},
1867
+ NOSETDEFAULTNOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'noSetDefaultNotebook', :optional => true},
1868
+ NOSETNOTEBOOKSTACK => {:type => ::Thrift::Types::BOOL, :name => 'noSetNotebookStack', :optional => true},
1869
+ NOPUBLISHTOPUBLIC => {:type => ::Thrift::Types::BOOL, :name => 'noPublishToPublic', :optional => true},
1870
+ NOPUBLISHTOBUSINESSLIBRARY => {:type => ::Thrift::Types::BOOL, :name => 'noPublishToBusinessLibrary', :optional => true},
1871
+ NOCREATETAGS => {:type => ::Thrift::Types::BOOL, :name => 'noCreateTags', :optional => true},
1872
+ NOUPDATETAGS => {:type => ::Thrift::Types::BOOL, :name => 'noUpdateTags', :optional => true},
1873
+ NOEXPUNGETAGS => {:type => ::Thrift::Types::BOOL, :name => 'noExpungeTags', :optional => true},
1874
+ NOSETPARENTTAG => {:type => ::Thrift::Types::BOOL, :name => 'noSetParentTag', :optional => true},
1875
+ NOCREATESHAREDNOTEBOOKS => {:type => ::Thrift::Types::BOOL, :name => 'noCreateSharedNotebooks', :optional => true},
1876
+ UPDATEWHICHSHAREDNOTEBOOKRESTRICTIONS => {:type => ::Thrift::Types::I32, :name => 'updateWhichSharedNotebookRestrictions', :optional => true, :enum_class => ::Evernote::EDAM::Type::SharedNotebookInstanceRestrictions},
1877
+ EXPUNGEWHICHSHAREDNOTEBOOKRESTRICTIONS => {:type => ::Thrift::Types::I32, :name => 'expungeWhichSharedNotebookRestrictions', :optional => true, :enum_class => ::Evernote::EDAM::Type::SharedNotebookInstanceRestrictions}
1878
+ }
1879
+
1880
+ def struct_fields; FIELDS; end
1881
+
1882
+ def validate
1883
+ unless @updateWhichSharedNotebookRestrictions.nil? || ::Evernote::EDAM::Type::SharedNotebookInstanceRestrictions::VALID_VALUES.include?(@updateWhichSharedNotebookRestrictions)
1884
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field updateWhichSharedNotebookRestrictions!')
1885
+ end
1886
+ unless @expungeWhichSharedNotebookRestrictions.nil? || ::Evernote::EDAM::Type::SharedNotebookInstanceRestrictions::VALID_VALUES.include?(@expungeWhichSharedNotebookRestrictions)
1887
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field expungeWhichSharedNotebookRestrictions!')
1888
+ end
1889
+ end
1890
+
1891
+ ::Thrift::Struct.generate_accessors self
1892
+ end
1893
+
1894
+ # A unique container for a set of notes.
1895
+ # <dl>
1896
+ # <dt>guid</dt>
1897
+ # <dd>The unique identifier of this notebook.
1898
+ # <br/>
1899
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
1900
+ # <br/>
1901
+ # Regex: EDAM_GUID_REGEX
1902
+ # </dd>
1903
+ #
1904
+ # <dt>name</dt>
1905
+ # <dd>A sequence of characters representing the name of the
1906
+ # notebook. May be changed by clients, but the account may not contain two
1907
+ # notebooks with names that are equal via a case-insensitive comparison.
1908
+ # Can't begin or end with a space.
1909
+ # <br/>
1910
+ # Length: EDAM_NOTEBOOK_NAME_LEN_MIN - EDAM_NOTEBOOK_NAME_LEN_MAX
1911
+ # <br/>
1912
+ # Regex: EDAM_NOTEBOOK_NAME_REGEX
1913
+ # </dd>
1914
+ #
1915
+ # <dt>updateSequenceNum</dt>
1916
+ # <dd>A number identifying the last transaction to
1917
+ # modify the state of this object. The USN values are sequential within an
1918
+ # account, and can be used to compare the order of modifications within the
1919
+ # service.
1920
+ # </dd>
1921
+ #
1922
+ # <dt>defaultNotebook</dt>
1923
+ # <dd>If true, this notebook should be used for new notes
1924
+ # whenever the user has not (or cannot) specify a desired target notebook.
1925
+ # For example, if a note is submitted via SMTP email.
1926
+ # The service will maintain at most one defaultNotebook per account.
1927
+ # If a second notebook is created or updated with defaultNotebook set to
1928
+ # true, the service will automatically update the prior notebook's
1929
+ # defaultNotebook field to false. If the default notebook is deleted
1930
+ # (i.e. "active" set to false), the "defaultNotebook" field will be
1931
+ # set to false by the service. If the account has no default notebook
1932
+ # set, the service will use the most recent notebook as the default.
1933
+ # </dd>
1934
+ #
1935
+ # <dt>serviceCreated</dt>
1936
+ # <dd>The time when this notebook was created on the
1937
+ # service. This will be set on the service during creation, and the service
1938
+ # will provide this value when it returns a Notebook to a client.
1939
+ # The service will ignore this value if it is sent by clients.
1940
+ # </dd>
1941
+ #
1942
+ # <dt>serviceUpdated</dt>
1943
+ # <dd>The time when this notebook was last modified on the
1944
+ # service. This will be set on the service during creation, and the service
1945
+ # will provide this value when it returns a Notebook to a client.
1946
+ # The service will ignore this value if it is sent by clients.
1947
+ # </dd>
1948
+ #
1949
+ # <dt>publishing</dt>
1950
+ # <dd>If the Notebook has been opened for public access, or
1951
+ # business users shared with their business (i.e. if 'published' is
1952
+ # set to true), then this will point to the set of publishing
1953
+ # information for the Notebook (URI, description, etc.). A
1954
+ # Notebook cannot be published without providing this information,
1955
+ # but it will persist for later use if publishing is ever disabled
1956
+ # on the Notebook. Clients that do not wish to change the
1957
+ # publishing behavior of a Notebook should not set this value when
1958
+ # calling NoteStore.updateNotebook().
1959
+ # </dd>
1960
+ #
1961
+ # <dt>published</dt>
1962
+ # <dd>If this is set to true, then the Notebook will be
1963
+ # accessible either to the public, or for business users to their business,
1964
+ # via the 'publishing' specification, which must also be set. If this is set
1965
+ # to false, the Notebook will not be available to the public (or business).
1966
+ # Clients that do not wish to change the publishing behavior of a Notebook
1967
+ # should not set this value when calling NoteStore.updateNotebook().
1968
+ # </dd>
1969
+ #
1970
+ # <dt>stack</dt>
1971
+ # <dd>If this is set, then the notebook is visually contained within a stack
1972
+ # of notebooks with this name. All notebooks in the same account with the
1973
+ # same 'stack' field are considered to be in the same stack.
1974
+ # Notebooks with no stack set are "top level" and not contained within a
1975
+ # stack.
1976
+ # </dd>
1977
+ #
1978
+ # <dt>sharedNotebookIds</dt>
1979
+ # <dd><i>DEPRECATED</i> - replaced by sharedNotebooks.</dd>
1980
+ #
1981
+ # <dt>sharedNotebooks</dt>
1982
+ # <dd>The list of recipients to whom this notebook has been shared
1983
+ # (one SharedNotebook object per recipient email address). This field will
1984
+ # be unset if you do not have permission to access this data. If you are
1985
+ # accessing the notebook as the owner or via a shared notebook that is
1986
+ # modifiable, then you have access to this data and the value will be set.
1987
+ # This field is read-only. Clients may not make changes to shared notebooks
1988
+ # via this field.
1989
+ # </dd>
1990
+ #
1991
+ # <dt>businessNotebook</dt>
1992
+ # <dd>If the notebook is part of a business account and has been published to the
1993
+ # business library, this will contain information for the library listing.
1994
+ # The presence or absence of this field is not a reliable test of whether a given
1995
+ # notebook is in fact a business notebook - the field is only used when a notebook is or
1996
+ # has been published to the business library.
1997
+ # </dd>
1998
+ #
1999
+ # <dt>contact</dt>
2000
+ # <dd>Intended for use with Business accounts, this field identifies the user who
2001
+ # has been designated as the "contact". For notebooks created in business
2002
+ # accounts, the server will automatically set this value to the user who created
2003
+ # the notebook unless Notebook.contact.username has been set, in which that value
2004
+ # will be used. When updating a notebook, it is common to leave Notebook.contact
2005
+ # field unset, indicating that no change to the value is being requested and that
2006
+ # the existing value, if any, should be preserved.
2007
+ # </dd>
2008
+ #
2009
+ # </dl>
2010
+ class Notebook
2011
+ include ::Thrift::Struct, ::Thrift::Struct_Union
2012
+ GUID = 1
2013
+ NAME = 2
2014
+ UPDATESEQUENCENUM = 5
2015
+ DEFAULTNOTEBOOK = 6
2016
+ SERVICECREATED = 7
2017
+ SERVICEUPDATED = 8
2018
+ PUBLISHING = 10
2019
+ PUBLISHED = 11
2020
+ STACK = 12
2021
+ SHAREDNOTEBOOKIDS = 13
2022
+ SHAREDNOTEBOOKS = 14
2023
+ BUSINESSNOTEBOOK = 15
2024
+ CONTACT = 16
2025
+ RESTRICTIONS = 17
2026
+
2027
+ FIELDS = {
2028
+ GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
2029
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
2030
+ UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
2031
+ DEFAULTNOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'defaultNotebook', :optional => true},
2032
+ SERVICECREATED => {:type => ::Thrift::Types::I64, :name => 'serviceCreated', :optional => true},
2033
+ SERVICEUPDATED => {:type => ::Thrift::Types::I64, :name => 'serviceUpdated', :optional => true},
2034
+ PUBLISHING => {:type => ::Thrift::Types::STRUCT, :name => 'publishing', :class => ::Evernote::EDAM::Type::Publishing, :optional => true},
2035
+ PUBLISHED => {:type => ::Thrift::Types::BOOL, :name => 'published', :optional => true},
2036
+ STACK => {:type => ::Thrift::Types::STRING, :name => 'stack', :optional => true},
2037
+ SHAREDNOTEBOOKIDS => {:type => ::Thrift::Types::LIST, :name => 'sharedNotebookIds', :element => {:type => ::Thrift::Types::I64}, :optional => true},
2038
+ SHAREDNOTEBOOKS => {:type => ::Thrift::Types::LIST, :name => 'sharedNotebooks', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Evernote::EDAM::Type::SharedNotebook}, :optional => true},
2039
+ BUSINESSNOTEBOOK => {:type => ::Thrift::Types::STRUCT, :name => 'businessNotebook', :class => ::Evernote::EDAM::Type::BusinessNotebook, :optional => true},
2040
+ CONTACT => {:type => ::Thrift::Types::STRUCT, :name => 'contact', :class => ::Evernote::EDAM::Type::User, :optional => true},
2041
+ RESTRICTIONS => {:type => ::Thrift::Types::STRUCT, :name => 'restrictions', :class => ::Evernote::EDAM::Type::NotebookRestrictions, :optional => true}
2042
+ }
2043
+
2044
+ def struct_fields; FIELDS; end
2045
+
2046
+ def validate
2047
+ end
2048
+
2049
+ ::Thrift::Struct.generate_accessors self
2050
+ end
2051
+
2052
+ # A link in an users account that refers them to a public or individual share in
2053
+ # another user's account.
2054
+ #
2055
+ # <dl>
2056
+ # <dt>shareName</dt>
2057
+ # <dd>the display name of the shared notebook.
2058
+ # The link owner can change this.</dd>
2059
+ #
2060
+ # <dt>username</dt>
2061
+ # <dd>the username of the user who owns the shared or public notebook</dd>
2062
+ #
2063
+ # <dt>shardId</dt>
2064
+ # <dd>the shard ID of the notebook if the notebook is not public</dt>
2065
+ #
2066
+ # <dt>shareKey</dt>
2067
+ # <dd>the secret key that provides access to the shared notebook</dd>
2068
+ #
2069
+ # <dt>uri</dt>
2070
+ # <dd>the identifier of the public notebook</dd>
2071
+ #
2072
+ # <dt>guid</dt>
2073
+ # <dd>The unique identifier of this linked notebook. Will be set whenever
2074
+ # a linked notebook is retrieved from the service, but may be null when a client
2075
+ # is creating a linked notebook.
2076
+ # <br/>
2077
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
2078
+ # <br/>
2079
+ # Regex: EDAM_GUID_REGEX
2080
+ # </dd>
2081
+ #
2082
+ # <dt>updateSequenceNum</dt>
2083
+ # <dd>A number identifying the last transaction to
2084
+ # modify the state of this object. The USN values are sequential within an
2085
+ # account, and can be used to compare the order of modifications within the
2086
+ # service.
2087
+ # </dd>
2088
+ #
2089
+ # <dt>noteStoreUrl</dt>
2090
+ # <dd>
2091
+ # This field will contain the full URL that clients should use to make
2092
+ # NoteStore requests to the server shard that contains that notebook's data.
2093
+ # I.e. this is the URL that should be used to create the Thrift HTTP client
2094
+ # transport to send messages to the NoteStore service for the account.
2095
+ # </dd>
2096
+ #
2097
+ # <dt>webApiUrlPrefix:</dt>
2098
+ # <dd>
2099
+ # This field will contain the initial part of the URLs that should be used
2100
+ # to make requests to Evernote's thin client "web API", which provide
2101
+ # optimized operations for clients that aren't capable of manipulating
2102
+ # the full contents of accounts via the full Thrift data model. Clients
2103
+ # should concatenate the relative path for the various servlets onto the
2104
+ # end of this string to construct the full URL, as documented on our
2105
+ # developer web site.
2106
+ # </dd>
2107
+ #
2108
+ # <dt>stack</dt>
2109
+ # <dd>If this is set, then the notebook is visually contained within a stack
2110
+ # of notebooks with this name. All notebooks in the same account with the
2111
+ # same 'stack' field are considered to be in the same stack.
2112
+ # Notebooks with no stack set are "top level" and not contained within a
2113
+ # stack. The link owner can change this and this field is for the benefit
2114
+ # of the link owner.
2115
+ # </dd>
2116
+ #
2117
+ # <dt>businessId</dt>
2118
+ # <dd>If set, this will be the unique identifier for the business that owns
2119
+ # the notebook to which the linked notebook refers.
2120
+ #
2121
+ # </dl>
2122
+ class LinkedNotebook
2123
+ include ::Thrift::Struct, ::Thrift::Struct_Union
2124
+ SHARENAME = 2
2125
+ USERNAME = 3
2126
+ SHARDID = 4
2127
+ SHAREKEY = 5
2128
+ URI = 6
2129
+ GUID = 7
2130
+ UPDATESEQUENCENUM = 8
2131
+ NOTESTOREURL = 9
2132
+ WEBAPIURLPREFIX = 10
2133
+ STACK = 11
2134
+ BUSINESSID = 12
2135
+
2136
+ FIELDS = {
2137
+ SHARENAME => {:type => ::Thrift::Types::STRING, :name => 'shareName', :optional => true},
2138
+ USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
2139
+ SHARDID => {:type => ::Thrift::Types::STRING, :name => 'shardId', :optional => true},
2140
+ SHAREKEY => {:type => ::Thrift::Types::STRING, :name => 'shareKey', :optional => true},
2141
+ URI => {:type => ::Thrift::Types::STRING, :name => 'uri', :optional => true},
2142
+ GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
2143
+ UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
2144
+ NOTESTOREURL => {:type => ::Thrift::Types::STRING, :name => 'noteStoreUrl', :optional => true},
2145
+ WEBAPIURLPREFIX => {:type => ::Thrift::Types::STRING, :name => 'webApiUrlPrefix', :optional => true},
2146
+ STACK => {:type => ::Thrift::Types::STRING, :name => 'stack', :optional => true},
2147
+ BUSINESSID => {:type => ::Thrift::Types::I32, :name => 'businessId', :optional => true}
2148
+ }
2149
+
2150
+ def struct_fields; FIELDS; end
2151
+
2152
+ def validate
2153
+ end
2154
+
2155
+ ::Thrift::Struct.generate_accessors self
2156
+ end
2157
+
2158
+ # A structure that describes a notebook or a user's relationship with
2159
+ # a notebook. NotebookDescriptor is expected to remain a lighter-weight
2160
+ # structure when compared to Notebook.
2161
+ # <dl>
2162
+ # <dt>guid</dt>
2163
+ # <dd>The unique identifier of the notebook.
2164
+ # </dd>
2165
+ #
2166
+ # <dt>notebookDisplayName</dt>
2167
+ # <dd>A sequence of characters representing the name of the
2168
+ # notebook.
2169
+ # </dd>
2170
+ #
2171
+ # <dt>contactName</dt>
2172
+ # <dd>The User.name value of the notebook's "contact".
2173
+ # </dd>
2174
+ #
2175
+ # <dt>hasSharedNotebook</dt>
2176
+ # <dd>Whether a SharedNotebook record exists between the calling user and this
2177
+ # notebook.
2178
+ # </dd>
2179
+ #
2180
+ # <dt>joinedUserCount</dt>
2181
+ # <dd>The number of users who have joined this notebook.
2182
+ # </dd>
2183
+ #
2184
+ # </dl>
2185
+ class NotebookDescriptor
2186
+ include ::Thrift::Struct, ::Thrift::Struct_Union
2187
+ GUID = 1
2188
+ NOTEBOOKDISPLAYNAME = 2
2189
+ CONTACTNAME = 3
2190
+ HASSHAREDNOTEBOOK = 4
2191
+ JOINEDUSERCOUNT = 5
2192
+
2193
+ FIELDS = {
2194
+ GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
2195
+ NOTEBOOKDISPLAYNAME => {:type => ::Thrift::Types::STRING, :name => 'notebookDisplayName', :optional => true},
2196
+ CONTACTNAME => {:type => ::Thrift::Types::STRING, :name => 'contactName', :optional => true},
2197
+ HASSHAREDNOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'hasSharedNotebook', :optional => true},
2198
+ JOINEDUSERCOUNT => {:type => ::Thrift::Types::I32, :name => 'joinedUserCount', :optional => true}
2199
+ }
2200
+
2201
+ def struct_fields; FIELDS; end
2202
+
2203
+ def validate
2204
+ end
2205
+
2206
+ ::Thrift::Struct.generate_accessors self
2207
+ end
2208
+
2209
+ end
2210
+ end
2211
+ end