Class: UserProfile

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

Overview

  • A structure holding the user profile and its child models.

*

*

  • userModelVersion:

  • Version number of profile

*

  • airavataInternalUserId:

  • internal to Airavata, not intended to be used outside of the Airavata platform or possibly by gateways

  • (that is, never shown to users), never reassigned, REQUIRED

*

  • userId:

  • Externally assertable unique identifier. SAML (primarly in higher education, academic) tends to keep

  • user name less opaque. OpenID Connect maintains them to be opaque.

*

  • firstName, middleName, lastName:

  • First and Last names as assertede by the user

*

  • namePrefix, nameSuffix:

  • prefix and suffix to the users name as asserted by the user

*

  • emails:

  • Email identifier are Verified, REQUIRED and MULTIVALUED

*

  • userName:

  • Name-based identifiers can be multivalues. To keep it simple, Airavata will make it a string.

  • In the future these can be enumerated as:

    • Official name (as asserted possibly by some external identity provider)

    • Prefered name (as asserted or suggested by user directly)

    • Components:

    • givenName

    • surname (familyName)

    • displayName (often asserted by user to handle things like middle names, suffix, prefix, and the like)

*

*

  • phones: Telephone MULTIVALUED

*

  • country: Country of Residance

*

  • nationality Countries of citizenship

*

  • comments:

  • Free-form information (treated as opaque by Airavata and simply passed to resource).

*

  • labeledURI:

    • Google Scholar, Web of Science, ACS, e.t.c

*

*

Constant Summary collapse

USERMODELVERSION =
1
AIRAVATAINTERNALUSERID =
2
USERID =
3
GATEWAYID =
4
EMAILS =
5
FIRSTNAME =
6
LASTNAME =
7
MIDDLENAME =
8
NAMEPREFIX =
9
NAMESUFFIX =
10
ORCIDID =
11
PHONES =
12
COUNTRY =
13
NATIONALITY =
14
HOMEORGANIZATION =
15
ORGINATIONAFFILIATION =
16
CREATIONTIME =
17
LASTACCESSTIME =
18
VALIDUNTIL =
19
STATE =
20
COMMENTS =
21
LABELEDURI =
22
GPGKEY =
23
TIMEZONE =
24
NSFDEMOGRAPHICS =
25
CUSTOMDASHBOARD =
26
FIELDS =
{
  USERMODELVERSION => {:type => ::Thrift::Types::STRING, :name => 'userModelVersion', :default => %q"1.0"},
  AIRAVATAINTERNALUSERID => {:type => ::Thrift::Types::STRING, :name => 'airavataInternalUserId', :default => %q"DO_NOT_SET_AT_CLIENTS"},
  USERID => {:type => ::Thrift::Types::STRING, :name => 'userId'},
  GATEWAYID => {:type => ::Thrift::Types::STRING, :name => 'gatewayId'},
  EMAILS => {:type => ::Thrift::Types::LIST, :name => 'emails', :element => {:type => ::Thrift::Types::STRING}},
  FIRSTNAME => {:type => ::Thrift::Types::STRING, :name => 'firstName'},
  LASTNAME => {:type => ::Thrift::Types::STRING, :name => 'lastName'},
  MIDDLENAME => {:type => ::Thrift::Types::STRING, :name => 'middleName', :optional => true},
  NAMEPREFIX => {:type => ::Thrift::Types::STRING, :name => 'namePrefix', :optional => true},
  NAMESUFFIX => {:type => ::Thrift::Types::STRING, :name => 'nameSuffix', :optional => true},
  ORCIDID => {:type => ::Thrift::Types::STRING, :name => 'orcidId', :optional => true},
  PHONES => {:type => ::Thrift::Types::LIST, :name => 'phones', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
  COUNTRY => {:type => ::Thrift::Types::STRING, :name => 'country', :optional => true},
  NATIONALITY => {:type => ::Thrift::Types::LIST, :name => 'nationality', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
  HOMEORGANIZATION => {:type => ::Thrift::Types::STRING, :name => 'homeOrganization', :optional => true},
  ORGINATIONAFFILIATION => {:type => ::Thrift::Types::STRING, :name => 'orginationAffiliation', :optional => true},
  CREATIONTIME => {:type => ::Thrift::Types::I64, :name => 'creationTime'},
  LASTACCESSTIME => {:type => ::Thrift::Types::I64, :name => 'lastAccessTime'},
  VALIDUNTIL => {:type => ::Thrift::Types::I64, :name => 'validUntil'},
  STATE => {:type => ::Thrift::Types::I32, :name => 'State', :enum_class => ::Status},
  COMMENTS => {:type => ::Thrift::Types::STRING, :name => 'comments', :optional => true},
  LABELEDURI => {:type => ::Thrift::Types::LIST, :name => 'labeledURI', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
  GPGKEY => {:type => ::Thrift::Types::STRING, :name => 'gpgKey', :optional => true},
  TIMEZONE => {:type => ::Thrift::Types::STRING, :name => 'timeZone', :optional => true},
  NSFDEMOGRAPHICS => {:type => ::Thrift::Types::STRUCT, :name => 'nsfDemographics', :class => ::NSFDemographics, :optional => true},
  CUSTOMDASHBOARD => {:type => ::Thrift::Types::STRUCT, :name => 'customDashboard', :class => ::CustomDashboard, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



279
# File 'lib/user_profile_model_types.rb', line 279

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# File 'lib/user_profile_model_types.rb', line 281

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field userModelVersion is unset!') unless @userModelVersion
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field airavataInternalUserId is unset!') unless @airavataInternalUserId
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field userId is unset!') unless @userId
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field gatewayId is unset!') unless @gatewayId
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field emails is unset!') unless @emails
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field firstName is unset!') unless @firstName
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lastName is unset!') unless @lastName
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field creationTime is unset!') unless @creationTime
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field lastAccessTime is unset!') unless @lastAccessTime
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field validUntil is unset!') unless @validUntil
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field State is unset!') unless @State
  unless @State.nil? || ::Status::VALID_VALUES.include?(@State)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field State!')
  end
end