Class: NotifyDeviceConnectionRequest

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

DEVICEID =
1
CONNECTIONID =
2
CONNECTIONTYPE =
3
CODE =
4
ERRORREASON =
5
STARTTIME =
6
ENDTIME =
7
FIELDS =
{
  DEVICEID => {:type => ::Thrift::Types::STRING, :name => 'deviceId'},
  CONNECTIONID => {:type => ::Thrift::Types::STRING, :name => 'connectionId', :optional => true},
  CONNECTIONTYPE => {:type => ::Thrift::Types::I32, :name => 'connectionType', :optional => true, :enum_class => ::G_a_b_e1_a_a_f},
  CODE => {:type => ::Thrift::Types::I32, :name => 'code', :optional => true, :enum_class => ::G_a_b_e1_a_a_e},
  ERRORREASON => {:type => ::Thrift::Types::STRING, :name => 'errorReason', :optional => true},
  STARTTIME => {:type => ::Thrift::Types::I64, :name => 'startTime', :optional => true},
  ENDTIME => {:type => ::Thrift::Types::I64, :name => 'endTime', :optional => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject



5259
5260
5261
5262
5263
5264
5265
5266
# File 'lib/linerb/gen-rb/takagi_chan_types.rb', line 5259

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