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

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

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

        private static volatile MinuteData_Response[] _emptyArray;

        public MinuteDataRequest.MinuteData_Request input;

        public MinuteLine output;

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

            private static volatile MinuteLine[] _emptyArray;

            public MinutePoint[] line;

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

                private static volatile MinutePoint[] _emptyArray;

                private int bitField0_;

                private int price_;

                private int time_;

                private int trade_;

                private long volume_;

                public MinutePoint() {
                    clear();
                }

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

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

                public MinutePoint clear() {
                    this.bitField0_ = 0;
                    this.time_ = 0;
                    this.price_ = 0;
                    this.volume_ = 0;
                    this.trade_ = 0;
                    this.cachedSize = -1;
                    return this;
                }

                public MinutePoint clearPrice() {
                    this.price_ = 0;
                    this.bitField0_ &= -3;
                    return this;
                }

                public MinutePoint clearTime() {
                    this.time_ = 0;
                    this.bitField0_ &= -2;
                    return this;
                }

                public MinutePoint clearTrade() {
                    this.trade_ = 0;
                    this.bitField0_ &= -9;
                    return this;
                }

                public MinutePoint clearVolume() {
                    this.volume_ = 0;
                    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.time_);
                    }
                    if ((this.bitField0_ & 2) != 0) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.price_);
                    }
                    if ((this.bitField0_ & 4) != 0) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeUInt64Size(3, this.volume_);
                    }
                    if ((this.bitField0_ & 8) != 0) {
                        return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(4, this.trade_);
                    }
                    return computeSerializedSize;
                }

                public int getPrice() {
                    return this.price_;
                }

                public int getTime() {
                    return this.time_;
                }

                public int getTrade() {
                    return this.trade_;
                }

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

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

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

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

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

                public MinutePoint setPrice(int i10) {
                    this.price_ = i10;
                    this.bitField0_ |= 2;
                    return this;
                }

                public MinutePoint setTime(int i10) {
                    this.time_ = i10;
                    this.bitField0_ |= 1;
                    return this;
                }

                public MinutePoint setTrade(int i10) {
                    this.trade_ = i10;
                    this.bitField0_ |= 8;
                    return this;
                }

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

                public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                    if ((this.bitField0_ & 1) != 0) {
                        codedOutputByteBufferNano.writeUInt32(1, this.time_);
                    }
                    if ((this.bitField0_ & 2) != 0) {
                        codedOutputByteBufferNano.writeUInt32(2, this.price_);
                    }
                    if ((this.bitField0_ & 4) != 0) {
                        codedOutputByteBufferNano.writeUInt64(3, this.volume_);
                    }
                    if ((this.bitField0_ & 8) != 0) {
                        codedOutputByteBufferNano.writeUInt32(4, this.trade_);
                    }
                    super.writeTo(codedOutputByteBufferNano);
                }

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

                public MinutePoint mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                    while (true) {
                        int readTag = codedInputByteBufferNano.readTag();
                        if (readTag == 0) {
                            return this;
                        }
                        if (readTag == 8) {
                            this.time_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 1;
                        } else if (readTag == 16) {
                            this.price_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 2;
                        } else if (readTag == 24) {
                            this.volume_ = codedInputByteBufferNano.readUInt64();
                            this.bitField0_ |= 4;
                        } else if (readTag == 32) {
                            this.trade_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 8;
                        } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                            return this;
                        }
                    }
                }
            }

            public MinuteLine() {
                clear();
            }

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

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

            public MinuteLine clear() {
                this.line = MinutePoint.emptyArray();
                this.cachedSize = -1;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                MinutePoint[] minutePointArr = this.line;
                if (minutePointArr != null && minutePointArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        MinutePoint[] minutePointArr2 = this.line;
                        if (i10 >= minutePointArr2.length) {
                            break;
                        }
                        MinutePoint minutePoint = minutePointArr2[i10];
                        if (minutePoint != null) {
                            computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, minutePoint);
                        }
                        i10++;
                    }
                }
                return computeSerializedSize;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                MinutePoint[] minutePointArr = this.line;
                if (minutePointArr != null && minutePointArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        MinutePoint[] minutePointArr2 = this.line;
                        if (i10 >= minutePointArr2.length) {
                            break;
                        }
                        MinutePoint minutePoint = minutePointArr2[i10];
                        if (minutePoint != null) {
                            codedOutputByteBufferNano.writeMessage(1, minutePoint);
                        }
                        i10++;
                    }
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public MinuteLine 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);
                        MinutePoint[] minutePointArr = this.line;
                        int length = minutePointArr == null ? 0 : minutePointArr.length;
                        int i10 = repeatedFieldArrayLength + length;
                        MinutePoint[] minutePointArr2 = new MinutePoint[i10];
                        if (length != 0) {
                            System.arraycopy(minutePointArr, 0, minutePointArr2, 0, length);
                        }
                        while (length < i10 - 1) {
                            MinutePoint minutePoint = new MinutePoint();
                            minutePointArr2[length] = minutePoint;
                            codedInputByteBufferNano.readMessage(minutePoint);
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        MinutePoint minutePoint2 = new MinutePoint();
                        minutePointArr2[length] = minutePoint2;
                        codedInputByteBufferNano.readMessage(minutePoint2);
                        this.line = minutePointArr2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public MinuteData_Response() {
            clear();
        }

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

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

        public MinuteData_Response clear() {
            this.input = null;
            this.output = null;
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            MinuteDataRequest.MinuteData_Request minuteData_Request = this.input;
            if (minuteData_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, minuteData_Request);
            }
            MinuteLine minuteLine = this.output;
            if (minuteLine != null) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeMessageSize(2, minuteLine);
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            MinuteDataRequest.MinuteData_Request minuteData_Request = this.input;
            if (minuteData_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, minuteData_Request);
            }
            MinuteLine minuteLine = this.output;
            if (minuteLine != null) {
                codedOutputByteBufferNano.writeMessage(2, minuteLine);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public MinuteData_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.input == null) {
                        this.input = new MinuteDataRequest.MinuteData_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.input);
                } else if (readTag == 18) {
                    if (this.output == null) {
                        this.output = new MinuteLine();
                    }
                    codedInputByteBufferNano.readMessage(this.output);
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
