---
title: "success(with:)"
framework: intents
role: symbol
role_heading: Type Method
path: "intents/inenergyresolutionresult/success(with:)"
---

# success(with:)

Creates an object whose resolution involves the successful matching of the specified parameter.

## Declaration

```swift
class func success(with resolvedEnergy: Measurement<UnitEnergy>) -> Self
```

## Parameters

- `resolvedEnergy`: The object that resolves the requested parameter of the intent. This value may be different than the one specified in the intent object.

## Return Value

Return Value A new INEnergyResolutionResult object.

## Discussion

Discussion Use this method to create a result object when you can resolve a parameter successfully to a value in your own internal data structures.

## See Also

### Creating a Resolution Result Object

- [confirmationRequired(with:)](intents/inenergyresolutionresult/confirmationrequired(with:).md)
- [disambiguation(with:)](intents/inenergyresolutionresult/disambiguation(with:).md)
