Class ModelsRepositoryClient

java.lang.Object
com.azure.iot.modelsrepository.ModelsRepositoryClient

public final class ModelsRepositoryClient extends Object
This class provides a client for interacting synchronously with a ModelsRepository instance. This client is instantiated through ModelsRepositoryClientBuilder.
  • Method Details

    • getRepositoryEndpoint

      public String getRepositoryEndpoint()
      Gets the repository endpoint that the client has been initialized with.
      Returns:
      The target repository endpoint.
    • getServiceVersion

      public ModelsRepositoryServiceVersion 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 through ModelsRepositoryClientBuilder.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

      public Map<String,String> getModels(String dtmi)
      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 - A ModelDependencyResolution 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

      public Map<String,String> getModels(Iterable<String> dtmis)
      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 - A ModelDependencyResolution 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.