LogSettings Class

  • java.lang.Object
    • com.azure.resourcemanager.monitor.models.LogSettings

Implements

public final class LogSettings
implements JsonSerializable<LogSettings>

Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log.

Constructor Summary

Constructor Description
LogSettings()

Creates an instance of LogSettings class.

Method Summary

Modifier and Type Method and Description
String category()

Get the category property: Name of a Diagnostic Log category for a resource type this setting is applied to.

String categoryGroup()

Get the categoryGroup property: Name of a Diagnostic Log category group for a resource type this setting is applied to.

boolean enabled()

Get the enabled property: a value indicating whether this log is enabled.

static LogSettings fromJson(JsonReader jsonReader)

Reads an instance of LogSettings from the JsonReader.

RetentionPolicy retentionPolicy()

Get the retentionPolicy property: the retention policy for this log.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

LogSettings withCategory(String category)

Set the category property: Name of a Diagnostic Log category for a resource type this setting is applied to.

LogSettings withCategoryGroup(String categoryGroup)

Set the categoryGroup property: Name of a Diagnostic Log category group for a resource type this setting is applied to.

LogSettings withEnabled(boolean enabled)

Set the enabled property: a value indicating whether this log is enabled.

LogSettings withRetentionPolicy(RetentionPolicy retentionPolicy)

Set the retentionPolicy property: the retention policy for this log.

Methods inherited from java.lang.Object

Constructor Details

LogSettings

public LogSettings()

Creates an instance of LogSettings class.

Method Details

category

public String category()

Get the category property: Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.

Returns:

the category value.

categoryGroup

public String categoryGroup()

Get the categoryGroup property: Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.

Returns:

the categoryGroup value.

enabled

public boolean enabled()

Get the enabled property: a value indicating whether this log is enabled.

Returns:

the enabled value.

fromJson

public static LogSettings fromJson(JsonReader jsonReader)

Reads an instance of LogSettings from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of LogSettings if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

retentionPolicy

public RetentionPolicy retentionPolicy()

Get the retentionPolicy property: the retention policy for this log.

Returns:

the retentionPolicy value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCategory

public LogSettings withCategory(String category)

Set the category property: Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.

Parameters:

category - the category value to set.

Returns:

the LogSettings object itself.

withCategoryGroup

public LogSettings withCategoryGroup(String categoryGroup)

Set the categoryGroup property: Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.

Parameters:

categoryGroup - the categoryGroup value to set.

Returns:

the LogSettings object itself.

withEnabled

public LogSettings withEnabled(boolean enabled)

Set the enabled property: a value indicating whether this log is enabled.

Parameters:

enabled - the enabled value to set.

Returns:

the LogSettings object itself.

withRetentionPolicy

public LogSettings withRetentionPolicy(RetentionPolicy retentionPolicy)

Set the retentionPolicy property: the retention policy for this log.

Parameters:

retentionPolicy - the retentionPolicy value to set.

Returns:

the LogSettings object itself.

Applies to