Class UniversalActionResponse
    
    
      
    
    
      
      Zadbaj o dobrą organizację dzięki kolekcji
    
    
      
      Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
Uniwersalnydziałanieodpowiedź
Obiekt odpowiedzi, który może być zwracany przez metodę tworzącą działanie uniwersalne.
// A universal action that opens a link.
const openLinkUniversalAction =
    CardService.newUniversalActionResponseBuilder()
        .setOpenLink(CardService.newOpenLink().setUrl('https://www.google.com'))
        .build();
const cardBuilder1 = CardService.newCardBuilder();
const cardBuilder2 = CardService.newCardBuilder();
// Finish building the cards ...
// A universal action that shows two static cards.
const cardsUniversalAction =
    CardService.newUniversalActionResponseBuilder()
        .displayAddOnCards([cardBuilder1.build(), cardBuilder2.build()])
        .build();
 
Metody
| Metoda | Zwracany typ | Krótki opis | 
| printJson() | String | Wypisuje reprezentację obiektu w formacie JSON. | 
 
Szczegółowa dokumentacja
printJson()
Wypisuje reprezentację obiektu w formacie JSON. Jest to tylko funkcja debugowania.
Powrót
String
 
 
 
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
  Ostatnia aktualizacja: 2025-07-26 UTC.
  
  
  
    
      [null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[],["The `UniversalActionResponse` object is used to define actions within a card-based interface. Key actions include using the `setOpenLink` method to open a URL and `displayAddOnCards` to display multiple static cards. `printJson()` is a method for debugging, that returns the JSON representation of the object as a string. These methods are used within the `UniversalActionResponseBuilder` to create the object.\n"]]