Class: Hexspace::TOpenSessionReq

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

Constant Summary collapse

CLIENT_PROTOCOL =
1
USERNAME =
2
PASSWORD =
3
CONFIGURATION =
4
FIELDS =
{
  CLIENT_PROTOCOL => {:type => ::Thrift::Types::I32, :name => 'client_protocol', :default =>       9, :enum_class => ::Hexspace::TProtocolVersion},
  USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username', :optional => true},
  PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password', :optional => true},
  CONFIGURATION => {:type => ::Thrift::Types::MAP, :name => 'configuration', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



1132
# File 'lib/hexspace/tcli_service_types.rb', line 1132

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


1134
1135
1136
1137
1138
1139
# File 'lib/hexspace/tcli_service_types.rb', line 1134

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field client_protocol is unset!') unless @client_protocol
  unless @client_protocol.nil? || ::Hexspace::TProtocolVersion::VALID_VALUES.include?(@client_protocol)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field client_protocol!')
  end
end