Source code for slidge_whatsapp.generated.go


# python wrapper for package go within overall package whatsapp
# This is what you import to use the package.
# File is generated by gopy. Do not edit.
# gopy build -output=generated -no-make=true .

# the following is required to enable dlopen to open the _go.so file
import os,sys,inspect,collections
try:
	import collections.abc as _collections_abc
except ImportError:
	_collections_abc = collections

[docs]cwd = os.getcwd()
[docs]currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
os.chdir(currentdir) from . import _whatsapp os.chdir(cwd) # to use this code in your end-user python file, import it as follows: # from whatsapp import go # and then refer to everything using go. prefix # packages imported by this package listed below: import collections try: import collections.abc as _collections_abc except ImportError:
[docs] _collections_abc = collections
[docs]class GoClass(object): """GoClass is the base class for all GoPy wrapper classes""" def __init__(self):
[docs] self.handle = 0
# use go.nil for nil pointers
[docs]nil = GoClass()
# need to explicitly initialize it
[docs]def main(): global nil nil = GoClass()
main()
[docs]def Init(): """calls the GoPyInit function, which runs the 'main' code string that was passed using -main arg to gopy""" _whatsapp.GoPyInit()
# ---- Types --- # Python type for slice []bool
[docs]class Slice_bool(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_bool_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_bool.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_bool len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_bool([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_bool_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_bool_len(self.handle) return Slice_bool(handle=_whatsapp.Slice_bool_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_bool_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_bool_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_bool.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_bool_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_bool_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# Python type for slice []byte
[docs]class Slice_byte(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_byte_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_byte.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_byte len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_byte([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_byte_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_byte_len(self.handle) return Slice_byte(handle=_whatsapp.Slice_byte_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_byte_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_byte_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_byte.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_byte_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_byte_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
@staticmethod
[docs] def from_bytes(value): """Create a Go []byte object from a Python bytes object""" handle = _whatsapp.Slice_byte_from_bytes(value) return Slice_byte(handle=handle)
[docs] def __bytes__(self): """Convert the slice to a bytes object.""" return _whatsapp.Slice_byte_to_bytes(self.handle)
# Python type for slice []error
[docs]class Slice_error(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_error_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_error.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_error len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_error([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_error_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_error_len(self.handle) return Slice_error(handle=_whatsapp.Slice_error_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_error_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_error_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_error.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_error_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_error_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# Python type for slice []float32
[docs]class Slice_float32(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_float32_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_float32.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_float32 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_float32([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_float32_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_float32_len(self.handle) return Slice_float32(handle=_whatsapp.Slice_float32_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_float32_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_float32_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_float32.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_float32_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_float32_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# Python type for slice []float64
[docs]class Slice_float64(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_float64_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_float64.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_float64 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_float64([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_float64_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_float64_len(self.handle) return Slice_float64(handle=_whatsapp.Slice_float64_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_float64_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_float64_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_float64.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_float64_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_float64_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# Python type for slice []int
[docs]class Slice_int(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_int_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_int.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_int len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_int([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_int_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_int_len(self.handle) return Slice_int(handle=_whatsapp.Slice_int_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_int_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_int_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_int.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_int_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_int_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# Python type for slice []int16
[docs]class Slice_int16(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_int16_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_int16.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_int16 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_int16([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_int16_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_int16_len(self.handle) return Slice_int16(handle=_whatsapp.Slice_int16_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_int16_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_int16_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_int16.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_int16_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_int16_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# Python type for slice []int32
[docs]class Slice_int32(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_int32_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_int32.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_int32 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_int32([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_int32_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_int32_len(self.handle) return Slice_int32(handle=_whatsapp.Slice_int32_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_int32_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_int32_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_int32.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_int32_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_int32_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# Python type for slice []int64
[docs]class Slice_int64(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_int64_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_int64.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_int64 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_int64([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_int64_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_int64_len(self.handle) return Slice_int64(handle=_whatsapp.Slice_int64_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_int64_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_int64_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_int64.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_int64_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_int64_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# Python type for slice []int8
[docs]class Slice_int8(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_int8_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_int8.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_int8 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_int8([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_int8_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_int8_len(self.handle) return Slice_int8(handle=_whatsapp.Slice_int8_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_int8_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_int8_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_int8.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_int8_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_int8_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# Python type for slice []rune
[docs]class Slice_rune(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_rune_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_rune.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_rune len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_rune([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_rune_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_rune_len(self.handle) return Slice_rune(handle=_whatsapp.Slice_rune_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_rune_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_rune_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_rune.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_rune_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_rune_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# Python type for slice []string
[docs]class Slice_string(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_string_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_string.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_string len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_string([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_string_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_string_len(self.handle) return Slice_string(handle=_whatsapp.Slice_string_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_string_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_string_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_string.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_string_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_string_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# Python type for slice []uint
[docs]class Slice_uint(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_uint_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_uint.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_uint len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_uint([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_uint_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_uint_len(self.handle) return Slice_uint(handle=_whatsapp.Slice_uint_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_uint_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_uint_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_uint.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_uint_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_uint_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# Python type for slice []uint16
[docs]class Slice_uint16(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_uint16_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_uint16.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_uint16 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_uint16([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_uint16_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_uint16_len(self.handle) return Slice_uint16(handle=_whatsapp.Slice_uint16_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_uint16_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_uint16_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_uint16.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_uint16_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_uint16_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# Python type for slice []uint32
[docs]class Slice_uint32(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_uint32_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_uint32.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_uint32 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_uint32([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_uint32_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_uint32_len(self.handle) return Slice_uint32(handle=_whatsapp.Slice_uint32_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_uint32_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_uint32_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_uint32.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_uint32_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_uint32_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# Python type for slice []uint64
[docs]class Slice_uint64(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_uint64_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_uint64.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_uint64 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_uint64([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_uint64_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_uint64_len(self.handle) return Slice_uint64(handle=_whatsapp.Slice_uint64_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_uint64_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_uint64_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_uint64.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_uint64_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_uint64_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# Python type for slice []uint8
[docs]class Slice_uint8(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg otherwise parameter is a python list that we copy from """
[docs] self.index = 0
if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) else: self.handle = _whatsapp.Slice_uint8_CTor() _whatsapp.IncRef(self.handle) if len(args) > 0: if not isinstance(args[0], _collections_abc.Iterable): raise TypeError('Slice_uint8.__init__ takes a sequence as argument') for elt in args[0]: self.append(elt)
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
[docs] def __str__(self): s = 'go.Slice_uint8 len: ' + str(len(self)) + ' handle: ' + str(self.handle) + ' [' if len(self) < 120: s += ', '.join(map(str, self)) + ']' return s
[docs] def __repr__(self): return 'go.Slice_uint8([' + ', '.join(map(str, self)) + '])'
[docs] def __len__(self): return _whatsapp.Slice_uint8_len(self.handle)
[docs] def __getitem__(self, key): if isinstance(key, slice): if key.step == None or key.step == 1: st = key.start ed = key.stop if st == None: st = 0 if ed == None: ed = _whatsapp.Slice_uint8_len(self.handle) return Slice_uint8(handle=_whatsapp.Slice_uint8_subslice(self.handle, st, ed)) return [self[ii] for ii in range(*key.indices(len(self)))] elif isinstance(key, int): if key < 0: key += len(self) if key < 0 or key >= len(self): raise IndexError('slice index out of range') return _whatsapp.Slice_uint8_elem(self.handle, key) else: raise TypeError('slice index invalid type')
[docs] def __setitem__(self, idx, value): if idx < 0: idx += len(self) if idx < len(self): _whatsapp.Slice_uint8_set(self.handle, idx, value) return raise IndexError('slice index out of range')
[docs] def __iadd__(self, value): if not isinstance(value, _collections_abc.Iterable): raise TypeError('Slice_uint8.__iadd__ takes a sequence as argument') for elt in value: self.append(elt) return self
[docs] def __iter__(self): self.index = 0 return self
[docs] def __next__(self): if self.index < len(self): rv = _whatsapp.Slice_uint8_elem(self.handle, self.index) self.index = self.index + 1 return rv raise StopIteration
[docs] def append(self, value): _whatsapp.Slice_uint8_append(self.handle, value)
[docs] def copy(self, src): """ copy emulates the go copy function, copying elements into this list from source list, up to min of size of each list """ mx = min(len(self), len(src)) for i in range(mx): self[i] = src[i]
# ---- External Types Outside of Targeted Packages --- # Python type for *protocol.SignalAddress
[docs]class Ptr_protocol_SignalAddress(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg """ if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], int): self.handle = args[0] _whatsapp.IncRef(self.handle) else: self.handle = 0
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
# Python type for *types.GroupParticipantAddRequest
[docs]class Ptr_types_GroupParticipantAddRequest(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg """ if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], int): self.handle = args[0] _whatsapp.IncRef(self.handle) else: self.handle = 0
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
# Python type for *time.Location
[docs]class Ptr_time_Location(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg """ if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], int): self.handle = args[0] _whatsapp.IncRef(self.handle) else: self.handle = 0
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
# Python type for driver.Value
[docs]class driver_Value(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg """ if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], int): self.handle = args[0] _whatsapp.IncRef(self.handle) else: self.handle = 0
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
# Python type for protocol.SignalAddress
[docs]class protocol_SignalAddress(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg """ if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], int): self.handle = args[0] _whatsapp.IncRef(self.handle) else: self.handle = 0
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
# Python type for types.GroupParticipant
[docs]class types_GroupParticipant(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg """ if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], int): self.handle = args[0] _whatsapp.IncRef(self.handle) else: self.handle = 0
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
# Python type for types.GroupParticipantAddRequest
[docs]class types_GroupParticipantAddRequest(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg """ if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], int): self.handle = args[0] _whatsapp.IncRef(self.handle) else: self.handle = 0
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
# Python type for types.JID
[docs]class types_JID(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg """ if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], int): self.handle = args[0] _whatsapp.IncRef(self.handle) else: self.handle = 0
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
# Python type for time.Location
[docs]class time_Location(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg """ if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], int): self.handle = args[0] _whatsapp.IncRef(self.handle) else: self.handle = 0
[docs] def __del__(self): _whatsapp.DecRef(self.handle)
# Python type for time.Time
[docs]class time_Time(GoClass): """""" def __init__(self, *args, **kwargs): """ handle=A Go-side object is always initialized with an explicit handle=arg """ if len(kwargs) == 1 and 'handle' in kwargs: self.handle = kwargs['handle'] _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], GoClass): self.handle = args[0].handle _whatsapp.IncRef(self.handle) elif len(args) == 1 and isinstance(args[0], int): self.handle = args[0] _whatsapp.IncRef(self.handle) else: self.handle = 0
[docs] def __del__(self): _whatsapp.DecRef(self.handle)