@@ -1753,6 +1753,108 @@ public func FfiConverterTypeSelectedCredential_lower(_ value: SelectedCredential
17531753 return FfiConverterTypeSelectedCredential . lower ( value)
17541754}
17551755
1756+
1757+ /**
1758+ * An Unverified asset link.
1759+ */
1760+ public struct UnverifiedAssetLink {
1761+ /**
1762+ * Application package name.
1763+ */
1764+ public let packageName : String
1765+ /**
1766+ * Fingerprint to compare.
1767+ */
1768+ public let sha256CertFingerprint : String
1769+ /**
1770+ * Host to lookup the well known asset link.
1771+ */
1772+ public let host : String
1773+ /**
1774+ * When sourced from the application statement list or parsed from host for passkeys.
1775+ * Will be generated from `host` if not provided.
1776+ */
1777+ public let assetLinkUrl : String ?
1778+
1779+ // Default memberwise initializers are never public by default, so we
1780+ // declare one manually.
1781+ public init (
1782+ /**
1783+ * Application package name.
1784+ */packageName: String ,
1785+ /**
1786+ * Fingerprint to compare.
1787+ */sha256CertFingerprint: String ,
1788+ /**
1789+ * Host to lookup the well known asset link.
1790+ */host: String ,
1791+ /**
1792+ * When sourced from the application statement list or parsed from host for passkeys.
1793+ * Will be generated from `host` if not provided.
1794+ */assetLinkUrl: String ? ) {
1795+ self . packageName = packageName
1796+ self . sha256CertFingerprint = sha256CertFingerprint
1797+ self . host = host
1798+ self . assetLinkUrl = assetLinkUrl
1799+ }
1800+ }
1801+
1802+
1803+
1804+ extension UnverifiedAssetLink : Equatable , Hashable {
1805+ public static func == ( lhs: UnverifiedAssetLink , rhs: UnverifiedAssetLink ) -> Bool {
1806+ if lhs. packageName != rhs. packageName {
1807+ return false
1808+ }
1809+ if lhs. sha256CertFingerprint != rhs. sha256CertFingerprint {
1810+ return false
1811+ }
1812+ if lhs. host != rhs. host {
1813+ return false
1814+ }
1815+ if lhs. assetLinkUrl != rhs. assetLinkUrl {
1816+ return false
1817+ }
1818+ return true
1819+ }
1820+
1821+ public func hash( into hasher: inout Hasher ) {
1822+ hasher. combine ( packageName)
1823+ hasher. combine ( sha256CertFingerprint)
1824+ hasher. combine ( host)
1825+ hasher. combine ( assetLinkUrl)
1826+ }
1827+ }
1828+
1829+
1830+ public struct FfiConverterTypeUnverifiedAssetLink : FfiConverterRustBuffer {
1831+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> UnverifiedAssetLink {
1832+ return
1833+ try UnverifiedAssetLink (
1834+ packageName: FfiConverterString . read ( from: & buf) ,
1835+ sha256CertFingerprint: FfiConverterString . read ( from: & buf) ,
1836+ host: FfiConverterString . read ( from: & buf) ,
1837+ assetLinkUrl: FfiConverterOptionString . read ( from: & buf)
1838+ )
1839+ }
1840+
1841+ public static func write( _ value: UnverifiedAssetLink , into buf: inout [ UInt8 ] ) {
1842+ FfiConverterString . write ( value. packageName, into: & buf)
1843+ FfiConverterString . write ( value. sha256CertFingerprint, into: & buf)
1844+ FfiConverterString . write ( value. host, into: & buf)
1845+ FfiConverterOptionString . write ( value. assetLinkUrl, into: & buf)
1846+ }
1847+ }
1848+
1849+
1850+ public func FfiConverterTypeUnverifiedAssetLink_lift( _ buf: RustBuffer ) throws -> UnverifiedAssetLink {
1851+ return try FfiConverterTypeUnverifiedAssetLink . lift ( buf)
1852+ }
1853+
1854+ public func FfiConverterTypeUnverifiedAssetLink_lower( _ value: UnverifiedAssetLink ) -> RustBuffer {
1855+ return FfiConverterTypeUnverifiedAssetLink . lower ( value)
1856+ }
1857+
17561858// Note that we don't yet support `indirect` for enums.
17571859// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
17581860
@@ -1814,6 +1916,77 @@ extension ClientData: Equatable, Hashable {}
18141916
18151917
18161918
1919+ // Note that we don't yet support `indirect` for enums.
1920+ // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
1921+ /**
1922+ * The origin of a WebAuthn request.
1923+ */
1924+
1925+ public enum Origin {
1926+
1927+ /**
1928+ * A Url, meant for a request in the web browser.
1929+ */
1930+ case web( String
1931+ )
1932+ /**
1933+ * An android digital asset fingerprint.
1934+ * Meant for a request coming from an android application.
1935+ */
1936+ case android( UnverifiedAssetLink
1937+ )
1938+ }
1939+
1940+
1941+ public struct FfiConverterTypeOrigin : FfiConverterRustBuffer {
1942+ typealias SwiftType = Origin
1943+
1944+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> Origin {
1945+ let variant : Int32 = try readInt ( & buf)
1946+ switch variant {
1947+
1948+ case 1 : return . web( try FfiConverterString . read ( from: & buf)
1949+ )
1950+
1951+ case 2 : return . android( try FfiConverterTypeUnverifiedAssetLink . read ( from: & buf)
1952+ )
1953+
1954+ default : throw UniffiInternalError . unexpectedEnumCase
1955+ }
1956+ }
1957+
1958+ public static func write( _ value: Origin , into buf: inout [ UInt8 ] ) {
1959+ switch value {
1960+
1961+
1962+ case let . web( v1) :
1963+ writeInt ( & buf, Int32 ( 1 ) )
1964+ FfiConverterString . write ( v1, into: & buf)
1965+
1966+
1967+ case let . android( v1) :
1968+ writeInt ( & buf, Int32 ( 2 ) )
1969+ FfiConverterTypeUnverifiedAssetLink . write ( v1, into: & buf)
1970+
1971+ }
1972+ }
1973+ }
1974+
1975+
1976+ public func FfiConverterTypeOrigin_lift( _ buf: RustBuffer ) throws -> Origin {
1977+ return try FfiConverterTypeOrigin . lift ( buf)
1978+ }
1979+
1980+ public func FfiConverterTypeOrigin_lower( _ value: Origin ) -> RustBuffer {
1981+ return FfiConverterTypeOrigin . lower ( value)
1982+ }
1983+
1984+
1985+
1986+ extension Origin : Equatable , Hashable { }
1987+
1988+
1989+
18171990// Note that we don't yet support `indirect` for enums.
18181991// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
18191992
0 commit comments