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

public final class BuildContext extends Object implements com.azure.json.JsonSerializable<BuildContext>
Configuration settings for Docker build context.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    Get the contextUri property: [Required] URI of the Docker build context used to build the image.
    Get the dockerfilePath property: Path to the Dockerfile in the build context.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of BuildContext from the JsonReader.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withContextUri(String contextUri)
    Set the contextUri property: [Required] URI of the Docker build context used to build the image.
    withDockerfilePath(String dockerfilePath)
    Set the dockerfilePath property: Path to the Dockerfile in the build context.

    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

    • BuildContext

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

    • contextUri

      public String contextUri()
      Get the contextUri property: [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. <seealso href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />.
      Returns:
      the contextUri value.
    • withContextUri

      public BuildContext withContextUri(String contextUri)
      Set the contextUri property: [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. <seealso href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />.
      Parameters:
      contextUri - the contextUri value to set.
      Returns:
      the BuildContext object itself.
    • dockerfilePath

      public String dockerfilePath()
      Get the dockerfilePath property: Path to the Dockerfile in the build context. <seealso href="https://docs.docker.com/engine/reference/builder/" />.
      Returns:
      the dockerfilePath value.
    • withDockerfilePath

      public BuildContext withDockerfilePath(String dockerfilePath)
      Set the dockerfilePath property: Path to the Dockerfile in the build context. <seealso href="https://docs.docker.com/engine/reference/builder/" />.
      Parameters:
      dockerfilePath - the dockerfilePath value to set.
      Returns:
      the BuildContext 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<BuildContext>
      Throws:
      IOException
    • fromJson

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