---
title: "init(restaurant:partySize:preferredBooking:maximumNumberOfResults:earliestBookingDateForResults:latestBookingDateForResults:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/ingetavailablerestaurantreservationbookingsintent/init(restaurant:partysize:preferredbooking:maximumnumberofresults:earliestbookingdateforresults:latestbookingdateforresults:)"
---

# init(restaurant:partySize:preferredBooking:maximumNumberOfResults:earliestBookingDateForResults:latestBookingDateForResults:)

Initializes the intent object with the specified reservation information.

## Declaration

```swift
init(restaurant: INRestaurant, partySize: Int, preferredBooking preferredBookingDateComponents: DateComponents?, maximumNumberOfResults: NSNumber?, earliestBookingDateForResults: Date?, latestBookingDateForResults: Date?)
```

## Parameters

- `restaurant`: The restaurant associated with the reservation.
- `partySize`: The number of people in the guest’s party.
- `preferredBookingDateComponents`: The date and time preferred by the user for the reservation.
- `maximumNumberOfResults`: The maximum number of reservation results to return.
- `earliestBookingDateForResults`: The earliest date for which to return results.
- `latestBookingDateForResults`: The latest date for which to return results.

## Return Value

Return Value An initialized intent object or nil if the object could not be created.

## Discussion

Discussion Normally, you do not create instances of this class yourself. Instead, SiriKit creates instances when Maps asks you to provide the available reservations for the restaurant. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.
