Class: Sfeed::MergeEvent

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

Constant Summary collapse

UID =
1
NICKNAME =
2
AVATAR =
3
TYPE =
4
TIMELINE =
5
EVENTS =
6
KEY =
7
FIELDS =
{
  UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
  NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname', :optional => true},
  AVATAR => {:type => ::Thrift::Types::STRING, :name => 'avatar', :optional => true},
  TYPE => {:type => ::Thrift::Types::I32, :name => 'type'},
  TIMELINE => {:type => ::Thrift::Types::DOUBLE, :name => 'timeline'},
  EVENTS => {:type => ::Thrift::Types::LIST, :name => 'events', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Sfeed::Event}, :optional => true},
  KEY => {:type => ::Thrift::Types::STRING, :name => 'key'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



143
# File 'lib/sfeed_types.rb', line 143

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


145
146
147
148
149
150
# File 'lib/sfeed_types.rb', line 145

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field uid is unset!') unless @uid
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timeline is unset!') unless @timeline
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
end