예제 #1
0
 @Override
 public boolean equals(Object other) {
   if (other == this) return true;
   if (!(other instanceof MethodOptions)) return false;
   MethodOptions o = (MethodOptions) other;
   return Internal.equals(unknownFields(), o.unknownFields())
       && Internal.equals(deprecated, o.deprecated)
       && Internal.equals(uninterpreted_option, o.uninterpreted_option);
 }
예제 #2
0
 @Override
 public MethodOptions redact(MethodOptions value) {
   Builder builder = value.newBuilder();
   Internal.redactElements(builder.uninterpreted_option, UninterpretedOption.ADAPTER);
   builder.clearUnknownFields();
   return builder.build();
 }
예제 #3
0
 @Override
 public void encode(ProtoWriter writer, MethodOptions value) throws IOException {
   if (value.deprecated != null) ProtoAdapter.BOOL.encodeWithTag(writer, 33, value.deprecated);
   if (value.uninterpreted_option != null)
     UninterpretedOption.ADAPTER
         .asRepeated()
         .encodeWithTag(writer, 999, value.uninterpreted_option);
   writer.writeBytes(value.unknownFields());
 }
예제 #4
0
 @Override
 public int encodedSize(MethodOptions value) {
   return (value.deprecated != null
           ? ProtoAdapter.BOOL.encodedSizeWithTag(33, value.deprecated)
           : 0)
       + UninterpretedOption.ADAPTER
           .asRepeated()
           .encodedSizeWithTag(999, value.uninterpreted_option)
       + value.unknownFields().size();
 }