Class: Evernote::EDAM::NoteStore::NoteMetadata

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/Evernote/EDAM/note_store_types.rb

Overview

findNotesMetadata function. It represents the high-level information about a single Note, without some of the larger deep structure. This allows for the information about a list of Notes to be returned relatively quickly with less marshalling and data transfer to remote clients. Most fields in this structure are identical to the corresponding field in the Note structure, with the exception of:

<dl> <dt>largestResourceMime</dt>

<dd>If set, then this will contain the MIME type of the largest Resource
(in bytes) within the Note.  This may be useful, for example, to choose
an appropriate icon or thumbnail to represent the Note.
</dd>

<dt>largestResourceSize</dt>

<dd>If set, this will contain the size of the largest Resource file, in
bytes, within the Note.  This may be useful, for example, to decide whether
to ask the server for a thumbnail to represent the Note.
</dd>

</dl>

Constant Summary collapse

GUID =
1
TITLE =
2
CONTENTLENGTH =
5
CREATED =
6
UPDATED =
7
DELETED =
8
UPDATESEQUENCENUM =
10
NOTEBOOKGUID =
11
TAGGUIDS =
12
ATTRIBUTES =
14
LARGESTRESOURCEMIME =
20
LARGESTRESOURCESIZE =
21
FIELDS =
{
  GUID => {:type => ::Thrift::Types::STRING, :name => 'guid'},
  TITLE => {:type => ::Thrift::Types::STRING, :name => 'title', :optional => true},
  CONTENTLENGTH => {:type => ::Thrift::Types::I32, :name => 'contentLength', :optional => true},
  CREATED => {:type => ::Thrift::Types::I64, :name => 'created', :optional => true},
  UPDATED => {:type => ::Thrift::Types::I64, :name => 'updated', :optional => true},
  DELETED => {:type => ::Thrift::Types::I64, :name => 'deleted', :optional => true},
  UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
  NOTEBOOKGUID => {:type => ::Thrift::Types::STRING, :name => 'notebookGuid', :optional => true},
  TAGGUIDS => {:type => ::Thrift::Types::LIST, :name => 'tagGuids', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
  ATTRIBUTES => {:type => ::Thrift::Types::STRUCT, :name => 'attributes', :class => ::Evernote::EDAM::Type::NoteAttributes, :optional => true},
  LARGESTRESOURCEMIME => {:type => ::Thrift::Types::STRING, :name => 'largestResourceMime', :optional => true},
  LARGESTRESOURCESIZE => {:type => ::Thrift::Types::I32, :name => 'largestResourceSize', :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_fieldsObject



579
# File 'lib/Evernote/EDAM/note_store_types.rb', line 579

def struct_fields; FIELDS; end

#validateObject



581
582
583
# File 'lib/Evernote/EDAM/note_store_types.rb', line 581

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field guid is unset!') unless @guid
end