Package com.azure.iot.modelsrepository
Class ModelsRepositoryClient
java.lang.Object
com.azure.iot.modelsrepository.ModelsRepositoryClient
This class provides a client for interacting synchronously with a ModelsRepository instance.
This client is instantiated through
ModelsRepositoryClientBuilder
.-
Method Summary
Modifier and TypeMethodDescriptionGets a collection of model definitions.getModels
(Iterable<String> dtmis, ModelDependencyResolution dependencyResolution, Context context) Gets a collection of model definitions.Gets a collection of model definitions.getModels
(String dtmi, ModelDependencyResolution dependencyResolution, Context context) Gets a collection of model definitions.Gets the repository endpoint that the client has been initialized with.Gets the Azure Models Repository service API version that this client is configured to use for all service requests.
-
Method Details
-
getRepositoryEndpoint
Gets the repository endpoint that the client has been initialized with.- Returns:
- The target repository endpoint.
-
getServiceVersion
Gets the Azure Models Repository service API version that this client is configured to use for all service requests. Unless configured while building this client throughModelsRepositoryClientBuilder.serviceVersion(ModelsRepositoryServiceVersion)
, this value will be equal to the latest service API version supported by this client.- Returns:
- The Azure Models Repository service API version.
-
getModels
Gets a collection of model definitions.- Parameters:
dtmi
- A well-formed DTDL model Id. See DTDL specs. For example 'dtmi:com:example:Thermostat;1'.- Returns:
- A Map containing the model definition(s) and dependencies (if applicable) where the key is the dtmi and the value is the raw model definition string.
-
getModels
public Map<String,String> getModels(String dtmi, ModelDependencyResolution dependencyResolution, Context context) Gets a collection of model definitions.- Parameters:
dtmi
- A well-formed DTDL model Id. See DTDL specs. For example 'dtmi:com:example:Thermostat;1'.dependencyResolution
- AModelDependencyResolution
value to dictate model resolution behavior.context
- Additional context that is passed through the Http pipeline during the service call.- Returns:
- A Map containing the model definition(s) and dependencies (if applicable) where the key is the dtmi and the value is the raw model definition string.
-
getModels
Gets a collection of model definitions.- Parameters:
dtmis
- Collection of well-formed DTDL model Ids.- Returns:
- A Map containing the model definition(s) and dependencies (if applicable) where the key is the dtmi and the value is the raw model definition string.
-
getModels
public Map<String,String> getModels(Iterable<String> dtmis, ModelDependencyResolution dependencyResolution, Context context) Gets a collection of model definitions.- Parameters:
dtmis
- An Iterable of well-formed DTDL model Ids. See DTDL specs. For example 'dtmi:com:example:Thermostat;1'.dependencyResolution
- AModelDependencyResolution
value to dictate model resolution behavior.context
- Additional context that is passed through the Http pipeline during the service call.- Returns:
- A Map containing the model definition(s) and dependencies (if applicable) where the key is the dtmi and the value is the raw model definition string.
-