Class: Hive2::Thrift::TPrimitiveTypeEntry

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

Constant Summary collapse

TYPE =
1
TYPEQUALIFIERS =
2
FIELDS =
{
  TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Hive2::Thrift::TTypeId},
  TYPEQUALIFIERS => {:type => ::Thrift::Types::STRUCT, :name => 'typeQualifiers', :class => ::Hive2::Thrift::TTypeQualifiers, :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject


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

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)

206
207
208
209
210
211
# File 'lib/thrift/t_c_l_i_service_types.rb', line 206

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