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

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

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

        private static volatile NorthHistoryTurnover_Response[] _emptyArray;

        public PricePoint[] indexClosePrice;

        public VolumePoint[] northVolume;

        public NorthHistoryTurnoverRequest.NorthHistoryTurnover_Request request;

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

            private static volatile PricePoint[] _emptyArray;

            private int bitField0_;

            private int closePrice_;

            private int date_;

            public PricePoint() {
                clear();
            }

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

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

            public PricePoint clear() {
                this.bitField0_ = 0;
                this.date_ = 0;
                this.closePrice_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public PricePoint clearClosePrice() {
                this.closePrice_ = 0;
                this.bitField0_ &= -3;
                return this;
            }

            public PricePoint clearDate() {
                this.date_ = 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.date_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(2, this.closePrice_);
                }
                return computeSerializedSize;
            }

            public int getClosePrice() {
                return this.closePrice_;
            }

            public int getDate() {
                return this.date_;
            }

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

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

            public PricePoint setClosePrice(int i10) {
                this.closePrice_ = i10;
                this.bitField0_ |= 2;
                return this;
            }

            public PricePoint setDate(int i10) {
                this.date_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(1, this.date_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeUInt32(2, this.closePrice_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public PricePoint mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.date_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 16) {
                        this.closePrice_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

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

            private static volatile VolumePoint[] _emptyArray;

            private int bitField0_;

            private int date_;

            private long volume_;

            public VolumePoint() {
                clear();
            }

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

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

            public VolumePoint clear() {
                this.bitField0_ = 0;
                this.date_ = 0;
                this.volume_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public VolumePoint clearDate() {
                this.date_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

            public VolumePoint clearVolume() {
                this.volume_ = 0;
                this.bitField0_ &= -3;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(1, this.date_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeInt64Size(2, this.volume_);
                }
                return computeSerializedSize;
            }

            public int getDate() {
                return this.date_;
            }

            public long getVolume() {
                return this.volume_;
            }

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

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

            public VolumePoint setDate(int i10) {
                this.date_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public VolumePoint setVolume(long j10) {
                this.volume_ = j10;
                this.bitField0_ |= 2;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(1, this.date_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeInt64(2, this.volume_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public VolumePoint mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.date_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 16) {
                        this.volume_ = codedInputByteBufferNano.readInt64();
                        this.bitField0_ |= 2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public NorthHistoryTurnover_Response() {
            clear();
        }

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

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

        public NorthHistoryTurnover_Response clear() {
            this.request = null;
            this.northVolume = VolumePoint.emptyArray();
            this.indexClosePrice = PricePoint.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            NorthHistoryTurnoverRequest.NorthHistoryTurnover_Request northHistoryTurnover_Request = this.request;
            if (northHistoryTurnover_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, northHistoryTurnover_Request);
            }
            VolumePoint[] volumePointArr = this.northVolume;
            int i10 = 0;
            if (volumePointArr != null && volumePointArr.length > 0) {
                int i11 = 0;
                while (true) {
                    VolumePoint[] volumePointArr2 = this.northVolume;
                    if (i11 >= volumePointArr2.length) {
                        break;
                    }
                    VolumePoint volumePoint = volumePointArr2[i11];
                    if (volumePoint != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, volumePoint);
                    }
                    i11++;
                }
            }
            PricePoint[] pricePointArr = this.indexClosePrice;
            if (pricePointArr != null && pricePointArr.length > 0) {
                while (true) {
                    PricePoint[] pricePointArr2 = this.indexClosePrice;
                    if (i10 >= pricePointArr2.length) {
                        break;
                    }
                    PricePoint pricePoint = pricePointArr2[i10];
                    if (pricePoint != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(3, pricePoint);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            NorthHistoryTurnoverRequest.NorthHistoryTurnover_Request northHistoryTurnover_Request = this.request;
            if (northHistoryTurnover_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, northHistoryTurnover_Request);
            }
            VolumePoint[] volumePointArr = this.northVolume;
            int i10 = 0;
            if (volumePointArr != null && volumePointArr.length > 0) {
                int i11 = 0;
                while (true) {
                    VolumePoint[] volumePointArr2 = this.northVolume;
                    if (i11 >= volumePointArr2.length) {
                        break;
                    }
                    VolumePoint volumePoint = volumePointArr2[i11];
                    if (volumePoint != null) {
                        codedOutputByteBufferNano.writeMessage(2, volumePoint);
                    }
                    i11++;
                }
            }
            PricePoint[] pricePointArr = this.indexClosePrice;
            if (pricePointArr != null && pricePointArr.length > 0) {
                while (true) {
                    PricePoint[] pricePointArr2 = this.indexClosePrice;
                    if (i10 >= pricePointArr2.length) {
                        break;
                    }
                    PricePoint pricePoint = pricePointArr2[i10];
                    if (pricePoint != null) {
                        codedOutputByteBufferNano.writeMessage(3, pricePoint);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public NorthHistoryTurnover_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.request == null) {
                        this.request = new NorthHistoryTurnoverRequest.NorthHistoryTurnover_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.request);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    VolumePoint[] volumePointArr = this.northVolume;
                    int length = volumePointArr == null ? 0 : volumePointArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    VolumePoint[] volumePointArr2 = new VolumePoint[i10];
                    if (length != 0) {
                        System.arraycopy(volumePointArr, 0, volumePointArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        VolumePoint volumePoint = new VolumePoint();
                        volumePointArr2[length] = volumePoint;
                        codedInputByteBufferNano.readMessage(volumePoint);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    VolumePoint volumePoint2 = new VolumePoint();
                    volumePointArr2[length] = volumePoint2;
                    codedInputByteBufferNano.readMessage(volumePoint2);
                    this.northVolume = volumePointArr2;
                } else if (readTag == 26) {
                    int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 26);
                    PricePoint[] pricePointArr = this.indexClosePrice;
                    int length2 = pricePointArr == null ? 0 : pricePointArr.length;
                    int i11 = repeatedFieldArrayLength2 + length2;
                    PricePoint[] pricePointArr2 = new PricePoint[i11];
                    if (length2 != 0) {
                        System.arraycopy(pricePointArr, 0, pricePointArr2, 0, length2);
                    }
                    while (length2 < i11 - 1) {
                        PricePoint pricePoint = new PricePoint();
                        pricePointArr2[length2] = pricePoint;
                        codedInputByteBufferNano.readMessage(pricePoint);
                        codedInputByteBufferNano.readTag();
                        length2++;
                    }
                    PricePoint pricePoint2 = new PricePoint();
                    pricePointArr2[length2] = pricePoint2;
                    codedInputByteBufferNano.readMessage(pricePoint2);
                    this.indexClosePrice = pricePointArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
