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