Class: Evernote::EDAM::Type::BusinessNotebook

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

Overview

the to business library, the Notebook will have a reference to one of these structures, which specifies how the Notebook will be represented in the library.

<dl> <dt>notebookDescription</dt>

<dd>A short description of the notebook's content that will be displayed
    in the business library user interface. The description may not begin
    or end with whitespace.
<br/>
Length: EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_LEN_MIN -
        EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_LEN_MAX
<br/>
Regex:  EDAM_BUSINESS_NOTEBOOK_DESCRIPTION_REGEX
</dd>

<dt>privilege</dt>

<dd>The privileges that will be granted to users who join the notebook through
    the business library.
</dd>

<dt>recommended</dt>

<dd>Whether the notebook should be "recommended" when displayed in the business
    library user interface.
</dd>

</dl>

Constant Summary collapse

NOTEBOOKDESCRIPTION =
1
PRIVILEGE =
2
3
FIELDS =
{
  NOTEBOOKDESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'notebookDescription', :optional => true},
  PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => ::Evernote::EDAM::Type::SharedNotebookPrivilegeLevel},
  RECOMMENDED => {:type => ::Thrift::Types::BOOL, :name => 'recommended', :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



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

def struct_fields; FIELDS; end

#validateObject



1677
1678
1679
1680
1681
# File 'lib/Evernote/EDAM/types_types.rb', line 1677

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