Class: Contact

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/linerb/gen-rb/takagi_chan_types.rb,
lib/linerb/gen-rb/takagi_chan_types.rb

Constant Summary collapse

MID =
1
CREATEDTIME =
2
TYPE =
10
STATUS =
11
RELATION =
21
DISPLAYNAME =
22
PHONETICNAME =
23
PICTURESTATUS =
24
THUMBNAILURL =
25
STATUSMESSAGE =
26
DISPLAYNAMEOVERRIDDEN =
27
FAVORITETIME =
28
CAPABLEVOICECALL =
31
CAPABLEVIDEOCALL =
32
CAPABLEMYHOME =
33
CAPABLEBUDDY =
34
ATTRIBUTES =
35
SETTINGS =
36
PICTUREPATH =
37
RECOMMENDPARAMS =
38
FRIENDREQUESTSTATUS =
39
MUSICPROFILE =
40
VIDEOPROFILE =
42
STATUSMESSAGECONTENTMETADATA =
43
AVATARPROFILE =
44
FIELDS =
{
  MID => {:type => ::Thrift::Types::STRING, :name => 'mid'},
  CREATEDTIME => {:type => ::Thrift::Types::I64, :name => 'createdTime'},
  TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::P0_a_e_a_b_c9},
  STATUS => {:type => ::Thrift::Types::I32, :name => 'status', :enum_class => ::P0_a_e_a_b_b9},
  RELATION => {:type => ::Thrift::Types::I32, :name => 'relation', :enum_class => ::P0_a_e_a_b_z8},
  DISPLAYNAME => {:type => ::Thrift::Types::STRING, :name => 'displayName'},
  PHONETICNAME => {:type => ::Thrift::Types::STRING, :name => 'phoneticName'},
  PICTURESTATUS => {:type => ::Thrift::Types::STRING, :name => 'pictureStatus'},
  THUMBNAILURL => {:type => ::Thrift::Types::STRING, :name => 'thumbnailUrl'},
  STATUSMESSAGE => {:type => ::Thrift::Types::STRING, :name => 'statusMessage'},
  DISPLAYNAMEOVERRIDDEN => {:type => ::Thrift::Types::STRING, :name => 'displayNameOverridden'},
  FAVORITETIME => {:type => ::Thrift::Types::I64, :name => 'favoriteTime'},
  CAPABLEVOICECALL => {:type => ::Thrift::Types::BOOL, :name => 'capableVoiceCall'},
  CAPABLEVIDEOCALL => {:type => ::Thrift::Types::BOOL, :name => 'capableVideoCall'},
  CAPABLEMYHOME => {:type => ::Thrift::Types::BOOL, :name => 'capableMyhome'},
  CAPABLEBUDDY => {:type => ::Thrift::Types::BOOL, :name => 'capableBuddy'},
  ATTRIBUTES => {:type => ::Thrift::Types::I32, :name => 'attributes'},
  SETTINGS => {:type => ::Thrift::Types::I64, :name => 'settings'},
  PICTUREPATH => {:type => ::Thrift::Types::STRING, :name => 'picturePath'},
  RECOMMENDPARAMS => {:type => ::Thrift::Types::STRING, :name => 'recommendParams'},
  FRIENDREQUESTSTATUS => {:type => ::Thrift::Types::I32, :name => 'friendRequestStatus', :enum_class => ::P0_a_e_a_b_za},
  MUSICPROFILE => {:type => ::Thrift::Types::STRING, :name => 'musicProfile'},
  VIDEOPROFILE => {:type => ::Thrift::Types::STRING, :name => 'videoProfile'},
  STATUSMESSAGECONTENTMETADATA => {:type => ::Thrift::Types::MAP, :name => 'statusMessageContentMetadata', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
  AVATARPROFILE => {:type => ::Thrift::Types::STRUCT, :name => 'avatarProfile', :class => ::AvatarProfile, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



13284
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 13284

def struct_fields; FIELDS; end

#validateObject



13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 13286

def validate
  unless @type.nil? || ::P0_a_e_a_b_c9::VALID_VALUES.include?(@type)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
  end
  unless @status.nil? || ::P0_a_e_a_b_b9::VALID_VALUES.include?(@status)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field status!')
  end
  unless @relation.nil? || ::P0_a_e_a_b_z8::VALID_VALUES.include?(@relation)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field relation!')
  end
  unless @friendRequestStatus.nil? || ::P0_a_e_a_b_za::VALID_VALUES.include?(@friendRequestStatus)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field friendRequestStatus!')
  end
end