PolicyViolation Class

  • java.lang.Object
    • com.azure.resourcemanager.devtestlabs.models.PolicyViolation

public final class PolicyViolation

Policy violation.

Constructor Summary

Constructor Description
PolicyViolation()

Creates an instance of PolicyViolation class.

Method Summary

Modifier and Type Method and Description
String code()

Get the code property: The code of the policy violation.

String message()

Get the message property: The message of the policy violation.

void validate()

Validates the instance.

PolicyViolation withCode(String code)

Set the code property: The code of the policy violation.

PolicyViolation withMessage(String message)

Set the message property: The message of the policy violation.

Methods inherited from java.lang.Object

Constructor Details

PolicyViolation

public PolicyViolation()

Creates an instance of PolicyViolation class.

Method Details

code

public String code()

Get the code property: The code of the policy violation.

Returns:

the code value.

message

public String message()

Get the message property: The message of the policy violation.

Returns:

the message value.

validate

public void validate()

Validates the instance.

withCode

public PolicyViolation withCode(String code)

Set the code property: The code of the policy violation.

Parameters:

code - the code value to set.

Returns:

the PolicyViolation object itself.

withMessage

public PolicyViolation withMessage(String message)

Set the message property: The message of the policy violation.

Parameters:

message - the message value to set.

Returns:

the PolicyViolation object itself.

Applies to