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

public final class ContainerState extends Object implements com.azure.json.JsonSerializable<ContainerState>
The container instance state.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    Get the detailStatus property: The human-readable status of the container instance state.
    Get the exitCode property: The container instance exit codes correspond to those from the `docker run` command.
    Get the finishTime property: The date-time when the container instance state finished.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ContainerState from the JsonReader.
    Get the startTime property: The date-time when the container instance state started.
    Get the state property: The state of the container instance.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.

    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

    • ContainerState

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

    • state

      public String state()
      Get the state property: The state of the container instance.
      Returns:
      the state value.
    • startTime

      public OffsetDateTime startTime()
      Get the startTime property: The date-time when the container instance state started.
      Returns:
      the startTime value.
    • exitCode

      public Integer exitCode()
      Get the exitCode property: The container instance exit codes correspond to those from the `docker run` command.
      Returns:
      the exitCode value.
    • finishTime

      public OffsetDateTime finishTime()
      Get the finishTime property: The date-time when the container instance state finished.
      Returns:
      the finishTime value.
    • detailStatus

      public String detailStatus()
      Get the detailStatus property: The human-readable status of the container instance state.
      Returns:
      the detailStatus value.
    • 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<ContainerState>
      Throws:
      IOException
    • fromJson

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