Class: QueueStatusModel

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

Constant Summary collapse

HOSTNAME =
1
QUEUENAME =
2
QUEUEUP =
3
RUNNINGJOBS =
4
QUEUEDJOBS =
5
TIME =
6
FIELDS =
{
  HOSTNAME => {:type => ::Thrift::Types::STRING, :name => 'hostName'},
  QUEUENAME => {:type => ::Thrift::Types::STRING, :name => 'queueName'},
  QUEUEUP => {:type => ::Thrift::Types::BOOL, :name => 'queueUp'},
  RUNNINGJOBS => {:type => ::Thrift::Types::I32, :name => 'runningJobs'},
  QUEUEDJOBS => {:type => ::Thrift::Types::I32, :name => 'queuedJobs'},
  TIME => {:type => ::Thrift::Types::I64, :name => 'time'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



199
# File 'lib/status_models_types.rb', line 199

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


201
202
203
204
205
206
207
208
# File 'lib/status_models_types.rb', line 201

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hostName is unset!') unless @hostName
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field queueName is unset!') unless @queueName
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field queueUp is unset!') if @queueUp.nil?
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field runningJobs is unset!') unless @runningJobs
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field queuedJobs is unset!') unless @queuedJobs
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field time is unset!') unless @time
end