Class MetricSpecification
java.lang.Object
com.azure.resourcemanager.keyvault.models.MetricSpecification
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MetricSpecification>
public final class MetricSpecification
extends Object
implements com.azure.json.JsonSerializable<MetricSpecification>
Metric specification of operation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the aggregationType property: The metric aggregation type.Get the dimensions property: The dimensions of metric.Get the displayDescription property: Display description of metric specification.Get the displayName property: Display name of metric specification.Get the fillGapWithZero property: Property to specify whether to fill gap with zero.static MetricSpecificationfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of MetricSpecification from the JsonReader.Get the internalMetricName property: The internal metric name.Get the lockAggregationType property: The metric lock aggregation type.name()Get the name property: Name of metric specification.Get the supportedAggregationTypes property: The supported aggregation types for the metrics.Get the supportedTimeGrainTypes property: The supported time grain types for the metrics.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) unit()Get the unit property: The metric unit.voidvalidate()Validates the instance.withAggregationType(String aggregationType) Set the aggregationType property: The metric aggregation type.withDimensions(List<DimensionProperties> dimensions) Set the dimensions property: The dimensions of metric.withDisplayDescription(String displayDescription) Set the displayDescription property: Display description of metric specification.withDisplayName(String displayName) Set the displayName property: Display name of metric specification.withFillGapWithZero(Boolean fillGapWithZero) Set the fillGapWithZero property: Property to specify whether to fill gap with zero.withInternalMetricName(String internalMetricName) Set the internalMetricName property: The internal metric name.withLockAggregationType(String lockAggregationType) Set the lockAggregationType property: The metric lock aggregation type.Set the name property: Name of metric specification.withSupportedAggregationTypes(List<String> supportedAggregationTypes) Set the supportedAggregationTypes property: The supported aggregation types for the metrics.withSupportedTimeGrainTypes(List<String> supportedTimeGrainTypes) Set the supportedTimeGrainTypes property: The supported time grain types for the metrics.Set the unit property: The metric unit.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
MetricSpecification
public MetricSpecification()Creates an instance of MetricSpecification class.
-
-
Method Details
-
name
Get the name property: Name of metric specification.- Returns:
- the name value.
-
withName
Set the name property: Name of metric specification.- Parameters:
name- the name value to set.- Returns:
- the MetricSpecification object itself.
-
displayName
Get the displayName property: Display name of metric specification.- Returns:
- the displayName value.
-
withDisplayName
Set the displayName property: Display name of metric specification.- Parameters:
displayName- the displayName value to set.- Returns:
- the MetricSpecification object itself.
-
displayDescription
Get the displayDescription property: Display description of metric specification.- Returns:
- the displayDescription value.
-
withDisplayDescription
Set the displayDescription property: Display description of metric specification.- Parameters:
displayDescription- the displayDescription value to set.- Returns:
- the MetricSpecification object itself.
-
unit
Get the unit property: The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'.- Returns:
- the unit value.
-
withUnit
Set the unit property: The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'.- Parameters:
unit- the unit value to set.- Returns:
- the MetricSpecification object itself.
-
aggregationType
Get the aggregationType property: The metric aggregation type. Possible values include: 'Average', 'Count', 'Total'.- Returns:
- the aggregationType value.
-
withAggregationType
Set the aggregationType property: The metric aggregation type. Possible values include: 'Average', 'Count', 'Total'.- Parameters:
aggregationType- the aggregationType value to set.- Returns:
- the MetricSpecification object itself.
-
supportedAggregationTypes
Get the supportedAggregationTypes property: The supported aggregation types for the metrics.- Returns:
- the supportedAggregationTypes value.
-
withSupportedAggregationTypes
Set the supportedAggregationTypes property: The supported aggregation types for the metrics.- Parameters:
supportedAggregationTypes- the supportedAggregationTypes value to set.- Returns:
- the MetricSpecification object itself.
-
supportedTimeGrainTypes
Get the supportedTimeGrainTypes property: The supported time grain types for the metrics.- Returns:
- the supportedTimeGrainTypes value.
-
withSupportedTimeGrainTypes
Set the supportedTimeGrainTypes property: The supported time grain types for the metrics.- Parameters:
supportedTimeGrainTypes- the supportedTimeGrainTypes value to set.- Returns:
- the MetricSpecification object itself.
-
lockAggregationType
Get the lockAggregationType property: The metric lock aggregation type.- Returns:
- the lockAggregationType value.
-
withLockAggregationType
Set the lockAggregationType property: The metric lock aggregation type.- Parameters:
lockAggregationType- the lockAggregationType value to set.- Returns:
- the MetricSpecification object itself.
-
dimensions
Get the dimensions property: The dimensions of metric.- Returns:
- the dimensions value.
-
withDimensions
Set the dimensions property: The dimensions of metric.- Parameters:
dimensions- the dimensions value to set.- Returns:
- the MetricSpecification object itself.
-
fillGapWithZero
Get the fillGapWithZero property: Property to specify whether to fill gap with zero.- Returns:
- the fillGapWithZero value.
-
withFillGapWithZero
Set the fillGapWithZero property: Property to specify whether to fill gap with zero.- Parameters:
fillGapWithZero- the fillGapWithZero value to set.- Returns:
- the MetricSpecification object itself.
-
internalMetricName
Get the internalMetricName property: The internal metric name.- Returns:
- the internalMetricName value.
-
withInternalMetricName
Set the internalMetricName property: The internal metric name.- Parameters:
internalMetricName- the internalMetricName value to set.- Returns:
- the MetricSpecification object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<MetricSpecification>- Throws:
IOException
-
fromJson
Reads an instance of MetricSpecification from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of MetricSpecification if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the MetricSpecification.
-