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

public final class ContainerExec extends Object implements com.azure.json.JsonSerializable<ContainerExec>
The container execution command, for liveness or readiness probe.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    Get the command property: The commands to execute within the container.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ContainerExec from the JsonReader.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the command property: The commands to execute within the container.

    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

    • ContainerExec

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

    • command

      public List<String> command()
      Get the command property: The commands to execute within the container.
      Returns:
      the command value.
    • withCommand

      public ContainerExec withCommand(List<String> command)
      Set the command property: The commands to execute within the container.
      Parameters:
      command - the command value to set.
      Returns:
      the ContainerExec 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<ContainerExec>
      Throws:
      IOException
    • fromJson

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