Skip to content

FormGroup

synapseclient.models.mixins.FormGroup dataclass

Dataclass representing a FormGroup.s

Source code in synapseclient/models/mixins/form.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@dataclass
class FormGroup:
    """Dataclass representing a FormGroup.s"""

    group_id: Optional[str] = None
    """Unique identifier provided by the system."""

    name: Optional[str] = None
    """Unique name for the group provided by the caller."""

    created_by: Optional[str] = None
    """Id of the user that created this group"""

    created_on: Optional[str] = None
    """The date this object was originally created."""

    def fill_from_dict(self, synapse_response: dict[str, Any]) -> "FormGroup":
        """Converts a response from the REST API into this dataclass."""
        self.group_id = synapse_response.get("groupId", None)
        self.name = synapse_response.get("name", None)
        self.created_by = synapse_response.get("createdBy", None)
        self.created_on = synapse_response.get("createdOn", None)

        return self

Attributes

group_id class-attribute instance-attribute

group_id: Optional[str] = None

Unique identifier provided by the system.

name class-attribute instance-attribute

name: Optional[str] = None

Unique name for the group provided by the caller.

created_by class-attribute instance-attribute

created_by: Optional[str] = None

Id of the user that created this group

created_on class-attribute instance-attribute

created_on: Optional[str] = None

The date this object was originally created.