Class: Hexspace::TColumnValue

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

Constant Summary collapse

BOOLVAL =
1
BYTEVAL =
2
I16VAL =
3
I32VAL =
4
I64VAL =
5
DOUBLEVAL =
6
STRINGVAL =
7
FIELDS =
{
  BOOLVAL => {:type => ::Thrift::Types::STRUCT, :name => 'boolVal', :class => ::Hexspace::TBoolValue, :optional => true},
  BYTEVAL => {:type => ::Thrift::Types::STRUCT, :name => 'byteVal', :class => ::Hexspace::TByteValue, :optional => true},
  I16VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i16Val', :class => ::Hexspace::TI16Value, :optional => true},
  I32VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i32Val', :class => ::Hexspace::TI32Value, :optional => true},
  I64VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i64Val', :class => ::Hexspace::TI64Value, :optional => true},
  DOUBLEVAL => {:type => ::Thrift::Types::STRUCT, :name => 'doubleVal', :class => ::Hexspace::TDoubleValue, :optional => true},
  STRINGVAL => {:type => ::Thrift::Types::STRUCT, :name => 'stringVal', :class => ::Hexspace::TStringValue, :optional => true}
}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.boolVal(val) ⇒ Object



701
702
703
# File 'lib/hexspace/tcli_service_types.rb', line 701

def boolVal(val)
  TColumnValue.new(:boolVal, val)
end

.byteVal(val) ⇒ Object



705
706
707
# File 'lib/hexspace/tcli_service_types.rb', line 705

def byteVal(val)
  TColumnValue.new(:byteVal, val)
end

.doubleVal(val) ⇒ Object



721
722
723
# File 'lib/hexspace/tcli_service_types.rb', line 721

def doubleVal(val)
  TColumnValue.new(:doubleVal, val)
end

.i16Val(val) ⇒ Object



709
710
711
# File 'lib/hexspace/tcli_service_types.rb', line 709

def i16Val(val)
  TColumnValue.new(:i16Val, val)
end

.i32Val(val) ⇒ Object



713
714
715
# File 'lib/hexspace/tcli_service_types.rb', line 713

def i32Val(val)
  TColumnValue.new(:i32Val, val)
end

.i64Val(val) ⇒ Object



717
718
719
# File 'lib/hexspace/tcli_service_types.rb', line 717

def i64Val(val)
  TColumnValue.new(:i64Val, val)
end

.stringVal(val) ⇒ Object



725
726
727
# File 'lib/hexspace/tcli_service_types.rb', line 725

def stringVal(val)
  TColumnValue.new(:stringVal, val)
end

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (StandardError)


750
751
752
# File 'lib/hexspace/tcli_service_types.rb', line 750

def validate
  raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
end