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.BlockIndexRequest;

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

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

        private static volatile BlockIndex_Response[] _emptyArray;

        public BlockIndexRequest.BlockIndex_Request inputParam;

        public Market_Status outputParam;

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

            private static volatile Market_Status[] _emptyArray;

            public Goods_Quote[] goodsQuote;

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

                private static volatile Goods_Quote[] _emptyArray;

                private int bitField0_;

                private long category_;

                private String code_;

                private int exchange_;

                private int id_;

                private String name_;

                private int ratio_;

                private int session_;

                public Goods_Quote() {
                    clear();
                }

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

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

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

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

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

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

                public Goods_Quote clearId() {
                    this.id_ = 0;
                    this.bitField0_ &= -2;
                    return this;
                }

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

                public Goods_Quote clearRatio() {
                    this.ratio_ = 0;
                    this.bitField0_ &= -65;
                    return this;
                }

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

                /* access modifiers changed from: protected */
                public int computeSerializedSize() {
                    int computeSerializedSize = super.computeSerializedSize();
                    if ((this.bitField0_ & 1) != 0) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(1, this.id_);
                    }
                    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) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(6, this.session_);
                    }
                    if ((this.bitField0_ & 64) != 0) {
                        return computeSerializedSize + CodedOutputByteBufferNano.computeSInt32Size(7, this.ratio_);
                    }
                    return computeSerializedSize;
                }

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

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

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

                public int getId() {
                    return this.id_;
                }

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

                public int getRatio() {
                    return this.ratio_;
                }

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

                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 hasId() {
                    if ((this.bitField0_ & 1) != 0) {
                        return true;
                    }
                    return false;
                }

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

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

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

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

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

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

                public Goods_Quote setId(int i10) {
                    this.id_ = i10;
                    this.bitField0_ |= 1;
                    return this;
                }

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

                public Goods_Quote setRatio(int i10) {
                    this.ratio_ = i10;
                    this.bitField0_ |= 64;
                    return this;
                }

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

                public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                    if ((this.bitField0_ & 1) != 0) {
                        codedOutputByteBufferNano.writeUInt32(1, this.id_);
                    }
                    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_);
                    }
                    if ((this.bitField0_ & 64) != 0) {
                        codedOutputByteBufferNano.writeSInt32(7, this.ratio_);
                    }
                    super.writeTo(codedOutputByteBufferNano);
                }

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

                public Goods_Quote mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                    while (true) {
                        int readTag = codedInputByteBufferNano.readTag();
                        if (readTag == 0) {
                            return this;
                        }
                        if (readTag == 8) {
                            this.id_ = 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 (readTag == 56) {
                            this.ratio_ = codedInputByteBufferNano.readSInt32();
                            this.bitField0_ |= 64;
                        } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                            return this;
                        }
                    }
                }
            }

            public Market_Status() {
                clear();
            }

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

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

            public Market_Status clear() {
                this.goodsQuote = Goods_Quote.emptyArray();
                this.cachedSize = -1;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                Goods_Quote[] goods_QuoteArr = this.goodsQuote;
                if (goods_QuoteArr != null && goods_QuoteArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        Goods_Quote[] goods_QuoteArr2 = this.goodsQuote;
                        if (i10 >= goods_QuoteArr2.length) {
                            break;
                        }
                        Goods_Quote goods_Quote = goods_QuoteArr2[i10];
                        if (goods_Quote != null) {
                            computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, goods_Quote);
                        }
                        i10++;
                    }
                }
                return computeSerializedSize;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                Goods_Quote[] goods_QuoteArr = this.goodsQuote;
                if (goods_QuoteArr != null && goods_QuoteArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        Goods_Quote[] goods_QuoteArr2 = this.goodsQuote;
                        if (i10 >= goods_QuoteArr2.length) {
                            break;
                        }
                        Goods_Quote goods_Quote = goods_QuoteArr2[i10];
                        if (goods_Quote != null) {
                            codedOutputByteBufferNano.writeMessage(1, goods_Quote);
                        }
                        i10++;
                    }
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public Market_Status mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 10) {
                        int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 10);
                        Goods_Quote[] goods_QuoteArr = this.goodsQuote;
                        int length = goods_QuoteArr == null ? 0 : goods_QuoteArr.length;
                        int i10 = repeatedFieldArrayLength + length;
                        Goods_Quote[] goods_QuoteArr2 = new Goods_Quote[i10];
                        if (length != 0) {
                            System.arraycopy(goods_QuoteArr, 0, goods_QuoteArr2, 0, length);
                        }
                        while (length < i10 - 1) {
                            Goods_Quote goods_Quote = new Goods_Quote();
                            goods_QuoteArr2[length] = goods_Quote;
                            codedInputByteBufferNano.readMessage(goods_Quote);
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        Goods_Quote goods_Quote2 = new Goods_Quote();
                        goods_QuoteArr2[length] = goods_Quote2;
                        codedInputByteBufferNano.readMessage(goods_Quote2);
                        this.goodsQuote = goods_QuoteArr2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public BlockIndex_Response() {
            clear();
        }

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

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

        public BlockIndex_Response clear() {
            this.inputParam = null;
            this.outputParam = null;
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            BlockIndexRequest.BlockIndex_Request blockIndex_Request = this.inputParam;
            if (blockIndex_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, blockIndex_Request);
            }
            Market_Status market_Status = this.outputParam;
            if (market_Status != null) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeMessageSize(2, market_Status);
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            BlockIndexRequest.BlockIndex_Request blockIndex_Request = this.inputParam;
            if (blockIndex_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, blockIndex_Request);
            }
            Market_Status market_Status = this.outputParam;
            if (market_Status != null) {
                codedOutputByteBufferNano.writeMessage(2, market_Status);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public BlockIndex_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 BlockIndexRequest.BlockIndex_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.inputParam);
                } else if (readTag == 18) {
                    if (this.outputParam == null) {
                        this.outputParam = new Market_Status();
                    }
                    codedInputByteBufferNano.readMessage(this.outputParam);
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
