Class: Evernote::EDAM::Type::NotebookRestrictions

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

Overview

that cannot be performed on a given notebook with a type of authenticated access and credentials. The values filled into this structure are based on then-current values in the server database for shared notebooks and notebook publishing records, as well as information related to the authentication token. Information from the authentication token includes the application that is accessing the server, as defined by the permissions granted by consumer (api) key, and the method used to obtain the token, for example via authenticateToSharedNotebook, authenticateToBusiness, etc. Note that changes to values in this structure that are the result of shared notebook or publishing record changes are communicated to the client via a change in the notebook USN during sync. It is important to use the same access method, parameters, and consumer key in order obtain correct results from the sync engine.

The server has the final say on what is allowed as values may change between calls to obtain NotebookRestrictions instances and to operate on data on the service.

If the following are set and true, then the given restriction is in effect, as accessed by the same authentication token from which the values were obtained.

<dt>noReadNotes</dt>

<dd>The client is not able to read notes from the service and
the notebook is write-only.
</dd>

<dt>noCreateNotes</dt>

<dd>The client may not create new notes in the notebook.
</dd>

<dt>noUpdateNotes</dt>

<dd>The client may not update notes currently in the notebook.
</dd>

<dt>noExpungeNotes</dt>

<dd>The client may not expunge notes currently in the notebook.
</dd>

<dt>noShareNotes</dt>

<dd>The client may not share notes in the notebook via the
shareNote method.
</dd>

<dt>noEmailNotes</dt>

<dd>The client may not e-mail notes via the Evernote service by
using the emailNote method.
</dd>

<dt>noSendMessageToRecipients</dt>

<dd>The client may not send messages to the share recipients of
the notebook.
</dd>

<dt>noUpdateNotebook</dt>

<dd>The client may not update the Notebook object itself, for
example, via the updateNotebook method.
</dd>

<dt>noExpungeNotebook</dt>

<dd>The client may not expunge the Notebook object itself, for
example, via the expungeNotebook method.
</dd>

<dt>noSetDefaultNotebook</dt>

<dd>The client may not set this notebook to be the default notebook.
The caller should leave Notebook.defaultNotebook unset.
</dd>

<dt>noSetNotebookStack</dt>

<dd>If the client is able to update the Notebook, the Notebook.stack
value may not be set.
</dd>

<dt>noPublishToPublic</dt>

<dd>The client may not change the publish the notebook to the public.
For example, business notebooks may not be shared publicly.
</dd>

<dt>noPublishToBusinessLibrary</dt>

<dd>The client may not publish the notebook to the business library.
</dd>

<dt>noCreateTags</dt>

<dd>The client may not complete an operation that results in a new tag
being created in the owner's account.
</dd>

<dt>noUpdateTags</dt>

<dd>The client may not update tags in the owner's account.
</dd>

<dt>noExpungeTags</dt>

<dd>The client may not expunge tags in the owner's account.
</dd>

<dt>noSetParentTag</dt>

<dd>If the client is able to create or update tags in the owner's account,
then they will not be able to set the parent tag.  Leave the value unset.
</dd>

<dt>noCreateSharedNotebooks</dt>

<dd>The client is unable to create shared notebooks for the notebook.
</dd>

<dt>updateWhichSharedNotebookRestrictions</dt>

<dd>Restrictions on which shared notebook instances can be updated.  If the
value is not set or null, then the client can update any of the shared notebooks
associated with the notebook on which the NotebookRestrictions are defined.
See the enumeration for further details.
</dd>

<dt>expungeWhichSharedNotebookRestrictions</dt>

<dd>Restrictions on which shared notebook instances can be expunged.  If the
value is not set or null, then the client can expunge any of the shared notebooks
associated with the notebook on which the NotebookRestrictions are defined.
See the enumeration for further details.
</dd>

Constant Summary collapse

