Esempio n. 1
0
 public Builder setTargetLang(java.lang.String value) {
   if (value == null) {
     throw new NullPointerException();
   }
   result.hasTargetLang = true;
   result.targetLang_ = value;
   return this;
 }
Esempio n. 2
0
 public Builder setSource(java.lang.String value) {
   if (value == null) {
     throw new NullPointerException();
   }
   result.hasSource = true;
   result.source_ = value;
   return this;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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.");
   }
 }
Esempio n. 9
0
 public Builder clearSource() {
   result.hasSource = false;
   result.source_ = getDefaultInstance().getSource();
   return this;
 }
Esempio n. 10
0
 public java.lang.String getSource() {
   return result.getSource();
 }
Esempio n. 11
0
 public jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateRequest
     getDefaultInstanceForType() {
   return jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateRequest
       .getDefaultInstance();
 }
Esempio n. 12
0
 public Builder clearTargetLang() {
   result.hasTargetLang = false;
   result.targetLang_ = getDefaultInstance().getTargetLang();
   return this;
 }
Esempio n. 13
0
 // required string source = 4;
 public boolean hasSource() {
   return result.hasSource();
 }
Esempio n. 14
0
 public java.lang.String getTargetLang() {
   return result.getTargetLang();
 }
Esempio n. 15
0
 public boolean isInitialized() {
   return result.isInitialized();
 }
Esempio n. 16
0
 // required string targetLang = 3;
 public boolean hasTargetLang() {
   return result.hasTargetLang();
 }
Esempio n. 17
0
 public Builder clearHeaders() {
   result.headers_ = java.util.Collections.emptyList();
   return this;
 }
Esempio n. 18
0
 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
   return jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateRequest
       .getDescriptor();
 }
Esempio n. 19
0
 public int getHeadersCount() {
   return result.getHeadersCount();
 }
Esempio n. 20
0
 public jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Header getHeaders(int index) {
   return result.getHeaders(index);
 }