Class: Hive2::Thrift::TOpenSessionReq
- Inherits:
-
Object
- Object
- Hive2::Thrift::TOpenSessionReq
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/thrift/t_c_l_i_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 => 2, :enum_class => ::Hive2::Thrift::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_fields ⇒ Object
787 |
# File 'lib/thrift/t_c_l_i_service_types.rb', line 787 def struct_fields; FIELDS; end |
#validate ⇒ Object
789 790 791 792 793 794 |
# File 'lib/thrift/t_c_l_i_service_types.rb', line 789 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field client_protocol is unset!') unless @client_protocol unless @client_protocol.nil? || ::Hive2::Thrift::TProtocolVersion::VALID_VALUES.include?(@client_protocol) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field client_protocol!') end end |