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

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

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

        private static volatile StrongStockBlockHisData_Response[] _emptyArray;

        public Detail[] dataList;

        public StrongStockBlockHisDataRequest.StrongStockBlockHisData_Request requestParams;

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

            private static volatile Detail[] _emptyArray;

            private int bitField0_;

            private long category_;

            private String code_;

            private int dataType_;

            private int exchange_;

            public long[] fieldValues;

            private int id_;

            private String name_;

            public Detail() {
                clear();
            }

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

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

            public Detail clear() {
                this.bitField0_ = 0;
                this.id_ = 0;
                this.code_ = "";
                this.name_ = "";
                this.exchange_ = 0;
                this.category_ = 0;
                this.dataType_ = 0;
                this.fieldValues = WireFormatNano.EMPTY_LONG_ARRAY;
                this.cachedSize = -1;
                return this;
            }

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

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

            public Detail clearDataType() {
                this.dataType_ = 0;
                this.bitField0_ &= -33;
                return this;
            }

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

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

            public Detail clearName() {
                this.name_ = "";
                this.bitField0_ &= -5;
                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) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeInt32Size(6, this.dataType_);
                }
                long[] jArr = this.fieldValues;
                if (jArr == null || jArr.length <= 0) {
                    return computeSerializedSize;
                }
                int i10 = 0;
                int i11 = 0;
                while (true) {
                    long[] jArr2 = this.fieldValues;
                    if (i10 >= jArr2.length) {
                        return computeSerializedSize + i11 + jArr2.length;
                    }
                    i11 += CodedOutputByteBufferNano.computeInt64SizeNoTag(jArr2[i10]);
                    i10++;
                }
            }

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

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

            public int getDataType() {
                return this.dataType_;
            }

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

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

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

            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 hasDataType() {
                if ((this.bitField0_ & 32) != 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 Detail setCategory(long j10) {
                this.category_ = j10;
                this.bitField0_ |= 16;
                return this;
            }

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

            public Detail setDataType(int i10) {
                this.dataType_ = i10;
                this.bitField0_ |= 32;
                return this;
            }

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

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

            public Detail setName(String str) {
                str.getClass();
                this.name_ = str;
                this.bitField0_ |= 4;
                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.writeInt32(6, this.dataType_);
                }
                long[] jArr = this.fieldValues;
                if (jArr != null && jArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        long[] jArr2 = this.fieldValues;
                        if (i10 >= jArr2.length) {
                            break;
                        }
                        codedOutputByteBufferNano.writeInt64(7, jArr2[i10]);
                        i10++;
                    }
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public Detail 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) {
                        int readInt32 = codedInputByteBufferNano.readInt32();
                        if (readInt32 == 0 || readInt32 == 1 || readInt32 == 2 || readInt32 == 4 || readInt32 == 8) {
                            this.dataType_ = readInt32;
                            this.bitField0_ |= 32;
                        }
                    } else if (readTag == 56) {
                        int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 56);
                        long[] jArr = this.fieldValues;
                        int length = jArr == null ? 0 : jArr.length;
                        int i10 = repeatedFieldArrayLength + length;
                        long[] jArr2 = new long[i10];
                        if (length != 0) {
                            System.arraycopy(jArr, 0, jArr2, 0, length);
                        }
                        while (length < i10 - 1) {
                            jArr2[length] = codedInputByteBufferNano.readInt64();
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        jArr2[length] = codedInputByteBufferNano.readInt64();
                        this.fieldValues = jArr2;
                    } else if (readTag == 58) {
                        int pushLimit = codedInputByteBufferNano.pushLimit(codedInputByteBufferNano.readRawVarint32());
                        int position = codedInputByteBufferNano.getPosition();
                        int i11 = 0;
                        while (codedInputByteBufferNano.getBytesUntilLimit() > 0) {
                            codedInputByteBufferNano.readInt64();
                            i11++;
                        }
                        codedInputByteBufferNano.rewindToPosition(position);
                        long[] jArr3 = this.fieldValues;
                        int length2 = jArr3 == null ? 0 : jArr3.length;
                        int i12 = i11 + length2;
                        long[] jArr4 = new long[i12];
                        if (length2 != 0) {
                            System.arraycopy(jArr3, 0, jArr4, 0, length2);
                        }
                        while (length2 < i12) {
                            jArr4[length2] = codedInputByteBufferNano.readInt64();
                            length2++;
                        }
                        this.fieldValues = jArr4;
                        codedInputByteBufferNano.popLimit(pushLimit);
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public StrongStockBlockHisData_Response() {
            clear();
        }

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

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

        public StrongStockBlockHisData_Response clear() {
            this.dataList = Detail.emptyArray();
            this.requestParams = null;
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            Detail[] detailArr = this.dataList;
            if (detailArr != null && detailArr.length > 0) {
                int i10 = 0;
                while (true) {
                    Detail[] detailArr2 = this.dataList;
                    if (i10 >= detailArr2.length) {
                        break;
                    }
                    Detail detail = detailArr2[i10];
                    if (detail != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, detail);
                    }
                    i10++;
                }
            }
            StrongStockBlockHisDataRequest.StrongStockBlockHisData_Request strongStockBlockHisData_Request = this.requestParams;
            if (strongStockBlockHisData_Request != null) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeMessageSize(2, strongStockBlockHisData_Request);
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            Detail[] detailArr = this.dataList;
            if (detailArr != null && detailArr.length > 0) {
                int i10 = 0;
                while (true) {
                    Detail[] detailArr2 = this.dataList;
                    if (i10 >= detailArr2.length) {
                        break;
                    }
                    Detail detail = detailArr2[i10];
                    if (detail != null) {
                        codedOutputByteBufferNano.writeMessage(1, detail);
                    }
                    i10++;
                }
            }
            StrongStockBlockHisDataRequest.StrongStockBlockHisData_Request strongStockBlockHisData_Request = this.requestParams;
            if (strongStockBlockHisData_Request != null) {
                codedOutputByteBufferNano.writeMessage(2, strongStockBlockHisData_Request);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public StrongStockBlockHisData_Response 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);
                    Detail[] detailArr = this.dataList;
                    int length = detailArr == null ? 0 : detailArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    Detail[] detailArr2 = new Detail[i10];
                    if (length != 0) {
                        System.arraycopy(detailArr, 0, detailArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        Detail detail = new Detail();
                        detailArr2[length] = detail;
                        codedInputByteBufferNano.readMessage(detail);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    Detail detail2 = new Detail();
                    detailArr2[length] = detail2;
                    codedInputByteBufferNano.readMessage(detail2);
                    this.dataList = detailArr2;
                } else if (readTag == 18) {
                    if (this.requestParams == null) {
                        this.requestParams = new StrongStockBlockHisDataRequest.StrongStockBlockHisData_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.requestParams);
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
