@Test public void testShouldBuildTellResponse_RichResponse_with_simpleresponse_and_metadata() throws Exception { String expectedResponse = "expected"; Map<String, Object> specs = new HashMap<>(); specs.put("a key", "a value"); ResponseMetadata metadata = ResponseMetadata.builder().status(Status.builder().message("OK").build()).specs(specs).build(); RichInitialPromptItem richInitialPromptItem = RichInitialPromptItem.builder().simpleResponse(SpeechResponse.builder().displayText(expectedResponse).build()).build(); RootResponse rootResponse = ResponseBuilder.tellResponseWithRichInput(Collections.singletonList(richInitialPromptItem), metadata); assertEquals(expectedResponse, rootResponse.finalResponse.richResponse.items.get(0).simpleResponse.displayText); }
public static RootResponse tellResponseWithRichInput(SpeechResponse message) { return ResponseBuilder.tellResponseWithRichInput(message, null, null, null); }
ResponseBuilder { public static RootResponse tellResponseWithRichInput(SpeechResponse message) { return ResponseBuilder.tellResponseWithRichInput(message, null, null, null); } }
ResponseBuilder { public static RootResponse tellResponseWithRichInput(SpeechResponse message) { return ResponseBuilder.tellResponseWithRichInput(message, null, null, null); }  }
ResponseBuilder { public static RootResponse tellResponseWithRichInput(SpeechResponse message) { return ResponseBuilder.tellResponseWithRichInput(message, null, null, null); }  static RootResponse tellResponse(String message); static RootResponse tellResponse(SpeechResponse message); static RootResponse tellResponseWithRichInput(SpeechResponse message); static RootResponse tellResponseWithRichInput(SpeechResponse message, ResponseMetadata metadata); static RootResponse tellResponseWithRichInput(SpeechResponse message, String conversationToken, List<SuggestionResponse> suggestions); static RootResponse tellResponseWithRichInput(SpeechResponse message, String conversationToken, List<SuggestionResponse> suggestions, ResponseMetadata metadata); static RootResponse tellResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, ResponseMetadata metadata); static RootResponse tellResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, String conversationToken, List<SuggestionResponse> suggestions, ResponseMetadata metadata); static RootResponse askResponse(String message); static RootResponse askResponse(SpeechResponse message); static RootResponse askResponse(String message, String[] noInputPrompts); static RootResponse askResponseWithRichInput(SpeechResponse message); static RootResponse askResponseWithRichInput(SpeechResponse message, ResponseMetadata metadata); static RootResponse askResponseWithRichInput(SpeechResponse message, String conversationToken, List<SpeechResponse> noInputPrompts, List<SuggestionResponse> suggestions); static RootResponse askResponseWithRichInput(SpeechResponse message, String conversationToken, List<SpeechResponse> noInputPrompts, List<SuggestionResponse> suggestions, ResponseMetadata metadata ); static RootResponse askResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems); static RootResponse askResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, ResponseMetadata metadata); static RootResponse askResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, String conversationToken, List<SpeechResponse> noInputPrompts, List<SuggestionResponse> suggestions, ResponseMetadata metadata); static RootResponse askResponse(SpeechResponse message, String conversationToken, List<SpeechResponse> noInputPrompts ); static RootResponse askResponse(String message, String conversationToken, String[] noInputPrompts); static RootResponse askForPermissionResponse(String permissionContext, SupportedPermissions... permissions); static RootResponse askForPermissionResponse(String permissionContext, String... permissions); static RootResponse askForPermissionResponse(String permissionContext, Collection<String> permissions); }
ResponseBuilder { public static RootResponse tellResponseWithRichInput(SpeechResponse message) { return ResponseBuilder.tellResponseWithRichInput(message, null, null, null); }  static RootResponse tellResponse(String message); static RootResponse tellResponse(SpeechResponse message); static RootResponse tellResponseWithRichInput(SpeechResponse message); static RootResponse tellResponseWithRichInput(SpeechResponse message, ResponseMetadata metadata); static RootResponse tellResponseWithRichInput(SpeechResponse message, String conversationToken, List<SuggestionResponse> suggestions); static RootResponse tellResponseWithRichInput(SpeechResponse message, String conversationToken, List<SuggestionResponse> suggestions, ResponseMetadata metadata); static RootResponse tellResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, ResponseMetadata metadata); static RootResponse tellResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, String conversationToken, List<SuggestionResponse> suggestions, ResponseMetadata metadata); static RootResponse askResponse(String message); static RootResponse askResponse(SpeechResponse message); static RootResponse askResponse(String message, String[] noInputPrompts); static RootResponse askResponseWithRichInput(SpeechResponse message); static RootResponse askResponseWithRichInput(SpeechResponse message, ResponseMetadata metadata); static RootResponse askResponseWithRichInput(SpeechResponse message, String conversationToken, List<SpeechResponse> noInputPrompts, List<SuggestionResponse> suggestions); static RootResponse askResponseWithRichInput(SpeechResponse message, String conversationToken, List<SpeechResponse> noInputPrompts, List<SuggestionResponse> suggestions, ResponseMetadata metadata ); static RootResponse askResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems); static RootResponse askResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, ResponseMetadata metadata); static RootResponse askResponseWithRichInput(List<RichInitialPromptItem> richInitialPromptItems, String conversationToken, List<SpeechResponse> noInputPrompts, List<SuggestionResponse> suggestions, ResponseMetadata metadata); static RootResponse askResponse(SpeechResponse message, String conversationToken, List<SpeechResponse> noInputPrompts ); static RootResponse askResponse(String message, String conversationToken, String[] noInputPrompts); static RootResponse askForPermissionResponse(String permissionContext, SupportedPermissions... permissions); static RootResponse askForPermissionResponse(String permissionContext, String... permissions); static RootResponse askForPermissionResponse(String permissionContext, Collection<String> permissions);  }