Package eu.binjr.sources.netdata.api
Class Chart
- java.lang.Object
-
- eu.binjr.sources.netdata.api.Chart
-
public class Chart extends java.lang.ObjectChart
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classChart.ChartTypeEnumThe chart type.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSERIALIZED_NAME_CHART_TYPEstatic java.lang.StringSERIALIZED_NAME_DATA_URLstatic java.lang.StringSERIALIZED_NAME_DIMENSIONSstatic java.lang.StringSERIALIZED_NAME_DURATIONstatic java.lang.StringSERIALIZED_NAME_ENABLEDstatic java.lang.StringSERIALIZED_NAME_FAMILYstatic java.lang.StringSERIALIZED_NAME_FIRST_ENTRYstatic java.lang.StringSERIALIZED_NAME_GREENstatic java.lang.StringSERIALIZED_NAME_IDstatic java.lang.StringSERIALIZED_NAME_LAST_ENTRYstatic java.lang.StringSERIALIZED_NAME_NAMEstatic java.lang.StringSERIALIZED_NAME_PRIORITYstatic java.lang.StringSERIALIZED_NAME_REDstatic java.lang.StringSERIALIZED_NAME_TITLEstatic java.lang.StringSERIALIZED_NAME_TYPEstatic java.lang.StringSERIALIZED_NAME_UNITSstatic java.lang.StringSERIALIZED_NAME_UPDATE_EVERY
-
Constructor Summary
Constructors Constructor Description Chart()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChartchartType(Chart.ChartTypeEnum chartType)ChartdataUrl(java.lang.String dataUrl)Chartdimensions(java.util.Map<java.lang.String,ChartDimensions> dimensions)Chartduration(java.math.BigDecimal duration)Chartenabled(java.lang.Boolean enabled)booleanequals(java.lang.Object o)Chartfamily(java.lang.String family)ChartfirstEntry(java.math.BigDecimal firstEntry)Chart.ChartTypeEnumgetChartType()The chart type.java.lang.StringgetDataUrl()The absolute path to get data values for this chart.java.util.Map<java.lang.String,ChartDimensions>getDimensions()An object containing all the chart dimensions available for the chart.java.math.BigDecimalgetDuration()The duration, in seconds, of the round robin database maintained by netdata.java.lang.BooleangetEnabled()True when the chart is enabled.java.lang.StringgetFamily()The family of the chart.java.math.BigDecimalgetFirstEntry()The UNIX timestamp of the first entry (the oldest) in the round robin database.java.math.BigDecimalgetGreen()Chart health green threshold.java.lang.StringgetId()The unique id of the chart.java.math.BigDecimalgetLastEntry()The UNIX timestamp of the latest entry in the round robin database.java.lang.StringgetName()The name of the chart.java.math.BigDecimalgetPriority()The relative priority of the chart.java.math.BigDecimalgetRed()Chart health red threshold.java.lang.StringgetTitle()The title of the chart.java.lang.StringgetType()The type of the chart.java.lang.StringgetUnits()The unit of measurement for the values of all dimensions of the chart.java.math.BigDecimalgetUpdateEvery()The update frequency of this chart, in seconds.Chartgreen(java.math.BigDecimal green)inthashCode()Chartid(java.lang.String id)ChartlastEntry(java.math.BigDecimal lastEntry)Chartname(java.lang.String name)Chartpriority(java.math.BigDecimal priority)ChartputDimensionsItem(java.lang.String key, ChartDimensions dimensionsItem)Chartred(java.math.BigDecimal red)voidsetChartType(Chart.ChartTypeEnum chartType)voidsetDataUrl(java.lang.String dataUrl)voidsetDimensions(java.util.Map<java.lang.String,ChartDimensions> dimensions)voidsetDuration(java.math.BigDecimal duration)voidsetEnabled(java.lang.Boolean enabled)voidsetFamily(java.lang.String family)voidsetFirstEntry(java.math.BigDecimal firstEntry)voidsetGreen(java.math.BigDecimal green)voidsetId(java.lang.String id)voidsetLastEntry(java.math.BigDecimal lastEntry)voidsetName(java.lang.String name)voidsetPriority(java.math.BigDecimal priority)voidsetRed(java.math.BigDecimal red)voidsetTitle(java.lang.String title)voidsetType(java.lang.String type)voidsetUnits(java.lang.String units)voidsetUpdateEvery(java.math.BigDecimal updateEvery)Charttitle(java.lang.String title)java.lang.StringtoString()Charttype(java.lang.String type)Chartunits(java.lang.String units)ChartupdateEvery(java.math.BigDecimal updateEvery)
-
-
-
Field Detail
-
SERIALIZED_NAME_ID
public static final java.lang.String SERIALIZED_NAME_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_NAME
public static final java.lang.String SERIALIZED_NAME_NAME
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TYPE
public static final java.lang.String SERIALIZED_NAME_TYPE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FAMILY
public static final java.lang.String SERIALIZED_NAME_FAMILY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TITLE
public static final java.lang.String SERIALIZED_NAME_TITLE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PRIORITY
public static final java.lang.String SERIALIZED_NAME_PRIORITY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ENABLED
public static final java.lang.String SERIALIZED_NAME_ENABLED
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_UNITS
public static final java.lang.String SERIALIZED_NAME_UNITS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DATA_URL
public static final java.lang.String SERIALIZED_NAME_DATA_URL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CHART_TYPE
public static final java.lang.String SERIALIZED_NAME_CHART_TYPE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DURATION
public static final java.lang.String SERIALIZED_NAME_DURATION
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FIRST_ENTRY
public static final java.lang.String SERIALIZED_NAME_FIRST_ENTRY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_LAST_ENTRY
public static final java.lang.String SERIALIZED_NAME_LAST_ENTRY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_UPDATE_EVERY
public static final java.lang.String SERIALIZED_NAME_UPDATE_EVERY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DIMENSIONS
public static final java.lang.String SERIALIZED_NAME_DIMENSIONS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_GREEN
public static final java.lang.String SERIALIZED_NAME_GREEN
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_RED
public static final java.lang.String SERIALIZED_NAME_RED
- See Also:
- Constant Field Values
-
-
Method Detail
-
id
public Chart id(java.lang.String id)
-
getId
public java.lang.String getId()
The unique id of the chart.- Returns:
- id
-
setId
public void setId(java.lang.String id)
-
name
public Chart name(java.lang.String name)
-
getName
public java.lang.String getName()
The name of the chart.- Returns:
- name
-
setName
public void setName(java.lang.String name)
-
type
public Chart type(java.lang.String type)
-
getType
public java.lang.String getType()
The type of the chart. Types are not handled by netdata. You can use this field for anything you like.- Returns:
- type
-
setType
public void setType(java.lang.String type)
-
family
public Chart family(java.lang.String family)
-
getFamily
public java.lang.String getFamily()
The family of the chart. Families are not handled by netdata. You can use this field for anything you like.- Returns:
- family
-
setFamily
public void setFamily(java.lang.String family)
-
title
public Chart title(java.lang.String title)
-
getTitle
public java.lang.String getTitle()
The title of the chart.- Returns:
- title
-
setTitle
public void setTitle(java.lang.String title)
-
priority
public Chart priority(java.math.BigDecimal priority)
-
getPriority
public java.math.BigDecimal getPriority()
The relative priority of the chart. NetData does not care about priorities. This is just an indication of importance for the chart viewers to sort charts of higher priority (lower number) closer to the top. Priority sorting should only be used among charts of the same type or family.- Returns:
- priority
-
setPriority
public void setPriority(java.math.BigDecimal priority)
-
enabled
public Chart enabled(java.lang.Boolean enabled)
-
getEnabled
public java.lang.Boolean getEnabled()
True when the chart is enabled. Disabled charts do not currently collect values, but they may have historical values available.- Returns:
- enabled
-
setEnabled
public void setEnabled(java.lang.Boolean enabled)
-
units
public Chart units(java.lang.String units)
-
getUnits
public java.lang.String getUnits()
The unit of measurement for the values of all dimensions of the chart.- Returns:
- units
-
setUnits
public void setUnits(java.lang.String units)
-
dataUrl
public Chart dataUrl(java.lang.String dataUrl)
-
getDataUrl
public java.lang.String getDataUrl()
The absolute path to get data values for this chart. You are expected to use this path as the base when constructing the URL to fetch data values for this chart.- Returns:
- dataUrl
-
setDataUrl
public void setDataUrl(java.lang.String dataUrl)
-
chartType
public Chart chartType(Chart.ChartTypeEnum chartType)
-
getChartType
public Chart.ChartTypeEnum getChartType()
The chart type.- Returns:
- chartType
-
setChartType
public void setChartType(Chart.ChartTypeEnum chartType)
-
duration
public Chart duration(java.math.BigDecimal duration)
-
getDuration
public java.math.BigDecimal getDuration()
The duration, in seconds, of the round robin database maintained by netdata.- Returns:
- duration
-
setDuration
public void setDuration(java.math.BigDecimal duration)
-
firstEntry
public Chart firstEntry(java.math.BigDecimal firstEntry)
-
getFirstEntry
public java.math.BigDecimal getFirstEntry()
The UNIX timestamp of the first entry (the oldest) in the round robin database.- Returns:
- firstEntry
-
setFirstEntry
public void setFirstEntry(java.math.BigDecimal firstEntry)
-
lastEntry
public Chart lastEntry(java.math.BigDecimal lastEntry)
-
getLastEntry
public java.math.BigDecimal getLastEntry()
The UNIX timestamp of the latest entry in the round robin database.- Returns:
- lastEntry
-
setLastEntry
public void setLastEntry(java.math.BigDecimal lastEntry)
-
updateEvery
public Chart updateEvery(java.math.BigDecimal updateEvery)
-
getUpdateEvery
public java.math.BigDecimal getUpdateEvery()
The update frequency of this chart, in seconds. One value every this amount of time is kept in the round robin database.- Returns:
- updateEvery
-
setUpdateEvery
public void setUpdateEvery(java.math.BigDecimal updateEvery)
-
dimensions
public Chart dimensions(java.util.Map<java.lang.String,ChartDimensions> dimensions)
-
putDimensionsItem
public Chart putDimensionsItem(java.lang.String key, ChartDimensions dimensionsItem)
-
getDimensions
public java.util.Map<java.lang.String,ChartDimensions> getDimensions()
An object containing all the chart dimensions available for the chart. This is used as an indexed array. For each pair in the dictionary: the key is the id of the dimension and the value is a dictionary containing the name.- Returns:
- dimensions
-
setDimensions
public void setDimensions(java.util.Map<java.lang.String,ChartDimensions> dimensions)
-
green
public Chart green(java.math.BigDecimal green)
-
getGreen
public java.math.BigDecimal getGreen()
Chart health green threshold.- Returns:
- green
-
setGreen
public void setGreen(java.math.BigDecimal green)
-
red
public Chart red(java.math.BigDecimal red)
-
getRed
public java.math.BigDecimal getRed()
Chart health red threshold.- Returns:
- red
-
setRed
public void setRed(java.math.BigDecimal red)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-