
com.alicloud.openservices.tablestore.model.timeseries.AttributeMetaQueryCondition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tablestore Show documentation
Show all versions of tablestore Show documentation
Aliyun Open Services SDK for Java Copyright (C) Alibaba Cloud Computing All rights reserved. 版权所有
(C)阿里云计算有限公司 http://www.aliyun.com
package com.alicloud.openservices.tablestore.model.timeseries;
import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries;
import com.alicloud.openservices.tablestore.core.utils.Preconditions;
import com.google.protobuf.ByteString;
public class AttributeMetaQueryCondition implements MetaQueryCondition {
private final MetaQuerySingleOperator operator;
private final String attributeName;
private final String value;
public AttributeMetaQueryCondition(MetaQuerySingleOperator operator, String attributeName, String value) {
Preconditions.checkNotNull(operator);
Preconditions.checkStringNotNullAndEmpty(attributeName, "tag name should not be null or empty");
Preconditions.checkNotNull(value);
this.operator = operator;
this.attributeName = attributeName;
this.value = value;
}
@Override
public Timeseries.MetaQueryConditionType getType() {
return Timeseries.MetaQueryConditionType.ATTRIBUTE_CONDITION;
}
@Override
public ByteString serialize() {
return Timeseries.MetaQueryAttributeCondition.newBuilder()
.setOp(operator.toPB())
.setAttrName(attributeName)
.setValue(value)
.build()
.toByteString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy