Package co.dapi.types
Class UserInput
java.lang.Object
co.dapi.types.UserInput
public class UserInput
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUserInput.UserInputID -
Constructor Summary
Constructors Constructor Description UserInput(UserInput.UserInputID id, int index, java.lang.String answer)Creates a UserInput object with only the fields that's needed for submitting a user input in the request.UserInput(UserInput.UserInputID id, int index, java.lang.String query, java.lang.String answer)Creates a UserInput object with all of its info. -
Method Summary
Modifier and Type Method Description java.util.Optional<java.lang.String>getAnswer()returns the UserInput that must be submitted.UserInput.UserInputIDgetId()returns the id of this UserInput, which is the type of input required.intgetIndex()returns the index of this UserInput, starting from 0.java.util.Optional<java.lang.String>getQuery()returns the textual description of what is required from the user side by this UserInput.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
UserInput
public UserInput(UserInput.UserInputID id, int index, java.lang.String query, java.lang.String answer)Creates a UserInput object with all of its info.- Parameters:
id- type of input required.index- the index of this UserInput object, starting from 0. it's used in case more than one user input is requested. will always be 0 if only one input is requested.query- textual description of what is required from the user side.answer- user input that must be submitted. in the response it will always be empty.
-
UserInput
Creates a UserInput object with only the fields that's needed for submitting a user input in the request.- Parameters:
id- type of input required.index- the index of this UserInput object, starting from 0. it's used in case more than one user input is requested. will always be 0 if only one input is requested.answer- user input that must be submitted.
-
-
Method Details
-
getId
returns the id of this UserInput, which is the type of input required. -
getIndex
public int getIndex()returns the index of this UserInput, starting from 0. will always be 0 if only one input is requested. -
getQuery
public java.util.Optional<java.lang.String> getQuery()returns the textual description of what is required from the user side by this UserInput. -
getAnswer
public java.util.Optional<java.lang.String> getAnswer()returns the UserInput that must be submitted. in the response it will always be empty.
-