Class DiagnosticMetricSet
java.lang.Object
com.azure.resourcemanager.appservice.models.DiagnosticMetricSet
- All Implemented Interfaces:
com.azure.json.JsonSerializable<DiagnosticMetricSet>
public final class DiagnosticMetricSet
extends Object
implements com.azure.json.JsonSerializable<DiagnosticMetricSet>
Class representing Diagnostic Metric information.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionendTime()
Get the endTime property: End time of the period.static DiagnosticMetricSet
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of DiagnosticMetricSet from the JsonReader.name()
Get the name property: Name of the metric.Get the startTime property: Start time of the period.Get the timeGrain property: Presented time grain.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) unit()
Get the unit property: Metric's unit.void
validate()
Validates the instance.values()
Get the values property: Collection of metric values for the selected period based on the {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain}.withEndTime
(OffsetDateTime endTime) Set the endTime property: End time of the period.Set the name property: Name of the metric.withStartTime
(OffsetDateTime startTime) Set the startTime property: Start time of the period.withTimeGrain
(String timeGrain) Set the timeGrain property: Presented time grain.Set the unit property: Metric's unit.withValues
(List<DiagnosticMetricSample> values) Set the values property: Collection of metric values for the selected period based on the {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain}.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
DiagnosticMetricSet
public DiagnosticMetricSet()Creates an instance of DiagnosticMetricSet class.
-
-
Method Details
-
name
Get the name property: Name of the metric.- Returns:
- the name value.
-
withName
Set the name property: Name of the metric.- Parameters:
name
- the name value to set.- Returns:
- the DiagnosticMetricSet object itself.
-
unit
Get the unit property: Metric's unit.- Returns:
- the unit value.
-
withUnit
Set the unit property: Metric's unit.- Parameters:
unit
- the unit value to set.- Returns:
- the DiagnosticMetricSet object itself.
-
startTime
Get the startTime property: Start time of the period.- Returns:
- the startTime value.
-
withStartTime
Set the startTime property: Start time of the period.- Parameters:
startTime
- the startTime value to set.- Returns:
- the DiagnosticMetricSet object itself.
-
endTime
Get the endTime property: End time of the period.- Returns:
- the endTime value.
-
withEndTime
Set the endTime property: End time of the period.- Parameters:
endTime
- the endTime value to set.- Returns:
- the DiagnosticMetricSet object itself.
-
timeGrain
Get the timeGrain property: Presented time grain. Supported grains at the moment are PT1M, PT1H, P1D.- Returns:
- the timeGrain value.
-
withTimeGrain
Set the timeGrain property: Presented time grain. Supported grains at the moment are PT1M, PT1H, P1D.- Parameters:
timeGrain
- the timeGrain value to set.- Returns:
- the DiagnosticMetricSet object itself.
-
values
Get the values property: Collection of metric values for the selected period based on the {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain}.- Returns:
- the values value.
-
withValues
Set the values property: Collection of metric values for the selected period based on the {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain}.- Parameters:
values
- the values value to set.- Returns:
- the DiagnosticMetricSet object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<DiagnosticMetricSet>
- Throws:
IOException
-
fromJson
Reads an instance of DiagnosticMetricSet from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of DiagnosticMetricSet 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 DiagnosticMetricSet.
-