import LDKCHeaders public class ChannelUpdate { public internal(set) var cOpaqueStruct: LDKChannelUpdate?; /* DEFAULT_CONSTRUCTOR_START */ public init(signature_arg: [UInt8], contents_arg: UnsignedChannelUpdate) { self.cOpaqueStruct = ChannelUpdate_new(Bindings.new_LDKSignature(array: signature_arg), contents_arg.cOpaqueStruct!) } /* DEFAULT_CONSTRUCTOR_END */ public init(pointer: LDKChannelUpdate){ self.cOpaqueStruct = pointer } /* STRUCT_METHODS_START */ public func get_signature() -> [UInt8] { return Bindings.LDKSignature_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer) in ChannelUpdate_get_signature(this_ptrPointer) }); } public func set_signature(val: [UInt8]) -> Void { let this_ptrPointer = UnsafeMutablePointer.allocate(capacity: 1) this_ptrPointer.initialize(to: self.cOpaqueStruct!) return ChannelUpdate_set_signature(this_ptrPointer, Bindings.new_LDKSignature(array: val)); } public func get_contents() -> UnsignedChannelUpdate { return UnsignedChannelUpdate(pointer: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer) in ChannelUpdate_get_contents(this_ptrPointer) }); } public func set_contents(val: UnsignedChannelUpdate) -> Void { let this_ptrPointer = UnsafeMutablePointer.allocate(capacity: 1) this_ptrPointer.initialize(to: self.cOpaqueStruct!) return ChannelUpdate_set_contents(this_ptrPointer, val.cOpaqueStruct!); } public func clone(orig: ChannelUpdate) -> ChannelUpdate { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in ChannelUpdate(pointer: ChannelUpdate_clone(origPointer)) }; } public func write(obj: ChannelUpdate) -> [UInt8] { return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer) in ChannelUpdate_write(objPointer) }); } public func read(ser: [UInt8]) -> Result_ChannelUpdateDecodeErrorZ { return Result_ChannelUpdateDecodeErrorZ(pointer: ChannelUpdate_read(Bindings.new_LDKu8slice(array: ser))); } deinit { if self.cOpaqueStruct?.is_owned == false { ChannelUpdate_free(self.cOpaqueStruct!) } } /* STRUCT_METHODS_END */ }