/* * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! package com.examples.abelanav2.grpc; @SuppressWarnings("hiding") public final class Error extends com.google.protobuf.nano.MessageNano { private static volatile Error[] _emptyArray; public static Error[] emptyArray() { // Lazily initializes the empty array if (_emptyArray == null) { synchronized ( com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) { if (_emptyArray == null) { _emptyArray = new Error[0]; } } } return _emptyArray; } // optional string code = 1; public java.lang.String code; // optional string details = 2; public java.lang.String details; public Error() { clear(); } public Error clear() { code = ""; details = ""; cachedSize = -1; return this; } @Override public void writeTo(com.google.protobuf.nano.CodedOutputByteBufferNano output) throws java.io.IOException { if (!this.code.equals("")) { output.writeString(1, this.code); } if (!this.details.equals("")) { output.writeString(2, this.details); } super.writeTo(output); } @Override protected int computeSerializedSize() { int size = super.computeSerializedSize(); if (!this.code.equals("")) { size += com.google.protobuf.nano.CodedOutputByteBufferNano .computeStringSize(1, this.code); } if (!this.details.equals("")) { size += com.google.protobuf.nano.CodedOutputByteBufferNano .computeStringSize(2, this.details); } return size; } @Override public Error mergeFrom( com.google.protobuf.nano.CodedInputByteBufferNano input) throws java.io.IOException { while (true) { int tag = input.readTag(); switch (tag) { case 0: return this; default: { if (!com.google.protobuf.nano.WireFormatNano.parseUnknownField(input, tag)) { return this; } break; } case 10: { this.code = input.readString(); break; } case 18: { this.details = input.readString(); break; } } } } public static Error parseFrom(byte[] data) throws com.google.protobuf.nano.InvalidProtocolBufferNanoException { return com.google.protobuf.nano.MessageNano.mergeFrom(new Error(), data); } public static Error parseFrom( com.google.protobuf.nano.CodedInputByteBufferNano input) throws java.io.IOException { return new Error().mergeFrom(input); } }