Class: ParserOutput

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

Constant Summary collapse

ID =
1
NAME =
2
REQUIREDOUTPUT =
3
PARSERID =
4
TYPE =
5
FIELDS =
{
  ID => {:type => ::Thrift::Types::STRING, :name => 'id'},
  NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
  REQUIREDOUTPUT => {:type => ::Thrift::Types::BOOL, :name => 'requiredOutput'},
  PARSERID => {:type => ::Thrift::Types::STRING, :name => 'parserId'},
  TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::IOType}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



64
# File 'lib/parser_model_types.rb', line 64

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


66
67
68
69
70
71
72
73
74
75
# File 'lib/parser_model_types.rb', line 66

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field requiredOutput is unset!') if @requiredOutput.nil?
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field parserId is unset!') unless @parserId
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
  unless @type.nil? || ::IOType::VALID_VALUES.include?(@type)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
  end
end