Esempio n. 1
0
 @Override
 public boolean equals(Object other) {
   if (other == this) return true;
   if (!(other instanceof RedactedChild)) return false;
   RedactedChild o = (RedactedChild) other;
   return equals(unknownFields(), o.unknownFields())
       && equals(a, o.a)
       && equals(b, o.b)
       && equals(c, o.c);
 }
Esempio n. 2
0
 @Override
 public void encode(ProtoWriter writer, RedactedChild value) throws IOException {
   if (value.a != null) ProtoAdapter.STRING.encodeWithTag(writer, 1, value.a);
   if (value.b != null) Redacted.ADAPTER.encodeWithTag(writer, 2, value.b);
   if (value.c != null) NotRedacted.ADAPTER.encodeWithTag(writer, 3, value.c);
   writer.writeBytes(value.unknownFields());
 }
Esempio n. 3
0
 @Override
 public int encodedSize(RedactedChild value) {
   return (value.a != null ? ProtoAdapter.STRING.encodedSizeWithTag(1, value.a) : 0)
       + (value.b != null ? Redacted.ADAPTER.encodedSizeWithTag(2, value.b) : 0)
       + (value.c != null ? NotRedacted.ADAPTER.encodedSizeWithTag(3, value.c) : 0)
       + value.unknownFields().size();
 }
Esempio n. 4
0
 @Override
 public RedactedChild redact(RedactedChild value) {
   Builder builder = value.newBuilder();
   if (builder.b != null) builder.b = Redacted.ADAPTER.redact(builder.b);
   if (builder.c != null) builder.c = NotRedacted.ADAPTER.redact(builder.c);
   builder.clearUnknownFields();
   return builder.build();
 }