log4ever 0.0.9 → 0.1.0

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