Class ResourceReferenceExtended

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

public final class ResourceReferenceExtended extends ResourceReference
The resourceId extended model. This is used to document failed resources with a resourceId and a corresponding error.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of ResourceReferenceExtended class.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.azure.core.management.exception.ManagementError
    Get the error property: The error detail.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ResourceReferenceExtended from the JsonReader.
    id()
    Get the id property: The resourceId of a resource managed by the deployment stack.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withError(com.azure.core.management.exception.ManagementError error)
    Set the error property: The error detail.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • ResourceReferenceExtended

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

    • error

      public com.azure.core.management.exception.ManagementError error()
      Get the error property: The error detail.
      Returns:
      the error value.
    • withError

      public ResourceReferenceExtended withError(com.azure.core.management.exception.ManagementError error)
      Set the error property: The error detail.
      Parameters:
      error - the error value to set.
      Returns:
      the ResourceReferenceExtended object itself.
    • id

      public String id()
      Get the id property: The resourceId of a resource managed by the deployment stack.
      Overrides:
      id in class ResourceReference
      Returns:
      the id value.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class ResourceReference
      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<ResourceReference>
      Overrides:
      toJson in class ResourceReference
      Throws:
      IOException
    • fromJson

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