Esempio n. 1
0
 public Builder setFault(jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Fault value) {
   if (value == null) {
     throw new NullPointerException();
   }
   result.hasFault = true;
   result.fault_ = value;
   return this;
 }
Esempio n. 2
0
 public Builder setResult(java.lang.String value) {
   if (value == null) {
     throw new NullPointerException();
   }
   result.hasResult = true;
   result.result_ = value;
   return this;
 }
Esempio n. 3
0
 public Builder mergeFault(jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Fault value) {
   if (result.hasFault()
       && result.fault_
           != jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Fault
               .getDefaultInstance()) {
     result.fault_ =
         jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Fault.newBuilder(result.fault_)
             .mergeFrom(value)
             .buildPartial();
   } else {
     result.fault_ = value;
   }
   result.hasFault = true;
   return this;
 }
Esempio n. 4
0
 public void translate(
     com.google.protobuf.RpcController controller,
     jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateRequest request,
     com.google.protobuf.RpcCallback<
             jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateResponse>
         done) {
   channel.callMethod(
       getDescriptor().getMethods().get(0),
       controller,
       request,
       jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateResponse
           .getDefaultInstance(),
       com.google.protobuf.RpcUtil.generalizeCallback(
           done,
           jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateResponse.class,
           jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateResponse
               .getDefaultInstance()));
 }
Esempio n. 5
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. 6
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. 7
0
 public jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateResponse translate(
     com.google.protobuf.RpcController controller,
     jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateRequest request)
     throws com.google.protobuf.ServiceException {
   return (jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateResponse)
       channel.callBlockingMethod(
           getDescriptor().getMethods().get(0),
           controller,
           request,
           jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateResponse
               .getDefaultInstance());
 }
Esempio n. 8
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. 9
0
 public jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateResponse
     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.TranslateResponse returnMe =
       result;
   result = null;
   return returnMe;
 }
Esempio n. 10
0
 public final com.google.protobuf.Message getResponsePrototype(
     com.google.protobuf.Descriptors.MethodDescriptor method) {
   if (method.getService() != getDescriptor()) {
     throw new java.lang.IllegalArgumentException(
         "Service.getResponsePrototype() given method " + "descriptor for wrong service type.");
   }
   switch (method.getIndex()) {
     case 0:
       return jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateResponse
           .getDefaultInstance();
     default:
       throw new java.lang.AssertionError("Can't get here.");
   }
 }
Esempio n. 11
0
 public Builder mergeFrom(
     jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateResponse other) {
   if (other
       == jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateResponse
           .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.hasFault()) {
     mergeFault(other.getFault());
   }
   if (other.hasResult()) {
     setResult(other.getResult());
   }
   this.mergeUnknownFields(other.getUnknownFields());
   return this;
 }
Esempio n. 12
0
 public Builder clearFault() {
   result.hasFault = false;
   result.fault_ =
       jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Fault.getDefaultInstance();
   return this;
 }
Esempio n. 13
0
 public Builder clearResult() {
   result.hasResult = false;
   result.result_ = getDefaultInstance().getResult();
   return this;
 }
Esempio n. 14
0
 public Builder setFault(
     jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Fault.Builder builderForValue) {
   result.hasFault = true;
   result.fault_ = builderForValue.build();
   return this;
 }
Esempio n. 15
0
 // optional .Fault fault = 2;
 public boolean hasFault() {
   return result.hasFault();
 }
Esempio n. 16
0
 public jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Fault getFault() {
   return result.getFault();
 }
Esempio n. 17
0
 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
   return jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateResponse
       .getDescriptor();
 }
Esempio n. 18
0
 public Builder clearHeaders() {
   result.headers_ = java.util.Collections.emptyList();
   return this;
 }
Esempio n. 19
0
 public jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateResponse
     getDefaultInstanceForType() {
   return jp.go.nict.langrid.client.protobuf.proto.TranslationProtos.TranslateResponse
       .getDefaultInstance();
 }
Esempio n. 20
0
 public boolean isInitialized() {
   return result.isInitialized();
 }
Esempio n. 21
0
 public jp.go.nict.langrid.client.protobuf.proto.CommonProtos.Header getHeaders(int index) {
   return result.getHeaders(index);
 }
Esempio n. 22
0
 public int getHeadersCount() {
   return result.getHeadersCount();
 }
Esempio n. 23
0
 public java.lang.String getResult() {
   return result.getResult();
 }