Class PolicyDefinitionProperties
java.lang.Object
com.azure.resourcemanager.resources.fluent.models.PolicyDefinitionProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PolicyDefinitionProperties>
public final class PolicyDefinitionProperties
extends Object
implements com.azure.json.JsonSerializable<PolicyDefinitionProperties>
The policy definition properties.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of PolicyDefinitionProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the description property: The policy definition description.Get the displayName property: The display name of the policy definition.static PolicyDefinitionPropertiesfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of PolicyDefinitionProperties from the JsonReader.metadata()Get the metadata property: The policy definition metadata.mode()Get the mode property: The policy definition mode.Get the parameters property: The parameter definitions for parameters used in the policy rule.Get the policyRule property: The policy rule.Get the policyType property: The type of policy definition.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.version()Get the version property: The policy definition version in #.#.# format.versions()Get the versions property: A list of available versions for this policy definition.withDescription(String description) Set the description property: The policy definition description.withDisplayName(String displayName) Set the displayName property: The display name of the policy definition.withMetadata(Object metadata) Set the metadata property: The policy definition metadata.Set the mode property: The policy definition mode.withParameters(Map<String, ParameterDefinitionsValue> parameters) Set the parameters property: The parameter definitions for parameters used in the policy rule.withPolicyRule(Object policyRule) Set the policyRule property: The policy rule.withPolicyType(PolicyType policyType) Set the policyType property: The type of policy definition.withVersion(String version) Set the version property: The policy definition version in #.#.# format.withVersions(List<String> versions) Set the versions property: A list of available versions for this policy definition.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
PolicyDefinitionProperties
public PolicyDefinitionProperties()Creates an instance of PolicyDefinitionProperties class.
-
-
Method Details
-
policyType
Get the policyType property: The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.- Returns:
- the policyType value.
-
withPolicyType
Set the policyType property: The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.- Parameters:
policyType- the policyType value to set.- Returns:
- the PolicyDefinitionProperties object itself.
-
mode
Get the mode property: The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data.- Returns:
- the mode value.
-
withMode
Set the mode property: The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data.- Parameters:
mode- the mode value to set.- Returns:
- the PolicyDefinitionProperties object itself.
-
displayName
Get the displayName property: The display name of the policy definition.- Returns:
- the displayName value.
-
withDisplayName
Set the displayName property: The display name of the policy definition.- Parameters:
displayName- the displayName value to set.- Returns:
- the PolicyDefinitionProperties object itself.
-
description
Get the description property: The policy definition description.- Returns:
- the description value.
-
withDescription
Set the description property: The policy definition description.- Parameters:
description- the description value to set.- Returns:
- the PolicyDefinitionProperties object itself.
-
policyRule
Get the policyRule property: The policy rule.- Returns:
- the policyRule value.
-
withPolicyRule
Set the policyRule property: The policy rule.- Parameters:
policyRule- the policyRule value to set.- Returns:
- the PolicyDefinitionProperties object itself.
-
metadata
Get the metadata property: The policy definition metadata. Metadata is an open ended object and is typically a collection of key value pairs.- Returns:
- the metadata value.
-
withMetadata
Set the metadata property: The policy definition metadata. Metadata is an open ended object and is typically a collection of key value pairs.- Parameters:
metadata- the metadata value to set.- Returns:
- the PolicyDefinitionProperties object itself.
-
parameters
Get the parameters property: The parameter definitions for parameters used in the policy rule. The keys are the parameter names.- Returns:
- the parameters value.
-
withParameters
Set the parameters property: The parameter definitions for parameters used in the policy rule. The keys are the parameter names.- Parameters:
parameters- the parameters value to set.- Returns:
- the PolicyDefinitionProperties object itself.
-
version
Get the version property: The policy definition version in #.#.# format.- Returns:
- the version value.
-
withVersion
Set the version property: The policy definition version in #.#.# format.- Parameters:
version- the version value to set.- Returns:
- the PolicyDefinitionProperties object itself.
-
versions
Get the versions property: A list of available versions for this policy definition.- Returns:
- the versions value.
-
withVersions
Set the versions property: A list of available versions for this policy definition.- Parameters:
versions- the versions value to set.- Returns:
- the PolicyDefinitionProperties object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<PolicyDefinitionProperties>- Throws:
IOException
-
fromJson
public static PolicyDefinitionProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of PolicyDefinitionProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of PolicyDefinitionProperties 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 PolicyDefinitionProperties.
-