Class | Evernote::EDAM::UserStore::PublicUserInfo |
In: |
ruby/lib/Evernote/EDAM/user_store_types.rb
|
Parent: | Object |
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. It is also used to construct the appropriate URL to make requests from the NoteStore. </dd> <dt>privilege:</dt> <dd> The privilege level of the account, to determine whether this is a Premium or Free account. </dd> </dl>
USERID | = | 1 |
SHARDID | = | 2 |
PRIVILEGE | = | 3 |
USERNAME | = | 4 |
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} |
# File ruby/lib/Evernote/EDAM/user_store_types.rb, line 50 50: def validate 51: raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field userId is unset!') unless @userId 52: raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field shardId is unset!') unless @shardId 53: unless @privilege.nil? || Evernote::EDAM::Type::PrivilegeLevel::VALID_VALUES.include?(@privilege) 54: raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field privilege!') 55: end 56: end