Class: JobSubmissionTaskModel

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

Constant Summary collapse

JOBSUBMISSIONPROTOCOL =
1
MONITORMODE =
2
WALLTIME =
3
FIELDS =
{
  JOBSUBMISSIONPROTOCOL => {:type => ::Thrift::Types::I32, :name => 'jobSubmissionProtocol', :enum_class => ::JobSubmissionProtocol},
  MONITORMODE => {:type => ::Thrift::Types::I32, :name => 'monitorMode', :enum_class => ::MonitorMode},
  WALLTIME => {:type => ::Thrift::Types::I32, :name => 'wallTime', :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



162
# File 'lib/task_model_types.rb', line 162

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


164
165
166
167
168
169
170
171
172
173
# File 'lib/task_model_types.rb', line 164

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