package nano;

import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.InternalNano;
import com.google.protobuf.nano.InvalidProtocolBufferNanoException;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
import nano.TemplateStockRequest;

/* compiled from: TbsSdkJava */
public interface TemplateStockResponse {

    /* compiled from: TbsSdkJava */
    public static final class TemplateStock_Response extends MessageNano {

        private static volatile TemplateStock_Response[] _emptyArray;

        private int bitField0_;

        public TemplateStockRequest.TemplateStock_Request inputParam;

        public Result_Data[] outputParam;

        private int totalSize_;

        private int tradeDate_;

        /* compiled from: TbsSdkJava */
        public static final class Result_Data extends MessageNano {

            private static volatile Result_Data[] _emptyArray;

            private int bitField0_;

            private long category_;

            private String code_;

            private int exchange_;

            private String name_;

            private int session_;

            private int stock_;

            public Result_Data() {
                clear();
            }

            public static Result_Data[] emptyArray() {
                if (_emptyArray == null) {
                    synchronized (InternalNano.LAZY_INIT_LOCK) {
                        try {
                            if (_emptyArray == null) {
                                _emptyArray = new Result_Data[0];
                            }
                        } catch (Throwable th) {
                            throw th;
                        }
                    }
                }
                return _emptyArray;
            }

            public static Result_Data parseFrom(byte[] bArr) throws InvalidProtocolBufferNanoException {
                return (Result_Data) MessageNano.mergeFrom(new Result_Data(), bArr);
            }

