Class PolicyTokenOperation

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

public final class PolicyTokenOperation extends Object implements com.azure.json.JsonSerializable<PolicyTokenOperation>
The resource operation to acquire a token for.
  • Constructor Details

    • PolicyTokenOperation

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

    • uri

      public String uri()
      Get the uri property: The request URI of the resource operation.
      Returns:
      the uri value.
    • withUri

      public PolicyTokenOperation withUri(String uri)
      Set the uri property: The request URI of the resource operation.
      Parameters:
      uri - the uri value to set.
      Returns:
      the PolicyTokenOperation object itself.
    • httpMethod

      public String httpMethod()
      Get the httpMethod property: The http method of the resource operation.
      Returns:
      the httpMethod value.
    • withHttpMethod

      public PolicyTokenOperation withHttpMethod(String httpMethod)
      Set the httpMethod property: The http method of the resource operation.
      Parameters:
      httpMethod - the httpMethod value to set.
      Returns:
      the PolicyTokenOperation object itself.
    • content

      public Object content()
      Get the content property: The payload of the resource operation.
      Returns:
      the content value.
    • withContent

      public PolicyTokenOperation withContent(Object content)
      Set the content property: The payload of the resource operation.
      Parameters:
      content - the content value to set.
      Returns:
      the PolicyTokenOperation 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<PolicyTokenOperation>
      Throws:
      IOException
    • fromJson

      public static PolicyTokenOperation fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of PolicyTokenOperation from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of PolicyTokenOperation if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the PolicyTokenOperation.