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 StrategySelectionRequest {

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

        private static volatile StrategySelection_Request[] _emptyArray;

        public int[] band;

        private int bitField0_;

        private int cpx_;

        private int days_;

        private int resonance_;

        public int[] value;

        public StrategySelection_Request() {
            clear();
        }

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

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

        public StrategySelection_Request clear() {
            this.bitField0_ = 0;
            int[] iArr = WireFormatNano.EMPTY_INT_ARRAY;
            this.value = iArr;
            this.band = iArr;
            this.days_ = 0;
            this.resonance_ = 0;
            this.cpx_ = 0;
            this.cachedSize = -1;
            return this;
        }

        public StrategySelection_Request clearCpx() {
            this.cpx_ = 0;
            this.bitField0_ &= -5;
            return this;
        }

        public StrategySelection_Request clearDays() {
            this.days_ = 0;
            this.bitField0_ &= -2;
            return this;
        }

        public StrategySelection_Request clearResonance() {
            this.resonance_ = 0;
            this.bitField0_ &= -3;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int[] iArr;
            int[] iArr2;
            int computeSerializedSize = super.computeSerializedSize();
            int[] iArr3 = this.value;
            int i10 = 0;
            if (iArr3 != null && iArr3.length > 0) {
                int i11 = 0;
                int i12 = 0;
                while (true) {
                    iArr2 = this.value;
                    if (i11 >= iArr2.length) {
                        break;
                    }
                    i12 += CodedOutputByteBufferNano.computeUInt32SizeNoTag(iArr2[i11]);
                    i11++;
                }
                computeSerializedSize = computeSerializedSize + i12 + iArr2.length;
            }
            int[] iArr4 = this.band;
            if (iArr4 != null && iArr4.length > 0) {
                int i13 = 0;
                while (true) {
                    iArr = this.band;
                    if (i10 >= iArr.length) {
                        break;
                    }
                    i13 += CodedOutputByteBufferNano.computeUInt32SizeNoTag(iArr[i10]);
                    i10++;
                }
                computeSerializedSize = computeSerializedSize + i13 + iArr.length;
            }
            if ((this.bitField0_ & 1) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.days_);
            }
            if ((this.bitField0_ & 2) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeInt32Size(4, this.resonance_);
            }
            if ((this.bitField0_ & 4) != 0) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(5, this.cpx_);
            }
            return computeSerializedSize;
        }

        public int getCpx() {
            return this.cpx_;
        }

        public int getDays() {
            return this.days_;
        }

        public int getResonance() {
            return this.resonance_;
        }

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

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

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

        public StrategySelection_Request setCpx(int i10) {
            this.cpx_ = i10;
            this.bitField0_ |= 4;
            return this;
        }

        public StrategySelection_Request setDays(int i10) {
            this.days_ = i10;
            this.bitField0_ |= 1;
            return this;
        }

        public StrategySelection_Request setResonance(int i10) {
            this.resonance_ = i10;
            this.bitField0_ |= 2;
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            int[] iArr = this.value;
            int i10 = 0;
            if (iArr != null && iArr.length > 0) {
                int i11 = 0;
                while (true) {
                    int[] iArr2 = this.value;
                    if (i11 >= iArr2.length) {
                        break;
                    }
                    codedOutputByteBufferNano.writeUInt32(1, iArr2[i11]);
                    i11++;
                }
            }
            int[] iArr3 = this.band;
            if (iArr3 != null && iArr3.length > 0) {
                while (true) {
                    int[] iArr4 = this.band;
                    if (i10 >= iArr4.length) {
                        break;
                    }
                    codedOutputByteBufferNano.writeUInt32(2, iArr4[i10]);
                    i10++;
                }
            }
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeUInt32(3, this.days_);
            }
            if ((this.bitField0_ & 2) != 0) {
                codedOutputByteBufferNano.writeInt32(4, this.resonance_);
            }
            if ((this.bitField0_ & 4) != 0) {
                codedOutputByteBufferNano.writeUInt32(5, this.cpx_);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public StrategySelection_Request mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 8) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 8);
                    int[] iArr = this.value;
                    int length = iArr == null ? 0 : iArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    int[] iArr2 = new int[i10];
                    if (length != 0) {
                        System.arraycopy(iArr, 0, iArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        iArr2[length] = codedInputByteBufferNano.readUInt32();
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    iArr2[length] = codedInputByteBufferNano.readUInt32();
                    this.value = iArr2;
                } else if (readTag == 10) {
                    int pushLimit = codedInputByteBufferNano.pushLimit(codedInputByteBufferNano.readRawVarint32());
                    int position = codedInputByteBufferNano.getPosition();
                    int i11 = 0;
                    while (codedInputByteBufferNano.getBytesUntilLimit() > 0) {
                        codedInputByteBufferNano.readUInt32();
                        i11++;
                    }
                    codedInputByteBufferNano.rewindToPosition(position);
                    int[] iArr3 = this.value;
                    int length2 = iArr3 == null ? 0 : iArr3.length;
                    int i12 = i11 + length2;
                    int[] iArr4 = new int[i12];
                    if (length2 != 0) {
                        System.arraycopy(iArr3, 0, iArr4, 0, length2);
                    }
                    while (length2 < i12) {
                        iArr4[length2] = codedInputByteBufferNano.readUInt32();
                        length2++;
                    }
                    this.value = iArr4;
                    codedInputByteBufferNano.popLimit(pushLimit);
                } else if (readTag == 16) {
                    int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 16);
                    int[] iArr5 = this.band;
                    int length3 = iArr5 == null ? 0 : iArr5.length;
                    int i13 = repeatedFieldArrayLength2 + length3;
                    int[] iArr6 = new int[i13];
                    if (length3 != 0) {
                        System.arraycopy(iArr5, 0, iArr6, 0, length3);
                    }
                    while (length3 < i13 - 1) {
                        iArr6[length3] = codedInputByteBufferNano.readUInt32();
                        codedInputByteBufferNano.readTag();
                        length3++;
                    }
                    iArr6[length3] = codedInputByteBufferNano.readUInt32();
                    this.band = iArr6;
                } else if (readTag == 18) {
                    int pushLimit2 = codedInputByteBufferNano.pushLimit(codedInputByteBufferNano.readRawVarint32());
                    int position2 = codedInputByteBufferNano.getPosition();
                    int i14 = 0;
                    while (codedInputByteBufferNano.getBytesUntilLimit() > 0) {
                        codedInputByteBufferNano.readUInt32();
                        i14++;
                    }
                    codedInputByteBufferNano.rewindToPosition(position2);
                    int[] iArr7 = this.band;
                    int length4 = iArr7 == null ? 0 : iArr7.length;
                    int i15 = i14 + length4;
                    int[] iArr8 = new int[i15];
                    if (length4 != 0) {
                        System.arraycopy(iArr7, 0, iArr8, 0, length4);
                    }
                    while (length4 < i15) {
                        iArr8[length4] = codedInputByteBufferNano.readUInt32();
                        length4++;
                    }
                    this.band = iArr8;
                    codedInputByteBufferNano.popLimit(pushLimit2);
                } else if (readTag == 24) {
                    this.days_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 1;
                } else if (readTag == 32) {
                    this.resonance_ = codedInputByteBufferNano.readInt32();
                    this.bitField0_ |= 2;
                } else if (readTag == 40) {
                    this.cpx_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 4;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
