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
This structure is used to provide publicly-available user information
about a particular account.
<dl>
<dt>userId:</dt>
<dd>
The unique numeric user identifier for the user account.
</dd>
<dt>shardId:</dt>
<dd>
The name of the virtual server that manages the state of
this user. This value is used internally to determine which system should
service requests about this user's data.
</dd>
<dt>privilege:</dt>
<dd>
The privilege level of the account, to determine whether
this is a Premium or Free account.
</dd>
<dt>noteStoreUrl:</dt>
<dd>
This field will contain the full URL that clients should use to make
NoteStore requests to the server shard that contains that user's data.
I.e. this is the URL that should be used to create the Thrift HTTP client
transport to send messages to the NoteStore service for the account.
</dd>
</dl>
Constant Summary collapse
- USERID =
1
- SHARDID =
2
- PRIVILEGE =
3
- USERNAME =
4
- NOTESTOREURL =
5
- 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} }
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
64 |
# File 'lib/Evernote/EDAM/user_store_types.rb', line 64 def struct_fields; FIELDS; end |
#validate ⇒ Object
66 67 68 69 70 71 72 |
# File 'lib/Evernote/EDAM/user_store_types.rb', line 66 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 |