Contents

init(for:keyPath:)

Creates a new parameter object using the specified key path and class information.

Declaration

convenience init(for aClass: AnyClass, keyPath: String)

Parameters

  • aClass:

    The intent or intent response class that contains the specified key path. For example, when specifying properties of a ride request intent, you would specify the Inrequestrideintent class.

  • keyPath:

    The path to a property of the specified class. For example, to specify the key path for the Pickuplocation property of a ride request, specify the string pickupLocation.

Return Value

An initialized parameter object.

Discussion

If any properties in the key path contain an array or ordered set, use the setIndex(_:forSubKeyPath:) method to specify which object in those properties to use.

See Also

Creating a Parameter Object