public Builder mergeFrom( jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateRequest other) { if (other == jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateRequest .getDefaultInstance()) return this; if (!other.headers_.isEmpty()) { if (result.headers_.isEmpty()) { result.headers_ = new java.util.ArrayList< jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Header>(); } result.headers_.addAll(other.headers_); } if (other.hasSourceLang()) { setSourceLang(other.getSourceLang()); } if (other.hasTargetLang()) { setTargetLang(other.getTargetLang()); } if (other.hasSource()) { setSource(other.getSource()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder addHeaders( jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Header.Builder builderForValue) { if (result.headers_.isEmpty()) { result.headers_ = new java.util.ArrayList< jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Header>(); } result.headers_.add(builderForValue.build()); return this; }
public Builder addAllHeaders( java.lang.Iterable<? extends jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Header> values) { if (result.headers_.isEmpty()) { result.headers_ = new java.util.ArrayList< jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Header>(); } super.addAll(values, result.headers_); return this; }
public Builder addHeaders( jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Header value) { if (value == null) { throw new NullPointerException(); } if (result.headers_.isEmpty()) { result.headers_ = new java.util.ArrayList< jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Header>(); } result.headers_.add(value); return this; }
public jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateRequest buildPartial() { if (result == null) { throw new IllegalStateException("build() has already been called on this Builder."); } if (result.headers_ != java.util.Collections.EMPTY_LIST) { result.headers_ = java.util.Collections.unmodifiableList(result.headers_); } jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateRequest returnMe = result; result = null; return returnMe; }
public Builder clearHeaders() { result.headers_ = java.util.Collections.emptyList(); return this; }