:tocdepth: 3 :py:mod:`gws.plugin.qfieldcloud.patcher` ======================================== .. py:module:: gws.plugin.qfieldcloud.patcher **Source code:** :source:`gws.plugin.qfieldcloud.patcher` Module Contents --------------- .. py:class:: Args(*args, **kwargs) Bases: :py:obj:`gws.Data` Basic data object. This object can be instantiated by passing one or or ``dict`` arguments and/or keyword args. All dicts keys and keywords become attributes of the object. Accessing an undefined attribute returns ``None`` and no error is raised, unless the attribute name starts with an underscore. .. py:attribute:: baseDir :type: str .. py:attribute:: caps :type: gws.plugin.qfieldcloud.caps.Caps .. py:attribute:: changes :type: list[Change] .. py:attribute:: fileContent :type: bytes .. py:attribute:: filePath :type: str .. py:attribute:: project :type: gws.Project .. py:attribute:: qfcProject :type: gws.plugin.qfieldcloud.core.QfcProject .. py:attribute:: user :type: gws.User .. py:class:: Change(*args, **kwargs) Bases: :py:obj:`gws.Data` Basic data object. This object can be instantiated by passing one or or ``dict`` arguments and/or keyword args. All dicts keys and keywords become attributes of the object. Accessing an undefined attribute returns ``None`` and no error is raised, unless the attribute name starts with an underscore. .. py:attribute:: layerUid :type: str .. py:attribute:: newAtts :type: dict .. py:attribute:: oldAtts :type: dict .. py:attribute:: type :type: ChangeType .. py:attribute:: uid :type: str .. py:attribute:: wkt :type: str .. py:class:: ChangeType(*args, **kwds) Bases: :py:obj:`gws.Enum` Enumeration type. Despite being declared as extending ``Enum`` (for IDE support), this class is actually just a simple object and intended to be used as a collection of attributes. It doesn't provide any ``Enum``-specific utilities. The rationale behind this is that we need ``Enum`` members (e.g. ``Color.RED``) to be scalars, and not complex objects as in the standard ``Enum``. .. py:attribute:: create :value: 'create' .. py:attribute:: delete :value: 'delete' .. py:attribute:: patch :value: 'patch' .. py:class:: Object .. py:attribute:: args :type: Args .. py:attribute:: caps :type: gws.plugin.qfieldcloud.caps.Caps .. py:attribute:: ops_by_model :type: dict[str, list[Operation]] .. py:attribute:: project :type: gws.Project .. py:attribute:: qfcProject :type: gws.plugin.qfieldcloud.core.QfcProject .. py:attribute:: root :type: gws.Root .. py:attribute:: user :type: gws.User .. py:method:: apply_changes(root: gws.Root, args: Args) .. py:method:: apply_upload(root: gws.Root, args: Args) .. py:method:: commit_operations_for_model(me: gws.plugin.qfieldcloud.caps.ModelEntry, ops: list[Operation]) .. py:method:: commit_upload(path: str, content: bytes) .. py:method:: commit_upload_for_model(me: gws.plugin.qfieldcloud.caps.ModelEntry, path: str, content: bytes) -> bool .. py:method:: find_uid_for_path(me: gws.plugin.qfieldcloud.caps.ModelEntry, ff: gws.plugin.model_field.file.Object, path: str, mc: gws.ModelContext) -> Optional[str] .. py:method:: get_feature(me: gws.plugin.qfieldcloud.caps.ModelEntry, pk: str) -> gws.Feature | None .. py:method:: prepare(args: Args) .. py:method:: prepare_change(cc: Change) .. py:class:: Operation(*args, **kwargs) Bases: :py:obj:`gws.Data` Basic data object. This object can be instantiated by passing one or or ``dict`` arguments and/or keyword args. All dicts keys and keywords become attributes of the object. Accessing an undefined attribute returns ``None`` and no error is raised, unless the attribute name starts with an underscore. .. py:attribute:: feature :type: gws.Feature .. py:attribute:: type :type: gws.ModelOperation