I am trying to save a Shape object using Google Slides API and then restore the shape to insert it into a different slide or presentation. As far as I could see, the shape is handled as a PageElement object.
Is there any convenient way to serialize the PageElement objects in the new Google Slides API, as a serialized text or JSON format? And then reverse back this serialization to insert the object again into the slide?
P.S. Maybe regenerating the object from the objectId or any other way using element.asShape(). For the purpose of exploring the new Google Slides API, I tried to modify the Translate Add-on sample.
I also found useful the documentation here but unfortunately it didn't answer my question.