Class: Evernote::EDAM::Type::User
- Inherits:
-
Object
- Object
- Evernote::EDAM::Type::User
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/Evernote/EDAM/types_types.rb
Overview
<dl>
<dt>id</dt>
<dd>The unique numeric identifier for the account, which will not
change for the lifetime of the account.
</dd>
<dt>username</dt>
<dd>The name that uniquely identifies a single user account. This name
may be presented by the user, along with their password, to log into
their account.
May only contain a-z, 0-9, or '-', and may not start or end with the '-'
<br/>
Length: EDAM_USER_USERNAME_LEN_MIN - EDAM_USER_USERNAME_LEN_MAX
<br/>
Regex: EDAM_USER_USERNAME_REGEX
</dd>
<dt>email</dt>
<dd>The email address registered for the user. Must comply with
RFC 2821 and RFC 2822.<br/>
Third party applications that authenticate using OAuth do not have
access to this field.
Length: EDAM_EMAIL_LEN_MIN - EDAM_EMAIL_LEN_MAX
<br/>
Regex: EDAM_EMAIL_REGEX
</dd>
<dt>name</dt>
<dd>The printable name of the user, which may be a combination
of given and family names. This is used instead of separate "first"
and "last" names due to variations in international name format/order.
May not start or end with a whitespace character. May contain any
character but carriage return or newline (Unicode classes Zl and Zp).
<br/>
Length: EDAM_USER_NAME_LEN_MIN - EDAM_USER_NAME_LEN_MAX
<br/>
Regex: EDAM_USER_NAME_REGEX
</dd>
<dt>timezone</dt>
<dd>The zone ID for the user's default location. If present,
this may be used to localize the display of any timestamp for which no
other timezone is available.
The format must be encoded as a standard zone ID such as
"America/Los_Angeles" or "GMT+08:00"
<br/>
Length: EDAM_TIMEZONE_LEN_MIN - EDAM_TIMEZONE_LEN_MAX
<br/>
Regex: EDAM_TIMEZONE_REGEX
</dd>
<dt>privilege</dt>
<dd>The level of access permitted for the user.
</dd>
<dt>created</dt>
<dd>The date and time when this user account was created in the
service.
</dd>
<dt>updated</dt>
<dd>The date and time when this user account was last modified
in the service.
</dd>
<dt>deleted</dt>
<dd>If the account has been deleted from the system (e.g. as
the result of a legal request by the user), the date and time of the
deletion will be represented here. If not, this value will not be set.
</dd>
<dt>active</dt>
<dd>If the user account is available for login and
synchronization, this flag will be set to true.
</dd>
<dt>shardId</dt>
<dd>DEPRECATED - Client applications should have no need to use this field.
</dd>
<dt>attributes</dt>
<dd>If present, this will contain a list of the attributes
for this user account.
</dd>
<dt>accounting</dt>
<dd>Bookkeeping information for the user's subscription.
</dd>
<dt>premiumInfo</dt>
<dd>If present, this will contain a set of commerce information
relating to the user's premium service level.
</dd>
<dt>businessUserInfo</dt>
<dd>If present, this will contain a set of business information
relating to the user's business membership. If not present, the
user is not currently part of a business.
</dd>
</dl>
Constant Summary collapse
- ID =
1
- USERNAME =
2
- EMAIL =
3
- NAME =
4
- TIMEZONE =
6
- PRIVILEGE =
7
- CREATED =
9
- UPDATED =
10
- DELETED =
11
- ACTIVE =
13
- SHARDID =
14
- ATTRIBUTES =
15
- ACCOUNTING =
16
- PREMIUMINFO =
17
- BUSINESSUSERINFO =
18
- FIELDS =
{ ID => {:type => ::Thrift::Types::I32, :name => 'id', :optional => true}, USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true}, EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email', :optional => true}, NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :optional => true}, TIMEZONE => {:type => ::Thrift::Types::STRING, :name => 'timezone', :optional => true}, PRIVILEGE => {:type => ::Thrift::Types::I32, :name => 'privilege', :optional => true, :enum_class => ::Evernote::EDAM::Type::PrivilegeLevel}, CREATED => {:type => ::Thrift::Types::I64, :name => 'created', :optional => true}, UPDATED => {:type => ::Thrift::Types::I64, :name => 'updated', :optional => true}, DELETED => {:type => ::Thrift::Types::I64, :name => 'deleted', :optional => true}, ACTIVE => {:type => ::Thrift::Types::BOOL, :name => 'active', :optional => true}, SHARDID => {:type => ::Thrift::Types::STRING, :name => 'shardId', :optional => true}, ATTRIBUTES => {:type => ::Thrift::Types::STRUCT, :name => 'attributes', :class => ::Evernote::EDAM::Type::UserAttributes, :optional => true}, ACCOUNTING => {:type => ::Thrift::Types::STRUCT, :name => 'accounting', :class => ::Evernote::EDAM::Type::Accounting, :optional => true}, PREMIUMINFO => {:type => ::Thrift::Types::STRUCT, :name => 'premiumInfo', :class => ::Evernote::EDAM::Type::PremiumInfo, :optional => true}, BUSINESSUSERINFO => {:type => ::Thrift::Types::STRUCT, :name => 'businessUserInfo', :class => ::Evernote::EDAM::Type::BusinessUserInfo, :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
824 |
# File 'lib/Evernote/EDAM/types_types.rb', line 824 def struct_fields; FIELDS; end |
#validate ⇒ Object
826 827 828 829 830 |
# File 'lib/Evernote/EDAM/types_types.rb', line 826 def validate 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 |