public class ProtobufSchema extends Object implements ParsedSchema
| Modifier and Type | Class and Description |
|---|---|
static class |
ProtobufSchema.Format |
static class |
ProtobufSchema.ProtobufMeta |
RESERVED| Constructor and Description |
|---|
ProtobufSchema(com.google.protobuf.Descriptors.Descriptor descriptor) |
ProtobufSchema(com.google.protobuf.Descriptors.Descriptor descriptor,
List<SchemaReference> references) |
ProtobufSchema(com.google.protobuf.Descriptors.EnumDescriptor enumDescriptor) |
ProtobufSchema(com.google.protobuf.Descriptors.EnumDescriptor enumDescriptor,
List<SchemaReference> references) |
ProtobufSchema(com.google.protobuf.Descriptors.FileDescriptor fileDescriptor) |
ProtobufSchema(com.google.protobuf.Descriptors.FileDescriptor fileDescriptor,
List<SchemaReference> references) |
ProtobufSchema(com.squareup.wire.schema.internal.parser.ProtoFileElement protoFileElement,
List<SchemaReference> references,
Map<String,com.squareup.wire.schema.internal.parser.ProtoFileElement> dependencies) |
ProtobufSchema(String schemaString) |
ProtobufSchema(String schemaString,
List<SchemaReference> references,
Map<String,String> resolvedReferences,
Integer version,
String name) |
ProtobufSchema(String schemaString,
List<SchemaReference> references,
Map<String,String> resolvedReferences,
Metadata metadata,
RuleSet ruleSet,
Integer version,
String name) |
| Modifier and Type | Method and Description |
|---|---|
String |
canonicalString() |
ProtobufSchema |
copy() |
ProtobufSchema |
copy(Integer version) |
ProtobufSchema |
copy(List<SchemaReference> references) |
ProtobufSchema |
copy(List<SchemaReference> references,
Map<String,com.squareup.wire.schema.internal.parser.ProtoFileElement> dependencies) |
ParsedSchema |
copy(Map<SchemaEntity,Set<String>> tagsToAdd,
Map<SchemaEntity,Set<String>> tagsToRemove) |
ProtobufSchema |
copy(Metadata metadata,
RuleSet ruleSet) |
ProtobufSchema |
copy(String name) |
Object |
copyMessage(Object message) |
ProtobufSchema |
copyWithSchema(String schema) |
Map<String,com.squareup.wire.schema.internal.parser.ProtoFileElement> |
dependencies() |
Map<String,com.squareup.wire.schema.internal.parser.ProtoFileElement> |
dependenciesWithLogicalTypes() |
boolean |
equals(Object o) |
static String |
findDoc(Optional<com.squareup.wire.schema.internal.parser.OptionElement> meta) |
static ProtobufSchema.ProtobufMeta |
findMeta(String name,
List<com.squareup.wire.schema.internal.parser.OptionElement> options) |
static ProtobufSchema.ProtobufMeta |
findMeta(String name,
Map<String,com.squareup.wire.schema.internal.parser.OptionElement> options) |
static Optional<com.squareup.wire.schema.internal.parser.OptionElement> |
findOption(String name,
List<com.squareup.wire.schema.internal.parser.OptionElement> options) |
static Optional<com.squareup.wire.schema.internal.parser.OptionElement> |
findOption(String name,
Map<String,com.squareup.wire.schema.internal.parser.OptionElement> options) |
static Map<String,String> |
findParams(Optional<com.squareup.wire.schema.internal.parser.OptionElement> meta) |
static List<String> |
findTags(Optional<com.squareup.wire.schema.internal.parser.OptionElement> meta) |
String |
formattedString(String format) |
Object |
fromJson(com.fasterxml.jackson.databind.JsonNode json) |
String |
fullName() |
String |
fullName(String originalPath) |
com.google.protobuf.Descriptors.EnumDescriptor |
getEnumDescriptor(String enumTypeName) |
com.google.protobuf.Descriptors.EnumValueDescriptor |
getEnumValue(String enumTypeName,
int enumNumber) |
int |
hashCode() |
boolean |
hasTopLevelField(String field) |
Map<SchemaEntity,Set<String>> |
inlineTaggedEntities() |
Set<String> |
inlineTags() |
List<String> |
isBackwardCompatible(ParsedSchema previousSchema) |
static Set<String> |
knownTypes() |
protected static com.squareup.wire.schema.internal.parser.OptionElement |
merge(com.squareup.wire.schema.internal.parser.OptionElement existing,
com.squareup.wire.schema.internal.parser.OptionElement replacement) |
Metadata |
metadata() |
String |
name() |
com.google.protobuf.DynamicMessage.Builder |
newMessageBuilder() |
com.google.protobuf.DynamicMessage.Builder |
newMessageBuilder(String name) |
ProtobufSchema |
normalize() |
com.squareup.wire.schema.internal.parser.ProtoFileElement |
rawSchema() |
List<SchemaReference> |
references() |
Map<String,String> |
resolvedReferences() |
RuleSet |
ruleSet() |
String |
schemaType() |
com.google.protobuf.Descriptors.Descriptor |
toDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
toDescriptor(String name) |
DynamicSchema |
toDynamicSchema() |
DynamicSchema |
toDynamicSchema(String name) |
com.fasterxml.jackson.databind.JsonNode |
toJson(Object message) |
static String |
toMapEntry(String s) |
static String |
toMapField(String s) |
MessageIndexes |
toMessageIndexes(String name) |
MessageIndexes |
toMessageIndexes(String name,
boolean normalize) |
String |
toMessageName(MessageIndexes indexes) |
com.google.protobuf.Descriptors.GenericDescriptor |
toSpecificDescriptor(String originalPath) |
String |
toString() |
protected static com.squareup.wire.schema.internal.parser.OptionElement |
transform(com.squareup.wire.schema.internal.parser.OptionElement option) |
Object |
transformMessage(RuleContext ctx,
FieldTransform transform,
Object message) |
static String |
underscoresToCamelCase(String input,
boolean capitalizeNextLetter) |
void |
validate(boolean strict) |
Integer |
version() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcanLookup, deepEquals, equivalent, getReservedFields, isCompatible, tags, validatepublic static final String TYPE
public static final String PROTO2
public static final String PROTO3
public static final String DOC_FIELD
public static final String PARAMS_FIELD
public static final String TAGS_FIELD
public static final String PRECISION_KEY
public static final String SCALE_KEY
public static final String DEFAULT_NAME
public static final String MAP_ENTRY_SUFFIX
public static final String KEY_FIELD
public static final String VALUE_FIELD
public static final String CONFLUENT_PREFIX
public static final String CONFLUENT_FILE_META
public static final String CONFLUENT_MESSAGE_META
public static final String CONFLUENT_FIELD_META
public static final String CONFLUENT_ENUM_META
public static final String CONFLUENT_ENUM_VALUE_META
public static final com.squareup.wire.schema.Location DEFAULT_LOCATION
public static final String CFLT_META_LOCATION
public static final String CFLT_DECIMAL_LOCATION
public static final String CALENDAR_PERIOD_LOCATION
public static final String COLOR_LOCATION
public static final String DATE_LOCATION
public static final String DATETIME_LOCATION
public static final String DAY_OF_WEEK_LOCATION
public static final String DECIMAL_LOCATION
public static final String EXPR_LOCATION
public static final String FRACTION_LOCATION
public static final String INTERVAL_LOCATION
public static final String LATLNG_LOCATION
public static final String MONEY_LOCATION
public static final String MONTH_LOCATION
public static final String PHONE_NUMBER_LOCATION
public static final String POSTAL_ADDRESS_LOCATION
public static final String QUATERNION_LOCATION
public static final String TIME_OF_DAY_LOCATION
public static final String ANY_LOCATION
public static final String API_LOCATION
public static final String DESCRIPTOR_LOCATION
public static final String DURATION_LOCATION
public static final String EMPTY_LOCATION
public static final String FIELD_MASK_LOCATION
public static final String SOURCE_CONTEXT_LOCATION
public static final String STRUCT_LOCATION
public static final String TIMESTAMP_LOCATION
public static final String TYPE_LOCATION
public static final String WRAPPER_LOCATION
public static final com.google.protobuf.ExtensionRegistry EXTENSION_REGISTRY
public ProtobufSchema(String schemaString)
public ProtobufSchema(String schemaString, List<SchemaReference> references, Map<String,String> resolvedReferences, Integer version, String name)
public ProtobufSchema(String schemaString, List<SchemaReference> references, Map<String,String> resolvedReferences, Metadata metadata, RuleSet ruleSet, Integer version, String name)
public ProtobufSchema(com.squareup.wire.schema.internal.parser.ProtoFileElement protoFileElement,
List<SchemaReference> references,
Map<String,com.squareup.wire.schema.internal.parser.ProtoFileElement> dependencies)
public ProtobufSchema(com.google.protobuf.Descriptors.Descriptor descriptor)
public ProtobufSchema(com.google.protobuf.Descriptors.Descriptor descriptor,
List<SchemaReference> references)
public ProtobufSchema(com.google.protobuf.Descriptors.EnumDescriptor enumDescriptor)
public ProtobufSchema(com.google.protobuf.Descriptors.EnumDescriptor enumDescriptor,
List<SchemaReference> references)
public ProtobufSchema(com.google.protobuf.Descriptors.FileDescriptor fileDescriptor)
public ProtobufSchema(com.google.protobuf.Descriptors.FileDescriptor fileDescriptor,
List<SchemaReference> references)
public ProtobufSchema copy()
copy in interface ParsedSchemapublic ProtobufSchema copy(Integer version)
copy in interface ParsedSchemapublic ProtobufSchema copy(String name)
public ProtobufSchema copy(List<SchemaReference> references)
public ProtobufSchema copy(List<SchemaReference> references, Map<String,com.squareup.wire.schema.internal.parser.ProtoFileElement> dependencies)
public ProtobufSchema copy(Metadata metadata, RuleSet ruleSet)
copy in interface ParsedSchemapublic ParsedSchema copy(Map<SchemaEntity,Set<String>> tagsToAdd, Map<SchemaEntity,Set<String>> tagsToRemove)
copy in interface ParsedSchemapublic ProtobufSchema copyWithSchema(String schema)
public com.google.protobuf.Descriptors.Descriptor toDescriptor()
public com.google.protobuf.Descriptors.Descriptor toDescriptor(String name)
public com.google.protobuf.DynamicMessage.Builder newMessageBuilder()
public com.google.protobuf.DynamicMessage.Builder newMessageBuilder(String name)
public com.google.protobuf.Descriptors.EnumDescriptor getEnumDescriptor(String enumTypeName)
public com.google.protobuf.Descriptors.EnumValueDescriptor getEnumValue(String enumTypeName, int enumNumber)
public DynamicSchema toDynamicSchema()
public DynamicSchema toDynamicSchema(String name)
protected static com.squareup.wire.schema.internal.parser.OptionElement merge(com.squareup.wire.schema.internal.parser.OptionElement existing,
com.squareup.wire.schema.internal.parser.OptionElement replacement)
protected static com.squareup.wire.schema.internal.parser.OptionElement transform(com.squareup.wire.schema.internal.parser.OptionElement option)
public static Optional<com.squareup.wire.schema.internal.parser.OptionElement> findOption(String name, List<com.squareup.wire.schema.internal.parser.OptionElement> options)
public static Optional<com.squareup.wire.schema.internal.parser.OptionElement> findOption(String name, Map<String,com.squareup.wire.schema.internal.parser.OptionElement> options)
public static ProtobufSchema.ProtobufMeta findMeta(String name, List<com.squareup.wire.schema.internal.parser.OptionElement> options)
public static ProtobufSchema.ProtobufMeta findMeta(String name, Map<String,com.squareup.wire.schema.internal.parser.OptionElement> options)
public static String findDoc(Optional<com.squareup.wire.schema.internal.parser.OptionElement> meta)
public static Map<String,String> findParams(Optional<com.squareup.wire.schema.internal.parser.OptionElement> meta)
public static List<String> findTags(Optional<com.squareup.wire.schema.internal.parser.OptionElement> meta)
public com.squareup.wire.schema.internal.parser.ProtoFileElement rawSchema()
rawSchema in interface ParsedSchemapublic boolean hasTopLevelField(String field)
hasTopLevelField in interface ParsedSchemapublic String schemaType()
schemaType in interface ParsedSchemapublic String name()
name in interface ParsedSchemapublic String canonicalString()
canonicalString in interface ParsedSchemapublic String formattedString(String format)
formattedString in interface ParsedSchemapublic Integer version()
version in interface ParsedSchemapublic List<SchemaReference> references()
references in interface ParsedSchemapublic Map<String,com.squareup.wire.schema.internal.parser.ProtoFileElement> dependencies()
public Map<String,com.squareup.wire.schema.internal.parser.ProtoFileElement> dependenciesWithLogicalTypes()
public Metadata metadata()
metadata in interface ParsedSchemapublic RuleSet ruleSet()
ruleSet in interface ParsedSchemapublic ProtobufSchema normalize()
normalize in interface ParsedSchemapublic void validate(boolean strict)
validate in interface ParsedSchemapublic List<String> isBackwardCompatible(ParsedSchema previousSchema)
isBackwardCompatible in interface ParsedSchemapublic com.google.protobuf.Descriptors.GenericDescriptor toSpecificDescriptor(String originalPath)
public String fullName()
public MessageIndexes toMessageIndexes(String name)
public MessageIndexes toMessageIndexes(String name, boolean normalize)
public String toMessageName(MessageIndexes indexes)
public Object fromJson(com.fasterxml.jackson.databind.JsonNode json) throws IOException
fromJson in interface ParsedSchemaIOExceptionpublic com.fasterxml.jackson.databind.JsonNode toJson(Object message) throws IOException
toJson in interface ParsedSchemaIOExceptionpublic Object copyMessage(Object message)
copyMessage in interface ParsedSchemapublic Object transformMessage(RuleContext ctx, FieldTransform transform, Object message) throws RuleException
transformMessage in interface ParsedSchemaRuleExceptionpublic Set<String> inlineTags()
inlineTags in interface ParsedSchemapublic Map<SchemaEntity,Set<String>> inlineTaggedEntities()
inlineTaggedEntities in interface ParsedSchemaCopyright © 2026 Confluent, Inc.. All rights reserved.