Class LogFilesDataSource
java.lang.Object
com.azure.resourcemanager.monitor.models.LogFilesDataSource
- All Implemented Interfaces:
com.azure.json.JsonSerializable<LogFilesDataSource>
public final class LogFilesDataSource
extends Object
implements com.azure.json.JsonSerializable<LogFilesDataSource>
Definition of which custom log files will be collected by this data collection rule.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the filePatterns property: File Patterns where the log files are located.format()
Get the format property: The data format of the log files.static LogFilesDataSource
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of LogFilesDataSource from the JsonReader.name()
Get the name property: A friendly name for the data source.settings()
Get the settings property: The log files specific settings.streams()
Get the streams property: List of streams that this data source will be sent to.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withFilePatterns
(List<String> filePatterns) Set the filePatterns property: File Patterns where the log files are located.Set the format property: The data format of the log files.Set the name property: A friendly name for the data source.withSettings
(LogFilesDataSourceSettings settings) Set the settings property: The log files specific settings.withStreams
(List<String> streams) Set the streams property: List of streams that this data source will be sent to.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
-
LogFilesDataSource
public LogFilesDataSource()Creates an instance of LogFilesDataSource class.
-
-
Method Details
-
streams
Get the streams property: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data source.- Returns:
- the streams value.
-
withStreams
Set the streams property: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data source.- Parameters:
streams
- the streams value to set.- Returns:
- the LogFilesDataSource object itself.
-
filePatterns
Get the filePatterns property: File Patterns where the log files are located.- Returns:
- the filePatterns value.
-
withFilePatterns
Set the filePatterns property: File Patterns where the log files are located.- Parameters:
filePatterns
- the filePatterns value to set.- Returns:
- the LogFilesDataSource object itself.
-
format
Get the format property: The data format of the log files.- Returns:
- the format value.
-
withFormat
Set the format property: The data format of the log files.- Parameters:
format
- the format value to set.- Returns:
- the LogFilesDataSource object itself.
-
settings
Get the settings property: The log files specific settings.- Returns:
- the settings value.
-
withSettings
Set the settings property: The log files specific settings.- Parameters:
settings
- the settings value to set.- Returns:
- the LogFilesDataSource object itself.
-
name
Get the name property: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule.- Returns:
- the name value.
-
withName
Set the name property: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule.- Parameters:
name
- the name value to set.- Returns:
- the LogFilesDataSource 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<LogFilesDataSource>
- Throws:
IOException
-
fromJson
Reads an instance of LogFilesDataSource from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of LogFilesDataSource 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 LogFilesDataSource.
-