Class DataCollectionRuleDestinations
java.lang.Object
com.azure.resourcemanager.monitor.models.DestinationsSpec
com.azure.resourcemanager.monitor.models.DataCollectionRuleDestinations
- All Implemented Interfaces:
com.azure.json.JsonSerializable<DestinationsSpec>
The specification of destinations.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of DataCollectionRuleDestinations class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of DataCollectionRuleDestinations from the JsonReader.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withAzureMonitorMetrics
(DestinationsSpecAzureMonitorMetrics azureMonitorMetrics) Set the azureMonitorMetrics property: Azure Monitor Metrics destination.withLogAnalytics
(List<LogAnalyticsDestination> logAnalytics) Set the logAnalytics property: List of Log Analytics destinations.Methods inherited from class com.azure.resourcemanager.monitor.models.DestinationsSpec
azureMonitorMetrics, logAnalytics
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
-
DataCollectionRuleDestinations
public DataCollectionRuleDestinations()Creates an instance of DataCollectionRuleDestinations class.
-
-
Method Details
-
withLogAnalytics
Set the logAnalytics property: List of Log Analytics destinations.- Overrides:
withLogAnalytics
in classDestinationsSpec
- Parameters:
logAnalytics
- the logAnalytics value to set.- Returns:
- the DestinationsSpec object itself.
-
withAzureMonitorMetrics
public DataCollectionRuleDestinations withAzureMonitorMetrics(DestinationsSpecAzureMonitorMetrics azureMonitorMetrics) Set the azureMonitorMetrics property: Azure Monitor Metrics destination.- Overrides:
withAzureMonitorMetrics
in classDestinationsSpec
- Parameters:
azureMonitorMetrics
- the azureMonitorMetrics value to set.- Returns:
- the DestinationsSpec object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validate
in classDestinationsSpec
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<DestinationsSpec>
- Overrides:
toJson
in classDestinationsSpec
- Throws:
IOException
-
fromJson
public static DataCollectionRuleDestinations fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of DataCollectionRuleDestinations from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of DataCollectionRuleDestinations 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 DataCollectionRuleDestinations.
-