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

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

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

        private static volatile RangeStatistics_Response[] _emptyArray;

        public RangeStatisticsRequest.RangeStatistics_Request inputParam;

        public Range_Statistics outputParam;

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

            private static volatile Range_Statistics[] _emptyArray;

            private int bitField0_;

            public Field_Statistics[] fieldCount;

            private int tradeDate_;

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

                private static volatile Field_Statistics[] _emptyArray;

                private int bitField0_;

                private int fieldId_;

                public Value_Statistics[] valueCount;

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

                    private static volatile Value_Statistics[] _emptyArray;

                    private int bitField0_;

                    private int count_;

                    private long value_;

                    public Value_Statistics() {
                        clear();
                    }

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

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

                    public Value_Statistics clear() {
                        this.bitField0_ = 0;
                        this.value_ = 0;
                        this.count_ = 0;
                        this.cachedSize = -1;
                        return this;
                    }

                    public Value_Statistics clearCount() {
                        this.count_ = 0;
                        this.bitField0_ &= -3;
                        return this;
                    }

                    public Value_Statistics clearValue() {
                        this.value_ = 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.computeInt64Size(1, this.value_);
                        }
                        if ((this.bitField0_ & 2) != 0) {
                            return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(2, this.count_);
                        }
                        return computeSerializedSize;
                    }

                    public int getCount() {
                        return this.count_;
                    }

                    public long getValue() {
                        return this.value_;
                    }

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

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

                    public Value_Statistics setCount(int i10) {
                        this.count_ = i10;
                        this.bitField0_ |= 2;
                        return this;
                    }

                    public Value_Statistics setValue(long j10) {
                        this.value_ = j10;
                        this.bitField0_ |= 1;
                        return this;
                    }

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

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

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

                public Field_Statistics() {
                    clear();
                }

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

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

                public Field_Statistics clear() {
                    this.bitField0_ = 0;
                    this.fieldId_ = 0;
                    this.valueCount = Value_Statistics.emptyArray();
                    this.cachedSize = -1;
                    return this;
                }

                public Field_Statistics clearFieldId() {
                    this.fieldId_ = 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.computeInt32Size(1, this.fieldId_);
                    }
                    Value_Statistics[] value_StatisticsArr = this.valueCount;
                    if (value_StatisticsArr != null && value_StatisticsArr.length > 0) {
                        int i10 = 0;
                        while (true) {
                            Value_Statistics[] value_StatisticsArr2 = this.valueCount;
                            if (i10 >= value_StatisticsArr2.length) {
                                break;
                            }
                            Value_Statistics value_Statistics = value_StatisticsArr2[i10];
                            if (value_Statistics != null) {
                                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, value_Statistics);
                            }
                            i10++;
                        }
                    }
                    return computeSerializedSize;
                }

                public int getFieldId() {
                    return this.fieldId_;
                }

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

                public Field_Statistics setFieldId(int i10) {
                    this.fieldId_ = i10;
                    this.bitField0_ |= 1;
                    return this;
                }

                public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                    if ((this.bitField0_ & 1) != 0) {
                        codedOutputByteBufferNano.writeInt32(1, this.fieldId_);
                    }
                    Value_Statistics[] value_StatisticsArr = this.valueCount;
                    if (value_StatisticsArr != null && value_StatisticsArr.length > 0) {
                        int i10 = 0;
                        while (true) {
                            Value_Statistics[] value_StatisticsArr2 = this.valueCount;
                            if (i10 >= value_StatisticsArr2.length) {
                                break;
                            }
                            Value_Statistics value_Statistics = value_StatisticsArr2[i10];
                            if (value_Statistics != null) {
                                codedOutputByteBufferNano.writeMessage(2, value_Statistics);
                            }
                            i10++;
                        }
                    }
                    super.writeTo(codedOutputByteBufferNano);
                }

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

                public Field_Statistics mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                    while (true) {
                        int readTag = codedInputByteBufferNano.readTag();
                        if (readTag == 0) {
                            return this;
                        }
                        if (readTag == 8) {
                            this.fieldId_ = codedInputByteBufferNano.readInt32();
                            this.bitField0_ |= 1;
                        } else if (readTag == 18) {
                            int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                            Value_Statistics[] value_StatisticsArr = this.valueCount;
                            int length = value_StatisticsArr == null ? 0 : value_StatisticsArr.length;
                            int i10 = repeatedFieldArrayLength + length;
                            Value_Statistics[] value_StatisticsArr2 = new Value_Statistics[i10];
                            if (length != 0) {
                                System.arraycopy(value_StatisticsArr, 0, value_StatisticsArr2, 0, length);
                            }
                            while (length < i10 - 1) {
                                Value_Statistics value_Statistics = new Value_Statistics();
                                value_StatisticsArr2[length] = value_Statistics;
                                codedInputByteBufferNano.readMessage(value_Statistics);
                                codedInputByteBufferNano.readTag();
                                length++;
                            }
                            Value_Statistics value_Statistics2 = new Value_Statistics();
                            value_StatisticsArr2[length] = value_Statistics2;
                            codedInputByteBufferNano.readMessage(value_Statistics2);
                            this.valueCount = value_StatisticsArr2;
                        } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                            return this;
                        }
                    }
                }
            }

            public Range_Statistics() {
                clear();
            }

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

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

            public Range_Statistics clear() {
                this.bitField0_ = 0;
                this.fieldCount = Field_Statistics.emptyArray();
                this.tradeDate_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public Range_Statistics clearTradeDate() {
                this.tradeDate_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                Field_Statistics[] field_StatisticsArr = this.fieldCount;
                if (field_StatisticsArr != null && field_StatisticsArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        Field_Statistics[] field_StatisticsArr2 = this.fieldCount;
                        if (i10 >= field_StatisticsArr2.length) {
                            break;
                        }
                        Field_Statistics field_Statistics = field_StatisticsArr2[i10];
                        if (field_Statistics != null) {
                            computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, field_Statistics);
                        }
                        i10++;
                    }
                }
                if ((this.bitField0_ & 1) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(4, this.tradeDate_);
                }
                return computeSerializedSize;
            }

            public int getTradeDate() {
                return this.tradeDate_;
            }

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

            public Range_Statistics setTradeDate(int i10) {
                this.tradeDate_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                Field_Statistics[] field_StatisticsArr = this.fieldCount;
                if (field_StatisticsArr != null && field_StatisticsArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        Field_Statistics[] field_StatisticsArr2 = this.fieldCount;
                        if (i10 >= field_StatisticsArr2.length) {
                            break;
                        }
                        Field_Statistics field_Statistics = field_StatisticsArr2[i10];
                        if (field_Statistics != null) {
                            codedOutputByteBufferNano.writeMessage(1, field_Statistics);
                        }
                        i10++;
                    }
                }
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(4, this.tradeDate_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public Range_Statistics 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);
                        Field_Statistics[] field_StatisticsArr = this.fieldCount;
                        int length = field_StatisticsArr == null ? 0 : field_StatisticsArr.length;
                        int i10 = repeatedFieldArrayLength + length;
                        Field_Statistics[] field_StatisticsArr2 = new Field_Statistics[i10];
                        if (length != 0) {
                            System.arraycopy(field_StatisticsArr, 0, field_StatisticsArr2, 0, length);
                        }
                        while (length < i10 - 1) {
                            Field_Statistics field_Statistics = new Field_Statistics();
                            field_StatisticsArr2[length] = field_Statistics;
                            codedInputByteBufferNano.readMessage(field_Statistics);
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        Field_Statistics field_Statistics2 = new Field_Statistics();
                        field_StatisticsArr2[length] = field_Statistics2;
                        codedInputByteBufferNano.readMessage(field_Statistics2);
                        this.fieldCount = field_StatisticsArr2;
                    } else if (readTag == 32) {
                        this.tradeDate_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public RangeStatistics_Response() {
            clear();
        }

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

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

        public RangeStatistics_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();
            RangeStatisticsRequest.RangeStatistics_Request rangeStatistics_Request = this.inputParam;
            if (rangeStatistics_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, rangeStatistics_Request);
            }
            Range_Statistics range_Statistics = this.outputParam;
            if (range_Statistics != null) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeMessageSize(2, range_Statistics);
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            RangeStatisticsRequest.RangeStatistics_Request rangeStatistics_Request = this.inputParam;
            if (rangeStatistics_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, rangeStatistics_Request);
            }
            Range_Statistics range_Statistics = this.outputParam;
            if (range_Statistics != null) {
                codedOutputByteBufferNano.writeMessage(2, range_Statistics);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

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