org.gradle.tooling.connection

## Interface ModelResult<T>

- Type Parameters:
    `T` - Type of model in the result
  All Known Subinterfaces:
    FailedModelResult<T>

      @Incubating
      public interface ModelResult<T>

  The result of a model request.
  Since:
    2.13

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `GradleConnectionException` | `getFailure()` The failure retrieving the model.
    `T` | `getModel()` Returns the model produced.

- - ### Method Detail

    - #### getModel

          T getModel()
                     throws GradleConnectionException

      Returns the model produced.
      Returns:
        the model, never null.
      Throws:
        `GradleConnectionException` - if the model could not be retrieved.

    - #### getFailure

          @Nullable
          GradleConnectionException getFailure()

      The failure retrieving the model. If this value is not null, further details can be obtained by casting to `FailedModelResult`.
      Returns:
        the failure, or null if the result was successful.