Class: Evernote::EDAM::NoteStore::SyncState
- Inherits:
-
Object
- Object
- Evernote::EDAM::NoteStore::SyncState
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/Evernote/EDAM/note_store_types.rb
Overview
This structure encapsulates the information about the state of the
user's account for the purpose of "state based" synchronization.
<dl>
<dt>currentTime</dt>
<dd>
The server's current date and time.
</dd>
<dt>fullSyncBefore</dt>
<dd>
The cutoff date and time for client caches to be
updated via incremental synchronization. Any clients that were last
synched with the server before this date/time must do a full resync of all
objects. This cutoff point will change over time as archival data is
deleted or special circumstances on the service require resynchronization.
</dd>
<dt>updateCount</dt>
<dd>
Indicates the total number of transactions that have
been committed within the account. This reflects (for example) the
number of discrete additions or modifications that have been made to
the data in this account (tags, notes, resources, etc.).
This number is the "high water mark" for Update Sequence Numbers (USN)
within the account.
</dd>
<dt>uploaded</dt>
<dd>
The total number of bytes that have been uploaded to
this account in the current monthly period. This can be compared against
Accounting.uploadLimit (from the UserStore) to determine how close the user
is to their monthly upload limit.
This value may not be present if the SyncState has been retrieved by
a caller that only has read access to the account.
</dd>
</dl>
Constant Summary collapse
- CURRENTTIME =
1
- FULLSYNCBEFORE =
2
- UPDATECOUNT =
3
- UPLOADED =
4
- FIELDS =
{ CURRENTTIME => {:type => ::Thrift::Types::I64, :name => 'currentTime'}, FULLSYNCBEFORE => {:type => ::Thrift::Types::I64, :name => 'fullSyncBefore'}, UPDATECOUNT => {:type => ::Thrift::Types::I32, :name => 'updateCount'}, UPLOADED => {:type => ::Thrift::Types::I64, :name => 'uploaded', :optional => true} }
Constants included from Thrift::Struct_Union
Thrift::Struct_Union::CONTAINER_TYPES
Instance Method Summary collapse
Methods included from Thrift::Struct
#<=>, #==, #differences, #eql?, field_accessor, #fields_with_default_values, generate_accessors, #hash, #initialize, #inspect, qmark_isset_method, #read, #write
Methods included from Thrift::Struct_Union
#each_field, #field_info, #inspect_collection, #inspect_field, #is_container?, #name_to_id, #read_field, #sorted_field_ids, #write_container, #write_data
Instance Method Details
#struct_fields ⇒ Object
67 |
# File 'lib/Evernote/EDAM/note_store_types.rb', line 67 def struct_fields; FIELDS; end |
#validate ⇒ Object
69 70 71 72 73 |
# File 'lib/Evernote/EDAM/note_store_types.rb', line 69 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field currentTime is unset!') unless @currentTime raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fullSyncBefore is unset!') unless @fullSyncBefore raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field updateCount is unset!') unless @updateCount end |