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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncodeId()Get the codeId property: ARM resource ID of the code asset.static CodeConfigurationfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of CodeConfiguration from the JsonReader.Get the scoringScript property: [Required] The script to execute on startup.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withCodeId(String codeId) Set the codeId property: ARM resource ID of the code asset.withScoringScript(String scoringScript) Set the scoringScript property: [Required] The script to execute on startup.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
CodeConfiguration
public CodeConfiguration()Creates an instance of CodeConfiguration class.
-
-
Method Details
-
codeId
Get the codeId property: ARM resource ID of the code asset.- Returns:
- the codeId value.
-
withCodeId
Set the codeId property: ARM resource ID of the code asset.- Parameters:
codeId- the codeId value to set.- Returns:
- the CodeConfiguration object itself.
-
scoringScript
Get the scoringScript property: [Required] The script to execute on startup. eg. "score.py".- Returns:
- the scoringScript value.
-
withScoringScript
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<CodeConfiguration>- Throws:
IOException
-
fromJson
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.
-