public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.example.grpc.TranslationRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.example.grpc.TranslationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * <code>string message = 1;</code> */ public Builder setMessage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } message_ = value; onChanged(); return this; } /**
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; }
private Builder() { maybeForceBuilderInitialization(); }
public static Builder newBuilder(com.example.grpc.TranslationRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() {
/** * <code>string message = 1;</code> */ public Builder setMessageBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); message_ = value; onChanged(); return this; }
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
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; }
/** * <code>.com.example.grpc.Language from = 2;</code> */ public Builder setFromValue(int value) { from_ = value; onChanged(); return this; } /**
/** * <code>string message = 1;</code> */ public Builder clearMessage() { message_ = getDefaultInstance().getMessage(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.example.grpc.TranslationRequest) { return mergeFrom((com.example.grpc.TranslationRequest)other); } else { super.mergeFrom(other); return this; } }
/** * <code>.com.example.grpc.Language to = 3;</code> */ public Builder setTo(com.example.grpc.Language value) { if (value == null) { throw new NullPointerException(); } to_ = value.getNumber(); onChanged(); return this; } /**
/** * <code>.com.example.grpc.Language to = 3;</code> */ public Builder setToValue(int value) { to_ = value; onChanged(); return this; } /**
/** * <code>.com.example.grpc.Language from = 2;</code> */ public Builder clearFrom() { from_ = 0; onChanged(); return this; }
/** * <code>.com.example.grpc.Language from = 2;</code> */ public Builder setFrom(com.example.grpc.Language value) { if (value == null) { throw new NullPointerException(); } from_ = value.getNumber(); onChanged(); return this; } /**
private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() {
/** * <code>.com.example.grpc.Language to = 3;</code> */ public Builder clearTo() { to_ = 0; onChanged(); return this; } public final Builder setUnknownFields(
public com.example.grpc.TranslationRequest build() { com.example.grpc.TranslationRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }