---
title: "init(type:validDuration:userActivity:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/inreservationaction/init(type:validduration:useractivity:)"
---

# init(type:validDuration:userActivity:)

Creates a new reservation action.

## Declaration

```swift
init(type: INReservationActionType, validDuration: INDateComponentsRange, userActivity: NSUserActivity)
```

## Parameters

- `type`: The type of action to create.
- `validDuration`: The date and time range the action is valid.
- `userActivity`: The user activity object to use when launching your app. Provide an object if you want to add information that is specific to your app. If you specify nil, the system automatically creates a user activity object for you, sets its type to the class name of the intent being handled, and fills it with an doc://com.apple.sirikit/documentation/Intents/INInteraction object containing the intent and your response.
