<commit_before>//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

@_exported import Intents
import Foundation

#if os(iOS) || os(watchOS) || os(macOS)

public protocol _INIntentSetImageKeyPath { }

extension _INIntentSetImageKeyPath {
    
    @available(iOS 12.0, watchOS 5.0, macOS 10.14, *)
    public func setImage<Value>(_ image: INImage?, forParameterNamed parameterName: KeyPath<Self, Value>) {
        if let keyPathString = parameterName._kvcKeyPathString {
            (self as! INIntent).__setImage(image, forParameterNamed: keyPathString)
        }
    }
    
    @available(iOS 12.0, watchOS 5.0, macOS 10.14, *)
    public func image<Value>(forParameterNamed parameterName: KeyPath<Self, Value>) -> INImage? {
        if let keyPathString = parameterName._kvcKeyPathString {
            return (self as! INIntent).__image(forParameterNamed: keyPathString)
        } else {
            return nil
        }
    }
}

@available(iOS 10.0, watchOS 3.2, macOS 10.12, *)
extension INIntent : _INIntentSetImageKeyPath { }

#endif<commit_msg>Make APIs using INImage unavailable on macOS<commit_after>//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

@_exported import Intents
import Foundation

#if os(iOS) || os(watchOS)

public protocol _INIntentSetImageKeyPath { }

extension _INIntentSetImageKeyPath {
    
    @available(iOS 12.0, watchOS 5.0, *)
    public func setImage<Value>(_ image: INImage?, forParameterNamed parameterName: KeyPath<Self, Value>) {
        if let keyPathString = parameterName._kvcKeyPathString {
            (self as! INIntent).__setImage(image, forParameterNamed: keyPathString)
        }
    }
    
    @available(iOS 12.0, watchOS 5.0, *)
    public func image<Value>(forParameterNamed parameterName: KeyPath<Self, Value>) -> INImage? {
        if let keyPathString = parameterName._kvcKeyPathString {
            return (self as! INIntent).__image(forParameterNamed: keyPathString)
        } else {
            return nil
        }
    }
}

@available(iOS 10.0, watchOS 3.2, *)
extension INIntent : _INIntentSetImageKeyPath { }

#endif
{'fraction_non_alphanumeric': 0.19581812147361433, 'fraction_numerical': 0.02057749751078659, 'mean_word_length': 2.261904761904762, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1680274', 'n_tokens_mistral': 874, 'n_tokens_neox': 808, 'n_words': 236}