Created
October 8, 2018 14:40
-
-
Save russell-archer/257395caa9ca2b2a80d19c681fc92d16 to your computer and use it in GitHub Desktop.
ShowRandomColor. Code generated by Xcode from the Intents definition file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ShowRandomColorIntent.swift | |
// | |
// This file was automatically generated and should not be edited. | |
// Comments removed for brevity. | |
// | |
import Foundation | |
import Intents | |
@available(iOS 12.0, watchOS 5.0, *) | |
@objc(ShowRandomColorIntent) | |
public class ShowRandomColorIntent: INIntent { | |
} | |
@available(iOS 12.0, watchOS 5.0, *) | |
@objc(ShowRandomColorIntentHandling) | |
public protocol ShowRandomColorIntentHandling: NSObjectProtocol { | |
@objc(handleShowRandomColor:completion:) | |
func handle(intent: ShowRandomColorIntent, completion: @escaping (ShowRandomColorIntentResponse) -> Swift.Void) | |
@objc(confirmShowRandomColor:completion:) | |
optional func confirm(intent: ShowRandomColorIntent, completion: @escaping (ShowRandomColorIntentResponse) -> Swift.Void) | |
} | |
@available(iOS 12.0, watchOS 5.0, *) | |
@objc(ShowRandomColorIntentResponse) | |
public class ShowRandomColorIntentResponse: INIntentResponse { | |
@NSManaged public var colorName: String? | |
@objc public fileprivate(set) var code: ShowRandomColorIntentResponseCode = .unspecified | |
@objc(initWithCode:userActivity:) | |
public convenience init(code: ShowRandomColorIntentResponseCode, userActivity: NSUserActivity?) { | |
self.init() | |
self.code = code | |
self.userActivity = userActivity | |
} | |
@objc(failureIntentResponseWithColorName:) | |
public static func failure(colorName: String) -> ShowRandomColorIntentResponse { | |
let intentResponse = ShowRandomColorIntentResponse(code: .failure, userActivity: nil) | |
intentResponse.colorName = colorName | |
return intentResponse | |
} | |
@objc(successIntentResponseWithColorName:) | |
public static func success(colorName: String) -> ShowRandomColorIntentResponse { | |
let intentResponse = ShowRandomColorIntentResponse(code: .success, userActivity: nil) | |
intentResponse.colorName = colorName | |
return intentResponse | |
} | |
} | |
@available(iOS 12.0, watchOS 5.0, *) | |
@objc public enum ShowRandomColorIntentResponseCode: Int { | |
case unspecified = 0 | |
case ready | |
case continueInApp | |
case inProgress | |
case success | |
case failure | |
case failureRequiringAppLaunch | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment