ModelVersion Class

  • java.lang.Object
    • com.azure.ai.projects.models.ModelVersion

Implements

public final class ModelVersion
implements JsonSerializable<ModelVersion>

Model Version Definition.

Constructor Summary

Constructor Description
ModelVersion(String blobUrl)

Creates an instance of ModelVersion class.

Method Summary

Modifier and Type Method and Description
static ModelVersion fromJson(JsonReader jsonReader)

Reads an instance of ModelVersion from the JsonReader.

ArtifactProfile getArtifactProfile()

Get the artifactProfile property: The artifact profile of the model.

String getBaseModel()

Get the baseModel property: Base model asset ID.

String getBlobUrl()

Get the blobUrl property: URI of the model artifact in blob storage.

String getDescription()

Get the description property: The asset description text.

String getId()

Get the id property: Asset ID, a unique identifier for the asset.

LoraConfig getLoraConfig()

Get the loraConfig property: Adapter-specific configuration.

String getName()

Get the name property: The name of the resource.

ModelSourceData getSource()

Get the source property: The source of the model.

Map<String,String> getTags()

Get the tags property: Tag dictionary.

String getVersion()

Get the version property: The version of the resource.

List<FoundryModelWarning> getWarnings()

Get the warnings property: Service-computed advisory warnings derived from the artifact profile.

FoundryModelWeightType getWeightType()

Get the weightType property: The weight type of the model.

ModelVersion setBaseModel(String baseModel)

Set the baseModel property: Base model asset ID.

ModelVersion setDescription(String description)

Set the description property: The asset description text.

ModelVersion setLoraConfig(LoraConfig loraConfig)

Set the loraConfig property: Adapter-specific configuration.

ModelVersion setSource(ModelSourceData source)

Set the source property: The source of the model.

ModelVersion setTags(Map<String,String> tags)

Set the tags property: Tag dictionary.

ModelVersion setWeightType(FoundryModelWeightType weightType)

Set the weightType property: The weight type of the model.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

ModelVersion

public ModelVersion(String blobUrl)

Creates an instance of ModelVersion class.

Parameters:

blobUrl - the blobUrl value to set.

Method Details

fromJson

public static ModelVersion fromJson(JsonReader jsonReader)

Reads an instance of ModelVersion from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ModelVersion if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getArtifactProfile

public ArtifactProfile getArtifactProfile()

Get the artifactProfile property: The artifact profile of the model.

Returns:

the artifactProfile value.

getBaseModel

public String getBaseModel()

Get the baseModel property: Base model asset ID.

Returns:

the baseModel value.

getBlobUrl

public String getBlobUrl()

Get the blobUrl property: URI of the model artifact in blob storage.

Returns:

the blobUrl value.

getDescription

public String getDescription()

Get the description property: The asset description text.

Returns:

the description value.

getId

public String getId()

Get the id property: Asset ID, a unique identifier for the asset.

Returns:

the id value.

getLoraConfig

public LoraConfig getLoraConfig()

Get the loraConfig property: Adapter-specific configuration. Required when weight_type is lora; ignored otherwise. May be auto-populated from adapter_config.json when present in the uploaded files — user-provided values take precedence over auto-detected values.

Returns:

the loraConfig value.

getName

public String getName()

Get the name property: The name of the resource.

Returns:

the name value.

getSource

public ModelSourceData getSource()

Get the source property: The source of the model.

Returns:

the source value.

getTags

public Map<String,String> getTags()

Get the tags property: Tag dictionary. Tags can be added, removed, and updated.

Returns:

the tags value.

getVersion

public String getVersion()

Get the version property: The version of the resource.

Returns:

the version value.

getWarnings

public List<FoundryModelWarning> getWarnings()

Get the warnings property: Service-computed advisory warnings derived from the artifact profile.

Returns:

the warnings value.

getWeightType

public FoundryModelWeightType getWeightType()

Get the weightType property: The weight type of the model.

Returns:

the weightType value.

setBaseModel

public ModelVersion setBaseModel(String baseModel)

Set the baseModel property: Base model asset ID.

Parameters:

baseModel - the baseModel value to set.

Returns:

the ModelVersion object itself.

setDescription

public ModelVersion setDescription(String description)

Set the description property: The asset description text.

Parameters:

description - the description value to set.

Returns:

the ModelVersion object itself.

setLoraConfig

public ModelVersion setLoraConfig(LoraConfig loraConfig)

Set the loraConfig property: Adapter-specific configuration. Required when weight_type is lora; ignored otherwise. May be auto-populated from adapter_config.json when present in the uploaded files — user-provided values take precedence over auto-detected values.

Parameters:

loraConfig - the loraConfig value to set.

Returns:

the ModelVersion object itself.

setSource

public ModelVersion setSource(ModelSourceData source)

Set the source property: The source of the model.

Parameters:

source - the source value to set.

Returns:

the ModelVersion object itself.

setTags

public ModelVersion setTags(Map<String,String> tags)

Set the tags property: Tag dictionary. Tags can be added, removed, and updated.

Parameters:

tags - the tags value to set.

Returns:

the ModelVersion object itself.

setWeightType

public ModelVersion setWeightType(FoundryModelWeightType weightType)

Set the weightType property: The weight type of the model.

Parameters:

weightType - the weightType value to set.

Returns:

the ModelVersion object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to