Class PolicyDefinitionVersionProperties

java.lang.Object
com.azure.resourcemanager.resources.fluent.models.PolicyDefinitionVersionProperties
All Implemented Interfaces:
com.azure.json.JsonSerializable<PolicyDefinitionVersionProperties>

public final class PolicyDefinitionVersionProperties extends Object implements com.azure.json.JsonSerializable<PolicyDefinitionVersionProperties>
The policy definition properties.
  • Constructor Details

    • PolicyDefinitionVersionProperties

      public PolicyDefinitionVersionProperties()
      Creates an instance of PolicyDefinitionVersionProperties 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 PolicyDefinitionVersionProperties 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 PolicyDefinitionVersionProperties 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 PolicyDefinitionVersionProperties 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 PolicyDefinitionVersionProperties object itself.
    • displayName

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

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

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

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

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

      public PolicyDefinitionVersionProperties withPolicyRule(Object policyRule)
      Set the policyRule property: The policy rule.
      Parameters:
      policyRule - the policyRule value to set.
      Returns:
      the PolicyDefinitionVersionProperties 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 PolicyDefinitionVersionProperties 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 PolicyDefinitionVersionProperties 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

      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 PolicyDefinitionVersionProperties object itself.
    • version

      public String version()
      Get the version property: The policy definition version in #.#.# format.
      Returns:
      the version value.
    • withVersion

      public PolicyDefinitionVersionProperties withVersion(String version)
      Set the version property: The policy definition version in #.#.# format.
      Parameters:
      version - the version value to set.
      Returns:
      the PolicyDefinitionVersionProperties 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<PolicyDefinitionVersionProperties>
      Throws:
      IOException
    • fromJson

      public static PolicyDefinitionVersionProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of PolicyDefinitionVersionProperties from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of PolicyDefinitionVersionProperties 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 PolicyDefinitionVersionProperties.