Condividi tramite


RetentionPolicyParameters Class

  • java.lang.Object
    • com.azure.resourcemanager.network.models.RetentionPolicyParameters

Implements

public final class RetentionPolicyParameters
implements JsonSerializable<RetentionPolicyParameters>

Parameters that define the retention policy for flow log.

Constructor Summary

Constructor Description
RetentionPolicyParameters()

Creates an instance of RetentionPolicyParameters class.

Method Summary

Modifier and Type Method and Description
Integer days()

Get the days property: Number of days to retain flow log records.

Boolean enabled()

Get the enabled property: Flag to enable/disable retention.

static RetentionPolicyParameters fromJson(JsonReader jsonReader)

Reads an instance of RetentionPolicyParameters from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

RetentionPolicyParameters withDays(Integer days)

Set the days property: Number of days to retain flow log records.

RetentionPolicyParameters withEnabled(Boolean enabled)

Set the enabled property: Flag to enable/disable retention.

Methods inherited from java.lang.Object

Constructor Details

RetentionPolicyParameters

public RetentionPolicyParameters()

Creates an instance of RetentionPolicyParameters class.

Method Details

days

public Integer days()

Get the days property: Number of days to retain flow log records.

Returns:

the days value.

enabled

public Boolean enabled()

Get the enabled property: Flag to enable/disable retention.

Returns:

the enabled value.

fromJson

public static RetentionPolicyParameters fromJson(JsonReader jsonReader)

Reads an instance of RetentionPolicyParameters from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of RetentionPolicyParameters 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 RetentionPolicyParameters.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withDays

public RetentionPolicyParameters withDays(Integer days)

Set the days property: Number of days to retain flow log records.

Parameters:

days - the days value to set.

Returns:

the RetentionPolicyParameters object itself.

withEnabled

public RetentionPolicyParameters withEnabled(Boolean enabled)

Set the enabled property: Flag to enable/disable retention.

Parameters:

enabled - the enabled value to set.

Returns:

the RetentionPolicyParameters object itself.

Applies to