mirror of
https://github.com/zoriya/react-native-video.git
synced 2026-08-16 02:56:22 +00:00
115 lines
3.3 KiB
Swift
Generated
115 lines
3.3 KiB
Swift
Generated
///
|
|
/// CustomVideoMetadata.swift
|
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
/// https://github.com/mrousavy/nitro
|
|
/// Copyright © Marc Rousavy @ Margelo
|
|
///
|
|
|
|
import NitroModules
|
|
|
|
/**
|
|
* Represents an instance of `CustomVideoMetadata`, backed by a C++ struct.
|
|
*/
|
|
public typealias CustomVideoMetadata = margelo.nitro.video.CustomVideoMetadata
|
|
|
|
public extension CustomVideoMetadata {
|
|
private typealias bridge = margelo.nitro.video.bridge.swift
|
|
|
|
/**
|
|
* Create a new instance of `CustomVideoMetadata`.
|
|
*/
|
|
init(title: String?, subtitle: String?, description: String?, artist: String?, imageUri: String?) {
|
|
self.init({ () -> bridge.std__optional_std__string_ in
|
|
if let __unwrappedValue = title {
|
|
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
} else {
|
|
return .init()
|
|
}
|
|
}(), { () -> bridge.std__optional_std__string_ in
|
|
if let __unwrappedValue = subtitle {
|
|
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
} else {
|
|
return .init()
|
|
}
|
|
}(), { () -> bridge.std__optional_std__string_ in
|
|
if let __unwrappedValue = description {
|
|
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
} else {
|
|
return .init()
|
|
}
|
|
}(), { () -> bridge.std__optional_std__string_ in
|
|
if let __unwrappedValue = artist {
|
|
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
} else {
|
|
return .init()
|
|
}
|
|
}(), { () -> bridge.std__optional_std__string_ in
|
|
if let __unwrappedValue = imageUri {
|
|
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
} else {
|
|
return .init()
|
|
}
|
|
}())
|
|
}
|
|
|
|
@inline(__always)
|
|
var title: String? {
|
|
return { () -> String? in
|
|
if bridge.has_value_std__optional_std__string_(self.__title) {
|
|
let __unwrapped = bridge.get_std__optional_std__string_(self.__title)
|
|
return String(__unwrapped)
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
|
|
@inline(__always)
|
|
var subtitle: String? {
|
|
return { () -> String? in
|
|
if bridge.has_value_std__optional_std__string_(self.__subtitle) {
|
|
let __unwrapped = bridge.get_std__optional_std__string_(self.__subtitle)
|
|
return String(__unwrapped)
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
|
|
@inline(__always)
|
|
var description: String? {
|
|
return { () -> String? in
|
|
if bridge.has_value_std__optional_std__string_(self.__description) {
|
|
let __unwrapped = bridge.get_std__optional_std__string_(self.__description)
|
|
return String(__unwrapped)
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
|
|
@inline(__always)
|
|
var artist: String? {
|
|
return { () -> String? in
|
|
if bridge.has_value_std__optional_std__string_(self.__artist) {
|
|
let __unwrapped = bridge.get_std__optional_std__string_(self.__artist)
|
|
return String(__unwrapped)
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
|
|
@inline(__always)
|
|
var imageUri: String? {
|
|
return { () -> String? in
|
|
if bridge.has_value_std__optional_std__string_(self.__imageUri) {
|
|
let __unwrapped = bridge.get_std__optional_std__string_(self.__imageUri)
|
|
return String(__unwrapped)
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
}
|