Class: ExperimentStatusChangeEvent

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

Constant Summary collapse

STATE =
1
EXPERIMENTID =
2
GATEWAYID =
3
FIELDS =
{
  STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::ExperimentState},
  EXPERIMENTID => {:type => ::Thrift::Types::STRING, :name => 'experimentId'},
  GATEWAYID => {:type => ::Thrift::Types::STRING, :name => 'gatewayId'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



48
# File 'lib/messaging_events_types.rb', line 48

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


50
51
52
53
54
55
56
57
# File 'lib/messaging_events_types.rb', line 50

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