Class: Evernote::EDAM::Type::SavedSearch

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

Overview

<dl> <dt>guid</dt>

<dd>The unique identifier of this search.  Will be set by the
service, so may be omitted by the client when creating.
<br/>
Length:  EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
<br/>
Regex:  EDAM_GUID_REGEX
</dd>

<dt>name</dt>

<dd>The name of the saved search to display in the GUI.  The
 may only contain one search with a given name (case-insensitive
compare). Can't begin or end with a space.
<br/>
Length:  EDAM_SAVED_SEARCH_NAME_LEN_MIN - EDAM_SAVED_SEARCH_NAME_LEN_MAX
<br/>
Regex:  EDAM_SAVED_SEARCH_NAME_REGEX
</dd>

<dt>query</dt>

<dd>A string expressing the search to be performed.
<br/>
Length:  EDAM_SAVED_SEARCH_QUERY_LEN_MIN - EDAM_SAVED_SEARCH_QUERY_LEN_MAX
</dd>

<dt>format</dt>

<dd>The format of the query string, to determine how to parse
and process it.
</dd>

<dt>updateSequenceNum</dt>

<dd>A number identifying the last transaction to
modify the state of this object.  The USN values are sequential within an
, and can be used to compare the order of modifications within the
service.
</dd>

<dt>scope</dt>

<dd><p>Specifies the set of notes that should be included in the search, if
 possible.</p>
 <p>Clients are expected to search as much of the desired scope as possible,
 with the understanding that a given client may not be able to cover the full
 specified scope. For example, when executing a search that includes notes in both
 the owner's account and business notebooks, a mobile client may choose to only
 search within the user's account because it is not capable of searching both
 scopes simultaneously. When a search across multiple scopes is not possible,
 a client may choose which scope to search based on the current application
 context. If a client cannot search any of the desired scopes, it should refuse
 to execute the search.</p>
 </dd>

</dl>

Constant Summary collapse

GUID =
1
NAME =
2
QUERY =
3
FORMAT =
4
UPDATESEQUENCENUM =
5
SCOPE =
6
FIELDS =
{
  GUID => {:type => ::Thrift::Types::STRING, :name => 'guid', :optional => true},
  NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true},
  QUERY => {:type => ::Thrift::Types::STRING, :name => 'query', :optional => true},
  FORMAT => {:type => ::Thrift::Types::I32, :name => 'format', :optional => true, :enum_class => ::Evernote::EDAM::Type::QueryFormat},
  UPDATESEQUENCENUM => {:type => ::Thrift::Types::I32, :name => 'updateSequenceNum', :optional => true},
  SCOPE => {:type => ::Thrift::Types::STRUCT, :name => 'scope', :class => ::Evernote::EDAM::Type::SavedSearchScope, :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



1792
# File 'lib/Evernote/EDAM/types_types.rb', line 1792

def struct_fields; FIELDS; end

#validateObject



1794
1795
1796
1797
1798
# File 'lib/Evernote/EDAM/types_types.rb', line 1794

def validate
  unless @format.nil? || ::Evernote::EDAM::Type::QueryFormat::VALID_VALUES.include?(@format)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field format!')
  end
end