Class: ScenarioResult

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/linerb/gen-rb/takagi_chan_types.rb,
lib/linerb/gen-rb/takagi_chan_types.rb

Constant Summary collapse

SCENARIOID =
1
DEVICEID =
2
REVISION =
3
STARTTIME =
4
ENDTIME =
5
CODE =
6
ERRORREASON =
7
BLENOTIFICATIONPAYLOAD =
8
ACTIONRESULTS =
9
CONNECTIONID =
10
FIELDS =
{
  SCENARIOID => {:type => ::Thrift::Types::STRING, :name => 'scenarioId'},
  DEVICEID => {:type => ::Thrift::Types::STRING, :name => 'deviceId'},
  REVISION => {:type => ::Thrift::Types::I64, :name => 'revision'},
  STARTTIME => {:type => ::Thrift::Types::I64, :name => 'startTime'},
  ENDTIME => {:type => ::Thrift::Types::I64, :name => 'endTime'},
  CODE => {:type => ::Thrift::Types::I32, :name => 'code', :enum_class => ::G_a_c_y0_a_a_g0},
  ERRORREASON => {:type => ::Thrift::Types::STRING, :name => 'errorReason', :optional => true},
  BLENOTIFICATIONPAYLOAD => {:type => ::Thrift::Types::STRING, :name => 'bleNotificationPayload', :optional => true},
  ACTIONRESULTS => {:type => ::Thrift::Types::LIST, :name => 'actionResults', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ScenarioActionResult}, :optional => true},
  CONNECTIONID => {:type => ::Thrift::Types::STRING, :name => 'connectionId', :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



8902
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 8902

def struct_fields; FIELDS; end

#validateObject



8904
8905
8906
8907
8908
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 8904

def validate
  unless @code.nil? || ::G_a_c_y0_a_a_g0::VALID_VALUES.include?(@code)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field code!')
  end
end