// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 // swiftlint:disable all import Foundation @_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation import CWinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.security.credentials.passwordcredential) public final class PasswordCredential : WinRTClass { private typealias SwiftABI = __ABI_Windows_Security_Credentials.IPasswordCredential private typealias CABI = __x_ABI_CWindows_CSecurity_CCredentials_CIPasswordCredential private lazy var _default: SwiftABI! = getInterfaceForCaching() @_spi(WinRTInternal) override public func _getABI() -> UnsafeMutablePointer? { if T.self == CABI.self { return RawPointer(_default) } return super._getABI() } @_spi(WinRTInternal) public static func from(abi: ComPtr<__x_ABI_CWindows_CSecurity_CCredentials_CIPasswordCredential>?) -> PasswordCredential? { guard let abi = abi else { return nil } return .init(fromAbi: WindowsFoundation.IInspectable(abi)) } @_spi(WinRTInternal) public init(fromAbi: WindowsFoundation.IInspectable) { super.init(fromAbi) } override public init() { super.init(try! RoActivateInstance(HString("Windows.Security.Credentials.PasswordCredential"))) } private static let _ICredentialFactory: __ABI_Windows_Security_Credentials.ICredentialFactory = try! RoGetActivationFactory(HString("Windows.Security.Credentials.PasswordCredential")) public init(_ resource: String, _ userName: String, _ password: String) { super.init(try! Self._ICredentialFactory.CreatePasswordCredentialImpl(resource, userName, password)) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.security.credentials.passwordcredential.retrievepassword) public func retrievePassword() throws { try _default.RetrievePasswordImpl() } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.security.credentials.passwordcredential.password) public var password : String { get { try! _default.get_PasswordImpl() } set { try! _default.put_PasswordImpl(newValue) } } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.security.credentials.passwordcredential.properties) public var properties : WindowsFoundation.AnyIPropertySet! { get { try! _default.get_PropertiesImpl() } } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.security.credentials.passwordcredential.resource) public var resource : String { get { try! _default.get_ResourceImpl() } set { try! _default.put_ResourceImpl(newValue) } } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.security.credentials.passwordcredential.username) public var userName : String { get { try! _default.get_UserNameImpl() } set { try! _default.put_UserNameImpl(newValue) } } deinit { _default = nil } }