Class SuggestionsResponse
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
추천응답
추천 콜백 함수에서 반환될 수 있는 응답 객체입니다. 자동 완성을 구현하는 TextInput
위젯과 함께 사용됩니다.
Google Workspace 부가기능 및 Google Chat 앱에서 사용할 수 있습니다.
const suggestionsResponse = CardService.newSuggestionsResponseBuilder()
.setSuggestions(
CardService.newSuggestions()
.addSuggestion('First suggestion')
.addSuggestion('Second suggestion'),
)
.build();
자세한 문서
printJson()
이 객체의 JSON 표현을 출력합니다. 디버깅 전용입니다.
리턴
String
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003e\u003ccode\u003eSuggestionsResponse\u003c/code\u003e objects, used with \u003ccode\u003eTextInput\u003c/code\u003e widgets for autocomplete, facilitate suggestions within Google Workspace Add-ons and Google Chat apps.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can leverage the \u003ccode\u003eSuggestionsResponseBuilder\u003c/code\u003e to construct a response containing suggestions using methods like \u003ccode\u003esetSuggestions\u003c/code\u003e and \u003ccode\u003eaddSuggestion\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eFor debugging purposes, the \u003ccode\u003eprintJson()\u003c/code\u003e method outputs the JSON structure of the \u003ccode\u003eSuggestionsResponse\u003c/code\u003e object.\u003c/p\u003e\n"]]],[],null,["# Class SuggestionsResponse\n\nSuggestionsResponse\n\nA response object that can be returned from a suggestions callback function. This is used with\n[TextInput](/apps-script/reference/card-service/text-input) widgets that implement autocomplete.\n\nAvailable for Google Workspace add-ons and Google Chat apps.\n\n```javascript\nconst suggestionsResponse = CardService.newSuggestionsResponseBuilder()\n .setSuggestions(\n CardService.newSuggestions()\n .addSuggestion('First suggestion')\n .addSuggestion('Second suggestion'),\n )\n .build();\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|-----------------------------|-------------|------------------------------------------------|\n| [printJson()](#printJson()) | `String` | Prints the JSON representation of this object. |\n\nDetailed documentation\n----------------------\n\n### `print``Json()`\n\nPrints the JSON representation of this object. This is for debugging only.\n\n#### Return\n\n\n`String`"]]