            public Result_Data clear() {
                this.bitField0_ = 0;
                this.stock_ = 0;
                this.name_ = "";
                this.code_ = "";
                this.exchange_ = 0;
                this.category_ = 0;
                this.session_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public Result_Data clearCategory() {
                this.category_ = 0;
                this.bitField0_ &= -17;
                return this;
            }

            public Result_Data clearCode() {
                this.code_ = "";
                this.bitField0_ &= -5;
                return this;
            }

            public Result_Data clearExchange() {
                this.exchange_ = 0;
                this.bitField0_ &= -9;
                return this;
            }

            public Result_Data clearName() {
                this.name_ = "";
                this.bitField0_ &= -3;
                return this;
            }

            public Result_Data clearSession() {
                this.session_ = 0;
                this.bitField0_ &= -33;
                return this;
            }

            public Result_Data clearStock() {
                this.stock_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(1, this.stock_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(2, this.name_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(3, this.code_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(4, this.exchange_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt64Size(5, this.category_);
                }
                if ((this.bitField0_ & 32) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(6, this.session_);
                }
                return computeSerializedSize;
            }

            public long getCategory() {
                return this.category_;
            }

            public String getCode() {
                return this.code_;
            }

            public int getExchange() {
                return this.exchange_;
            }

            public String getName() {
                return this.name_;
            }

            public int getSession() {
                return this.session_;
            }

            public int getStock() {
                return this.stock_;
            }

            public boolean hasCategory() {
                if ((this.bitField0_ & 16) != 0) {
                    return true;
                }
                return false;
            }

            public boolean hasCode() {
                if ((this.bitField0_ & 4) != 0) {
                    return true;
                }
                return false;
            }

            public boolean hasExchange() {
                if ((this.bitField0_ & 8) != 0) {
                    return true;
                }
                return false;
            }

            public boolean hasName() {
                if ((this.bitField0_ & 2) != 0) {
                    return true;
                }
                return false;
            }

            public boolean hasSession() {
                if ((this.bitField0_ & 32) != 0) {
                    return true;
                }
                return false;
            }

            public boolean hasStock() {
                if ((this.bitField0_ & 1) != 0) {
                    return true;
                }
                return false;
            }

            public Result_Data setCategory(long j10) {
                this.category_ = j10;
                this.bitField0_ |= 16;
                return this;
            }

            public Result_Data setCode(String str) {
                str.getClass();
                this.code_ = str;
                this.bitField0_ |= 4;
                return this;
            }

            public Result_Data setExchange(int i10) {
                this.exchange_ = i10;
                this.bitField0_ |= 8;
                return this;
            }

            public Result_Data setName(String str) {
                str.getClass();
                this.name_ = str;
                this.bitField0_ |= 2;
                return this;
            }

            public Result_Data setSession(int i10) {
                this.session_ = i10;
                this.bitField0_ |= 32;
                return this;
            }

            public Result_Data setStock(int i10) {
                this.stock_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(1, this.stock_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeString(2, this.name_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    codedOutputByteBufferNano.writeString(3, this.code_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    codedOutputByteBufferNano.writeUInt32(4, this.exchange_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    codedOutputByteBufferNano.writeUInt64(5, this.category_);
                }
                if ((this.bitField0_ & 32) != 0) {
                    codedOutputByteBufferNano.writeUInt32(6, this.session_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

            public static Result_Data parseFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                return new Result_Data().mergeFrom(codedInputByteBufferNano);
            }

            public Result_Data mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.stock_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 18) {
                        this.name_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 2;
                    } else if (readTag == 26) {
                        this.code_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 4;
                    } else if (readTag == 32) {
                        this.exchange_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 8;
                    } else if (readTag == 40) {
                        this.category_ = codedInputByteBufferNano.readUInt64();
                        this.bitField0_ |= 16;
                    } else if (readTag == 48) {
                        this.session_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 32;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public TemplateStock_Response() {
            clear();
        }

        public static TemplateStock_Response[] emptyArray() {
            if (_emptyArray == null) {
                synchronized (InternalNano.LAZY_INIT_LOCK) {
                    try {
                        if (_emptyArray == null) {
                            _emptyArray = new TemplateStock_Response[0];
                        }
                    } catch (Throwable th) {
                        throw th;
                    }
                }
            }
            return _emptyArray;
        }

        public static TemplateStock_Response parseFrom(byte[] bArr) throws InvalidProtocolBufferNanoException {
            return (TemplateStock_Response) MessageNano.mergeFrom(new TemplateStock_Response(), bArr);
        }

        public TemplateStock_Response clear() {
            this.bitField0_ = 0;
            this.inputParam = null;
            this.outputParam = Result_Data.emptyArray();
            this.totalSize_ = 0;
            this.tradeDate_ = 0;
            this.cachedSize = -1;
            return this;
        }

        public TemplateStock_Response clearTotalSize() {
            this.totalSize_ = 0;
            this.bitField0_ &= -2;
            return this;
        }

        public TemplateStock_Response clearTradeDate() {
            this.tradeDate_ = 0;
            this.bitField0_ &= -3;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            TemplateStockRequest.TemplateStock_Request templateStock_Request = this.inputParam;
            if (templateStock_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, templateStock_Request);
            }
            Result_Data[] result_DataArr = this.outputParam;
            if (result_DataArr != null && result_DataArr.length > 0) {
                int i10 = 0;
                while (true) {
                    Result_Data[] result_DataArr2 = this.outputParam;
                    if (i10 >= result_DataArr2.length) {
                        break;
                    }
                    Result_Data result_Data = result_DataArr2[i10];
                    if (result_Data != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, result_Data);
                    }
                    i10++;
                }
            }
            if ((this.bitField0_ & 1) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.totalSize_);
            }
            if ((this.bitField0_ & 2) != 0) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(4, this.tradeDate_);
            }
            return computeSerializedSize;
        }

        public int getTotalSize() {
            return this.totalSize_;
        }

        public int getTradeDate() {
            return this.tradeDate_;
        }

        public boolean hasTotalSize() {
            if ((this.bitField0_ & 1) != 0) {
                return true;
            }
            return false;
        }

        public boolean hasTradeDate() {
            if ((this.bitField0_ & 2) != 0) {
                return true;
            }
            return false;
        }

        public TemplateStock_Response setTotalSize(int i10) {
            this.totalSize_ = i10;
            this.bitField0_ |= 1;
            return this;
        }

        public TemplateStock_Response setTradeDate(int i10) {
            this.tradeDate_ = i10;
            this.bitField0_ |= 2;
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            TemplateStockRequest.TemplateStock_Request templateStock_Request = this.inputParam;
            if (templateStock_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, templateStock_Request);
            }
            Result_Data[] result_DataArr = this.outputParam;
            if (result_DataArr != null && result_DataArr.length > 0) {
                int i10 = 0;
                while (true) {
                    Result_Data[] result_DataArr2 = this.outputParam;
                    if (i10 >= result_DataArr2.length) {
                        break;
                    }
                    Result_Data result_Data = result_DataArr2[i10];
                    if (result_Data != null) {
                        codedOutputByteBufferNano.writeMessage(2, result_Data);
                    }
                    i10++;
                }
            }
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeUInt32(3, this.totalSize_);
            }
            if ((this.bitField0_ & 2) != 0) {
                codedOutputByteBufferNano.writeUInt32(4, this.tradeDate_);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

        public static TemplateStock_Response parseFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            return new TemplateStock_Response().mergeFrom(codedInputByteBufferNano);
        }

        public TemplateStock_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.inputParam == null) {
                        this.inputParam = new TemplateStockRequest.TemplateStock_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.inputParam);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    Result_Data[] result_DataArr = this.outputParam;
                    int length = result_DataArr == null ? 0 : result_DataArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    Result_Data[] result_DataArr2 = new Result_Data[i10];
                    if (length != 0) {
                        System.arraycopy(result_DataArr, 0, result_DataArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        Result_Data result_Data = new Result_Data();
                        result_DataArr2[length] = result_Data;
                        codedInputByteBufferNano.readMessage(result_Data);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    Result_Data result_Data2 = new Result_Data();
                    result_DataArr2[length] = result_Data2;
                    codedInputByteBufferNano.readMessage(result_Data2);
                    this.outputParam = result_DataArr2;
                } else if (readTag == 24) {
                    this.totalSize_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 1;
                } else if (readTag == 32) {
                    this.tradeDate_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
