com.baidubce.services.tsdb.model
Class Filters

java.lang.Object
  extended by com.baidubce.services.tsdb.model.Filters

public class Filters
extends Object

Represent the filters for querying datapoints from Tsdb.


Constructor Summary
Filters()
           
 
Method Summary
 Filters addField(FieldFilter field)
          Add field filter to fields which just append not replace.
 Filters addField(String field, String value)
          Add field filter to fields which just append not replace.
 Filters addOr(Filters or)
          Add an or condition.
 Filters addTag(String tagKey, List<String> tagValues)
          Add tag to tags which just append not replace.
 Filters addTag(String tagKey, String... tagValues)
          Add tag to tags which just append not replace.
 Filters addTagFilter(TagFilter tagFilter)
           
 com.fasterxml.jackson.databind.JsonNode getEnd()
           
 List<FieldFilter> getFields()
           
 List<Filters> getOr()
           
 com.fasterxml.jackson.databind.JsonNode getStart()
           
 List<TagFilter> getTagFilters()
           
 Map<String,List<String>> getTags()
           
 com.fasterxml.jackson.databind.JsonNode getTagsJsonNode()
           
 String getValue()
           
 void setEnd(com.fasterxml.jackson.databind.JsonNode end)
           
 void setFields(List<FieldFilter> fields)
           
 void setOr(List<Filters> or)
           
 void setStart(com.fasterxml.jackson.databind.JsonNode start)
           
 void setTagFilters(List<TagFilter> tagFilters)
           
 void setTags(Map<String,List<String>> tags)
           
 void setTagsJsonNode(com.fasterxml.jackson.databind.JsonNode tags)
           
 void setValue(String value)
           
 Filters withAbsoluteEnd(long end)
          Set absolute end time.
 Filters withAbsoluteStart(long start)
          Set absolute start time.
 Filters withFields(List<FieldFilter> fields)
          Set field filters.
 Filters withOr(List<Filters> or)
           
 Filters withRelativeEnd(String end)
          Set relative end time, like "5 days ago", "2 minutes ago" or "3 seconds ago".
 Filters withRelativeStart(String start)
          Set relative start time, like "5 days ago", "2 minutes ago" or "3 seconds ago".
 Filters withTagFilters(List<TagFilter> tagFilters)
           
 Filters withTags(Map<String,List<String>> tags)
           
 Filters withValue(String value)
          Set value for filter.
 Filters withValue(ValueFilter value)
          Set value for filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Filters

public Filters()
Method Detail

getStart

public com.fasterxml.jackson.databind.JsonNode getStart()

setStart

public void setStart(com.fasterxml.jackson.databind.JsonNode start)

getEnd

public com.fasterxml.jackson.databind.JsonNode getEnd()

setEnd

public void setEnd(com.fasterxml.jackson.databind.JsonNode end)

getTags

public Map<String,List<String>> getTags()

setTags

public void setTags(Map<String,List<String>> tags)

getValue

public String getValue()

setValue

public void setValue(String value)

getFields

public List<FieldFilter> getFields()

setFields

public void setFields(List<FieldFilter> fields)

getOr

public List<Filters> getOr()

setOr

public void setOr(List<Filters> or)

getTagFilters

public List<TagFilter> getTagFilters()

setTagFilters

public void setTagFilters(List<TagFilter> tagFilters)

getTagsJsonNode

public com.fasterxml.jackson.databind.JsonNode getTagsJsonNode()

setTagsJsonNode

public void setTagsJsonNode(com.fasterxml.jackson.databind.JsonNode tags)
                     throws com.fasterxml.jackson.core.JsonProcessingException
Throws:
com.fasterxml.jackson.core.JsonProcessingException

withTagFilters

public Filters withTagFilters(List<TagFilter> tagFilters)

addTagFilter

public Filters addTagFilter(TagFilter tagFilter)

withValue

public Filters withValue(ValueFilter value)
Set value for filter.

Parameters:
value - The value for filter.
Returns:
Filters

withValue

public Filters withValue(String value)
Set value for filter.

Parameters:
value -
Returns:

withFields

public Filters withFields(List<FieldFilter> fields)
Set field filters.

Parameters:
fields - The field filters list.
Returns:
Filters

withAbsoluteStart

public Filters withAbsoluteStart(long start)
Set absolute start time.

Parameters:
start - The unit is millisecond.
Returns:
Filters

withRelativeStart

public Filters withRelativeStart(String start)
Set relative start time, like "5 days ago", "2 minutes ago" or "3 seconds ago".

Parameters:
start -
Returns:
Filters

withAbsoluteEnd

public Filters withAbsoluteEnd(long end)
Set absolute end time.

Parameters:
end - The unit is millisecond.
Returns:
Filters

withRelativeEnd

public Filters withRelativeEnd(String end)
Set relative end time, like "5 days ago", "2 minutes ago" or "3 seconds ago".

Parameters:
end -
Returns:
Filters

withTags

public Filters withTags(Map<String,List<String>> tags)

addField

public Filters addField(FieldFilter field)
Add field filter to fields which just append not replace.

Parameters:
field - The field filter
Returns:
Filters

addField

public Filters addField(String field,
                        String value)
Add field filter to fields which just append not replace.

Parameters:
field - The field name for filter
value - The value filter
Returns:
Filters

addTag

public Filters addTag(String tagKey,
                      List<String> tagValues)
Add tag to tags which just append not replace.

Parameters:
tagKey -
tagValues -
Returns:
Filters

addTag

public Filters addTag(String tagKey,
                      String... tagValues)
Add tag to tags which just append not replace.

Parameters:
tagKey -
tagValues -
Returns:
Filters

withOr

public Filters withOr(List<Filters> or)

addOr

public Filters addOr(Filters or)
Add an or condition.

Parameters:
or - an filters for or condition.
Returns:
Filters


Copyright © 2018. All rights reserved.