Class SessionContainer

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

public final class SessionContainer extends Object implements com.azure.json.JsonSerializable<SessionContainer>
Container definitions for the sessions of the session pool.
  • Constructor Details

    • SessionContainer

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

    • image

      public String image()
      Get the image property: Container image tag.
      Returns:
      the image value.
    • withImage

      public SessionContainer withImage(String image)
      Set the image property: Container image tag.
      Parameters:
      image - the image value to set.
      Returns:
      the SessionContainer object itself.
    • name

      public String name()
      Get the name property: Custom container name.
      Returns:
      the name value.
    • withName

      public SessionContainer withName(String name)
      Set the name property: Custom container name.
      Parameters:
      name - the name value to set.
      Returns:
      the SessionContainer object itself.
    • command

      public List<String> command()
      Get the command property: Container start command.
      Returns:
      the command value.
    • withCommand

      public SessionContainer withCommand(List<String> command)
      Set the command property: Container start command.
      Parameters:
      command - the command value to set.
      Returns:
      the SessionContainer object itself.
    • args

      public List<String> args()
      Get the args property: Container start command arguments.
      Returns:
      the args value.
    • withArgs

      public SessionContainer withArgs(List<String> args)
      Set the args property: Container start command arguments.
      Parameters:
      args - the args value to set.
      Returns:
      the SessionContainer object itself.
    • env

      public List<EnvironmentVar> env()
      Get the env property: Container environment variables.
      Returns:
      the env value.
    • withEnv

      public SessionContainer withEnv(List<EnvironmentVar> env)
      Set the env property: Container environment variables.
      Parameters:
      env - the env value to set.
      Returns:
      the SessionContainer object itself.
    • resources

      public SessionContainerResources resources()
      Get the resources property: Container resource requirements.
      Returns:
      the resources value.
    • withResources

      public SessionContainer withResources(SessionContainerResources resources)
      Set the resources property: Container resource requirements.
      Parameters:
      resources - the resources value to set.
      Returns:
      the SessionContainer 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<SessionContainer>
      Throws:
      IOException
    • fromJson

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