예제 #1
0
 public Builder setTargetLang(java.lang.String value) {
   if (value == null) {
     throw new NullPointerException();
   }
   result.hasTargetLang = true;
   result.targetLang_ = value;
   return this;
 }
예제 #2
0
 public Builder setSource(java.lang.String value) {
   if (value == null) {
     throw new NullPointerException();
   }
   result.hasSource = true;
   result.source_ = value;
   return this;
 }
예제 #3
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;
 }
예제 #4
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;
 }
예제 #5
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;
 }
예제 #6
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;
 }
예제 #7
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;
 }
예제 #8
0
 public final com.google.protobuf.Message getRequestPrototype(
     com.google.protobuf.Descriptors.MethodDescriptor method) {
   if (method.getService() != getDescriptor()) {
     throw new java.lang.IllegalArgumentException(
         "Service.getRequestPrototype() given method " + "descriptor for wrong service type.");
   }
   switch (method.getIndex()) {
     case 0:
       return jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateRequest
           .getDefaultInstance();
     default:
       throw new java.lang.AssertionError("Can't get here.");
   }
 }
예제 #9
0
 public Builder clearSource() {
   result.hasSource = false;
   result.source_ = getDefaultInstance().getSource();
   return this;
 }
예제 #10
0
 public java.lang.String getSource() {
   return result.getSource();
 }
예제 #11
0
 public jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateRequest
     getDefaultInstanceForType() {
   return jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateRequest
       .getDefaultInstance();
 }
예제 #12
0
 public Builder clearTargetLang() {
   result.hasTargetLang = false;
   result.targetLang_ = getDefaultInstance().getTargetLang();
   return this;
 }
예제 #13
0
 // required string source = 4;
 public boolean hasSource() {
   return result.hasSource();
 }
예제 #14
0
 public java.lang.String getTargetLang() {
   return result.getTargetLang();
 }
예제 #15
0
 public boolean isInitialized() {
   return result.isInitialized();
 }
예제 #16
0
 // required string targetLang = 3;
 public boolean hasTargetLang() {
   return result.hasTargetLang();
 }
예제 #17
0
 public Builder clearHeaders() {
   result.headers_ = java.util.Collections.emptyList();
   return this;
 }
예제 #18
0
 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
   return jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateRequest
       .getDescriptor();
 }
예제 #19
0
 public int getHeadersCount() {
   return result.getHeadersCount();
 }
예제 #20
0
 public jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Header getHeaders(int index) {
   return result.getHeaders(index);
 }