Class ServiceStatus

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

public final class ServiceStatus extends Object implements com.azure.json.JsonSerializable<ServiceStatus>
Describes the status and behavior of a service.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ServiceStatus from the JsonReader.
    Get the startupType property: The behavior of the service when the Arc-enabled machine starts up.
    Get the status property: The current status of the service.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withStartupType(String startupType)
    Set the startupType property: The behavior of the service when the Arc-enabled machine starts up.
    Set the status property: The current status of the service.

    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

    • ServiceStatus

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

    • status

      public String status()
      Get the status property: The current status of the service.
      Returns:
      the status value.
    • withStatus

      public ServiceStatus withStatus(String status)
      Set the status property: The current status of the service.
      Parameters:
      status - the status value to set.
      Returns:
      the ServiceStatus object itself.
    • startupType

      public String startupType()
      Get the startupType property: The behavior of the service when the Arc-enabled machine starts up.
      Returns:
      the startupType value.
    • withStartupType

      public ServiceStatus withStartupType(String startupType)
      Set the startupType property: The behavior of the service when the Arc-enabled machine starts up.
      Parameters:
      startupType - the startupType value to set.
      Returns:
      the ServiceStatus 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<ServiceStatus>
      Throws:
      IOException
    • fromJson

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