Class: DBEventPublisherContext

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

Constant Summary collapse

CRUDTYPE =
1
ENTITYTYPE =
2
ENTITYDATAMODEL =
3
FIELDS =
{
  CRUDTYPE => {:type => ::Thrift::Types::I32, :name => 'crudType', :enum_class => ::CrudType},
  ENTITYTYPE => {:type => ::Thrift::Types::I32, :name => 'entityType', :enum_class => ::EntityType},
  ENTITYDATAMODEL => {:type => ::Thrift::Types::STRING, :name => 'entityDataModel', :binary => true}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



50
# File 'lib/db_event_model_types.rb', line 50

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


52
53
54
55
56
57
58
59
60
61
62
# File 'lib/db_event_model_types.rb', line 52

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field crudType is unset!') unless @crudType
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field entityType is unset!') unless @entityType
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field entityDataModel is unset!') unless @entityDataModel
  unless @crudType.nil? || ::CrudType::VALID_VALUES.include?(@crudType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field crudType!')
  end
  unless @entityType.nil? || ::EntityType::VALID_VALUES.include?(@entityType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field entityType!')
  end
end