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;

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

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

        private static volatile RangeStatistics_Request[] _emptyArray;

        public market[] exchangeCategory;

        public field[] fieldId;

        public int[] goodsId;

        public int[] groupCode;

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

            private static volatile field[] _emptyArray;

            private int bitField0_;

            private int id_;

            private int limit_;

            private int type_;

            public field() {
                clear();
            }

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

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

            public field clear() {
                this.bitField0_ = 0;
                this.type_ = 0;
                this.limit_ = 0;
                this.id_ = 0;
                this.cachedSize = -1;
                return this;
            }

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

            public field clearLimit() {
                this.limit_ = 0;
                this.bitField0_ &= -3;
                return this;
            }

            public field clearType() {
                this.type_ = 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.type_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.limit_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeInt32Size(3, this.id_);
                }
                return computeSerializedSize;
            }

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

            public int getLimit() {
                return this.limit_;
            }

            public int getType() {
                return this.type_;
            }

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

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

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

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

            public field setLimit(int i10) {
                this.limit_ = i10;
                this.bitField0_ |= 2;
                return this;
            }

            public field setType(int i10) {
                this.type_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(1, this.type_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeUInt32(2, this.limit_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    codedOutputByteBufferNano.writeInt32(3, this.id_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public field mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.type_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 16) {
                        this.limit_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 2;
                    } else if (readTag == 24) {
                        this.id_ = codedInputByteBufferNano.readInt32();
                        this.bitField0_ |= 4;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

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

            private static volatile market[] _emptyArray;

            private int bitField0_;

            private long category_;

            private int exchange_;

            public market() {
                clear();
            }

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

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

            public market clear() {
                this.bitField0_ = 0;
                this.exchange_ = 0;
                this.category_ = 0;
                this.cachedSize = -1;
                return this;
            }

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

            public market clearExchange() {
                this.exchange_ = 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(5, this.exchange_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeUInt64Size(6, this.category_);
                }
                return computeSerializedSize;
            }

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

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

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

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

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

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

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(5, this.exchange_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeUInt64(6, this.category_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public market mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 40) {
                        this.exchange_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 48) {
                        this.category_ = codedInputByteBufferNano.readUInt64();
                        this.bitField0_ |= 2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public RangeStatistics_Request() {
            clear();
        }

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

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

        public RangeStatistics_Request clear() {
            this.exchangeCategory = market.emptyArray();
            int[] iArr = WireFormatNano.EMPTY_INT_ARRAY;
            this.groupCode = iArr;
            this.goodsId = iArr;
            this.fieldId = field.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int[] iArr;
            int[] iArr2;
            int computeSerializedSize = super.computeSerializedSize();
            market[] marketArr = this.exchangeCategory;
            int i10 = 0;
            if (marketArr != null && marketArr.length > 0) {
                int i11 = 0;
                while (true) {
                    market[] marketArr2 = this.exchangeCategory;
                    if (i11 >= marketArr2.length) {
                        break;
                    }
                    market market2 = marketArr2[i11];
                    if (market2 != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, market2);
                    }
                    i11++;
                }
            }
            int[] iArr3 = this.groupCode;
            if (iArr3 != null && iArr3.length > 0) {
                int i12 = 0;
                int i13 = 0;
                while (true) {
                    iArr2 = this.groupCode;
                    if (i12 >= iArr2.length) {
                        break;
                    }
                    i13 += CodedOutputByteBufferNano.computeUInt32SizeNoTag(iArr2[i12]);
                    i12++;
                }
                computeSerializedSize = computeSerializedSize + i13 + iArr2.length;
            }
            int[] iArr4 = this.goodsId;
            if (iArr4 != null && iArr4.length > 0) {
                int i14 = 0;
                int i15 = 0;
                while (true) {
                    iArr = this.goodsId;
                    if (i14 >= iArr.length) {
                        break;
                    }
                    i15 += CodedOutputByteBufferNano.computeUInt32SizeNoTag(iArr[i14]);
                    i14++;
                }
                computeSerializedSize = computeSerializedSize + i15 + iArr.length;
            }
            field[] fieldArr = this.fieldId;
            if (fieldArr != null && fieldArr.length > 0) {
                while (true) {
                    field[] fieldArr2 = this.fieldId;
                    if (i10 >= fieldArr2.length) {
                        break;
                    }
                    field field2 = fieldArr2[i10];
                    if (field2 != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(4, field2);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            market[] marketArr = this.exchangeCategory;
            int i10 = 0;
            if (marketArr != null && marketArr.length > 0) {
                int i11 = 0;
                while (true) {
                    market[] marketArr2 = this.exchangeCategory;
                    if (i11 >= marketArr2.length) {
                        break;
                    }
                    market market2 = marketArr2[i11];
                    if (market2 != null) {
                        codedOutputByteBufferNano.writeMessage(1, market2);
                    }
                    i11++;
                }
            }
            int[] iArr = this.groupCode;
            if (iArr != null && iArr.length > 0) {
                int i12 = 0;
                while (true) {
                    int[] iArr2 = this.groupCode;
                    if (i12 >= iArr2.length) {
                        break;
                    }
                    codedOutputByteBufferNano.writeUInt32(2, iArr2[i12]);
                    i12++;
                }
            }
            int[] iArr3 = this.goodsId;
            if (iArr3 != null && iArr3.length > 0) {
                int i13 = 0;
                while (true) {
                    int[] iArr4 = this.goodsId;
                    if (i13 >= iArr4.length) {
                        break;
                    }
                    codedOutputByteBufferNano.writeUInt32(3, iArr4[i13]);
                    i13++;
                }
            }
            field[] fieldArr = this.fieldId;
            if (fieldArr != null && fieldArr.length > 0) {
                while (true) {
                    field[] fieldArr2 = this.fieldId;
                    if (i10 >= fieldArr2.length) {
                        break;
                    }
                    field field2 = fieldArr2[i10];
                    if (field2 != null) {
                        codedOutputByteBufferNano.writeMessage(4, field2);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public RangeStatistics_Request 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);
                    market[] marketArr = this.exchangeCategory;
                    int length = marketArr == null ? 0 : marketArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    market[] marketArr2 = new market[i10];
                    if (length != 0) {
                        System.arraycopy(marketArr, 0, marketArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        market market2 = new market();
                        marketArr2[length] = market2;
                        codedInputByteBufferNano.readMessage(market2);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    market market3 = new market();
                    marketArr2[length] = market3;
                    codedInputByteBufferNano.readMessage(market3);
                    this.exchangeCategory = marketArr2;
                } else if (readTag == 16) {
                    int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 16);
                    int[] iArr = this.groupCode;
                    int length2 = iArr == null ? 0 : iArr.length;
                    int i11 = repeatedFieldArrayLength2 + length2;
                    int[] iArr2 = new int[i11];
                    if (length2 != 0) {
                        System.arraycopy(iArr, 0, iArr2, 0, length2);
                    }
                    while (length2 < i11 - 1) {
                        iArr2[length2] = codedInputByteBufferNano.readUInt32();
                        codedInputByteBufferNano.readTag();
                        length2++;
                    }
                    iArr2[length2] = codedInputByteBufferNano.readUInt32();
                    this.groupCode = iArr2;
                } else if (readTag == 18) {
                    int pushLimit = codedInputByteBufferNano.pushLimit(codedInputByteBufferNano.readRawVarint32());
                    int position = codedInputByteBufferNano.getPosition();
                    int i12 = 0;
                    while (codedInputByteBufferNano.getBytesUntilLimit() > 0) {
                        codedInputByteBufferNano.readUInt32();
                        i12++;
                    }
                    codedInputByteBufferNano.rewindToPosition(position);
                    int[] iArr3 = this.groupCode;
                    int length3 = iArr3 == null ? 0 : iArr3.length;
                    int i13 = i12 + length3;
                    int[] iArr4 = new int[i13];
                    if (length3 != 0) {
                        System.arraycopy(iArr3, 0, iArr4, 0, length3);
                    }
                    while (length3 < i13) {
                        iArr4[length3] = codedInputByteBufferNano.readUInt32();
                        length3++;
                    }
                    this.groupCode = iArr4;
                    codedInputByteBufferNano.popLimit(pushLimit);
                } else if (readTag == 24) {
                    int repeatedFieldArrayLength3 = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 24);
                    int[] iArr5 = this.goodsId;
                    int length4 = iArr5 == null ? 0 : iArr5.length;
                    int i14 = repeatedFieldArrayLength3 + length4;
                    int[] iArr6 = new int[i14];
                    if (length4 != 0) {
                        System.arraycopy(iArr5, 0, iArr6, 0, length4);
                    }
                    while (length4 < i14 - 1) {
                        iArr6[length4] = codedInputByteBufferNano.readUInt32();
                        codedInputByteBufferNano.readTag();
                        length4++;
                    }
                    iArr6[length4] = codedInputByteBufferNano.readUInt32();
                    this.goodsId = iArr6;
                } else if (readTag == 26) {
                    int pushLimit2 = codedInputByteBufferNano.pushLimit(codedInputByteBufferNano.readRawVarint32());
                    int position2 = codedInputByteBufferNano.getPosition();
                    int i15 = 0;
                    while (codedInputByteBufferNano.getBytesUntilLimit() > 0) {
                        codedInputByteBufferNano.readUInt32();
                        i15++;
                    }
                    codedInputByteBufferNano.rewindToPosition(position2);
                    int[] iArr7 = this.goodsId;
                    int length5 = iArr7 == null ? 0 : iArr7.length;
                    int i16 = i15 + length5;
                    int[] iArr8 = new int[i16];
                    if (length5 != 0) {
                        System.arraycopy(iArr7, 0, iArr8, 0, length5);
                    }
                    while (length5 < i16) {
                        iArr8[length5] = codedInputByteBufferNano.readUInt32();
                        length5++;
                    }
                    this.goodsId = iArr8;
                    codedInputByteBufferNano.popLimit(pushLimit2);
                } else if (readTag == 34) {
                    int repeatedFieldArrayLength4 = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 34);
                    field[] fieldArr = this.fieldId;
                    int length6 = fieldArr == null ? 0 : fieldArr.length;
                    int i17 = repeatedFieldArrayLength4 + length6;
                    field[] fieldArr2 = new field[i17];
                    if (length6 != 0) {
                        System.arraycopy(fieldArr, 0, fieldArr2, 0, length6);
                    }
                    while (length6 < i17 - 1) {
                        field field2 = new field();
                        fieldArr2[length6] = field2;
                        codedInputByteBufferNano.readMessage(field2);
                        codedInputByteBufferNano.readTag();
                        length6++;
                    }
                    field field3 = new field();
                    fieldArr2[length6] = field3;
                    codedInputByteBufferNano.readMessage(field3);
                    this.fieldId = fieldArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
