def serialize(self,writer: SerializationWriter) -> None:
        """
        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        """
        if writer is None:
            raise TypeError("writer cannot be null.")
        super().serialize(writer)
        writer.write_bool_value("isLabelAppliedExplicitly", self.is_label_applied_explicitly)
        writer.write_object_value("labelAppliedBy", self.label_applied_by)
        writer.write_datetime_value("labelAppliedDateTime", self.label_applied_date_time)
        writer.write_str_value("name", self.name)
        writer.write_object_value("retentionSettings", self.retention_settings)

        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        
msgraph/generated/models/item_retention_label.py