Class: Hexspace::TColumn

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
BINARYVAL =
8
FIELDS =
{
  BOOLVAL => {:type => ::Thrift::Types::STRUCT, :name => 'boolVal', :class => ::Hexspace::TBoolColumn, :optional => true},
  BYTEVAL => {:type => ::Thrift::Types::STRUCT, :name => 'byteVal', :class => ::Hexspace::TByteColumn, :optional => true},
  I16VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i16Val', :class => ::Hexspace::TI16Column, :optional => true},
  I32VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i32Val', :class => ::Hexspace::TI32Column, :optional => true},
  I64VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i64Val', :class => ::Hexspace::TI64Column, :optional => true},
  DOUBLEVAL => {:type => ::Thrift::Types::STRUCT, :name => 'doubleVal', :class => ::Hexspace::TDoubleColumn, :optional => true},
  STRINGVAL => {:type => ::Thrift::Types::STRUCT, :name => 'stringVal', :class => ::Hexspace::TStringColumn, :optional => true},
  BINARYVAL => {:type => ::Thrift::Types::STRUCT, :name => 'binaryVal', :class => ::Hexspace::TBinaryColumn, :optional => true}
}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.binaryVal(val) ⇒ Object



965
966
967
# File 'lib/hexspace/tcli_service_types.rb', line 965

def binaryVal(val)
  TColumn.new(:binaryVal, val)
end

.boolVal(val) ⇒ Object



937
938
939
# File 'lib/hexspace/tcli_service_types.rb', line 937

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

.byteVal(val) ⇒ Object



941
942
943
# File 'lib/hexspace/tcli_service_types.rb', line 941

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

.doubleVal(val) ⇒ Object



957
958
959
# File 'lib/hexspace/tcli_service_types.rb', line 957

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

.i16Val(val) ⇒ Object



945
946
947
# File 'lib/hexspace/tcli_service_types.rb', line 945

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

.i32Val(val) ⇒ Object



949
950
951
# File 'lib/hexspace/tcli_service_types.rb', line 949

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

.i64Val(val) ⇒ Object



953
954
955
# File 'lib/hexspace/tcli_service_types.rb', line 953

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

.stringVal(val) ⇒ Object



961
962
963
# File 'lib/hexspace/tcli_service_types.rb', line 961

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

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (StandardError)


992
993
994
# File 'lib/hexspace/tcli_service_types.rb', line 992

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