Class CodeConfiguration

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

public final class CodeConfiguration extends Object implements com.azure.json.JsonSerializable<CodeConfiguration>
Configuration for a scoring code asset.
  • Constructor Details

    • CodeConfiguration

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

    • codeId

      public String codeId()
      Get the codeId property: ARM resource ID of the code asset.
      Returns:
      the codeId value.
    • withCodeId

      public CodeConfiguration withCodeId(String codeId)
      Set the codeId property: ARM resource ID of the code asset.
      Parameters:
      codeId - the codeId value to set.
      Returns:
      the CodeConfiguration object itself.
    • scoringScript

      public String scoringScript()
      Get the scoringScript property: [Required] The script to execute on startup. eg. "score.py".
      Returns:
      the scoringScript value.
    • withScoringScript

      public CodeConfiguration withScoringScript(String scoringScript)
      Set the scoringScript property: [Required] The script to execute on startup. eg. "score.py".
      Parameters:
      scoringScript - the scoringScript value to set.
      Returns:
      the CodeConfiguration 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<CodeConfiguration>
      Throws:
      IOException
    • fromJson

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