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

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

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

        private static volatile BlockIndustryChain_Response[] _emptyArray;

        public IndustryChainInfo[] industry;

        public BlockIndustryChainRequest.BlockIndustryChain_Request requestParams;

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

            private static volatile IndustryChainInfo[] _emptyArray;

            private int bitField0_;

            private String name_;

            public StockInfo[] stocks;

            private String typeName_;

            public IndustryChainInfo() {
                clear();
            }

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

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

            public IndustryChainInfo clear() {
                this.bitField0_ = 0;
                this.name_ = "";
                this.typeName_ = "";
                this.stocks = StockInfo.emptyArray();
                this.cachedSize = -1;
                return this;
            }

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

            public IndustryChainInfo clearTypeName() {
                this.typeName_ = "";
                this.bitField0_ &= -3;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(1, this.name_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(2, this.typeName_);
                }
                StockInfo[] stockInfoArr = this.stocks;
                if (stockInfoArr != null && stockInfoArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        StockInfo[] stockInfoArr2 = this.stocks;
                        if (i10 >= stockInfoArr2.length) {
                            break;
                        }
                        StockInfo stockInfo = stockInfoArr2[i10];
                        if (stockInfo != null) {
                            computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(3, stockInfo);
                        }
                        i10++;
                    }
                }
                return computeSerializedSize;
            }

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

            public String getTypeName() {
                return this.typeName_;
            }

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

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

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

            public IndustryChainInfo setTypeName(String str) {
                str.getClass();
                this.typeName_ = str;
                this.bitField0_ |= 2;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeString(1, this.name_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeString(2, this.typeName_);
                }
                StockInfo[] stockInfoArr = this.stocks;
                if (stockInfoArr != null && stockInfoArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        StockInfo[] stockInfoArr2 = this.stocks;
                        if (i10 >= stockInfoArr2.length) {
                            break;
                        }
                        StockInfo stockInfo = stockInfoArr2[i10];
                        if (stockInfo != null) {
                            codedOutputByteBufferNano.writeMessage(3, stockInfo);
                        }
                        i10++;
                    }
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public IndustryChainInfo mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 10) {
                        this.name_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 1;
                    } else if (readTag == 18) {
                        this.typeName_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 2;
                    } else if (readTag == 26) {
                        int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 26);
                        StockInfo[] stockInfoArr = this.stocks;
                        int length = stockInfoArr == null ? 0 : stockInfoArr.length;
                        int i10 = repeatedFieldArrayLength + length;
                        StockInfo[] stockInfoArr2 = new StockInfo[i10];
                        if (length != 0) {
                            System.arraycopy(stockInfoArr, 0, stockInfoArr2, 0, length);
                        }
                        while (length < i10 - 1) {
                            StockInfo stockInfo = new StockInfo();
                            stockInfoArr2[length] = stockInfo;
                            codedInputByteBufferNano.readMessage(stockInfo);
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        StockInfo stockInfo2 = new StockInfo();
                        stockInfoArr2[length] = stockInfo2;
                        codedInputByteBufferNano.readMessage(stockInfo2);
                        this.stocks = stockInfoArr2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

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

            private static volatile StockInfo[] _emptyArray;

            private int bitField0_;

            private long category_;

            private String code_;

            private int exchange_;

            private int id_;

            private String name_;

            private int tradeSession_;

            public StockInfo() {
                clear();
            }

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

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

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

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

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

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

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

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

            public StockInfo clearTradeSession() {
                this.tradeSession_ = 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.code_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(3, this.name_);
                }
                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.tradeSession_);
                }
                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 getTradeSession() {
                return this.tradeSession_;
            }

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

            public boolean hasCode() {
                if ((this.bitField0_ & 2) != 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_ & 4) != 0) {
                    return true;
                }
                return false;
            }

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

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

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

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

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

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

            public StockInfo setTradeSession(int i10) {
                this.tradeSession_ = 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.code_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    codedOutputByteBufferNano.writeString(3, this.name_);
                }
                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.tradeSession_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public StockInfo 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.code_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 2;
                    } else if (readTag == 26) {
                        this.name_ = 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.tradeSession_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 32;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public BlockIndustryChain_Response() {
            clear();
        }

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

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

        public BlockIndustryChain_Response clear() {
            this.requestParams = null;
            this.industry = IndustryChainInfo.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            BlockIndustryChainRequest.BlockIndustryChain_Request blockIndustryChain_Request = this.requestParams;
            if (blockIndustryChain_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, blockIndustryChain_Request);
            }
            IndustryChainInfo[] industryChainInfoArr = this.industry;
            if (industryChainInfoArr != null && industryChainInfoArr.length > 0) {
                int i10 = 0;
                while (true) {
                    IndustryChainInfo[] industryChainInfoArr2 = this.industry;
                    if (i10 >= industryChainInfoArr2.length) {
                        break;
                    }
                    IndustryChainInfo industryChainInfo = industryChainInfoArr2[i10];
                    if (industryChainInfo != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, industryChainInfo);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            BlockIndustryChainRequest.BlockIndustryChain_Request blockIndustryChain_Request = this.requestParams;
            if (blockIndustryChain_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, blockIndustryChain_Request);
            }
            IndustryChainInfo[] industryChainInfoArr = this.industry;
            if (industryChainInfoArr != null && industryChainInfoArr.length > 0) {
                int i10 = 0;
                while (true) {
                    IndustryChainInfo[] industryChainInfoArr2 = this.industry;
                    if (i10 >= industryChainInfoArr2.length) {
                        break;
                    }
                    IndustryChainInfo industryChainInfo = industryChainInfoArr2[i10];
                    if (industryChainInfo != null) {
                        codedOutputByteBufferNano.writeMessage(2, industryChainInfo);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public BlockIndustryChain_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.requestParams == null) {
                        this.requestParams = new BlockIndustryChainRequest.BlockIndustryChain_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.requestParams);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    IndustryChainInfo[] industryChainInfoArr = this.industry;
                    int length = industryChainInfoArr == null ? 0 : industryChainInfoArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    IndustryChainInfo[] industryChainInfoArr2 = new IndustryChainInfo[i10];
                    if (length != 0) {
                        System.arraycopy(industryChainInfoArr, 0, industryChainInfoArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        IndustryChainInfo industryChainInfo = new IndustryChainInfo();
                        industryChainInfoArr2[length] = industryChainInfo;
                        codedInputByteBufferNano.readMessage(industryChainInfo);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    IndustryChainInfo industryChainInfo2 = new IndustryChainInfo();
                    industryChainInfoArr2[length] = industryChainInfo2;
                    codedInputByteBufferNano.readMessage(industryChainInfo2);
                    this.industry = industryChainInfoArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
