Class: Gossiperl::Client::Thrift::Digest

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/gossiperl_client/headers.rb,
lib/gossiperl_client/thrift/gossiperl_types.rb

Constant Summary collapse

NAME =
1
PORT =
2
HEARTBEAT =
3
ID =
4
SECRET =
5
FIELDS =
{
  NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
  PORT => {:type => ::Thrift::Types::I32, :name => 'port'},
  HEARTBEAT => {:type => ::Thrift::Types::I64, :name => 'heartbeat'},
  ID => {:type => ::Thrift::Types::STRING, :name => 'id'},
  SECRET => {:type => ::Thrift::Types::STRING, :name => 'secret'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



184
# File 'lib/gossiperl_client/thrift/gossiperl_types.rb', line 184

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


186
187
188
189
190
191
192
# File 'lib/gossiperl_client/thrift/gossiperl_types.rb', line 186

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field port is unset!') unless @port
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field heartbeat is unset!') unless @heartbeat
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field secret is unset!') unless @secret
end