예제 #1
0
 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;
 }
예제 #2
0
 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;
 }
예제 #3
0
 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;
 }
예제 #4
0
 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;
 }
예제 #5
0
 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;
 }
예제 #6
0
 public Builder clearHeaders() {
   result.headers_ = java.util.Collections.emptyList();
   return this;
 }