evernote 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,20 @@
1
+ #
2
+ # Autogenerated by Thrift
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'types_types'
8
+
9
+ module Evernote
10
+ module EDAM
11
+ module Type
12
+ EDAM_NOTE_SOURCE_WEB_CLIP = %q"web.clip"
13
+
14
+ EDAM_NOTE_SOURCE_MAIL_CLIP = %q"mail.clip"
15
+
16
+ EDAM_NOTE_SOURCE_MAIL_SMTP_GATEWAY = %q"mail.smtp"
17
+
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,1533 @@
1
+ #
2
+ # Autogenerated by Thrift
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'limits_types'
8
+
9
+
10
+ module Evernote
11
+ module EDAM
12
+ 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
+ VALUE_MAP = {1 => "CREATED", 2 => "UPDATED", 3 => "RELEVANCE", 4 => "UPDATE_SEQUENCE_NUMBER"}
36
+ VALID_VALUES = Set.new([CREATED, UPDATED, RELEVANCE, UPDATE_SEQUENCE_NUMBER]).freeze
37
+ end
38
+
39
+ module PremiumOrderStatus
40
+ NONE = 0
41
+ PENDING = 1
42
+ ACTIVE = 2
43
+ FAILED = 3
44
+ CANCELLATION_PENDING = 4
45
+ CANCELED = 5
46
+ VALUE_MAP = {0 => "NONE", 1 => "PENDING", 2 => "ACTIVE", 3 => "FAILED", 4 => "CANCELLATION_PENDING", 5 => "CANCELED"}
47
+ VALID_VALUES = Set.new([NONE, PENDING, ACTIVE, FAILED, CANCELLATION_PENDING, CANCELED]).freeze
48
+ end
49
+
50
+ # In several places, EDAM exchanges blocks of bytes of data for a component
51
+ # which may be relatively large. For example: the contents of a clipped
52
+ # HTML note, the bytes of an embedded image, or the recognition XML for
53
+ # a large image. This structure is used in the protocol to represent
54
+ # any of those large blocks of data when they are transmitted or when
55
+ # they are only referenced their metadata.
56
+ #
57
+ # <dl>
58
+ # <dt>bodyHash</dt>
59
+ # <dd>This field carries a one-way hash of the contents of the
60
+ # data body, in binary form. The hash function is MD5<br/>
61
+ # Length: EDAM_HASH_LEN (exactly)
62
+ # </dd>
63
+ #
64
+ # <dt>size</dt>
65
+ # <dd>The length, in bytes, of the data body.
66
+ # </dd>
67
+ #
68
+ # <dt>body</dt>
69
+ # <dd>This field is set to contain the binary contents of the data
70
+ # whenever the resource is being transferred. If only metadata is
71
+ # being exchanged, this field will be empty. For example, a client could
72
+ # notify the service about the change to an attribute for a resource
73
+ # without transmitting the binary resource contents.
74
+ # </dd>
75
+ # </dl>
76
+ class Data
77
+ include ::Thrift::Struct
78
+ BODYHASH = 1
79
+ SIZE = 2
80
+ BODY = 3
81
+
82
+ ::Thrift::Struct.field_accessor self, :bodyHash, :size, :body
83
+ FIELDS = {
84
+ BODYHASH => {:type => ::Thrift::Types::STRING, :name => 'bodyHash', :optional => true},
85
+ SIZE => {:type => ::Thrift::Types::I32, :name => 'size', :optional => true},
86
+ BODY => {:type => ::Thrift::Types::STRING, :name => 'body', :optional => true}
87
+ }
88
+
89
+ def struct_fields; FIELDS; end
90
+
91
+ def validate
92
+ end
93
+
94
+ end
95
+
96
+ # A structure holding the optional attributes that can be stored
97
+ # on a User. These are generally less critical than the core User fields.
98
+ #
99
+ # <dl>
100
+ # <dt>defaultLocationName</dt>
101
+ # <dd>the location string that should be associated
102
+ # with the user in order to determine where notes are taken if not otherwise
103
+ # specified.<br/>
104
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
105
+ # </dd>
106
+ #
107
+ # <dt>defaultLatitude</dt>
108
+ # <dd>if set, this is the latitude that should be
109
+ # assigned to any notes that have no other latitude information.
110
+ # </dd>
111
+ #
112
+ # <dt>defaultLongitude</dt>
113
+ # <dd>if set, this is the longitude that should be
114
+ # assigned to any notes that have no other longitude information.
115
+ # </dd>
116
+ #
117
+ # <dt>preactivation</dt>
118
+ # <dd>if set, the user account is not yet confirmed for
119
+ # login. I.e. the account has been created, but we are still waiting for
120
+ # the user to complete the activation step.
121
+ # </dd>
122
+ #
123
+ # <dt>viewedPromotions</dt>
124
+ # <dd>a list of promotions the user has seen.
125
+ # This list may occasionally be modified by the system when promotions are
126
+ # no longer available.<br/>
127
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
128
+ # </dd>
129
+ #
130
+ # <dt>incomingEmailAddress</dt>
131
+ # <dd>if set, this is the email address that the
132
+ # user may send email to in order to add an email note directly into the
133
+ # account via the SMTP email gateway. This is the part of the email
134
+ # address before the '@' symbol ... our domain is not included.
135
+ # If this is not set, the user may not add notes via the gateway.<br/>
136
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
137
+ # </dd>
138
+ #
139
+ # <dt>recentMailedAddresses</dt>
140
+ # <dd>if set, this will contain a list of email
141
+ # addresses that have recently been used as recipients
142
+ # of outbound emails by the user. This can be used to pre-populate a
143
+ # list of possible destinations when a user wishes to send a note via
144
+ # email.<br/>
145
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX each<br/>
146
+ # Max: EDAM_USER_RECENT_MAILED_ADDRESSES_MAX entries
147
+ # </dd>
148
+ #
149
+ # <dt>comments</dt>
150
+ # <dd>Free-form text field that may hold general support
151
+ # information, etc.<br/>
152
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
153
+ # </dd>
154
+ #
155
+ # <dt>dateAgreedToTermsOfService</dt>
156
+ # <dd>The date/time when the user agreed to
157
+ # the terms of service. This can be used as the effective "start date"
158
+ # for the account.
159
+ # </dd>
160
+ #
161
+ # <dt>maxReferrals</dt>
162
+ # <dd>The number of referrals that the user is permitted
163
+ # to make.
164
+ # </dd>
165
+ #
166
+ # <dt>referralCount</dt>
167
+ # <dd>The number of referrals sent from this account.
168
+ # </dd>
169
+ #
170
+ # <dt>refererCode</dt>
171
+ # <dd>A code indicating where the user was sent from. AKA
172
+ # promotion code
173
+ # </dd>
174
+ #
175
+ # <dt>sentEmailDate</dt>
176
+ # <dd>The most recent date when the user sent outbound
177
+ # emails from the service. Used with sentEmailCount to limit the number
178
+ # of emails that can be sent per day.
179
+ # </dd>
180
+ #
181
+ # <dt>sentEmailCount</dt>
182
+ # <dd>The number of emails that were sent from the user
183
+ # via the service on sentEmailDate. Used to enforce a limit on the number
184
+ # of emails per user per day to prevent spamming.
185
+ # </dd>
186
+ #
187
+ # <dt>dailyEmailLimit</dt>
188
+ # <dd>If set, this is the maximum number of emails that
189
+ # may be sent in a given day from this account. If unset, the server will
190
+ # use the configured default limit.
191
+ # </dd>
192
+ #
193
+ # <dt>emailOptOutDate</dt>
194
+ # <dd>If set, this is the date when the user asked
195
+ # to be excluded from offers and promotions sent by Evernote. If not set,
196
+ # then the user currently agrees to receive these messages.
197
+ # </dd>
198
+ #
199
+ # <dt>partnerEmailOptInDate</dt>
200
+ # <dd>If set, this is the date when the user asked
201
+ # to be included in offers and promotions sent by Evernote's partners.
202
+ # If not sent, then the user currently does not agree to receive these
203
+ # emails.
204
+ # </dd>
205
+ #
206
+ # <dt>preferredLanguage</dt>
207
+ # <dd>a 2 character language codes based on:
208
+ # http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt used for
209
+ # localization purposes to determine what language to use for the web
210
+ # interface and for other direct communication (e.g. emails).
211
+ # </dd>
212
+ #
213
+ # <dt>preferredCountry</dt>
214
+ # <dd>Preferred country code based on ISO 3166-1-alpha-2 indicating the
215
+ # users preferred country</dd>
216
+ #
217
+ # <dt>clipFullPage</dt>
218
+ # <dd>Boolean flag set to true if the user wants to clip full pages by
219
+ # default when they use the web clipper without a selection.</dd>
220
+ #
221
+ # <dt>twitterUserName</dt>
222
+ # <dd>The username of the account of someone who has chosen to enable
223
+ # Twittering into Evernote. This value is subject to change, since users
224
+ # may change their Twitter user name.</dd>
225
+ #
226
+ # <dt>twitterId</dt>
227
+ # <dd>The unique identifier of the user's Twitter account if that user
228
+ # has chosen to enable Twittering into Evernote.</dd>
229
+ #
230
+ # <dt>groupName</dt>
231
+ # <dd>A name identifier used to identify a particular set of branding and
232
+ # light customization.</dd>
233
+ #
234
+ # <dt>recognitionLanguage</dt>
235
+ # <dd>a 2 character language codes based on:
236
+ # http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt
237
+ # If set, this is used to determine the language that should be used
238
+ # when processing images and PDF files to find text.
239
+ # If not set, then the 'preferredLanguage' will be used.
240
+ # </dd>
241
+ # </dl>
242
+ #
243
+ # <dt>customerProfileId</dt>
244
+ # <dd>a numeric identified which provides a linkage between the user record
245
+ # and the direct credit card payment creditcard profile.
246
+ # </dd>
247
+ # </dl>
248
+ #
249
+ class UserAttributes
250
+ include ::Thrift::Struct
251
+ DEFAULTLOCATIONNAME = 1
252
+ DEFAULTLATITUDE = 2
253
+ DEFAULTLONGITUDE = 3
254
+ PREACTIVATION = 4
255
+ VIEWEDPROMOTIONS = 5
256
+ INCOMINGEMAILADDRESS = 6
257
+ RECENTMAILEDADDRESSES = 7
258
+ COMMENTS = 9
259
+ DATEAGREEDTOTERMSOFSERVICE = 11
260
+ MAXREFERRALS = 12
261
+ REFERRALCOUNT = 13
262
+ REFERERCODE = 14
263
+ SENTEMAILDATE = 15
264
+ SENTEMAILCOUNT = 16
265
+ DAILYEMAILLIMIT = 17
266
+ EMAILOPTOUTDATE = 18
267
+ PARTNEREMAILOPTINDATE = 19
268
+ PREFERREDLANGUAGE = 20
269
+ PREFERREDCOUNTRY = 21
270
+ CLIPFULLPAGE = 22
271
+ TWITTERUSERNAME = 23
272
+ TWITTERID = 24
273
+ GROUPNAME = 25
274
+ RECOGNITIONLANGUAGE = 26
275
+ CUSTOMERPROFILEID = 27
276
+
277
+ ::Thrift::Struct.field_accessor self, :defaultLocationName, :defaultLatitude, :defaultLongitude, :preactivation, :viewedPromotions, :incomingEmailAddress, :recentMailedAddresses, :comments, :dateAgreedToTermsOfService, :maxReferrals, :referralCount, :refererCode, :sentEmailDate, :sentEmailCount, :dailyEmailLimit, :emailOptOutDate, :partnerEmailOptInDate, :preferredLanguage, :preferredCountry, :clipFullPage, :twitterUserName, :twitterId, :groupName, :recognitionLanguage, :customerProfileId
278
+ FIELDS = {
279
+ DEFAULTLOCATIONNAME => {:type => ::Thrift::Types::STRING, :name => 'defaultLocationName', :optional => true},
280
+ DEFAULTLATITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'defaultLatitude', :optional => true},
281
+ DEFAULTLONGITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'defaultLongitude', :optional => true},
282
+ PREACTIVATION => {:type => ::Thrift::Types::BOOL, :name => 'preactivation', :optional => true},
283
+ VIEWEDPROMOTIONS => {:type => ::Thrift::Types::LIST, :name => 'viewedPromotions', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
284
+ INCOMINGEMAILADDRESS => {:type => ::Thrift::Types::STRING, :name => 'incomingEmailAddress', :optional => true},
285
+ RECENTMAILEDADDRESSES => {:type => ::Thrift::Types::LIST, :name => 'recentMailedAddresses', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
286
+ COMMENTS => {:type => ::Thrift::Types::STRING, :name => 'comments', :optional => true},
287
+ DATEAGREEDTOTERMSOFSERVICE => {:type => ::Thrift::Types::I64, :name => 'dateAgreedToTermsOfService', :optional => true},
288
+ MAXREFERRALS => {:type => ::Thrift::Types::I32, :name => 'maxReferrals', :optional => true},
289
+ REFERRALCOUNT => {:type => ::Thrift::Types::I32, :name => 'referralCount', :optional => true},
290
+ REFERERCODE => {:type => ::Thrift::Types::STRING, :name => 'refererCode', :optional => true},
291
+ SENTEMAILDATE => {:type => ::Thrift::Types::I64, :name => 'sentEmailDate', :optional => true},
292
+ SENTEMAILCOUNT => {:type => ::Thrift::Types::I32, :name => 'sentEmailCount', :optional => true},
293
+ DAILYEMAILLIMIT => {:type => ::Thrift::Types::I32, :name => 'dailyEmailLimit', :optional => true},
294
+ EMAILOPTOUTDATE => {:type => ::Thrift::Types::I64, :name => 'emailOptOutDate', :optional => true},
295
+ PARTNEREMAILOPTINDATE => {:type => ::Thrift::Types::I64, :name => 'partnerEmailOptInDate', :optional => true},
296
+ PREFERREDLANGUAGE => {:type => ::Thrift::Types::STRING, :name => 'preferredLanguage', :optional => true},
297
+ PREFERREDCOUNTRY => {:type => ::Thrift::Types::STRING, :name => 'preferredCountry', :optional => true},
298
+ CLIPFULLPAGE => {:type => ::Thrift::Types::BOOL, :name => 'clipFullPage', :optional => true},
299
+ TWITTERUSERNAME => {:type => ::Thrift::Types::STRING, :name => 'twitterUserName', :optional => true},
300
+ TWITTERID => {:type => ::Thrift::Types::STRING, :name => 'twitterId', :optional => true},
301
+ GROUPNAME => {:type => ::Thrift::Types::STRING, :name => 'groupName', :optional => true},
302
+ RECOGNITIONLANGUAGE => {:type => ::Thrift::Types::STRING, :name => 'recognitionLanguage', :optional => true},
303
+ CUSTOMERPROFILEID => {:type => ::Thrift::Types::I64, :name => 'customerProfileId', :optional => true}
304
+ }
305
+
306
+ def struct_fields; FIELDS; end
307
+
308
+ def validate
309
+ end
310
+
311
+ end
312
+
313
+ # This represents the bookkeeping information for the user's subscription.
314
+ #
315
+ # <dl>
316
+ # <dt>uploadLimit</dt>
317
+ # <dd>The number of bytes that can be uploaded to the account
318
+ # in the current month. For new notes that are created, this is the length
319
+ # of the note content (in Unicode characters) plus the size of each resource
320
+ # (in bytes). For edited notes, this is the the difference between the old
321
+ # length and the new length (if this is greater than 0) plus the size of
322
+ # each new resource.
323
+ # </dd>
324
+ # <dt>uploadLimitEnd</dt>
325
+ # <dd>The date and time when the current upload limit
326
+ # expires. At this time, the monthly upload count reverts to 0 and a new
327
+ # limit is imposed. This date and time is exclusive, so this is effectively
328
+ # the start of the new month.
329
+ # </dd>
330
+ # <dt>uploadLimitNextMonth</dt>
331
+ # <dd> When uploadLimitEnd is research the service
332
+ # will change uploadLimit to uploadLimitNextMonth. If a premium account is
333
+ # canceled, this mechanism will reset the quota appropriately.
334
+ # </dd>
335
+ # <dt>premiumServiceStatus</dt>
336
+ # <dd>Indicates the phases of a premium account
337
+ # during the billing process.
338
+ # </dd>
339
+ # <dt>premiumOrderNumber</dt>
340
+ # <dd>The order number used by the commerce system to
341
+ # process recurring payments
342
+ # </dd>
343
+ # <dt>premiumServiceStart</dt>
344
+ # <dd>The start date when this premium promotion
345
+ # began (this number will get overwritten if a premium service is canceled
346
+ # and then re-activated).
347
+ # </dd>
348
+ # <dt>premiumCommerceService</dt>
349
+ # <dd>The commerce system used (paypal, Google
350
+ # checkout, etc)
351
+ # </dd>
352
+ # <dt>premiumServiceSKU</dt>
353
+ # <dd>The code associated with the purchase eg. monthly
354
+ # or annual purchase. Clients should interpret this value and localize it.
355
+ # </dd>
356
+ # <dt>lastSuccessfulCharge</dt>
357
+ # <dd>Date the last time the user was charged.
358
+ # Null if never charged.
359
+ # </dd>
360
+ # <dt>lastFailedCharge</dt>
361
+ # <dd>Date the last time a charge was attempted and
362
+ # failed.
363
+ # </dd>
364
+ # <dt>lastFailedChargeReason</dt>
365
+ # <dd>Reason provided for the charge failure
366
+ # </dd>
367
+ # <dt>nextPaymentDue</dt>
368
+ # <dd>The end of the billing cycle. This could be in the
369
+ # past if there are failed charges.
370
+ # </dd>
371
+ # <dt>premiumLockUntil</dt>
372
+ # <dd>An internal variable to manage locking operations
373
+ # on the commerce variables.
374
+ # </dd>
375
+ # <dt>updated</dt>
376
+ # <dd>The date any modification where made to this record.
377
+ # </dd>
378
+ # <dt>premiumSubscriptionNumber</dt>
379
+ # <dd>The number number identifying the
380
+ # recurring subscription used to make the recurring charges.
381
+ # </dd>
382
+ # </dl>
383
+ class Accounting
384
+ include ::Thrift::Struct
385
+ UPLOADLIMIT = 1
386
+ UPLOADLIMITEND = 2
387
+ UPLOADLIMITNEXTMONTH = 3
388
+ PREMIUMSERVICESTATUS = 4
389
+ PREMIUMORDERNUMBER = 5
390
+ PREMIUMCOMMERCESERVICE = 6
391
+ PREMIUMSERVICESTART = 7
392
+ PREMIUMSERVICESKU = 8
393
+ LASTSUCCESSFULCHARGE = 9
394
+ LASTFAILEDCHARGE = 10
395
+ LASTFAILEDCHARGEREASON = 11
396
+ NEXTPAYMENTDUE = 12
397
+ PREMIUMLOCKUNTIL = 13
398
+ UPDATED = 14
399
+ PREMIUMSUBSCRIPTIONNUMBER = 16
400
+ LASTREQUESTEDCHARGE = 17
401
+
402
+ ::Thrift::Struct.field_accessor self, :uploadLimit, :uploadLimitEnd, :uploadLimitNextMonth, :premiumServiceStatus, :premiumOrderNumber, :premiumCommerceService, :premiumServiceStart, :premiumServiceSKU, :lastSuccessfulCharge, :lastFailedCharge, :lastFailedChargeReason, :nextPaymentDue, :premiumLockUntil, :updated, :premiumSubscriptionNumber, :lastRequestedCharge
403
+ FIELDS = {
404
+ UPLOADLIMIT => {:type => ::Thrift::Types::I64, :name => 'uploadLimit', :optional => true},
405
+ UPLOADLIMITEND => {:type => ::Thrift::Types::I64, :name => 'uploadLimitEnd', :optional => true},
406
+ UPLOADLIMITNEXTMONTH => {:type => ::Thrift::Types::I64, :name => 'uploadLimitNextMonth', :optional => true},
407
+ PREMIUMSERVICESTATUS => {:type => ::Thrift::Types::I32, :name => 'premiumServiceStatus', :optional => true, :enum_class => Evernote::EDAM::Type::PremiumOrderStatus},
408
+ PREMIUMORDERNUMBER => {:type => ::Thrift::Types::STRING, :name => 'premiumOrderNumber', :optional => true},
409
+ PREMIUMCOMMERCESERVICE => {:type => ::Thrift::Types::STRING, :name => 'premiumCommerceService', :optional => true},
410
+ PREMIUMSERVICESTART => {:type => ::Thrift::Types::I64, :name => 'premiumServiceStart', :optional => true},
411
+ PREMIUMSERVICESKU => {:type => ::Thrift::Types::STRING, :name => 'premiumServiceSKU', :optional => true},
412
+ LASTSUCCESSFULCHARGE => {:type => ::Thrift::Types::I64, :name => 'lastSuccessfulCharge', :optional => true},
413
+ LASTFAILEDCHARGE => {:type => ::Thrift::Types::I64, :name => 'lastFailedCharge', :optional => true},
414
+ LASTFAILEDCHARGEREASON => {:type => ::Thrift::Types::STRING, :name => 'lastFailedChargeReason', :optional => true},
415
+ NEXTPAYMENTDUE => {:type => ::Thrift::Types::I64, :name => 'nextPaymentDue', :optional => true},
416
+ PREMIUMLOCKUNTIL => {:type => ::Thrift::Types::I64, :name => 'premiumLockUntil', :optional => true},
417
+ UPDATED => {:type => ::Thrift::Types::I64, :name => 'updated', :optional => true},
418
+ PREMIUMSUBSCRIPTIONNUMBER => {:type => ::Thrift::Types::STRING, :name => 'premiumSubscriptionNumber', :optional => true},
419
+ LASTREQUESTEDCHARGE => {:type => ::Thrift::Types::I64, :name => 'lastRequestedCharge', :optional => true}
420
+ }
421
+
422
+ def struct_fields; FIELDS; end
423
+
424
+ def validate
425
+ unless @premiumServiceStatus.nil? || Evernote::EDAM::Type::PremiumOrderStatus::VALID_VALUES.include?(@premiumServiceStatus)
426
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field premiumServiceStatus!')
427
+ end
428
+ end
429
+
430
+ end
431
+
432
+ # This represents the information about a single user account.
433
+ # <dl>
434
+ # <dt>id</dt>
435
+ # <dd>The unique numeric identifier for the account, which will not
436
+ # change for the lifetime of the account.
437
+ # </dd>
438
+ #
439
+ # <dt>username</dt>
440
+ # <dd>The name that the user provides to log in to their
441
+ # account. In the future, this may be empty for some accounts if their login
442
+ # process is indirect (e.g. via social networks, etc.).
443
+ # May only contain a-z, 0-9, or '-', and may not start or end with the '-'
444
+ # <br/>
445
+ # Length: EDAM_USER_USERNAME_LEN_MIN - EDAM_USER_USERNAME_LEN_MAX
446
+ # <br/>
447
+ # Regex: EDAM_USER_USERNAME_REGEX
448
+ # </dd>
449
+ #
450
+ # <dt>email</dt>
451
+ # <dd>The email address registered for the user. Must comply with
452
+ # RFC 2821 and RFC 2822.<br/>
453
+ # Length: EDAM_EMAIL_LEN_MIN - EDAM_EMAIL_LEN_MAX
454
+ # <br/>
455
+ # Regex: EDAM_EMAIL_REGEX
456
+ # </dd>
457
+ #
458
+ # <dt>name</dt>
459
+ # <dd>The printable name of the user, which may be a combination
460
+ # of given and family names. This is used instead of separate "first"
461
+ # and "last" names due to variations in international name format/order.
462
+ # May not start or end with a whitespace character. May contain any
463
+ # character but carriage return or newline (Unicode classes Zl and Zp).
464
+ # <br/>
465
+ # Length: EDAM_USER_NAME_LEN_MIN - EDAM_USER_NAME_LEN_MAX
466
+ # <br/>
467
+ # Regex: EDAM_USER_NAME_REGEX
468
+ # </dd>
469
+ #
470
+ # <dt>timezone</dt>
471
+ # <dd>The zone ID for the user's default location. If present,
472
+ # this may be used to localize the display of any timestamp for which no
473
+ # other timezone is available - for example, an note that arrives via
474
+ # a micro-browser may not contain enough information to display its
475
+ # local time, so this default timezone may be assigned to the note.
476
+ # The format must be encoded as a standard zone ID such as
477
+ # "America/Los_Angeles" or "GMT+08:00"
478
+ # <br/>
479
+ # Length: EDAM_TIMEZONE_LEN_MIN - EDAM_TIMEZONE_LEN_MAX
480
+ # <br/>
481
+ # Regex: EDAM_TIMEZONE_REGEX
482
+ # </dd>
483
+ #
484
+ # <dt>privilege</dt>
485
+ # <dd>The level of access permitted for the user.
486
+ # </dd>
487
+ #
488
+ # <dt>created</dt>
489
+ # <dd>The date and time when this user account was created in the
490
+ # service.
491
+ # </dd>
492
+ #
493
+ # <dt>updated</dt>
494
+ # <dd>The date and time when this user account was last modified
495
+ # in the service.
496
+ # </dd>
497
+ #
498
+ # <dt>deleted</dt>
499
+ # <dd>If the account has been deleted from the system (e.g. as
500
+ # the result of a legal request by the user), the date and time of the
501
+ # deletion will be represented here. If not, this value will not be set.
502
+ # </dd>
503
+ #
504
+ # <dt>active</dt>
505
+ # <dd>If the user account is available for login and
506
+ # synchronization, this flag will be set to true.
507
+ # </dd>
508
+ #
509
+ # <dt>shardId</dt>
510
+ # <dd>The name of the virtual server that manages the state of
511
+ # this user. This value is used internally to determine which system should
512
+ # service requests about this user's data.
513
+ # </dd>
514
+ #
515
+ # <dt>attributes</dt>
516
+ # <dd>If present, this will contain a list of the attributes
517
+ # for this user account.
518
+ # </dd>
519
+ #
520
+ # <dt>accounting</dt>
521
+ # <dd>Bookkeeping information for the user's subscription.
522
+ # </dd>
523
+ # </dl>
524
+ class User
525
+ include ::Thrift::Struct
526
+ ID = 1
527
+ USERNAME = 2
528
+ EMAIL = 3
529
+ NAME = 4
530
+ TIMEZONE = 6
531
+ PRIVILEGE = 7
532
+ CREATED = 9
533
+ UPDATED = 10
534
+ DELETED = 11
535
+ ACTIVE = 13
536
+ SHARDID = 14
537
+ ATTRIBUTES = 15
538
+ ACCOUNTING = 16
539
+
540
+ ::Thrift::Struct.field_accessor self, :id, :username, :email, :name, :timezone, :privilege, :created, :updated, :deleted, :active, :shardId, :attributes, :accounting
541
+ FIELDS = {
542
+ ID => {:type => ::Thrift::Types::I32, :name => 'id', :optional => true},
543
+ USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
544
+ EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email', :optional => true},
545
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
546
+ TIMEZONE => {:type => ::Thrift::Types::STRING, :name => 'timezone', :optional => true},
547
+ PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => Evernote::EDAM::Type::PrivilegeLevel},
548
+ CREATED => {:type => ::Thrift::Types::I64, :name => 'created', :optional => true},
549
+ UPDATED => {:type => ::Thrift::Types::I64, :name => 'updated', :optional => true},
550
+ DELETED => {:type => ::Thrift::Types::I64, :name => 'deleted', :optional => true},
551
+ ACTIVE => {:type => ::Thrift::Types::BOOL, :name => 'active', :optional => true},
552
+ SHARDID => {:type => ::Thrift::Types::STRING, :name => 'shardId', :optional => true},
553
+ ATTRIBUTES => {:type => ::Thrift::Types::STRUCT, :name => 'attributes', :class => Evernote::EDAM::Type::UserAttributes, :optional => true},
554
+ ACCOUNTING => {:type => ::Thrift::Types::STRUCT, :name => 'accounting', :class => Evernote::EDAM::Type::Accounting, :optional => true}
555
+ }
556
+
557
+ def struct_fields; FIELDS; end
558
+
559
+ def validate
560
+ unless @privilege.nil? || Evernote::EDAM::Type::PrivilegeLevel::VALID_VALUES.include?(@privilege)
561
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field privilege!')
562
+ end
563
+ end
564
+
565
+ end
566
+
567
+ # A tag within a user's account is a unique name which may be organized
568
+ # a simple hierarchy.
569
+ # <dl>
570
+ # <dt>guid</dt>
571
+ # <dd>The unique identifier of this tag. Will be set by the service,
572
+ # so may be omitted by the client when creating the Tag.
573
+ # <br/>
574
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
575
+ # <br/>
576
+ # Regex: EDAM_GUID_REGEX
577
+ # </dd>
578
+ #
579
+ # <dt>name</dt>
580
+ # <dd>A sequence of characters representing the tag's identifier.
581
+ # Case is preserved, but is ignored for comparisons.
582
+ # This means that an account may only have one tag with a given name, via
583
+ # case-insensitive comparison, so an account may not have both "food" and
584
+ # "Food" tags.
585
+ # May not contain a comma (','), and may not begin or end with a space.
586
+ # <br/>
587
+ # Length: EDAM_TAG_NAME_LEN_MIN - EDAM_TAG_NAME_LEN_MAX
588
+ # <br/>
589
+ # Regex: EDAM_TAG_NAME_REGEX
590
+ # </dd>
591
+ #
592
+ # <dt>parentGuid</dt>
593
+ # <dd>If this is set, then this is the GUID of the tag that
594
+ # holds this tag within the tag organizational heirarchy. If this is
595
+ # not set, then the tag has no parent and it is a "top level" tag.
596
+ # Cycles are not allowed (e.g. a->parent->parent == a) and will be
597
+ # rejected by the service.
598
+ # <br/>
599
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
600
+ # <br/>
601
+ # Regex: EDAM_GUID_REGEX
602
+ # </dd>
603
+ #
604
+ # <dt>updateSequenceNum</dt>
605
+ # <dd>A number identifying the last transaction to
606
+ # modify the state of this object. The USN values are sequential within an
607
+ # account, and can be used to compare the order of modifications within the
608
+ # service.
609
+ # </dd>
610
+ # </dl>
611
+ class Tag
612
+ include ::Thrift::Struct
613
+ GUID = 1
614
+ NAME = 2
615
+ PARENTGUID = 3
616
+ UPDATESEQUENCENUM = 4
617
+
618
+ ::Thrift::Struct.field_accessor self, :guid, :name, :parentGuid, :updateSequenceNum
619
+ FIELDS = {
620
+ GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
621
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
622
+ PARENTGUID => {:type => ::Thrift::Types::STRING, :name => 'parentGuid', :optional => true},
623
+ UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true}
624
+ }
625
+
626
+ def struct_fields; FIELDS; end
627
+
628
+ def validate
629
+ end
630
+
631
+ end
632
+
633
+ # Structure holding the optional attributes of a Resource
634
+ # <dl>
635
+ # <dt>sourceURL</dt>
636
+ # <dd>the original location where the resource was hosted
637
+ # <br/>
638
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
639
+ # </dd>
640
+ #
641
+ # <dt>timestamp</dt>
642
+ # <dd>the date and time that is associated with this resource
643
+ # (e.g. the time embedded in an image from a digital camera with a clock)
644
+ # </dd>
645
+ #
646
+ # <dt>latitude</dt>
647
+ # <dd>the latitude where the resource was captured
648
+ # </dd>
649
+ #
650
+ # <dt>longitude</dt>
651
+ # <dd>the longitude where the resource was captured
652
+ # </dd>
653
+ #
654
+ # <dt>altitude</dt>
655
+ # <dd>the altitude where the resource was captured
656
+ # </dd>
657
+ #
658
+ # <dt>cameraMake</dt>
659
+ # <dd>information about an image's camera, e.g. as embedded in
660
+ # the image's EXIF data
661
+ # <br/>
662
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
663
+ # </dd>
664
+ #
665
+ # <dt>cameraModel</dt>
666
+ # <dd>information about an image's camera, e.g. as embedded
667
+ # in the image's EXIF data
668
+ # <br/>
669
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
670
+ # </dd>
671
+ #
672
+ # <dt>clientWillIndex</dt>
673
+ # <dd>if true, then the original client that submitted
674
+ # the resource plans to submit the recognition index for this resource at a
675
+ # later time.
676
+ # </dd>
677
+ #
678
+ # <dt>recoType</dt>
679
+ # <dd>DEPRECATED - this field is no longer set by the service, so should
680
+ # be ignored.
681
+ # </dd>
682
+ #
683
+ # <dt>fileName</dt>
684
+ # <dd>if the resource came from a source that provided an
685
+ # explicit file name, the original name will be stored here. Many resources
686
+ # come from unnamed sources, so this will not always be set.
687
+ # </dd>
688
+ #
689
+ # <dt>attachment</dt>
690
+ # <dd>this will be true if the resource is a Premium file attachment. This
691
+ # will be available within the search grammar so that you can identify
692
+ # notes that contain attachments.
693
+ # </dd>
694
+ # </dl>
695
+ class ResourceAttributes
696
+ include ::Thrift::Struct
697
+ SOURCEURL = 1
698
+ TIMESTAMP = 2
699
+ LATITUDE = 3
700
+ LONGITUDE = 4
701
+ ALTITUDE = 5
702
+ CAMERAMAKE = 6
703
+ CAMERAMODEL = 7
704
+ CLIENTWILLINDEX = 8
705
+ RECOTYPE = 9
706
+ FILENAME = 10
707
+ ATTACHMENT = 11
708
+
709
+ ::Thrift::Struct.field_accessor self, :sourceURL, :timestamp, :latitude, :longitude, :altitude, :cameraMake, :cameraModel, :clientWillIndex, :recoType, :fileName, :attachment
710
+ FIELDS = {
711
+ SOURCEURL => {:type => ::Thrift::Types::STRING, :name => 'sourceURL', :optional => true},
712
+ TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true},
713
+ LATITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'latitude', :optional => true},
714
+ LONGITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'longitude', :optional => true},
715
+ ALTITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'altitude', :optional => true},
716
+ CAMERAMAKE => {:type => ::Thrift::Types::STRING, :name => 'cameraMake', :optional => true},
717
+ CAMERAMODEL => {:type => ::Thrift::Types::STRING, :name => 'cameraModel', :optional => true},
718
+ CLIENTWILLINDEX => {:type => ::Thrift::Types::BOOL, :name => 'clientWillIndex', :optional => true},
719
+ RECOTYPE => {:type => ::Thrift::Types::STRING, :name => 'recoType', :optional => true},
720
+ FILENAME => {:type => ::Thrift::Types::STRING, :name => 'fileName', :optional => true},
721
+ ATTACHMENT => {:type => ::Thrift::Types::BOOL, :name => 'attachment', :optional => true}
722
+ }
723
+
724
+ def struct_fields; FIELDS; end
725
+
726
+ def validate
727
+ end
728
+
729
+ end
730
+
731
+ # Every media file that is embedded or attached to a note is represented
732
+ # through a Resource entry.
733
+ # <dl>
734
+ # <dt>guid</dt>
735
+ # <dd>The unique identifier of this resource. Will be set whenever
736
+ # a resource is retrieved from the service, but may be null when a client
737
+ # is creating a resource.
738
+ # <br/>
739
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
740
+ # <br/>
741
+ # Regex: EDAM_GUID_REGEX
742
+ # </dd>
743
+ #
744
+ # <dt>noteGuid</dt>
745
+ # <dd>The unique identifier of the Note that holds this
746
+ # Resource. Will be set whenever the resource is retrieved from the service,
747
+ # but may be null when a client is creating a resource.
748
+ # <br/>
749
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
750
+ # <br/>
751
+ # Regex: EDAM_GUID_REGEX
752
+ # </dd>
753
+ #
754
+ # <dt>data</dt>
755
+ # <dd>The contents of the resource.
756
+ # Maximum length: The data.body is limited to 25 MB (26214400 bytes)
757
+ # </dd>
758
+ #
759
+ # <dt>mime</dt>
760
+ # <dd>The MIME type for the embedded resource. E.g. "image/gif"
761
+ # <br/>
762
+ # Length: EDAM_MIME_LEN_MIN - EDAM_MIME_LEN_MAX
763
+ # <br/>
764
+ # Regex: EDAM_MIME_REGEX
765
+ # </dd>
766
+ #
767
+ # <dt>width</dt>
768
+ # <dd>If set, this contains the display width of this resource, in
769
+ # pixels.
770
+ # </dd>
771
+ #
772
+ # <dt>height</dt>
773
+ # <dd>If set, this contains the display height of this resource,
774
+ # in pixels.
775
+ # </dd>
776
+ #
777
+ # <dt>duration</dt>
778
+ # <dd>DEPRECATED: ignored.
779
+ # </dd>
780
+ #
781
+ # <dt>active</dt>
782
+ # <dd>DEPRECATED: ignored.
783
+ # </dd>
784
+ #
785
+ # <dt>recognition</dt>
786
+ # <dd>If set, this will hold the encoded data that provides
787
+ # information on search and recognition within this resource.
788
+ # </dd>
789
+ #
790
+ # <dt>attributes</dt>
791
+ # <dd>A list of the attributes for this resource.
792
+ # </dd>
793
+ #
794
+ # <dt>updateSequenceNum</dt>
795
+ # <dd>A number identifying the last transaction to
796
+ # modify the state of this object. The USN values are sequential within an
797
+ # account, and can be used to compare the order of modifications within the
798
+ # service.
799
+ # </dd>
800
+ #
801
+ # <dt>alternateData</dt>
802
+ # <dd>Some Resources may be assigned an alternate data format by the service
803
+ # which may be more appropriate for indexing or rendering than the original
804
+ # data provided by the user. In these cases, the alternate data form will
805
+ # be available via this Data element. If a Resource has no alternate form,
806
+ # this field will be unset.</dd>
807
+ # </dl>
808
+ class Resource
809
+ include ::Thrift::Struct
810
+ GUID = 1
811
+ NOTEGUID = 2
812
+ DATA = 3
813
+ MIME = 4
814
+ WIDTH = 5
815
+ HEIGHT = 6
816
+ DURATION = 7
817
+ ACTIVE = 8
818
+ RECOGNITION = 9
819
+ ATTRIBUTES = 11
820
+ UPDATESEQUENCENUM = 12
821
+ ALTERNATEDATA = 13
822
+
823
+ ::Thrift::Struct.field_accessor self, :guid, :noteGuid, :data, :mime, :width, :height, :duration, :active, :recognition, :attributes, :updateSequenceNum, :alternateData
824
+ FIELDS = {
825
+ GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
826
+ NOTEGUID => {:type => ::Thrift::Types::STRING, :name => 'noteGuid', :optional => true},
827
+ DATA => {:type => ::Thrift::Types::STRUCT, :name => 'data', :class => Evernote::EDAM::Type::Data, :optional => true},
828
+ MIME => {:type => ::Thrift::Types::STRING, :name => 'mime', :optional => true},
829
+ WIDTH => {:type => ::Thrift::Types::I16, :name => 'width', :optional => true},
830
+ HEIGHT => {:type => ::Thrift::Types::I16, :name => 'height', :optional => true},
831
+ DURATION => {:type => ::Thrift::Types::I16, :name => 'duration', :optional => true},
832
+ ACTIVE => {:type => ::Thrift::Types::BOOL, :name => 'active', :optional => true},
833
+ RECOGNITION => {:type => ::Thrift::Types::STRUCT, :name => 'recognition', :class => Evernote::EDAM::Type::Data, :optional => true},
834
+ ATTRIBUTES => {:type => ::Thrift::Types::STRUCT, :name => 'attributes', :class => Evernote::EDAM::Type::ResourceAttributes, :optional => true},
835
+ UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
836
+ ALTERNATEDATA => {:type => ::Thrift::Types::STRUCT, :name => 'alternateData', :class => Evernote::EDAM::Type::Data, :optional => true}
837
+ }
838
+
839
+ def struct_fields; FIELDS; end
840
+
841
+ def validate
842
+ end
843
+
844
+ end
845
+
846
+ # The list of optional attributes that can be stored on a note.
847
+ # <dl>
848
+ # <dt>subjectDate</dt>
849
+ # <dd>time that the note refers to
850
+ # </dd>
851
+ #
852
+ # <dt>latitude</dt>
853
+ # <dd>the latitude where the note was taken
854
+ # </dd>
855
+ #
856
+ # <dt>longitude</dt>
857
+ # <dd>the longitude where the note was taken
858
+ # </dd>
859
+ #
860
+ # <dt>altitude</dt>
861
+ # <dd>the altitude where the note was taken
862
+ # </dd>
863
+ #
864
+ # <dt>author</dt>
865
+ # <dd>the author of the content of the note
866
+ # <br/>
867
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
868
+ # </dd>
869
+ #
870
+ # <dt>source</dt>
871
+ # <dd>the method that the note was added to the account, if the
872
+ # note wasn't directly authored in an Evernote client.
873
+ # <br/>
874
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
875
+ # </dd>
876
+ #
877
+ # <dt>sourceURL</dt>
878
+ # <dd>the original location where the resource was hosted
879
+ # <br/>
880
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
881
+ # </dd>
882
+ #
883
+ # <dt>sourceApplication</dt>
884
+ # <dd>an identifying string for the application that
885
+ # created this note. This string does not have a guaranteed syntax or
886
+ # structure -- it is intended for human inspection and tracking.
887
+ # <br/>
888
+ # Length: EDAM_ATTRIBUTE_LEN_MIN - EDAM_ATTRIBUTE_LEN_MAX
889
+ # </dd>
890
+ # </dl>
891
+ class NoteAttributes
892
+ include ::Thrift::Struct
893
+ SUBJECTDATE = 1
894
+ LATITUDE = 10
895
+ LONGITUDE = 11
896
+ ALTITUDE = 12
897
+ AUTHOR = 13
898
+ SOURCE = 14
899
+ SOURCEURL = 15
900
+ SOURCEAPPLICATION = 16
901
+
902
+ ::Thrift::Struct.field_accessor self, :subjectDate, :latitude, :longitude, :altitude, :author, :source, :sourceURL, :sourceApplication
903
+ FIELDS = {
904
+ SUBJECTDATE => {:type => ::Thrift::Types::I64, :name => 'subjectDate', :optional => true},
905
+ LATITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'latitude', :optional => true},
906
+ LONGITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'longitude', :optional => true},
907
+ ALTITUDE => {:type => ::Thrift::Types::DOUBLE, :name => 'altitude', :optional => true},
908
+ AUTHOR => {:type => ::Thrift::Types::STRING, :name => 'author', :optional => true},
909
+ SOURCE => {:type => ::Thrift::Types::STRING, :name => 'source', :optional => true},
910
+ SOURCEURL => {:type => ::Thrift::Types::STRING, :name => 'sourceURL', :optional => true},
911
+ SOURCEAPPLICATION => {:type => ::Thrift::Types::STRING, :name => 'sourceApplication', :optional => true}
912
+ }
913
+
914
+ def struct_fields; FIELDS; end
915
+
916
+ def validate
917
+ end
918
+
919
+ end
920
+
921
+ # Represents a single note in the user's account.
922
+ #
923
+ # <dl>
924
+ # <dt>guid</dt>
925
+ # <dd>The unique identifier of this note. Will be set by the
926
+ # server, but will be omitted by clients calling NoteStore.createNote()
927
+ # <br/>
928
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
929
+ # <br/>
930
+ # Regex: EDAM_GUID_REGEX
931
+ # </dd>
932
+ #
933
+ # <dt>title</dt>
934
+ # <dd>The subject of the note. Can't begin or end with a space.
935
+ # <br/>
936
+ # Length: EDAM_NOTE_TITLE_LEN_MIN - EDAM_NOTE_TITLE_LEN_MAX
937
+ # <br/>
938
+ # Regex: EDAM_NOTE_TITLE_REGEX
939
+ # </dd>
940
+ #
941
+ # <dt>content</dt>
942
+ # <dd>The XHTML block that makes up the note. This is
943
+ # the canonical form of the note's contents, so will include abstract
944
+ # Evernote tags for internal resource references. A client may create
945
+ # a separate transformed version of this content for internal presentation,
946
+ # but the same canonical bytes should be used for transmission and
947
+ # comparison unless the user chooses to modify their content.
948
+ # <br/>
949
+ # Length: EDAM_NOTE_CONTENT_LEN_MIN - EDAM_NOTE_CONTENT_LEN_MAX
950
+ # </dd>
951
+ #
952
+ # <dt>contentHash</dt>
953
+ # <dd>The binary MD5 checksum of the UTF-8 encoded content
954
+ # body. This will always be set by the server, but clients may choose to omit
955
+ # this when they submit a note with content.
956
+ # <br/>
957
+ # Length: EDAM_HASH_LEN (exactly)
958
+ # </dd>
959
+ #
960
+ # <dt>contentLength</dt>
961
+ # <dd>The number of Unicode characters in the content of
962
+ # the note. This will always be set by the service, but clients may choose
963
+ # to omit this value when they submit a Note.
964
+ # </dd>
965
+ #
966
+ # <dt>created</dt>
967
+ # <dd>The date and time when the note was created in one of the
968
+ # clients. In most cases, this will match the user's sense of when
969
+ # the note was created, and ordering between notes will be based on
970
+ # ordering of this field. However, this is not a "reliable" timestamp
971
+ # if a client has an incorrect clock, so it cannot provide a true absolute
972
+ # ordering between notes. Notes created directly through the service
973
+ # (e.g. via the web GUI) will have an absolutely ordered "created" value.
974
+ # </dd>
975
+ #
976
+ # <dt>updated</dt>
977
+ # <dd>The date and time when the note was last modified in one of
978
+ # the clients. In most cases, this will match the user's sense of when
979
+ # the note was modified, but this field may not be absolutely reliable
980
+ # due to the possibility of client clock errors.
981
+ # </dd>
982
+ #
983
+ # <dt>deleted</dt>
984
+ # <dd>If present, the note is considered "deleted", and this
985
+ # stores the date and time when the note was deleted by one of the clients.
986
+ # In most cases, this will match the user's sense of when the note was
987
+ # deleted, but this field may be unreliable due to the possibility of
988
+ # client clock errors.
989
+ # </dd>
990
+ #
991
+ # <dt>active</dt>
992
+ # <dd>If the note is available for normal actions and viewing,
993
+ # this flag will be set to true.
994
+ # </dd>
995
+ #
996
+ # <dt>updateSequenceNum</dt>
997
+ # <dd>A number identifying the last transaction to
998
+ # modify the state of this note (including changes to the note's attributes
999
+ # or resources). The USN values are sequential within an account,
1000
+ # and can be used to compare the order of modifications within the service.
1001
+ # </dd>
1002
+ #
1003
+ # <dt>notebookGuid</dt>
1004
+ # <dd>The unique identifier of the notebook that contains
1005
+ # this note. If no notebookGuid is provided on a call to createNote(), the
1006
+ # default notebook will be used instead.
1007
+ # <br/>
1008
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
1009
+ # <br/>
1010
+ # Regex: EDAM_GUID_REGEX
1011
+ # </dd>
1012
+ #
1013
+ # <dt>tagGuids</dt>
1014
+ # <dd>A list of the GUID identifiers for tags that are applied to this note.
1015
+ # This may be provided in a call to createNote() to unambiguously declare
1016
+ # the tags that should be assigned to the new note. Alternately, clients
1017
+ # may pass the names of desired tags via the 'tagNames' field during
1018
+ # note creation.
1019
+ # If the list of tags are omitted on a call to createNote(), then
1020
+ # the server will assume that no changes have been made to the resources.
1021
+ # Maximum: EDAM_NOTE_TAGS_MAX tags per note
1022
+ # </dd>
1023
+ #
1024
+ # <dt>resources</dt>
1025
+ # <dd>The list of resources that are embedded within this note.
1026
+ # If the list of resources are omitted on a call to updateNote(), then
1027
+ # the server will assume that no changes have been made to the resources.
1028
+ # The binary contents of the resources must be provided when the resource
1029
+ # is first sent to the service, but it will be omitted by the service when
1030
+ # the Note is returned in the future.
1031
+ # Maximum: EDAM_NOTE_RESOURCES_MAX resources per note
1032
+ # </dd>
1033
+ #
1034
+ # <dt>attributes</dt>
1035
+ # <dd>A list of the attributes for this note.
1036
+ # If the list of attributes are omitted on a call to updateNote(), then
1037
+ # the server will assume that no changes have been made to the resources.
1038
+ # </dd>
1039
+ #
1040
+ # <dt>tagNames</dt>
1041
+ # <dd>May be provided by clients during calls to createNote() as an
1042
+ # alternative to providing the tagGuids of existing tags. If any tagNames
1043
+ # are provided during createNote(), these will be found, or created if they
1044
+ # don't already exist. Created tags will have no parent (they will be at
1045
+ # the top level of the tag panel).
1046
+ # </dd>
1047
+ # </dl>
1048
+ class Note
1049
+ include ::Thrift::Struct
1050
+ GUID = 1
1051
+ TITLE = 2
1052
+ CONTENT = 3
1053
+ CONTENTHASH = 4
1054
+ CONTENTLENGTH = 5
1055
+ CREATED = 6
1056
+ UPDATED = 7
1057
+ DELETED = 8
1058
+ ACTIVE = 9
1059
+ UPDATESEQUENCENUM = 10
1060
+ NOTEBOOKGUID = 11
1061
+ TAGGUIDS = 12
1062
+ RESOURCES = 13
1063
+ ATTRIBUTES = 14
1064
+ TAGNAMES = 15
1065
+
1066
+ ::Thrift::Struct.field_accessor self, :guid, :title, :content, :contentHash, :contentLength, :created, :updated, :deleted, :active, :updateSequenceNum, :notebookGuid, :tagGuids, :resources, :attributes, :tagNames
1067
+ FIELDS = {
1068
+ GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1069
+ TITLE => {:type => ::Thrift::Types::STRING, :name => 'title', :optional => true},
1070
+ CONTENT => {:type => ::Thrift::Types::STRING, :name => 'content', :optional => true},
1071
+ CONTENTHASH => {:type => ::Thrift::Types::STRING, :name => 'contentHash', :optional => true},
1072
+ CONTENTLENGTH => {:type => ::Thrift::Types::I32, :name => 'contentLength', :optional => true},
1073
+ CREATED => {:type => ::Thrift::Types::I64, :name => 'created', :optional => true},
1074
+ UPDATED => {:type => ::Thrift::Types::I64, :name => 'updated', :optional => true},
1075
+ DELETED => {:type => ::Thrift::Types::I64, :name => 'deleted', :optional => true},
1076
+ ACTIVE => {:type => ::Thrift::Types::BOOL, :name => 'active', :optional => true},
1077
+ UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
1078
+ NOTEBOOKGUID => {:type => ::Thrift::Types::STRING, :name => 'notebookGuid', :optional => true},
1079
+ TAGGUIDS => {:type => ::Thrift::Types::LIST, :name => 'tagGuids', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
1080
+ RESOURCES => {:type => ::Thrift::Types::LIST, :name => 'resources', :element => {:type => ::Thrift::Types::STRUCT, :class => Evernote::EDAM::Type::Resource}, :optional => true},
1081
+ ATTRIBUTES => {:type => ::Thrift::Types::STRUCT, :name => 'attributes', :class => Evernote::EDAM::Type::NoteAttributes, :optional => true},
1082
+ TAGNAMES => {:type => ::Thrift::Types::LIST, :name => 'tagNames', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
1083
+ }
1084
+
1085
+ def struct_fields; FIELDS; end
1086
+
1087
+ def validate
1088
+ end
1089
+
1090
+ end
1091
+
1092
+ # If a Notebook has been opened to the public, the Notebook will have a
1093
+ # reference to one of these structures, which gives the location and optional
1094
+ # description of the externally-visible public Notebook.
1095
+ # <dl>
1096
+ # <dt>uri</dt>
1097
+ # <dd>If this field is present, then the notebook is published for
1098
+ # mass consumption on the Internet under the provided URI, which is
1099
+ # relative to a defined base publishing URI defined by the service.
1100
+ # This field can only be modified via the web service GUI ... publishing
1101
+ # cannot be modified via an offline client.
1102
+ # <br/>
1103
+ # Length: EDAM_PUBLISHING_URI_LEN_MIN - EDAM_PUBLISHING_URI_LEN_MAX
1104
+ # <br/>
1105
+ # Regex: EDAM_PUBLISHING_URI_REGEX
1106
+ # </dd>
1107
+ #
1108
+ # <dt>order</dt>
1109
+ # <dd>When the notes are publicly displayed, they will be sorted
1110
+ # based on the requested criteria.
1111
+ # </dd>
1112
+ #
1113
+ # <dt>ascending</dt>
1114
+ # <dd>If this is set to true, then the public notes will be
1115
+ # displayed in ascending order (e.g. from oldest to newest). Otherwise,
1116
+ # the notes will be displayed in descending order (e.g. newest to oldest).
1117
+ # </dd>
1118
+ #
1119
+ # <dt>publicDescription</dt>
1120
+ # <dd>This field may be used to provide a short
1121
+ # description of the notebook, which may be displayed when (e.g.) the
1122
+ # notebook is shown in a public view. Can't begin or end with a space.
1123
+ # <br/>
1124
+ # Length: EDAM_PUBLISHING_DESCRIPTION_LEN_MIN -
1125
+ # EDAM_PUBLISHING_DESCRIPTION_LEN_MAX
1126
+ # <br/>
1127
+ # Regex: EDAM_PUBLISHING_DESCRIPTION_REGEX
1128
+ # </dd>
1129
+ # </dl>
1130
+ class Publishing
1131
+ include ::Thrift::Struct
1132
+ URI = 1
1133
+ ORDER = 2
1134
+ ASCENDING = 3
1135
+ PUBLICDESCRIPTION = 4
1136
+
1137
+ ::Thrift::Struct.field_accessor self, :uri, :order, :ascending, :publicDescription
1138
+ FIELDS = {
1139
+ URI => {:type => ::Thrift::Types::STRING, :name => 'uri', :optional => true},
1140
+ ORDER => {:type => ::Thrift::Types::I32, :name => 'order', :optional => true, :enum_class => Evernote::EDAM::Type::NoteSortOrder},
1141
+ ASCENDING => {:type => ::Thrift::Types::BOOL, :name => 'ascending', :optional => true},
1142
+ PUBLICDESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'publicDescription', :optional => true}
1143
+ }
1144
+
1145
+ def struct_fields; FIELDS; end
1146
+
1147
+ def validate
1148
+ unless @order.nil? || Evernote::EDAM::Type::NoteSortOrder::VALID_VALUES.include?(@order)
1149
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field order!')
1150
+ end
1151
+ end
1152
+
1153
+ end
1154
+
1155
+ # A unique container for a set of notes.
1156
+ # <dl>
1157
+ # <dt>guid</dt>
1158
+ # <dd>The unique identifier of this notebook.
1159
+ # <br/>
1160
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
1161
+ # <br/>
1162
+ # Regex: EDAM_GUID_REGEX
1163
+ # </dd>
1164
+ #
1165
+ # <dt>name</dt>
1166
+ # <dd>A sequence of characters representing the name of the
1167
+ # notebook. May be changed by clients, but the account may not contain two
1168
+ # notebooks with names that are equal via a case-insensitive comparison.
1169
+ # Can't begin or end with a space.
1170
+ # <br/>
1171
+ # Length: EDAM_NOTEBOOK_NAME_LEN_MIN - EDAM_NOTEBOOK_NAME_LEN_MAX
1172
+ # <br/>
1173
+ # Regex: EDAM_NOTEBOOK_NAME_REGEX
1174
+ # </dd>
1175
+ #
1176
+ # <dt>updateSequenceNum</dt>
1177
+ # <dd>A number identifying the last transaction to
1178
+ # modify the state of this object. The USN values are sequential within an
1179
+ # account, and can be used to compare the order of modifications within the
1180
+ # service.
1181
+ # </dd>
1182
+ #
1183
+ # <dt>defaultNotebook</dt>
1184
+ # <dd>If true, this notebook should be used for new notes
1185
+ # whenever the user has not (or cannot) specify a desired target notebook.
1186
+ # For example, if a note is submitted via SMTP email.
1187
+ # The service will maintain at most one defaultNotebook per account.
1188
+ # If a second notebook is created or updated with defaultNotebook set to
1189
+ # true, the service will automatically update the prior notebook's
1190
+ # defaultNotebook field to false. If the default notebook is deleted
1191
+ # (i.e. "active" set to false), the "defaultNotebook" field will be
1192
+ # set to false by the service. If the account has no default notebook
1193
+ # set, the service will use the most recent notebook as the default.
1194
+ # </dd>
1195
+ #
1196
+ # <dt>serviceCreated</dt>
1197
+ # <dd>The time when this notebook was created on the
1198
+ # service. This will be set on the service during creation, and the service
1199
+ # will provide this value when it returns a Notebook to a client.
1200
+ # The service will ignore this value if it is sent by clients.
1201
+ # </dd>
1202
+ #
1203
+ # <dt>serviceUpdated</dt>
1204
+ # <dd>The time when this notebook was last modified on the
1205
+ # service. This will be set on the service during creation, and the service
1206
+ # will provide this value when it returns a Notebook to a client.
1207
+ # The service will ignore this value if it is sent by clients.
1208
+ # </dd>
1209
+ #
1210
+ # <dt>publishing</dt>
1211
+ # <dd>If the Notebook has been opened for public access (i.e.
1212
+ # if 'published' is set to true), then this will point to the set of
1213
+ # publishing information for the Notebook (URI, description, etc.). A
1214
+ # Notebook cannot be published without providing this information, but it
1215
+ # will persist for later use if publishing is ever disabled on the Notebook.
1216
+ # Clients that do not wish to change the publishing behavior of a Notebook
1217
+ # should not set this value when calling NoteStore.updateNotebook().
1218
+ # </dd>
1219
+ #
1220
+ # <dt>published</dt>
1221
+ # <dd>If this is set to true, then the Notebook will be
1222
+ # accessible to the public via the 'publishing' specification, which must
1223
+ # also be set. If this is set to false, the Notebook will not be available
1224
+ # to the public.
1225
+ # Clients that do not wish to change the publishing behavior of a Notebook
1226
+ # should not set this value when calling NoteStore.updateNotebook().
1227
+ # </dd>
1228
+ # </dl>
1229
+ class Notebook
1230
+ include ::Thrift::Struct
1231
+ GUID = 1
1232
+ NAME = 2
1233
+ UPDATESEQUENCENUM = 5
1234
+ DEFAULTNOTEBOOK = 6
1235
+ SERVICECREATED = 7
1236
+ SERVICEUPDATED = 8
1237
+ PUBLISHING = 10
1238
+ PUBLISHED = 11
1239
+
1240
+ ::Thrift::Struct.field_accessor self, :guid, :name, :updateSequenceNum, :defaultNotebook, :serviceCreated, :serviceUpdated, :publishing, :published
1241
+ FIELDS = {
1242
+ GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1243
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
1244
+ UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
1245
+ DEFAULTNOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'defaultNotebook', :optional => true},
1246
+ SERVICECREATED => {:type => ::Thrift::Types::I64, :name => 'serviceCreated', :optional => true},
1247
+ SERVICEUPDATED => {:type => ::Thrift::Types::I64, :name => 'serviceUpdated', :optional => true},
1248
+ PUBLISHING => {:type => ::Thrift::Types::STRUCT, :name => 'publishing', :class => Evernote::EDAM::Type::Publishing, :optional => true},
1249
+ PUBLISHED => {:type => ::Thrift::Types::BOOL, :name => 'published', :optional => true}
1250
+ }
1251
+
1252
+ def struct_fields; FIELDS; end
1253
+
1254
+ def validate
1255
+ end
1256
+
1257
+ end
1258
+
1259
+ # A named search associated with the account that can be quickly re-used.
1260
+ # <dl>
1261
+ # <dt>guid</dt>
1262
+ # <dd>The unique identifier of this search. Will be set by the
1263
+ # service, so may be omitted by the client when creating.
1264
+ # <br/>
1265
+ # Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
1266
+ # <br/>
1267
+ # Regex: EDAM_GUID_REGEX
1268
+ # </dd>
1269
+ #
1270
+ # <dt>name</dt>
1271
+ # <dd>The name of the saved search to display in the GUI. The
1272
+ # account may only contain one search with a given name (case-insensitive
1273
+ # compare). Can't begin or end with a space.
1274
+ # <br/>
1275
+ # Length: EDAM_SAVED_SEARCH_NAME_LEN_MIN - EDAM_SAVED_SEARCH_NAME_LEN_MAX
1276
+ # <br/>
1277
+ # Regex: EDAM_SAVED_SEARCH_NAME_REGEX
1278
+ # </dd>
1279
+ #
1280
+ # <dt>query</dt>
1281
+ # <dd>A string expressing the search to be performed.
1282
+ # <br/>
1283
+ # Length: EDAM_SAVED_SEARCH_QUERY_LEN_MIN - EDAM_SAVED_SEARCH_QUERY_LEN_MAX
1284
+ # </dd>
1285
+ #
1286
+ # <dt>format</dt>
1287
+ # <dd>The format of the query string, to determine how to parse
1288
+ # and process it.
1289
+ # </dd>
1290
+ #
1291
+ # <dt>updateSequenceNum</dt>
1292
+ # <dd>A number identifying the last transaction to
1293
+ # modify the state of this object. The USN values are sequential within an
1294
+ # account, and can be used to compare the order of modifications within the
1295
+ # service.
1296
+ # </dd>
1297
+ # </dl>
1298
+ class SavedSearch
1299
+ include ::Thrift::Struct
1300
+ GUID = 1
1301
+ NAME = 2
1302
+ QUERY = 3
1303
+ FORMAT = 4
1304
+ UPDATESEQUENCENUM = 5
1305
+
1306
+ ::Thrift::Struct.field_accessor self, :guid, :name, :query, :format, :updateSequenceNum
1307
+ FIELDS = {
1308
+ GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
1309
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
1310
+ QUERY => {:type => ::Thrift::Types::STRING, :name => 'query', :optional => true},
1311
+ FORMAT => {:type => ::Thrift::Types::I32, :name => 'format', :optional => true, :enum_class => Evernote::EDAM::Type::QueryFormat},
1312
+ UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true}
1313
+ }
1314
+
1315
+ def struct_fields; FIELDS; end
1316
+
1317
+ def validate
1318
+ unless @format.nil? || Evernote::EDAM::Type::QueryFormat::VALID_VALUES.include?(@format)
1319
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field format!')
1320
+ end
1321
+ end
1322
+
1323
+ end
1324
+
1325
+ # An advertisement that may be displayed within an Evernote client.
1326
+ # Advertisements are either a snippet of HTML or else they
1327
+ # are an image (of type: JPEG, GIF, PNG) with an associated destination URL.
1328
+ #
1329
+ # <dl>
1330
+ # <dt>id</dt>
1331
+ # <dd>The unique identifier of this advertisement within Evernote's ad
1332
+ # inventory.
1333
+ # </dd>
1334
+ #
1335
+ # <dt>width</dt>
1336
+ # <dd>This ad should be displayed within a rectangle that is this wide,
1337
+ # in pixels.
1338
+ # </dd>
1339
+ #
1340
+ # <dt>height</dt>
1341
+ # <dd>This ad should be displayed within a rectangle that is this high,
1342
+ # in pixels.
1343
+ # </dd>
1344
+ #
1345
+ # <dt>advertiserName</dt>
1346
+ # <dd>A string containing a readable version of the name of this advertiser.
1347
+ # </dd>
1348
+ #
1349
+ # <dt>imageUrl</dt>
1350
+ # <dd>The location of the image to display for this ad.</dd>
1351
+ #
1352
+ # <dt>destinationUrl</dt>
1353
+ # <dd>When a user clicks on the ad, this is the destination they should be
1354
+ # sent to in a browser.</dd>
1355
+ #
1356
+ # <dt>displaySeconds</dt>
1357
+ # <dd>The number of seconds that the ad should be displayed before it is
1358
+ # replaced with a different ad.</dd>
1359
+ #
1360
+ # <dt>score</dt>
1361
+ # <dd>A numeric indicator of the relative value of this ad, which can be
1362
+ # compared against other ads from the same day.
1363
+ # </dd>
1364
+ #
1365
+ # <dt>image</dt>
1366
+ # <dd>If present, this is the raw image bits of the image file to display
1367
+ # for the ad. If not present, the imageUrl should be retrieved directly.
1368
+ # </dd>
1369
+ #
1370
+ # <dt>imageMime</dt>
1371
+ # <dd>The MIME type of the 'image' bytes, if those are set.</dd>
1372
+ #
1373
+ # <dt>html</dt>
1374
+ # <dd>The exact HTML to display for this ad, to support rich or external
1375
+ # advertisements.</dd>
1376
+ #
1377
+ # <dt>displayFrequency</dt>
1378
+ # <dd>If this value is set, this is the relatively frequency that this
1379
+ # ad should be displayed in the daily set of ads, relative to a base
1380
+ # frequency of 1.0. I.e. an ad with a frequency of 3.0 should be displayed
1381
+ # three times more frequently than an ad with a frequency of 1.0.</dd>
1382
+ # </dl>
1383
+ class Ad
1384
+ include ::Thrift::Struct
1385
+ ID = 1
1386
+ WIDTH = 2
1387
+ HEIGHT = 3
1388
+ ADVERTISERNAME = 4
1389
+ IMAGEURL = 5
1390
+ DESTINATIONURL = 6
1391
+ DISPLAYSECONDS = 7
1392
+ SCORE = 8
1393
+ IMAGE = 9
1394
+ IMAGEMIME = 10
1395
+ HTML = 11
1396
+ DISPLAYFREQUENCY = 12
1397
+
1398
+ ::Thrift::Struct.field_accessor self, :id, :width, :height, :advertiserName, :imageUrl, :destinationUrl, :displaySeconds, :score, :image, :imageMime, :html, :displayFrequency
1399
+ FIELDS = {
1400
+ ID => {:type => ::Thrift::Types::I32, :name => 'id', :optional => true},
1401
+ WIDTH => {:type => ::Thrift::Types::I16, :name => 'width', :optional => true},
1402
+ HEIGHT => {:type => ::Thrift::Types::I16, :name => 'height', :optional => true},
1403
+ ADVERTISERNAME => {:type => ::Thrift::Types::STRING, :name => 'advertiserName', :optional => true},
1404
+ IMAGEURL => {:type => ::Thrift::Types::STRING, :name => 'imageUrl', :optional => true},
1405
+ DESTINATIONURL => {:type => ::Thrift::Types::STRING, :name => 'destinationUrl', :optional => true},
1406
+ DISPLAYSECONDS => {:type => ::Thrift::Types::I16, :name => 'displaySeconds', :optional => true},
1407
+ SCORE => {:type => ::Thrift::Types::DOUBLE, :name => 'score', :optional => true},
1408
+ IMAGE => {:type => ::Thrift::Types::STRING, :name => 'image', :optional => true},
1409
+ IMAGEMIME => {:type => ::Thrift::Types::STRING, :name => 'imageMime', :optional => true},
1410
+ HTML => {:type => ::Thrift::Types::STRING, :name => 'html', :optional => true},
1411
+ DISPLAYFREQUENCY => {:type => ::Thrift::Types::DOUBLE, :name => 'displayFrequency', :optional => true}
1412
+ }
1413
+
1414
+ def struct_fields; FIELDS; end
1415
+
1416
+ def validate
1417
+ end
1418
+
1419
+ end
1420
+
1421
+ # Shared notebooks represent a relationship between a notebook and a single
1422
+ # share invitation recipient.
1423
+ # <dl>
1424
+ # <dt>id</dt>
1425
+ # <dd>the primary identifier of the share</dd>
1426
+ #
1427
+ # <dt>userId</dt>
1428
+ # <dd>The user id of the owner of the notebook</dd>
1429
+ #
1430
+ # <dt>notebookGuid</dt>
1431
+ # <dd>the GUID of the notebooks that's being shared.</dd>
1432
+ #
1433
+ # <dt>email</dt>
1434
+ # <dd>the email address of the recipient - used by the notebook
1435
+ # owner to identify who they shared with.</dd>
1436
+ #
1437
+ # <dt>notebookModifiable</dt>
1438
+ # <dd>a flag indicating the a share is read/write -otherwise it's read only</dd>
1439
+ #
1440
+ # <dt>requireLogin</dt>
1441
+ # <dd>indicates that a user must login to access the share</dd>
1442
+ #
1443
+ # <dt>serviceCreated</dt>
1444
+ # <dd>the date the owner first created the share with the specific email
1445
+ # address</dd>
1446
+ #
1447
+ # <dt>username</dt>
1448
+ # <dd>the username of the user who can access this share.
1449
+ # Once it's assigned it cannot be changed.</dd>
1450
+ # </dl>
1451
+ class SharedNotebook
1452
+ include ::Thrift::Struct
1453
+ ID = 1
1454
+ USERID = 2
1455
+ NOTEBOOKGUID = 3
1456
+ EMAIL = 4
1457
+ NOTEBOOKMODIFIABLE = 5
1458
+ REQUIRELOGIN = 6
1459
+ SERVICECREATED = 7
1460
+ SHAREKEY = 8
1461
+ USERNAME = 9
1462
+
1463
+ ::Thrift::Struct.field_accessor self, :id, :userId, :notebookGuid, :email, :notebookModifiable, :requireLogin, :serviceCreated, :shareKey, :username
1464
+ FIELDS = {
1465
+ ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true},
1466
+ USERID => {:type => ::Thrift::Types::I32, :name => 'userId', :optional => true},
1467
+ NOTEBOOKGUID => {:type => ::Thrift::Types::STRING, :name => 'notebookGuid', :optional => true},
1468
+ EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email', :optional => true},
1469
+ NOTEBOOKMODIFIABLE => {:type => ::Thrift::Types::BOOL, :name => 'notebookModifiable', :optional => true},
1470
+ REQUIRELOGIN => {:type => ::Thrift::Types::BOOL, :name => 'requireLogin', :optional => true},
1471
+ SERVICECREATED => {:type => ::Thrift::Types::I64, :name => 'serviceCreated', :optional => true},
1472
+ SHAREKEY => {:type => ::Thrift::Types::STRING, :name => 'shareKey', :optional => true},
1473
+ USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true}
1474
+ }
1475
+
1476
+ def struct_fields; FIELDS; end
1477
+
1478
+ def validate
1479
+ end
1480
+
1481
+ end
1482
+
1483
+ # A link in an users account that refers them to a public or individual share in
1484
+ # another user's account.
1485
+ #
1486
+ # <dl>
1487
+ # <dt>id</dt>
1488
+ # <dd>the primary identify of a linked notebook only used for deleting.</dd>
1489
+ #
1490
+ # <dt>shareName</dt>
1491
+ # <dd>the display name of the shared notebook.
1492
+ # The link owner can change this.</dd>
1493
+ #
1494
+ # <dt>username</dt>
1495
+ # <dd>the username of the user who owns the shared or public notebook</dd>
1496
+ #
1497
+ # <dt>shardId</dt>
1498
+ # <dd>the shard ID of the notebook if the notebook is not public</dt>
1499
+ #
1500
+ # <dt>shareKey</dt>
1501
+ # <dd>the secret key that provides access to the shared notebook</dd>
1502
+ #
1503
+ # <dt>uri</dt>
1504
+ # <dd>the identifier of the public notebook</dd>
1505
+ class LinkedNotebook
1506
+ include ::Thrift::Struct
1507
+ ID = 1
1508
+ SHARENAME = 2
1509
+ USERNAME = 3
1510
+ SHARDID = 4
1511
+ SHAREKEY = 5
1512
+ URI = 6
1513
+
1514
+ ::Thrift::Struct.field_accessor self, :id, :shareName, :username, :shardId, :shareKey, :uri
1515
+ FIELDS = {
1516
+ ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true},
1517
+ SHARENAME => {:type => ::Thrift::Types::STRING, :name => 'shareName', :optional => true},
1518
+ USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
1519
+ SHARDID => {:type => ::Thrift::Types::STRING, :name => 'shardId', :optional => true},
1520
+ SHAREKEY => {:type => ::Thrift::Types::STRING, :name => 'shareKey', :optional => true},
1521
+ URI => {:type => ::Thrift::Types::STRING, :name => 'uri', :optional => true}
1522
+ }
1523
+
1524
+ def struct_fields; FIELDS; end
1525
+
1526
+ def validate
1527
+ end
1528
+
1529
+ end
1530
+
1531
+ end
1532
+ end
1533
+ end