pulsar-client-cpp
Public Member Functions | List of all members
pulsar::SchemaInfo Class Reference

#include <Schema.h>

Public Member Functions

 SchemaInfo ()
 
 SchemaInfo (SchemaType schemaType, const std::string &name, const std::string &schema, const StringMap &properties=StringMap())
 
 SchemaInfo (const SchemaInfo &keySchema, const SchemaInfo &valueSchema, const KeyValueEncodingType &keyValueEncodingType=KeyValueEncodingType::INLINE)
 
SchemaType getSchemaType () const
 
const std::string & getName () const
 
const std::string & getSchema () const
 
const StringMap & getProperties () const
 

Detailed Description

Encapsulates data around the schema definition

Constructor & Destructor Documentation

◆ SchemaInfo() [1/3]

pulsar::SchemaInfo::SchemaInfo ( )

The default constructor with following configs:

  • schemaType: SchemaType::BYTES
  • name: "BYTES"
  • schema: ""
  • properties: {}
See also
SchemaInfo(SchemaType schemaType, const std::string& name, const std::string& schema, const StringMap& properties)

◆ SchemaInfo() [2/3]

pulsar::SchemaInfo::SchemaInfo ( SchemaType  schemaType,
const std::string &  name,
const std::string &  schema,
const StringMap &  properties = StringMap() 
)
Parameters
schemaTypethe schema type
namethe name of the schema definition
schemathe schema definition as a JSON string
propertiesa map of custom defined properties attached to the schema

◆ SchemaInfo() [3/3]

pulsar::SchemaInfo::SchemaInfo ( const SchemaInfo keySchema,
const SchemaInfo valueSchema,
const KeyValueEncodingType keyValueEncodingType = KeyValueEncodingType::INLINE 
)
Parameters
keySchemathe key schema.
valueSchemathe value schema.
keyValueEncodingTypeEncoding types of supported KeyValueSchema for Pulsar messages.

Member Function Documentation

◆ getName()

const std::string& pulsar::SchemaInfo::getName ( ) const
Returns
the name of the schema definition

◆ getProperties()

const StringMap& pulsar::SchemaInfo::getProperties ( ) const
Returns
a map of custom defined properties attached to the schema

◆ getSchema()

const std::string& pulsar::SchemaInfo::getSchema ( ) const
Returns
the schema definition as a JSON string

◆ getSchemaType()

SchemaType pulsar::SchemaInfo::getSchemaType ( ) const
Returns
the schema type

The documentation for this class was generated from the following file: