Class SamplingSettings
java.lang.Object
com.azure.resourcemanager.apimanagement.models.SamplingSettings
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SamplingSettings>
public final class SamplingSettings
extends Object
implements com.azure.json.JsonSerializable<SamplingSettings>
Sampling settings for Diagnostic.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SamplingSettingsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SamplingSettings from the JsonReader.Get the percentage property: Rate of sampling for fixed-rate sampling.Get the samplingType property: Sampling type.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withPercentage(Double percentage) Set the percentage property: Rate of sampling for fixed-rate sampling.withSamplingType(SamplingType samplingType) Set the samplingType property: Sampling type.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
-
SamplingSettings
public SamplingSettings()Creates an instance of SamplingSettings class.
-
-
Method Details
-
samplingType
Get the samplingType property: Sampling type.- Returns:
- the samplingType value.
-
withSamplingType
Set the samplingType property: Sampling type.- Parameters:
samplingType- the samplingType value to set.- Returns:
- the SamplingSettings object itself.
-
percentage
Get the percentage property: Rate of sampling for fixed-rate sampling.- Returns:
- the percentage value.
-
withPercentage
Set the percentage property: Rate of sampling for fixed-rate sampling.- Parameters:
percentage- the percentage value to set.- Returns:
- the SamplingSettings 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<SamplingSettings>- Throws:
IOException
-
fromJson
Reads an instance of SamplingSettings from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of SamplingSettings 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 SamplingSettings.
-