public final class MetricSettings extends Object
| Constructor and Description |
|---|
MetricSettings() |
| Modifier and Type | Method and Description |
|---|---|
String |
category()
Get the category property: Name of a Diagnostic Metric category for a resource type this setting is applied to.
|
boolean |
enabled()
Get the enabled property: a value indicating whether this category is enabled.
|
RetentionPolicy |
retentionPolicy()
Get the retentionPolicy property: the retention policy for this category.
|
Duration |
timeGrain()
Get the timeGrain property: the timegrain of the metric in ISO8601 format.
|
void |
validate()
Validates the instance.
|
MetricSettings |
withCategory(String category)
Set the category property: Name of a Diagnostic Metric category for a resource type this setting is applied to.
|
MetricSettings |
withEnabled(boolean enabled)
Set the enabled property: a value indicating whether this category is enabled.
|
MetricSettings |
withRetentionPolicy(RetentionPolicy retentionPolicy)
Set the retentionPolicy property: the retention policy for this category.
|
MetricSettings |
withTimeGrain(Duration timeGrain)
Set the timeGrain property: the timegrain of the metric in ISO8601 format.
|
public Duration timeGrain()
public MetricSettings withTimeGrain(Duration timeGrain)
timeGrain - the timeGrain value to set.public String category()
public MetricSettings withCategory(String category)
category - the category value to set.public boolean enabled()
public MetricSettings withEnabled(boolean enabled)
enabled - the enabled value to set.public RetentionPolicy retentionPolicy()
public MetricSettings withRetentionPolicy(RetentionPolicy retentionPolicy)
retentionPolicy - the retentionPolicy value to set.public void validate()
IllegalArgumentException - thrown if the instance is not valid.Copyright © 2020 Microsoft Corporation. All rights reserved.