/** * <code>string message = 1;</code> */ public Builder clearMessage() { message_ = getDefaultInstance().getMessage(); onChanged(); return this; } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); hash = (37 * hash) + FROM_FIELD_NUMBER; hash = (53 * hash) + from_; hash = (37 * hash) + TO_FIELD_NUMBER; hash = (53 * hash) + to_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
public Builder mergeFrom(com.example.grpc.TranslationRequest other) { if (other == com.example.grpc.TranslationRequest.getDefaultInstance()) return this; if (!other.getMessage().isEmpty()) { message_ = other.message_; onChanged(); } if (other.from_ != 0) { setFromValue(other.getFromValue()); } if (other.to_ != 0) { setToValue(other.getToValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
public com.example.grpc.TranslationRequest getDefaultInstanceForType() { return com.example.grpc.TranslationRequest.getDefaultInstance(); }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getMessageBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, message_); } if (from_ != com.example.grpc.Language.EN.getNumber()) { output.writeEnum(2, from_); } if (to_ != com.example.grpc.Language.EN.getNumber()) { output.writeEnum(3, to_); } unknownFields.writeTo(output); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.example.grpc.TranslationRequest)) { return super.equals(obj); } com.example.grpc.TranslationRequest other = (com.example.grpc.TranslationRequest) obj; boolean result = true; result = result && getMessage() .equals(other.getMessage()); result = result && from_ == other.from_; result = result && to_ == other.to_; result = result && unknownFields.equals(other.unknownFields); return result; }
public com.example.grpc.TranslationRequest buildPartial() { com.example.grpc.TranslationRequest result = new com.example.grpc.TranslationRequest(this); result.message_ = message_; result.from_ = from_; result.to_ = to_; onBuilt(); return result; }
public com.example.grpc.TranslationRequest build() { com.example.grpc.TranslationRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
private static io.grpc.MethodDescriptor<com.example.grpc.TranslationRequest, com.example.grpc.TranslationResponse> getTranslateMethodHelper() { io.grpc.MethodDescriptor<com.example.grpc.TranslationRequest, com.example.grpc.TranslationResponse> getTranslateMethod; if ((getTranslateMethod = TranslationServiceGrpc.getTranslateMethod) == null) { synchronized (TranslationServiceGrpc.class) { if ((getTranslateMethod = TranslationServiceGrpc.getTranslateMethod) == null) { TranslationServiceGrpc.getTranslateMethod = getTranslateMethod = io.grpc.MethodDescriptor.<com.example.grpc.TranslationRequest, com.example.grpc.TranslationResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName( "com.example.grpc.TranslationService", "translate")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.example.grpc.TranslationRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.example.grpc.TranslationResponse.getDefaultInstance())) .setSchemaDescriptor(new TranslationServiceMethodDescriptorSupplier("translate")) .build(); } } } return getTranslateMethod; }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getMessageBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, message_); } if (from_ != com.example.grpc.Language.EN.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, from_); } if (to_ != com.example.grpc.Language.EN.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(3, to_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }