Class: Evernote::EDAM::Type::NotebookRestrictions
- Inherits:
-
Object
- Object
- Evernote::EDAM::Type::NotebookRestrictions
- 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.
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_fields ⇒ Object
2097 |
# File 'lib/Evernote/EDAM/types_types.rb', line 2097 def struct_fields; FIELDS; end |
#validate ⇒ Object
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 |