Class ResponseInner
java.lang.Object
com.azure.resourcemanager.monitor.fluent.models.ResponseInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ResponseInner>
public final class ResponseInner
extends Object
implements com.azure.json.JsonSerializable<ResponseInner>
The response to a metrics query.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncost()
Get the cost property: The integer value representing the relative cost of the query.static ResponseInner
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ResponseInner from the JsonReader.interval()
Get the interval property: The interval (window size) for which the metric data was returned in.Get the namespace property: The namespace of the metrics being queried.Get the resourceRegion property: The region of the resource being queried for metrics.timespan()
Get the timespan property: The timespan for which the data was retrieved.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.value()
Get the value property: the value of the collection.Set the cost property: The integer value representing the relative cost of the query.withInterval
(Duration interval) Set the interval property: The interval (window size) for which the metric data was returned in.withNamespace
(String namespace) Set the namespace property: The namespace of the metrics being queried.withResourceRegion
(String resourceRegion) Set the resourceRegion property: The region of the resource being queried for metrics.withTimespan
(String timespan) Set the timespan property: The timespan for which the data was retrieved.withValue
(List<MetricInner> value) Set the value property: the value of the collection.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
-
ResponseInner
public ResponseInner()Creates an instance of ResponseInner class.
-
-
Method Details
-
cost
Get the cost property: The integer value representing the relative cost of the query.- Returns:
- the cost value.
-
withCost
Set the cost property: The integer value representing the relative cost of the query.- Parameters:
cost
- the cost value to set.- Returns:
- the ResponseInner object itself.
-
timespan
Get the timespan property: The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.- Returns:
- the timespan value.
-
withTimespan
Set the timespan property: The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.- Parameters:
timespan
- the timespan value to set.- Returns:
- the ResponseInner object itself.
-
interval
Get the interval property: The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made.- Returns:
- the interval value.
-
withInterval
Set the interval property: The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made.- Parameters:
interval
- the interval value to set.- Returns:
- the ResponseInner object itself.
-
namespace
Get the namespace property: The namespace of the metrics being queried.- Returns:
- the namespace value.
-
withNamespace
Set the namespace property: The namespace of the metrics being queried.- Parameters:
namespace
- the namespace value to set.- Returns:
- the ResponseInner object itself.
-
resourceRegion
Get the resourceRegion property: The region of the resource being queried for metrics.- Returns:
- the resourceRegion value.
-
withResourceRegion
Set the resourceRegion property: The region of the resource being queried for metrics.- Parameters:
resourceRegion
- the resourceRegion value to set.- Returns:
- the ResponseInner object itself.
-
value
Get the value property: the value of the collection.- Returns:
- the value value.
-
withValue
Set the value property: the value of the collection.- Parameters:
value
- the value value to set.- Returns:
- the ResponseInner 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<ResponseInner>
- Throws:
IOException
-
fromJson
Reads an instance of ResponseInner from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ResponseInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the ResponseInner.
-