Class: Evernote::EDAM::Type::SharedNotebook
- Inherits:
-
Object
- Object
- Evernote::EDAM::Type::SharedNotebook
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/Evernote/EDAM/types_types.rb
Overview
share invitation recipient.
- id
- the primary identifier of the share
- userId
- the user id of the owner of the notebook
- notebookGuid
- the GUID of the associated notebook shared.
- the email address of the recipient - used by the notebook owner to identify who they shared with.
- notebookModifiable
- (DEPRECATED) a flag indicating the share is read/write -otherwise it's read only. This field is deprecated in favor of the new "privilege" field.
- requireLogin
- (DEPRECATED) indicates that a user must login to access the share. This field is deprecated and will be "true" for all new shared notebooks. It is read-only and ignored when creating or modifying a shared notebook, except that a shared notebook can be modified to require login. See "allowPreview" for information on privileges and shared notebooks.
- serviceCreated
- the date the owner first created the share with the specific email address
- serviceUpdated
- the date the shared notebook was last updated on the service. This will be updated when authenticateToSharedNotebook is called the first time with a shared notebook requiring login (i.e. when the username is bound to that shared notebook).
- username
- the username of the user who can access this share. Once it's assigned it cannot be changed.
- privilege
- The privilege level granted to the notebook, activity stream, and invitations. See the corresponding enumeration for details.
- allowPreview
- Whether or not to grant "READ_NOTEBOOK" privilege without an authentication token, for authenticateToSharedNotebook(...). With the change to "requireLogin" always being true for new shared notebooks, this is the only way to access a shared notebook without an authorization token. This setting expires after the first use of authenticateToSharedNotebook(...) with a valid authentication token.
- recipientSettings
- Settings intended for use only by the recipient of this shared notebook. You should skip setting this value unless you want to change the value contained inside the structure, and only if you are the recipient.
Constant Summary collapse
- ID =
1- USERID =
2- NOTEBOOKGUID =
3- EMAIL =
4- NOTEBOOKMODIFIABLE =
5- REQUIRELOGIN =
6- SERVICECREATED =
7- SERVICEUPDATED =
10- SHAREKEY =
8- USERNAME =
9- PRIVILEGE =
11- ALLOWPREVIEW =
12- RECIPIENTSETTINGS =
13- FIELDS =
{ ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true}, USERID => {:type => ::Thrift::Types::I32, :name => 'userId', :optional => true}, NOTEBOOKGUID => {:type => ::Thrift::Types::STRING, :name => 'notebookGuid', :optional => true}, EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email', :optional => true}, NOTEBOOKMODIFIABLE => {:type => ::Thrift::Types::BOOL, :name => 'notebookModifiable', :optional => true}, REQUIRELOGIN => {:type => ::Thrift::Types::BOOL, :name => 'requireLogin', :optional => true}, SERVICECREATED => {:type => ::Thrift::Types::I64, :name => 'serviceCreated', :optional => true}, SERVICEUPDATED => {:type => ::Thrift::Types::I64, :name => 'serviceUpdated', :optional => true}, SHAREKEY => {:type => ::Thrift::Types::STRING, :name => 'shareKey', :optional => true}, USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true}, PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => ::Evernote::EDAM::Type::SharedNotebookPrivilegeLevel}, ALLOWPREVIEW => {:type => ::Thrift::Types::BOOL, :name => 'allowPreview', :optional => true}, RECIPIENTSETTINGS => {:type => ::Thrift::Types::STRUCT, :name => 'recipientSettings', :class => ::Evernote::EDAM::Type::SharedNotebookRecipientSettings, :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
1939 |
# File 'lib/Evernote/EDAM/types_types.rb', line 1939 def struct_fields; FIELDS; end |
#validate ⇒ Object
1941 1942 1943 1944 1945 |
# File 'lib/Evernote/EDAM/types_types.rb', line 1941 def validate unless @privilege.nil? || ::Evernote::EDAM::Type::SharedNotebookPrivilegeLevel::VALID_VALUES.include?(@privilege) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field privilege!') end end |