evernote-thrift 1.22.0
Sign up to get free protection for your applications and to get access to all the features.
- data/APACHE-LICENSE-2.0.txt +202 -0
- data/LICENSE +27 -0
- data/NOTICE +5 -0
- data/README.md +44 -0
- data/evernote-thrift.gemspec +28 -0
- data/lib/Evernote/EDAM/errors_constants.rb +14 -0
- data/lib/Evernote/EDAM/errors_types.rb +128 -0
- data/lib/Evernote/EDAM/limits_constants.rb +252 -0
- data/lib/Evernote/EDAM/limits_types.rb +13 -0
- data/lib/Evernote/EDAM/note_store.rb +5562 -0
- data/lib/Evernote/EDAM/note_store_constants.rb +14 -0
- data/lib/Evernote/EDAM/note_store_types.rb +1127 -0
- data/lib/Evernote/EDAM/types_constants.rb +20 -0
- data/lib/Evernote/EDAM/types_types.rb +1792 -0
- data/lib/Evernote/EDAM/user_store.rb +549 -0
- data/lib/Evernote/EDAM/user_store_constants.rb +18 -0
- data/lib/Evernote/EDAM/user_store_types.rb +417 -0
- data/lib/evernote-thrift.rb +39 -0
- data/lib/thrift.rb +64 -0
- data/lib/thrift/client.rb +62 -0
- data/lib/thrift/core_ext.rb +23 -0
- data/lib/thrift/core_ext/fixnum.rb +29 -0
- data/lib/thrift/exceptions.rb +84 -0
- data/lib/thrift/processor.rb +57 -0
- data/lib/thrift/protocol/base_protocol.rb +290 -0
- data/lib/thrift/protocol/binary_protocol.rb +229 -0
- data/lib/thrift/protocol/binary_protocol_accelerated.rb +39 -0
- data/lib/thrift/protocol/compact_protocol.rb +426 -0
- data/lib/thrift/serializer/deserializer.rb +33 -0
- data/lib/thrift/serializer/serializer.rb +34 -0
- data/lib/thrift/server/base_server.rb +31 -0
- data/lib/thrift/server/mongrel_http_server.rb +58 -0
- data/lib/thrift/server/nonblocking_server.rb +305 -0
- data/lib/thrift/server/simple_server.rb +43 -0
- data/lib/thrift/server/thread_pool_server.rb +75 -0
- data/lib/thrift/server/threaded_server.rb +47 -0
- data/lib/thrift/struct.rb +237 -0
- data/lib/thrift/struct_union.rb +192 -0
- data/lib/thrift/thrift_native.rb +24 -0
- data/lib/thrift/transport/base_server_transport.rb +37 -0
- data/lib/thrift/transport/base_transport.rb +107 -0
- data/lib/thrift/transport/buffered_transport.rb +108 -0
- data/lib/thrift/transport/framed_transport.rb +116 -0
- data/lib/thrift/transport/http_client_transport.rb +53 -0
- data/lib/thrift/transport/io_stream_transport.rb +39 -0
- data/lib/thrift/transport/memory_buffer_transport.rb +125 -0
- data/lib/thrift/transport/server_socket.rb +63 -0
- data/lib/thrift/transport/socket.rb +137 -0
- data/lib/thrift/transport/unix_server_socket.rb +60 -0
- data/lib/thrift/transport/unix_socket.rb +40 -0
- data/lib/thrift/types.rb +101 -0
- data/lib/thrift/union.rb +179 -0
- metadata +99 -0
@@ -0,0 +1,18 @@
|
|
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 'user_store_types'
|
8
|
+
|
9
|
+
module Evernote
|
10
|
+
module EDAM
|
11
|
+
module UserStore
|
12
|
+
EDAM_VERSION_MAJOR = 1
|
13
|
+
|
14
|
+
EDAM_VERSION_MINOR = 22
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,417 @@
|
|
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 'types_types'
|
8
|
+
require 'errors_types'
|
9
|
+
|
10
|
+
|
11
|
+
module Evernote
|
12
|
+
module EDAM
|
13
|
+
module UserStore
|
14
|
+
module SponsoredGroupRole
|
15
|
+
GROUP_MEMBER = 1
|
16
|
+
GROUP_ADMIN = 2
|
17
|
+
GROUP_OWNER = 3
|
18
|
+
VALUE_MAP = {1 => "GROUP_MEMBER", 2 => "GROUP_ADMIN", 3 => "GROUP_OWNER"}
|
19
|
+
VALID_VALUES = Set.new([GROUP_MEMBER, GROUP_ADMIN, GROUP_OWNER]).freeze
|
20
|
+
end
|
21
|
+
|
22
|
+
# This structure is used to provide publicly-available user information
|
23
|
+
# about a particular account.
|
24
|
+
# <dl>
|
25
|
+
# <dt>userId:</dt>
|
26
|
+
# <dd>
|
27
|
+
# The unique numeric user identifier for the user account.
|
28
|
+
# </dd>
|
29
|
+
# <dt>shardId:</dt>
|
30
|
+
# <dd>
|
31
|
+
# The name of the virtual server that manages the state of
|
32
|
+
# this user. This value is used internally to determine which system should
|
33
|
+
# service requests about this user's data.
|
34
|
+
# </dd>
|
35
|
+
# <dt>privilege:</dt>
|
36
|
+
# <dd>
|
37
|
+
# The privilege level of the account, to determine whether
|
38
|
+
# this is a Premium or Free account.
|
39
|
+
# </dd>
|
40
|
+
# <dt>noteStoreUrl:</dt>
|
41
|
+
# <dd>
|
42
|
+
# This field will contain the full URL that clients should use to make
|
43
|
+
# NoteStore requests to the server shard that contains that user's data.
|
44
|
+
# I.e. this is the URL that should be used to create the Thrift HTTP client
|
45
|
+
# transport to send messages to the NoteStore service for the account.
|
46
|
+
# </dd>
|
47
|
+
# </dl>
|
48
|
+
class PublicUserInfo
|
49
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
50
|
+
USERID = 1
|
51
|
+
SHARDID = 2
|
52
|
+
PRIVILEGE = 3
|
53
|
+
USERNAME = 4
|
54
|
+
NOTESTOREURL = 5
|
55
|
+
|
56
|
+
FIELDS = {
|
57
|
+
USERID => {:type => ::Thrift::Types::I32, :name => 'userId'},
|
58
|
+
SHARDID => {:type => ::Thrift::Types::STRING, :name => 'shardId'},
|
59
|
+
PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => Evernote::EDAM::Type::PrivilegeLevel},
|
60
|
+
USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
|
61
|
+
NOTESTOREURL => {:type => ::Thrift::Types::STRING, :name => 'noteStoreUrl', :optional => true}
|
62
|
+
}
|
63
|
+
|
64
|
+
def struct_fields; FIELDS; end
|
65
|
+
|
66
|
+
def validate
|
67
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field userId is unset!') unless @userId
|
68
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field shardId is unset!') unless @shardId
|
69
|
+
unless @privilege.nil? || Evernote::EDAM::Type::PrivilegeLevel::VALID_VALUES.include?(@privilege)
|
70
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field privilege!')
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
::Thrift::Struct.generate_accessors self
|
75
|
+
end
|
76
|
+
|
77
|
+
# This structure is used to provide information about a user's Premium account.
|
78
|
+
# <dl>
|
79
|
+
# <dt>currentTime:</dt>
|
80
|
+
# <dd>
|
81
|
+
# The server-side date and time when this data was generated.
|
82
|
+
# </dd>
|
83
|
+
# <dt>premium:</dt>
|
84
|
+
# <dd>
|
85
|
+
# True if the user's account is Premium.
|
86
|
+
# </dd>
|
87
|
+
# <dt>premiumRecurring</dt>
|
88
|
+
# <dd>
|
89
|
+
# True if the user's account is Premium and has a recurring payment method.
|
90
|
+
# </dd>
|
91
|
+
# <dt>premiumExpirationDate:</dt>
|
92
|
+
# <dd>
|
93
|
+
# The date when the user's Premium account expires, or the date when the
|
94
|
+
# user's account will be charged if it has a recurring payment method.
|
95
|
+
# </dd>
|
96
|
+
# <dt>premiumExtendable:</dt>
|
97
|
+
# <dd>
|
98
|
+
# True if the user is eligible for purchasing Premium account extensions.
|
99
|
+
# </dd>
|
100
|
+
# <dt>premiumPending:</dt>
|
101
|
+
# <dd>
|
102
|
+
# True if the user's Premium account is pending payment confirmation
|
103
|
+
# </dd>
|
104
|
+
# <dt>premiumCancellationPending:</dt>
|
105
|
+
# <dd>
|
106
|
+
# True if the user has requested that no further charges to be made; the
|
107
|
+
# Premium account will remain active until it expires.
|
108
|
+
# </dd>
|
109
|
+
# <dt>canPurchaseUploadAllowance:</dt>
|
110
|
+
# <dd>
|
111
|
+
# True if the user is eligible for purchasing additional upload allowance.
|
112
|
+
# </dd>
|
113
|
+
# <dt>sponsoredGroupName:</dt>
|
114
|
+
# <dd>
|
115
|
+
# The name of the sponsored group that the user is part of.
|
116
|
+
# </dd>
|
117
|
+
# <dt>sponsoredGroupRole:</dt>
|
118
|
+
# <dd>
|
119
|
+
# The role of the user within a sponsored group.
|
120
|
+
# </dd>
|
121
|
+
# <dt>businessName:</dt>
|
122
|
+
# <dd>
|
123
|
+
# The name of the business that the user is associated with.
|
124
|
+
# </dd>
|
125
|
+
# <dt>businessAdmin:</dt>
|
126
|
+
# <dd>
|
127
|
+
# True if the user is the administrator of the business.
|
128
|
+
# </dd>
|
129
|
+
# </dl>
|
130
|
+
class PremiumInfo
|
131
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
132
|
+
CURRENTTIME = 1
|
133
|
+
PREMIUM = 2
|
134
|
+
PREMIUMRECURRING = 3
|
135
|
+
PREMIUMEXPIRATIONDATE = 4
|
136
|
+
PREMIUMEXTENDABLE = 5
|
137
|
+
PREMIUMPENDING = 6
|
138
|
+
PREMIUMCANCELLATIONPENDING = 7
|
139
|
+
CANPURCHASEUPLOADALLOWANCE = 8
|
140
|
+
SPONSOREDGROUPNAME = 9
|
141
|
+
SPONSOREDGROUPROLE = 10
|
142
|
+
BUSINESSNAME = 11
|
143
|
+
BUSINESSADMIN = 12
|
144
|
+
|
145
|
+
FIELDS = {
|
146
|
+
CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'},
|
147
|
+
PREMIUM => {:type => ::Thrift::Types::BOOL, :name => 'premium'},
|
148
|
+
PREMIUMRECURRING => {:type => ::Thrift::Types::BOOL, :name => 'premiumRecurring'},
|
149
|
+
PREMIUMEXPIRATIONDATE => {:type => ::Thrift::Types::I64, :name => 'premiumExpirationDate', :optional => true},
|
150
|
+
PREMIUMEXTENDABLE => {:type => ::Thrift::Types::BOOL, :name => 'premiumExtendable'},
|
151
|
+
PREMIUMPENDING => {:type => ::Thrift::Types::BOOL, :name => 'premiumPending'},
|
152
|
+
PREMIUMCANCELLATIONPENDING => {:type => ::Thrift::Types::BOOL, :name => 'premiumCancellationPending'},
|
153
|
+
CANPURCHASEUPLOADALLOWANCE => {:type => ::Thrift::Types::BOOL, :name => 'canPurchaseUploadAllowance'},
|
154
|
+
SPONSOREDGROUPNAME => {:type => ::Thrift::Types::STRING, :name => 'sponsoredGroupName', :optional => true},
|
155
|
+
SPONSOREDGROUPROLE => {:type => ::Thrift::Types::I32, :name => 'sponsoredGroupRole', :optional => true, :enum_class => Evernote::EDAM::UserStore::SponsoredGroupRole},
|
156
|
+
BUSINESSNAME => {:type => ::Thrift::Types::STRING, :name => 'businessName', :optional => true},
|
157
|
+
BUSINESSADMIN => {:type => ::Thrift::Types::BOOL, :name => 'businessAdmin', :optional => true}
|
158
|
+
}
|
159
|
+
|
160
|
+
def struct_fields; FIELDS; end
|
161
|
+
|
162
|
+
def validate
|
163
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field currentTime is unset!') unless @currentTime
|
164
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premium is unset!') if @premium.nil?
|
165
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumRecurring is unset!') if @premiumRecurring.nil?
|
166
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumExtendable is unset!') if @premiumExtendable.nil?
|
167
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumPending is unset!') if @premiumPending.nil?
|
168
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field premiumCancellationPending is unset!') if @premiumCancellationPending.nil?
|
169
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field canPurchaseUploadAllowance is unset!') if @canPurchaseUploadAllowance.nil?
|
170
|
+
unless @sponsoredGroupRole.nil? || Evernote::EDAM::UserStore::SponsoredGroupRole::VALID_VALUES.include?(@sponsoredGroupRole)
|
171
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field sponsoredGroupRole!')
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
::Thrift::Struct.generate_accessors self
|
176
|
+
end
|
177
|
+
|
178
|
+
# When an authentication (or re-authentication) is performed, this structure
|
179
|
+
# provides the result to the client.
|
180
|
+
# <dl>
|
181
|
+
# <dt>currentTime:</dt>
|
182
|
+
# <dd>
|
183
|
+
# The server-side date and time when this result was
|
184
|
+
# generated.
|
185
|
+
# </dd>
|
186
|
+
# <dt>authenticationToken:</dt>
|
187
|
+
# <dd>
|
188
|
+
# Holds an opaque, ASCII-encoded token that can be
|
189
|
+
# used by the client to perform actions on a NoteStore.
|
190
|
+
# </dd>
|
191
|
+
# <dt>expiration:</dt>
|
192
|
+
# <dd>
|
193
|
+
# Holds the server-side date and time when the
|
194
|
+
# authentication token will expire.
|
195
|
+
# This time can be compared to "currentTime" to produce an expiration
|
196
|
+
# time that can be reconciled with the client's local clock.
|
197
|
+
# </dd>
|
198
|
+
# <dt>user:</dt>
|
199
|
+
# <dd>
|
200
|
+
# Holds the information about the account which was
|
201
|
+
# authenticated if this was a full authentication. May be absent if this
|
202
|
+
# particular authentication did not require user information.
|
203
|
+
# </dd>
|
204
|
+
# <dt>publicUserInfo:</dt>
|
205
|
+
# <dd>
|
206
|
+
# If this authentication result was achieved without full permissions to
|
207
|
+
# access the full User structure, this field may be set to give back
|
208
|
+
# a more limited public set of data.
|
209
|
+
# </dd>
|
210
|
+
# <dt>noteStoreUrl:</dt>
|
211
|
+
# <dd>
|
212
|
+
# This field will contain the full URL that clients should use to make
|
213
|
+
# NoteStore requests to the server shard that contains that user's data.
|
214
|
+
# I.e. this is the URL that should be used to create the Thrift HTTP client
|
215
|
+
# transport to send messages to the NoteStore service for the account.
|
216
|
+
# </dd>
|
217
|
+
# <dt>webApiUrlPrefix:</dt>
|
218
|
+
# <dd>
|
219
|
+
# This field will contain the initial part of the URLs that should be used
|
220
|
+
# to make requests to Evernote's thin client "web API", which provide
|
221
|
+
# optimized operations for clients that aren't capable of manipulating
|
222
|
+
# the full contents of accounts via the full Thrift data model. Clients
|
223
|
+
# should concatenate the relative path for the various servlets onto the
|
224
|
+
# end of this string to construct the full URL, as documented on our
|
225
|
+
# developer web site.
|
226
|
+
# </dd>
|
227
|
+
# </dl>
|
228
|
+
class AuthenticationResult
|
229
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
230
|
+
CURRENTTIME = 1
|
231
|
+
AUTHENTICATIONTOKEN = 2
|
232
|
+
EXPIRATION = 3
|
233
|
+
USER = 4
|
234
|
+
PUBLICUSERINFO = 5
|
235
|
+
NOTESTOREURL = 6
|
236
|
+
WEBAPIURLPREFIX = 7
|
237
|
+
|
238
|
+
FIELDS = {
|
239
|
+
CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'},
|
240
|
+
AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'},
|
241
|
+
EXPIRATION => {:type => ::Thrift::Types::I64, :name => 'expiration'},
|
242
|
+
USER => {:type => ::Thrift::Types::STRUCT, :name => 'user', :class => Evernote::EDAM::Type::User, :optional => true},
|
243
|
+
PUBLICUSERINFO => {:type => ::Thrift::Types::STRUCT, :name => 'publicUserInfo', :class => Evernote::EDAM::UserStore::PublicUserInfo, :optional => true},
|
244
|
+
NOTESTOREURL => {:type => ::Thrift::Types::STRING, :name => 'noteStoreUrl', :optional => true},
|
245
|
+
WEBAPIURLPREFIX => {:type => ::Thrift::Types::STRING, :name => 'webApiUrlPrefix', :optional => true}
|
246
|
+
}
|
247
|
+
|
248
|
+
def struct_fields; FIELDS; end
|
249
|
+
|
250
|
+
def validate
|
251
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field currentTime is unset!') unless @currentTime
|
252
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field authenticationToken is unset!') unless @authenticationToken
|
253
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expiration is unset!') unless @expiration
|
254
|
+
end
|
255
|
+
|
256
|
+
::Thrift::Struct.generate_accessors self
|
257
|
+
end
|
258
|
+
|
259
|
+
# This structure describes a collection of bootstrap settings.
|
260
|
+
# <dl>
|
261
|
+
# <dt>serviceHost:</dt>
|
262
|
+
# <dd>
|
263
|
+
# The hostname and optional port for composing Evernote web service URLs.
|
264
|
+
# This URL can be used to access the UserStore and related services,
|
265
|
+
# but must not be used to compose the NoteStore URL. Client applications
|
266
|
+
# must handle serviceHost values that include only the hostname
|
267
|
+
# (e.g. www.evernote.com) or both the hostname and port (e.g. www.evernote.com:8080).
|
268
|
+
# If no port is specified, or if port 443 is specified, client applications must
|
269
|
+
# use the scheme "https" when composing URLs. Otherwise, a client must use the
|
270
|
+
# scheme "http".
|
271
|
+
# </dd>
|
272
|
+
# <dt>marketingUrl:</dt>
|
273
|
+
# <dd>
|
274
|
+
# The URL stem for the Evernote corporate marketing website, e.g. http://www.evernote.com.
|
275
|
+
# This stem can be used to compose website URLs. For example, the URL of the Evernote
|
276
|
+
# Trunk is composed by appending "/about/trunk/" to the value of marketingUrl.
|
277
|
+
# </dd>
|
278
|
+
# <dt>supportUrl:</dt>
|
279
|
+
# <dd>
|
280
|
+
# The full URL for the Evernote customer support website, e.g. https://support.evernote.com.
|
281
|
+
# </dd>
|
282
|
+
# <dt>accountEmailDomain:</dt>
|
283
|
+
# <dd>
|
284
|
+
# The domain used for an Evernote user's incoming email address, which allows notes to
|
285
|
+
# be emailed into an account. E.g. m.evernote.com.
|
286
|
+
# </dd>
|
287
|
+
# <dt>enableFacebookSharing:</dt>
|
288
|
+
# <dd>
|
289
|
+
# Whether the client application should enable sharing of notes on Facebook.
|
290
|
+
# </dd>
|
291
|
+
# <dt>enableGiftSubscriptions:</dt>
|
292
|
+
# <dd>
|
293
|
+
# Whether the client application should enable gift subscriptions.
|
294
|
+
# </dd>
|
295
|
+
# <dt>enableSupportTickets:</dt>
|
296
|
+
# <dd>
|
297
|
+
# Whether the client application should enable in-client creation of support tickets.
|
298
|
+
# </dd>
|
299
|
+
# <dt>enableSharedNotebooks:</dt>
|
300
|
+
# <dd>
|
301
|
+
# Whether the client application should enable shared notebooks.
|
302
|
+
# </dd>
|
303
|
+
# <dt>enableSingleNoteSharing:</dt>
|
304
|
+
# <dd>
|
305
|
+
# Whether the client application should enable single note sharing.
|
306
|
+
# </dd>
|
307
|
+
# <dt>enableSponsoredAccounts:</dt>
|
308
|
+
# <dd>
|
309
|
+
# Whether the client application should enable sponsored accounts.
|
310
|
+
# </dd>
|
311
|
+
# <dt>enableTwitterSharing:</dt>
|
312
|
+
# <dd>
|
313
|
+
# Whether the client application should enable sharing of notes on Twitter.
|
314
|
+
# </dd>
|
315
|
+
# </dl>
|
316
|
+
class BootstrapSettings
|
317
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
318
|
+
SERVICEHOST = 1
|
319
|
+
MARKETINGURL = 2
|
320
|
+
SUPPORTURL = 3
|
321
|
+
ACCOUNTEMAILDOMAIN = 4
|
322
|
+
ENABLEFACEBOOKSHARING = 5
|
323
|
+
ENABLEGIFTSUBSCRIPTIONS = 6
|
324
|
+
ENABLESUPPORTTICKETS = 7
|
325
|
+
ENABLESHAREDNOTEBOOKS = 8
|
326
|
+
ENABLESINGLENOTESHARING = 9
|
327
|
+
ENABLESPONSOREDACCOUNTS = 10
|
328
|
+
ENABLETWITTERSHARING = 11
|
329
|
+
ENABLELINKEDINSHARING = 12
|
330
|
+
|
331
|
+
FIELDS = {
|
332
|
+
SERVICEHOST => {:type => ::Thrift::Types::STRING, :name => 'serviceHost'},
|
333
|
+
MARKETINGURL => {:type => ::Thrift::Types::STRING, :name => 'marketingUrl'},
|
334
|
+
SUPPORTURL => {:type => ::Thrift::Types::STRING, :name => 'supportUrl'},
|
335
|
+
ACCOUNTEMAILDOMAIN => {:type => ::Thrift::Types::STRING, :name => 'accountEmailDomain'},
|
336
|
+
ENABLEFACEBOOKSHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableFacebookSharing', :optional => true},
|
337
|
+
ENABLEGIFTSUBSCRIPTIONS => {:type => ::Thrift::Types::BOOL, :name => 'enableGiftSubscriptions', :optional => true},
|
338
|
+
ENABLESUPPORTTICKETS => {:type => ::Thrift::Types::BOOL, :name => 'enableSupportTickets', :optional => true},
|
339
|
+
ENABLESHAREDNOTEBOOKS => {:type => ::Thrift::Types::BOOL, :name => 'enableSharedNotebooks', :optional => true},
|
340
|
+
ENABLESINGLENOTESHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableSingleNoteSharing', :optional => true},
|
341
|
+
ENABLESPONSOREDACCOUNTS => {:type => ::Thrift::Types::BOOL, :name => 'enableSponsoredAccounts', :optional => true},
|
342
|
+
ENABLETWITTERSHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableTwitterSharing', :optional => true},
|
343
|
+
ENABLELINKEDINSHARING => {:type => ::Thrift::Types::BOOL, :name => 'enableLinkedInSharing', :optional => true}
|
344
|
+
}
|
345
|
+
|
346
|
+
def struct_fields; FIELDS; end
|
347
|
+
|
348
|
+
def validate
|
349
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field serviceHost is unset!') unless @serviceHost
|
350
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field marketingUrl is unset!') unless @marketingUrl
|
351
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field supportUrl is unset!') unless @supportUrl
|
352
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field accountEmailDomain is unset!') unless @accountEmailDomain
|
353
|
+
end
|
354
|
+
|
355
|
+
::Thrift::Struct.generate_accessors self
|
356
|
+
end
|
357
|
+
|
358
|
+
# This structure describes a collection of bootstrap settings.
|
359
|
+
# <dl>
|
360
|
+
# <dt>name:</dt>
|
361
|
+
# <dd>
|
362
|
+
# The unique name of the profile, which is guaranteed to remain consistent across
|
363
|
+
# calls to getBootstrapInfo.
|
364
|
+
# </dd>
|
365
|
+
# <dt>settings:</dt>
|
366
|
+
# <dd>
|
367
|
+
# The settings for this profile.
|
368
|
+
# </dd>
|
369
|
+
# </dl>
|
370
|
+
class BootstrapProfile
|
371
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
372
|
+
NAME = 1
|
373
|
+
SETTINGS = 2
|
374
|
+
|
375
|
+
FIELDS = {
|
376
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
377
|
+
SETTINGS => {:type => ::Thrift::Types::STRUCT, :name => 'settings', :class => Evernote::EDAM::UserStore::BootstrapSettings}
|
378
|
+
}
|
379
|
+
|
380
|
+
def struct_fields; FIELDS; end
|
381
|
+
|
382
|
+
def validate
|
383
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
|
384
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field settings is unset!') unless @settings
|
385
|
+
end
|
386
|
+
|
387
|
+
::Thrift::Struct.generate_accessors self
|
388
|
+
end
|
389
|
+
|
390
|
+
# This structure describes a collection of bootstrap profiles.
|
391
|
+
# <dl>
|
392
|
+
# <dt>profiles:</dt>
|
393
|
+
# <dd>
|
394
|
+
# List of one or more bootstrap profiles, in descending
|
395
|
+
# preference order.
|
396
|
+
# </dd>
|
397
|
+
# </dl>
|
398
|
+
class BootstrapInfo
|
399
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
400
|
+
PROFILES = 1
|
401
|
+
|
402
|
+
FIELDS = {
|
403
|
+
PROFILES => {:type => ::Thrift::Types::LIST, :name => 'profiles', :element => {:type => ::Thrift::Types::STRUCT, :class => Evernote::EDAM::UserStore::BootstrapProfile}}
|
404
|
+
}
|
405
|
+
|
406
|
+
def struct_fields; FIELDS; end
|
407
|
+
|
408
|
+
def validate
|
409
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field profiles is unset!') unless @profiles
|
410
|
+
end
|
411
|
+
|
412
|
+
::Thrift::Struct.generate_accessors self
|
413
|
+
end
|
414
|
+
|
415
|
+
end
|
416
|
+
end
|
417
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
#
|
2
|
+
# Licensed to the Apache Software Foundation (ASF) under one
|
3
|
+
# or more contributor license agreements. See the NOTICE file
|
4
|
+
# distributed with this work for additional information
|
5
|
+
# regarding copyright ownership. The ASF licenses this file
|
6
|
+
# to you under the Apache License, Version 2.0 (the
|
7
|
+
# "License"); you may not use this file except in compliance
|
8
|
+
# with the License. You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing,
|
13
|
+
# software distributed under the License is distributed on an
|
14
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
15
|
+
# KIND, either express or implied. See the License for the
|
16
|
+
# specific language governing permissions and limitations
|
17
|
+
# under the License.
|
18
|
+
#
|
19
|
+
# Contains some contributions under the Thrift Software License.
|
20
|
+
# Please see doc/old-thrift-license.txt in the Thrift distribution for
|
21
|
+
# details.
|
22
|
+
|
23
|
+
base_path = File.expand_path(File.dirname(__FILE__) + "/./")
|
24
|
+
$LOAD_PATH.unshift "#{base_path}/Evernote/EDAM"
|
25
|
+
|
26
|
+
require 'thrift.rb'
|
27
|
+
|
28
|
+
require 'set'
|
29
|
+
require 'errors_types'
|
30
|
+
require 'limits_constants'
|
31
|
+
require 'limits_types'
|
32
|
+
require 'note_store'
|
33
|
+
require 'note_store_constants'
|
34
|
+
require 'note_store_types'
|
35
|
+
require 'types_constants'
|
36
|
+
require 'types_types'
|
37
|
+
require 'user_store'
|
38
|
+
require 'user_store_constants'
|
39
|
+
require 'user_store_types'
|