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 Details

    • PolicyDefinitionProperties

      public PolicyDefinitionProperties()
      Creates an instance of PolicyDefinitionProperties class.
  • Method Details

    • policyType

      public PolicyType policyType()
      Get the policyType property: The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static.
      Returns:
      the policyType value.
    • withPolicyType

      public PolicyDefinitionProperties withPolicyType(PolicyType policyType)
      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

      public String mode()
      Get the mode property: The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data.
      Returns:
      the mode value.
    • withMode

      public PolicyDefinitionProperties withMode(String mode)
      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

      public String displayName()
      Get the displayName property: The display name of the policy definition.
      Returns:
      the displayName value.
    • withDisplayName

      public PolicyDefinitionProperties withDisplayName(String displayName)
      Set the displayName property: The display name of the policy definition.
      Parameters:
      displayName - the displayName value to set.
      Returns:
      the PolicyDefinitionProperties object itself.
    • description

      public String description()
      Get the description property: The policy definition description.
      Returns:
      the description value.
    • withDescription

      public PolicyDefinitionProperties withDescription(String description)
      Set the description property: The policy definition description.
      Parameters:
      description - the description value to set.
      Returns:
      the PolicyDefinitionProperties object itself.
    • policyRule

      public Object policyRule()
      Get the policyRule property: The policy rule.
      Returns:
      the policyRule value.
    • withPolicyRule

      public PolicyDefinitionProperties withPolicyRule(Object policyRule)
      Set the policyRule property: The policy rule.
      Parameters:
      policyRule - the policyRule value to set.
      Returns:
      the PolicyDefinitionProperties object itself.
    • metadata

      public Object 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

      public PolicyDefinitionProperties withMetadata(Object metadata)
      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

      public Map<String,ParameterDefinitionsValue> 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

      public PolicyDefinitionProperties withParameters(Map<String,ParameterDefinitionsValue> parameters)
      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.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.