NOREADNOTES =
1
NOCREATENOTES =
2
NOUPDATENOTES =
3
NOEXPUNGENOTES =
4
NOSHARENOTES =
5
NOEMAILNOTES =
6
NOSENDMESSAGETORECIPIENTS =
7
NOUPDATENOTEBOOK =
8
NOEXPUNGENOTEBOOK =
9
NOSETDEFAULTNOTEBOOK =
10
NOSETNOTEBOOKSTACK =
11
NOPUBLISHTOPUBLIC =
12
NOPUBLISHTOBUSINESSLIBRARY =
13
NOCREATETAGS =
14
NOUPDATETAGS =
15
NOEXPUNGETAGS =
16
NOSETPARENTTAG =
17
NOCREATESHAREDNOTEBOOKS =
18
UPDATEWHICHSHAREDNOTEBOOKRESTRICTIONS =
19
EXPUNGEWHICHSHAREDNOTEBOOKRESTRICTIONS =
20
FIELDS =
{
  NOREADNOTES => {:type => ::Thrift::Types::BOOL, :name => 'noReadNotes', :optional => true},
  NOCREATENOTES => {:type => ::Thrift::Types::BOOL, :name => 'noCreateNotes', :optional => true},
  NOUPDATENOTES => {:type => ::Thrift::Types::BOOL, :name => 'noUpdateNotes', :optional => true},
  NOEXPUNGENOTES => {:type => ::Thrift::Types::BOOL, :name => 'noExpungeNotes', :optional => true},
  NOSHARENOTES => {:type => ::Thrift::Types::BOOL, :name => 'noShareNotes', :optional => true},
  NOEMAILNOTES => {:type => ::Thrift::Types::BOOL, :name => 'noEmailNotes', :optional => true},
  NOSENDMESSAGETORECIPIENTS => {:type => ::Thrift::Types::BOOL, :name => 'noSendMessageToRecipients', :optional => true},
  NOUPDATENOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'noUpdateNotebook', :optional => true},
  NOEXPUNGENOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'noExpungeNotebook', :optional => true},
  NOSETDEFAULTNOTEBOOK => {:type => ::Thrift::Types::BOOL, :name => 'noSetDefaultNotebook', :optional => true},
  NOSETNOTEBOOKSTACK => {:type => ::Thrift::Types::BOOL, :name => 'noSetNotebookStack', :optional => true},
  NOPUBLISHTOPUBLIC => {:type => ::Thrift::Types::BOOL, :name => 'noPublishToPublic', :optional => true},
  NOPUBLISHTOBUSINESSLIBRARY => {:type => ::Thrift::Types::BOOL, :name => 'noPublishToBusinessLibrary', :optional => true},
  NOCREATETAGS => {:type => ::Thrift::Types::BOOL, :name => 'noCreateTags', :optional => true},
  NOUPDATETAGS => {:type => ::Thrift::Types::BOOL, :name => 'noUpdateTags', :optional => true},
  NOEXPUNGETAGS => {:type => ::Thrift::Types::BOOL, :name => 'noExpungeTags', :optional => true},
  NOSETPARENTTAG => {:type => ::Thrift::Types::BOOL, :name => 'noSetParentTag', :optional => true},
  NOCREATESHAREDNOTEBOOKS => {:type => ::Thrift::Types::BOOL, :name => 'noCreateSharedNotebooks', :optional => true},
  UPDATEWHICHSHAREDNOTEBOOKRESTRICTIONS => {:type => ::Thrift::Types::I32, :name => 'updateWhichSharedNotebookRestrictions', :optional => true, :enum_class => ::Evernote::EDAM::Type::SharedNotebookInstanceRestrictions},
  EXPUNGEWHICHSHAREDNOTEBOOKRESTRICTIONS => {:type => ::Thrift::Types::I32, :name => 'expungeWhichSharedNotebookRestrictions', :optional => true, :enum_class => ::Evernote::EDAM::Type::SharedNotebookInstanceRestrictions}
}

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



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

def struct_fields; FIELDS; end

#validateObject



2099
2100
2101
2102
2103
2104
2105
2106
# File 'lib/Evernote/EDAM/types_types.rb', line 2099

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