Class: Hive2::Thrift::TTypeEntry

Inherits:
Thrift::Union
  • Object
show all
Includes:
Thrift::Struct_Union
Defined in:
lib/thrift/t_c_l_i_service_types.rb

Constant Summary collapse

PRIMITIVEENTRY =
1
ARRAYENTRY =
2
MAPENTRY =
3
STRUCTENTRY =
4
UNIONENTRY =
5
USERDEFINEDTYPEENTRY =
6
FIELDS =
{
  PRIMITIVEENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'primitiveEntry', :class => ::Hive2::Thrift::TPrimitiveTypeEntry},
  ARRAYENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'arrayEntry', :class => ::Hive2::Thrift::TArrayTypeEntry},
  MAPENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'mapEntry', :class => ::Hive2::Thrift::TMapTypeEntry},
  STRUCTENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'structEntry', :class => ::Hive2::Thrift::TStructTypeEntry},
  UNIONENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'unionEntry', :class => ::Hive2::Thrift::TUnionTypeEntry},
  USERDEFINEDTYPEENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'userDefinedTypeEntry', :class => ::Hive2::Thrift::TUserDefinedTypeEntry}
}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.arrayEntry(val) ⇒ Object



306
307
308
# File 'lib/thrift/t_c_l_i_service_types.rb', line 306

def arrayEntry(val)
  TTypeEntry.new(:arrayEntry, val)
end

.mapEntry(val) ⇒ Object



310
311
312
# File 'lib/thrift/t_c_l_i_service_types.rb', line 310

def mapEntry(val)
  TTypeEntry.new(:mapEntry, val)
end

.primitiveEntry(val) ⇒ Object



302
303
304
# File 'lib/thrift/t_c_l_i_service_types.rb', line 302

def primitiveEntry(val)
  TTypeEntry.new(:primitiveEntry, val)
end

.structEntry(val) ⇒ Object



314
315
316
# File 'lib/thrift/t_c_l_i_service_types.rb', line 314

def structEntry(val)
  TTypeEntry.new(:structEntry, val)
end

.unionEntry(val) ⇒ Object



318
319
320
# File 'lib/thrift/t_c_l_i_service_types.rb', line 318

def unionEntry(val)
  TTypeEntry.new(:unionEntry, val)
end

.userDefinedTypeEntry(val) ⇒ Object



322
323
324
# File 'lib/thrift/t_c_l_i_service_types.rb', line 322

def userDefinedTypeEntry(val)
  TTypeEntry.new(:userDefinedTypeEntry, val)
end

Instance Method Details

#struct_fieldsObject



343
# File 'lib/thrift/t_c_l_i_service_types.rb', line 343

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (StandardError)


345
346
347
# File 'lib/thrift/t_c_l_i_service_types.rb', line 345

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