Package org.gradle.tooling

# Interface FetchModelResult<T extends Model,M>

Type Parameters:
  `T` - The type of target from which the model was fetched.
  `M` - The fetched model type.

@Incubating @NullMarked public interface FetchModelResult<T extends Model,M>
Carries the result of a single model fetch operation.

Since:
  9.3.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Collection<? extends Failure>`
  `getFailures()`
  Returns the failures that occurred during the fetch operation.
  `@Nullable M`
  `getModel()`
  Returns the fetched model.
  `@Nullable T`
  `getTarget()`
  Returns the target from which the model was fetched.

- ## Method Details

  - ### getTarget

    @Incubating @Nullable T getTarget()
    Returns the target from which the model was fetched.
    Returns:
      the target, or `null` if the fetch operation failed
    Since:
      9.3.0

  - ### getModel

    @Incubating @Nullable M getModel()
    Returns the fetched model.
    Returns:
      the model, or `null` if the fetch operation failed
    Since:
      9.3.0

  - ### getFailures

    @Incubating Collection<? extends Failure> getFailures()
    Returns the failures that occurred during the fetch operation.
    Returns:
      a collection of failures, empty if the fetch operation was successful
    Since:
      9.3.0