Class OperationMetricSpecificationDefinition
java.lang.Object
com.azure.resourcemanager.containerregistry.models.OperationMetricSpecificationDefinition
- All Implemented Interfaces:
com.azure.json.JsonSerializable<OperationMetricSpecificationDefinition>
public final class OperationMetricSpecificationDefinition
extends Object
implements com.azure.json.JsonSerializable<OperationMetricSpecificationDefinition>
The definition of Azure Monitoring metric.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of OperationMetricSpecificationDefinition class. -
Method Summary
Modifier and TypeMethodDescriptionGet the aggregationType property: Metric aggregation type.Get the displayDescription property: Metric description.Get the displayName property: Metric display name.fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of OperationMetricSpecificationDefinition from the JsonReader.Get the internalMetricName property: Internal metric name.name()Get the name property: Metric name.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) unit()Get the unit property: Metric unit.voidvalidate()Validates the instance.withAggregationType(String aggregationType) Set the aggregationType property: Metric aggregation type.withDisplayDescription(String displayDescription) Set the displayDescription property: Metric description.withDisplayName(String displayName) Set the displayName property: Metric display name.withInternalMetricName(String internalMetricName) Set the internalMetricName property: Internal metric name.Set the name property: Metric name.Set the unit property: 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
-
OperationMetricSpecificationDefinition
public OperationMetricSpecificationDefinition()Creates an instance of OperationMetricSpecificationDefinition class.
-
-
Method Details
-
name
Get the name property: Metric name.- Returns:
- the name value.
-
withName
Set the name property: Metric name.- Parameters:
name- the name value to set.- Returns:
- the OperationMetricSpecificationDefinition object itself.
-
displayName
Get the displayName property: Metric display name.- Returns:
- the displayName value.
-
withDisplayName
Set the displayName property: Metric display name.- Parameters:
displayName- the displayName value to set.- Returns:
- the OperationMetricSpecificationDefinition object itself.
-
displayDescription
Get the displayDescription property: Metric description.- Returns:
- the displayDescription value.
-
withDisplayDescription
Set the displayDescription property: Metric description.- Parameters:
displayDescription- the displayDescription value to set.- Returns:
- the OperationMetricSpecificationDefinition object itself.
-
unit
Get the unit property: Metric unit.- Returns:
- the unit value.
-
withUnit
Set the unit property: Metric unit.- Parameters:
unit- the unit value to set.- Returns:
- the OperationMetricSpecificationDefinition object itself.
-
aggregationType
Get the aggregationType property: Metric aggregation type.- Returns:
- the aggregationType value.
-
withAggregationType
Set the aggregationType property: Metric aggregation type.- Parameters:
aggregationType- the aggregationType value to set.- Returns:
- the OperationMetricSpecificationDefinition object itself.
-
internalMetricName
Get the internalMetricName property: Internal metric name.- Returns:
- the internalMetricName value.
-
withInternalMetricName
Set the internalMetricName property: Internal metric name.- Parameters:
internalMetricName- the internalMetricName value to set.- Returns:
- the OperationMetricSpecificationDefinition 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<OperationMetricSpecificationDefinition>- Throws:
IOException
-
fromJson
public static OperationMetricSpecificationDefinition fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of OperationMetricSpecificationDefinition from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of OperationMetricSpecificationDefinition 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 OperationMetricSpecificationDefinition.
-