p _ Nothing = ""

cc :: [String] -> String
cc [] = mempty
cc a = " {" ++ intercalate ", " (filter (not . null) a) ++ "}"


instance T.ToJSON MessageCopyOptions where
 toJSON MessageCopyOptions { new_caption = new_caption, replace_caption = replace_caption, send_copy = send_copy } =
  A.object [ "@type" A..= T.String "messageCopyOptions", "new_caption" A..= new_caption, "replace_caption" A..= replace_caption, "send_copy" A..= send_copy ]

instance T.FromJSON MessageCopyOptions where
 parseJSON v@(T.Object obj) = do
  t <- obj A..: "@type" :: T.Parser String
  case t of