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

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

        private static volatile TrendIndex_Request[] _emptyArray;

        private int bitField0_;

        private int dataFlag_;

        private int goodsId_;

        private String indexName_;

        public IndexParam[] indexParam;

        private int lastTime_;

        private int samplePoints_;

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

            private static volatile IndexParam[] _emptyArray;

            private int bitField0_;

            private String name_;

            private String value_;

            public IndexParam() {
                clear();
            }

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

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

            public IndexParam clear() {
                this.bitField0_ = 0;
                this.name_ = "";
                this.value_ = "";
                this.cachedSize = -1;
                return this;
            }

            public IndexParam clearName() {
                this.name_ = "";
                this.bitField0_ &= -2;
                return this;
            }

            public IndexParam clearValue() {
                this.value_ = "";
                this.bitField0_ &= -3;
                return this;
            }

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

            public String getName() {
                return this.name_;
            }

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

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

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

            public IndexParam setName(String str) {
                str.getClass();
                this.name_ = str;
                this.bitField0_ |= 1;
                return this;
            }

            public IndexParam setValue(String str) {
                str.getClass();
                this.value_ = str;
                this.bitField0_ |= 2;
                return this;
            }

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

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

            public IndexParam mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 10) {
                        this.name_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 1;
                    } else if (readTag == 18) {
                        this.value_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public TrendIndex_Request() {
            clear();
        }

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

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

        public TrendIndex_Request clear() {
            this.bitField0_ = 0;
            this.indexName_ = "";
            this.goodsId_ = 0;
            this.lastTime_ = 0;
            this.samplePoints_ = 0;
            this.dataFlag_ = 0;
            this.indexParam = IndexParam.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        public TrendIndex_Request clearDataFlag() {
            this.dataFlag_ = 0;
            this.bitField0_ &= -17;
            return this;
        }

        public TrendIndex_Request clearGoodsId() {
            this.goodsId_ = 0;
            this.bitField0_ &= -3;
            return this;
        }

        public TrendIndex_Request clearIndexName() {
            this.indexName_ = "";
            this.bitField0_ &= -2;
            return this;
        }

        public TrendIndex_Request clearLastTime() {
            this.lastTime_ = 0;
            this.bitField0_ &= -5;
            return this;
        }

        public TrendIndex_Request clearSamplePoints() {
            this.samplePoints_ = 0;
            this.bitField0_ &= -9;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            if ((this.bitField0_ & 1) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(1, this.indexName_);
            }
            if ((this.bitField0_ & 2) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.goodsId_);
            }
            if ((this.bitField0_ & 4) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.lastTime_);
            }
            if ((this.bitField0_ & 8) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(4, this.samplePoints_);
            }
            if ((this.bitField0_ & 16) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(5, this.dataFlag_);
            }
            IndexParam[] indexParamArr = this.indexParam;
            if (indexParamArr != null && indexParamArr.length > 0) {
                int i10 = 0;
                while (true) {
                    IndexParam[] indexParamArr2 = this.indexParam;
                    if (i10 >= indexParamArr2.length) {
                        break;
                    }
                    IndexParam indexParam2 = indexParamArr2[i10];
                    if (indexParam2 != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(6, indexParam2);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public int getDataFlag() {
            return this.dataFlag_;
        }

        public int getGoodsId() {
            return this.goodsId_;
        }

        public String getIndexName() {
            return this.indexName_;
        }

        public int getLastTime() {
            return this.lastTime_;
        }

        public int getSamplePoints() {
            return this.samplePoints_;
        }

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

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

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

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

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

        public TrendIndex_Request setDataFlag(int i10) {
            this.dataFlag_ = i10;
            this.bitField0_ |= 16;
            return this;
        }

        public TrendIndex_Request setGoodsId(int i10) {
            this.goodsId_ = i10;
            this.bitField0_ |= 2;
            return this;
        }

        public TrendIndex_Request setIndexName(String str) {
            str.getClass();
            this.indexName_ = str;
            this.bitField0_ |= 1;
            return this;
        }

        public TrendIndex_Request setLastTime(int i10) {
            this.lastTime_ = i10;
            this.bitField0_ |= 4;
            return this;
        }

        public TrendIndex_Request setSamplePoints(int i10) {
            this.samplePoints_ = i10;
            this.bitField0_ |= 8;
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeString(1, this.indexName_);
            }
            if ((this.bitField0_ & 2) != 0) {
                codedOutputByteBufferNano.writeUInt32(2, this.goodsId_);
            }
            if ((this.bitField0_ & 4) != 0) {
                codedOutputByteBufferNano.writeUInt32(3, this.lastTime_);
            }
            if ((this.bitField0_ & 8) != 0) {
                codedOutputByteBufferNano.writeUInt32(4, this.samplePoints_);
            }
            if ((this.bitField0_ & 16) != 0) {
                codedOutputByteBufferNano.writeUInt32(5, this.dataFlag_);
            }
            IndexParam[] indexParamArr = this.indexParam;
            if (indexParamArr != null && indexParamArr.length > 0) {
                int i10 = 0;
                while (true) {
                    IndexParam[] indexParamArr2 = this.indexParam;
                    if (i10 >= indexParamArr2.length) {
                        break;
                    }
                    IndexParam indexParam2 = indexParamArr2[i10];
                    if (indexParam2 != null) {
                        codedOutputByteBufferNano.writeMessage(6, indexParam2);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public TrendIndex_Request mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    this.indexName_ = codedInputByteBufferNano.readString();
                    this.bitField0_ |= 1;
                } else if (readTag == 16) {
                    this.goodsId_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 2;
                } else if (readTag == 24) {
                    this.lastTime_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 4;
                } else if (readTag == 32) {
                    this.samplePoints_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 8;
                } else if (readTag == 40) {
                    this.dataFlag_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 16;
                } else if (readTag == 50) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 50);
                    IndexParam[] indexParamArr = this.indexParam;
                    int length = indexParamArr == null ? 0 : indexParamArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    IndexParam[] indexParamArr2 = new IndexParam[i10];
                    if (length != 0) {
                        System.arraycopy(indexParamArr, 0, indexParamArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        IndexParam indexParam2 = new IndexParam();
                        indexParamArr2[length] = indexParam2;
                        codedInputByteBufferNano.readMessage(indexParam2);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    IndexParam indexParam3 = new IndexParam();
                    indexParamArr2[length] = indexParam3;
                    codedInputByteBufferNano.readMessage(indexParam3);
                    this.indexParam = indexParamArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
