MetricSpecification Class
- java.
lang. Object - com.
azure. resourcemanager. webpubsub. models. MetricSpecification
- com.
Implements
public final class MetricSpecification
implements JsonSerializable<MetricSpecification>
Specifications of the Metrics for Azure Monitoring.
Constructor Summary
| Constructor | Description |
|---|---|
| MetricSpecification() |
Creates an instance of Metric |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| String |
aggregationType()
Get the aggregation |
| String |
category()
Get the category property: The name of the metric category that the metric belongs to. |
| List<Dimension> |
dimensions()
Get the dimensions property: The dimensions of the metrics. |
| String |
displayDescription()
Get the display |
| String |
displayName()
Get the display |
| String |
fillGapWithZero()
Get the fill |
|
static
Metric |
fromJson(JsonReader jsonReader)
Reads an instance of Metric |
| String |
name()
Get the name property: Name of the metric. |
|
Json |
toJson(JsonWriter jsonWriter) |
| String |
unit()
Get the unit property: The unit that makes sense for the metric. |
| void |
validate()
Validates the instance. |
|
Metric |
withAggregationType(String aggregationType)
Set the aggregation |
|
Metric |
withCategory(String category)
Set the category property: The name of the metric category that the metric belongs to. |
|
Metric |
withDimensions(List<Dimension> dimensions)
Set the dimensions property: The dimensions of the metrics. |
|
Metric |
withDisplayDescription(String displayDescription)
Set the display |
|
Metric |
withDisplayName(String displayName)
Set the display |
|
Metric |
withFillGapWithZero(String fillGapWithZero)
Set the fill |
|
Metric |
withName(String name)
Set the name property: Name of the metric. |
|
Metric |
withUnit(String unit)
Set the unit property: The unit that makes sense for the metric. |
Methods inherited from java.lang.Object
Constructor Details
MetricSpecification
public MetricSpecification()
Creates an instance of MetricSpecification class.
Method Details
aggregationType
public String aggregationType()
Get the aggregationType property: Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count.
Returns:
category
public String category()
Get the category property: The name of the metric category that the metric belongs to. A metric can only belong to a single category.
Returns:
dimensions
public List<Dimension> dimensions()
Get the dimensions property: The dimensions of the metrics.
Returns:
displayDescription
public String displayDescription()
Get the displayDescription property: Localized friendly description of the metric.
Returns:
displayName
public String displayName()
Get the displayName property: Localized friendly display name of the metric.
Returns:
fillGapWithZero
public String fillGapWithZero()
Get the fillGapWithZero property: Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. Ex. a metric that returns the number of times a particular error code was emitted. The error code may not appear often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where nothing was emitted.
Returns:
fromJson
public static MetricSpecification fromJson(JsonReader jsonReader)
Reads an instance of MetricSpecification from the JsonReader.
Parameters:
Returns:
Throws:
name
public String name()
Get the name property: Name of the metric.
Returns:
toJson
unit
public String unit()
Get the unit property: The unit that makes sense for the metric.
Returns:
validate
public void validate()
Validates the instance.
withAggregationType
public MetricSpecification withAggregationType(String aggregationType)
Set the aggregationType property: Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count.
Parameters:
Returns:
withCategory
public MetricSpecification withCategory(String category)
Set the category property: The name of the metric category that the metric belongs to. A metric can only belong to a single category.
Parameters:
Returns:
withDimensions
public MetricSpecification withDimensions(List<Dimension> dimensions)
Set the dimensions property: The dimensions of the metrics.
Parameters:
Returns:
withDisplayDescription
public MetricSpecification withDisplayDescription(String displayDescription)
Set the displayDescription property: Localized friendly description of the metric.
Parameters:
Returns:
withDisplayName
public MetricSpecification withDisplayName(String displayName)
Set the displayName property: Localized friendly display name of the metric.
Parameters:
Returns:
withFillGapWithZero
public MetricSpecification withFillGapWithZero(String fillGapWithZero)
Set the fillGapWithZero property: Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. Ex. a metric that returns the number of times a particular error code was emitted. The error code may not appear often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where nothing was emitted.
Parameters:
Returns:
withName
public MetricSpecification withName(String name)
Set the name property: Name of the metric.
Parameters:
Returns:
withUnit
public MetricSpecification withUnit(String unit)
Set the unit property: The unit that makes sense for the metric.
Parameters:
Returns: