@Test public void testDefaultOmittedInProto3String() throws Exception { MessageDefinition.Builder message = MessageDefinition.newBuilder("msg1"); message.addField(null, "string", "field1", 1, "defaultVal"); DynamicSchema.Builder schema = DynamicSchema.newBuilder(); schema.setSyntax(PROTO3); schema.addMessageDefinition(message.build()); ProtobufSchema protobufSchema = new ProtobufSchema(schema.build().getMessageDescriptor("msg1")); assertEquals("syntax = \"proto3\";\n" + "\n" + "message msg1 {\n" + " string field1 = 1;\n" + "}\n", protobufSchema.toString()); }
@Override public String toString() { return canonicalString(); }
ProtobufSchema implements ParsedSchema { @Override public String toString() { return canonicalString(); } }
ProtobufSchema implements ParsedSchema { @Override public String toString() { return canonicalString(); } ProtobufSchema(String schemaString);  ProtobufSchema(
      String schemaString,
      List<SchemaReference> references,
      Map<String, String> resolvedReferences,
      Integer version,
      String name
  );  ProtobufSchema(
      ProtoFileElement protoFileElement,
      List<SchemaReference> references,
      Map<String, ProtoFileElement> dependencies
  );  ProtobufSchema(Descriptor descriptor); private  ProtobufSchema(
      ProtoFileElement schemaObj,
      Integer version,
      String name,
      List<SchemaReference> references,
      Map<String, ProtoFileElement> dependencies,
      String canonicalString,
      DynamicSchema dynamicSchema,
      Descriptor descriptor
  ); }
ProtobufSchema implements ParsedSchema { @Override public String toString() { return canonicalString(); } ProtobufSchema(String schemaString);  ProtobufSchema(
      String schemaString,
      List<SchemaReference> references,
      Map<String, String> resolvedReferences,
      Integer version,
      String name
  );  ProtobufSchema(
      ProtoFileElement protoFileElement,
      List<SchemaReference> references,
      Map<String, ProtoFileElement> dependencies
  );  ProtobufSchema(Descriptor descriptor); private  ProtobufSchema(
      ProtoFileElement schemaObj,
      Integer version,
      String name,
      List<SchemaReference> references,
      Map<String, ProtoFileElement> dependencies,
      String canonicalString,
      DynamicSchema dynamicSchema,
      Descriptor descriptor
  ); ProtobufSchema copy(); ProtobufSchema copy(Integer version); ProtobufSchema copy(String name); ProtobufSchema copy(List<SchemaReference> references); Descriptor toDescriptor(); Descriptor toDescriptor(String name); DynamicMessage.Builder newMessageBuilder(); DynamicMessage.Builder newMessageBuilder(String name); Descriptors.EnumValueDescriptor getEnumValue(String enumTypeName, int enumNumber); static Optional<OptionElement> findOption(String name, List<OptionElement> options); @Override ProtoFileElement rawSchema(); @Override String schemaType(); @Override String name(); @Override String canonicalString(); @Override String formattedString(String format); Integer version(); @Override List<SchemaReference> references(); Map<String, String> resolvedReferences(); Map<String, ProtoFileElement> dependencies(); @Override void validate(); @Override List<String> isBackwardCompatible(ParsedSchema previousSchema); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); String fullName(); MessageIndexes toMessageIndexes(String name); String toMessageName(MessageIndexes indexes); static String toMapEntry(String s); static String toMapField(String s); }
ProtobufSchema implements ParsedSchema { @Override public String toString() { return canonicalString(); } ProtobufSchema(String schemaString);  ProtobufSchema(
      String schemaString,
      List<SchemaReference> references,
      Map<String, String> resolvedReferences,
      Integer version,
      String name
  );  ProtobufSchema(
      ProtoFileElement protoFileElement,
      List<SchemaReference> references,
      Map<String, ProtoFileElement> dependencies
  );  ProtobufSchema(Descriptor descriptor); private  ProtobufSchema(
      ProtoFileElement schemaObj,
      Integer version,
      String name,
      List<SchemaReference> references,
      Map<String, ProtoFileElement> dependencies,
      String canonicalString,
      DynamicSchema dynamicSchema,
      Descriptor descriptor
  ); ProtobufSchema copy(); ProtobufSchema copy(Integer version); ProtobufSchema copy(String name); ProtobufSchema copy(List<SchemaReference> references); Descriptor toDescriptor(); Descriptor toDescriptor(String name); DynamicMessage.Builder newMessageBuilder(); DynamicMessage.Builder newMessageBuilder(String name); Descriptors.EnumValueDescriptor getEnumValue(String enumTypeName, int enumNumber); static Optional<OptionElement> findOption(String name, List<OptionElement> options); @Override ProtoFileElement rawSchema(); @Override String schemaType(); @Override String name(); @Override String canonicalString(); @Override String formattedString(String format); Integer version(); @Override List<SchemaReference> references(); Map<String, String> resolvedReferences(); Map<String, ProtoFileElement> dependencies(); @Override void validate(); @Override List<String> isBackwardCompatible(ParsedSchema previousSchema); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); String fullName(); MessageIndexes toMessageIndexes(String name); String toMessageName(MessageIndexes indexes); static String toMapEntry(String s); static String toMapField(String s); static final String TYPE; static final String SERIALIZED_FORMAT; static final String PROTO2; static final String PROTO3; static final String DEFAULT_NAME; static final String MAP_ENTRY_SUFFIX; static final String KEY_FIELD; static final String VALUE_FIELD; static final Location DEFAULT_LOCATION; }