/balmysundaycandy-scala/src-java/balmysundaycandy/scalatool/shared/RemoteCallResponse.java
Java | 549 lines | 482 code | 51 blank | 16 comment | 49 complexity | af82b25da7e523efe1018e252b0264f9 MD5 | raw file
Possible License(s): MIT, Apache-2.0, GPL-2.0
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: RemoteCallResponse.proto
- package balmysundaycandy.scalatool.shared;
- public final class RemoteCallResponse {
- private RemoteCallResponse() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- }
- public static final class CallResponse extends
- com.google.protobuf.GeneratedMessage {
- // Use CallResponse.newBuilder() to construct.
- private CallResponse() {
- initFields();
- }
- private CallResponse(boolean noInit) {}
-
- private static final CallResponse defaultInstance;
- public static CallResponse getDefaultInstance() {
- return defaultInstance;
- }
-
- public CallResponse getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return balmysundaycandy.scalatool.shared.RemoteCallResponse.internal_static_balmysundaycandy_scalatool_shared_CallResponse_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return balmysundaycandy.scalatool.shared.RemoteCallResponse.internal_static_balmysundaycandy_scalatool_shared_CallResponse_fieldAccessorTable;
- }
-
- public enum RequestType
- implements com.google.protobuf.ProtocolMessageEnum {
- RUN_SERVICE_CALL(0, 0),
- RUN_REMOTE_CALL(1, 1),
- ;
-
-
- public final int getNumber() { return value; }
-
- public static RequestType valueOf(int value) {
- switch (value) {
- case 0: return RUN_SERVICE_CALL;
- case 1: return RUN_REMOTE_CALL;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap<RequestType>
- internalGetValueMap() {
- return internalValueMap;
- }
- private static com.google.protobuf.Internal.EnumLiteMap<RequestType>
- internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap<RequestType>() {
- public RequestType findValueByNumber(int number) {
- return RequestType.valueOf(number)
- ; }
- };
-
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(index);
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final RequestType[] VALUES = {
- RUN_SERVICE_CALL, RUN_REMOTE_CALL,
- };
- public static RequestType valueOf(
- com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
- if (desc.getType() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "EnumValueDescriptor is not for this type.");
- }
- return VALUES[desc.getIndex()];
- }
- private final int index;
- private final int value;
- private RequestType(int index, int value) {
- this.index = index;
- this.value = value;
- }
-
- static {
- balmysundaycandy.scalatool.shared.RemoteCallResponse.getDescriptor();
- }
-
- // @@protoc_insertion_point(enum_scope:balmysundaycandy.scalatool.shared.CallResponse.RequestType)
- }
-
- // required .balmysundaycandy.scalatool.shared.CallResponse.RequestType requestType = 1;
- public static final int REQUESTTYPE_FIELD_NUMBER = 1;
- private boolean hasRequestType;
- private balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse.RequestType requestType_;
- public boolean hasRequestType() { return hasRequestType; }
- public balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse.RequestType getRequestType() { return requestType_; }
-
- // required bytes responseBytes = 2;
- public static final int RESPONSEBYTES_FIELD_NUMBER = 2;
- private boolean hasResponseBytes;
- private com.google.protobuf.ByteString responseBytes_ = com.google.protobuf.ByteString.EMPTY;
- public boolean hasResponseBytes() { return hasResponseBytes; }
- public com.google.protobuf.ByteString getResponseBytes() { return responseBytes_; }
-
- // optional string responseLog = 3;
- public static final int RESPONSELOG_FIELD_NUMBER = 3;
- private boolean hasResponseLog;
- private java.lang.String responseLog_ = "";
- public boolean hasResponseLog() { return hasResponseLog; }
- public java.lang.String getResponseLog() { return responseLog_; }
-
- // optional string errorLog = 4;
- public static final int ERRORLOG_FIELD_NUMBER = 4;
- private boolean hasErrorLog;
- private java.lang.String errorLog_ = "";
- public boolean hasErrorLog() { return hasErrorLog; }
- public java.lang.String getErrorLog() { return errorLog_; }
-
- private void initFields() {
- requestType_ = balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse.RequestType.RUN_SERVICE_CALL;
- }
- public final boolean isInitialized() {
- if (!hasRequestType) return false;
- if (!hasResponseBytes) return false;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasRequestType()) {
- output.writeEnum(1, getRequestType().getNumber());
- }
- if (hasResponseBytes()) {
- output.writeBytes(2, getResponseBytes());
- }
- if (hasResponseLog()) {
- output.writeString(3, getResponseLog());
- }
- if (hasErrorLog()) {
- output.writeString(4, getErrorLog());
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasRequestType()) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(1, getRequestType().getNumber());
- }
- if (hasResponseBytes()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, getResponseBytes());
- }
- if (hasResponseLog()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(3, getResponseLog());
- }
- if (hasErrorLog()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(4, getErrorLog());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- public static balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder> {
- private balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse result;
-
- // Construct using balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse();
- return builder;
- }
-
- protected balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse internalGetResult() {
- return result;
- }
-
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse();
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse.getDescriptor();
- }
-
- public balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse getDefaultInstanceForType() {
- return balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse.getDefaultInstance();
- }
-
- public boolean isInitialized() {
- return result.isInitialized();
- }
- public balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- public balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse returnMe = result;
- result = null;
- return returnMe;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse) {
- return mergeFrom((balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse other) {
- if (other == balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse.getDefaultInstance()) return this;
- if (other.hasRequestType()) {
- setRequestType(other.getRequestType());
- }
- if (other.hasResponseBytes()) {
- setResponseBytes(other.getResponseBytes());
- }
- if (other.hasResponseLog()) {
- setResponseLog(other.getResponseLog());
- }
- if (other.hasErrorLog()) {
- setErrorLog(other.getErrorLog());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- return this;
- }
- break;
- }
- case 8: {
- int rawValue = input.readEnum();
- balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse.RequestType value = balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse.RequestType.valueOf(rawValue);
- if (value == null) {
- unknownFields.mergeVarintField(1, rawValue);
- } else {
- setRequestType(value);
- }
- break;
- }
- case 18: {
- setResponseBytes(input.readBytes());
- break;
- }
- case 26: {
- setResponseLog(input.readString());
- break;
- }
- case 34: {
- setErrorLog(input.readString());
- break;
- }
- }
- }
- }
-
-
- // required .balmysundaycandy.scalatool.shared.CallResponse.RequestType requestType = 1;
- public boolean hasRequestType() {
- return result.hasRequestType();
- }
- public balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse.RequestType getRequestType() {
- return result.getRequestType();
- }
- public Builder setRequestType(balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse.RequestType value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasRequestType = true;
- result.requestType_ = value;
- return this;
- }
- public Builder clearRequestType() {
- result.hasRequestType = false;
- result.requestType_ = balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse.RequestType.RUN_SERVICE_CALL;
- return this;
- }
-
- // required bytes responseBytes = 2;
- public boolean hasResponseBytes() {
- return result.hasResponseBytes();
- }
- public com.google.protobuf.ByteString getResponseBytes() {
- return result.getResponseBytes();
- }
- public Builder setResponseBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasResponseBytes = true;
- result.responseBytes_ = value;
- return this;
- }
- public Builder clearResponseBytes() {
- result.hasResponseBytes = false;
- result.responseBytes_ = getDefaultInstance().getResponseBytes();
- return this;
- }
-
- // optional string responseLog = 3;
- public boolean hasResponseLog() {
- return result.hasResponseLog();
- }
- public java.lang.String getResponseLog() {
- return result.getResponseLog();
- }
- public Builder setResponseLog(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasResponseLog = true;
- result.responseLog_ = value;
- return this;
- }
- public Builder clearResponseLog() {
- result.hasResponseLog = false;
- result.responseLog_ = getDefaultInstance().getResponseLog();
- return this;
- }
-
- // optional string errorLog = 4;
- public boolean hasErrorLog() {
- return result.hasErrorLog();
- }
- public java.lang.String getErrorLog() {
- return result.getErrorLog();
- }
- public Builder setErrorLog(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasErrorLog = true;
- result.errorLog_ = value;
- return this;
- }
- public Builder clearErrorLog() {
- result.hasErrorLog = false;
- result.errorLog_ = getDefaultInstance().getErrorLog();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:balmysundaycandy.scalatool.shared.CallResponse)
- }
-
- static {
- defaultInstance = new CallResponse(true);
- balmysundaycandy.scalatool.shared.RemoteCallResponse.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:balmysundaycandy.scalatool.shared.CallResponse)
- }
-
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_balmysundaycandy_scalatool_shared_CallResponse_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_balmysundaycandy_scalatool_shared_CallResponse_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n\030RemoteCallResponse.proto\022!balmysundayc" +
- "andy.scalatool.shared\"\330\001\n\014CallResponse\022P" +
- "\n\013requestType\030\001 \002(\0162;.balmysundaycandy.s" +
- "calatool.shared.CallResponse.RequestType" +
- "\022\025\n\rresponseBytes\030\002 \002(\014\022\023\n\013responseLog\030\003" +
- " \001(\t\022\020\n\010errorLog\030\004 \001(\t\"8\n\013RequestType\022\024\n" +
- "\020RUN_SERVICE_CALL\020\000\022\023\n\017RUN_REMOTE_CALL\020\001" +
- "B9\n!balmysundaycandy.scalatool.sharedB\022R" +
- "emoteCallResponseH\001"
- };
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- internal_static_balmysundaycandy_scalatool_shared_CallResponse_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_balmysundaycandy_scalatool_shared_CallResponse_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_balmysundaycandy_scalatool_shared_CallResponse_descriptor,
- new java.lang.String[] { "RequestType", "ResponseBytes", "ResponseLog", "ErrorLog", },
- balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse.class,
- balmysundaycandy.scalatool.shared.RemoteCallResponse.CallResponse.Builder.class);
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- }, assigner);
- }
-
- public static void internalForceInit() {}
-
- // @@protoc_insertion_point(outer_class_scope)
- }