Class: Evernote::EDAM::UserStore::PublicUserInfo
- Inherits:
-
Object
- Object
- Evernote::EDAM::UserStore::PublicUserInfo
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/Evernote/EDAM/user_store_types.rb
Overview
</dl>
Constant Summary collapse
- USERID =
1
- SHARDID =
2
- PRIVILEGE =
3
- USERNAME =
4
- NOTESTOREURL =
5
- WEBAPIURLPREFIX =
6
- FIELDS =
{ USERID => {:type => ::Thrift::Types::I32, :name => 'userId'}, SHARDID => {:type => ::Thrift::Types::STRING, :name => 'shardId'}, PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => ::Evernote::EDAM::Type::PrivilegeLevel}, USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true}, NOTESTOREURL => {:type => ::Thrift::Types::STRING, :name => 'noteStoreUrl', :optional => true}, WEBAPIURLPREFIX => {:type => ::Thrift::Types::STRING, :name => 'webApiUrlPrefix', :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
67 |
# File 'lib/Evernote/EDAM/user_store_types.rb', line 67 def struct_fields; FIELDS; end |
#validate ⇒ Object
69 70 71 72 73 74 75 |
# File 'lib/Evernote/EDAM/user_store_types.rb', line 69 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field userId is unset!') unless @userId raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field shardId is unset!') unless @shardId unless @privilege.nil? || ::Evernote::EDAM::Type::PrivilegeLevel::VALID_VALUES.include?(@privilege) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field privilege!') end end |