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
All Methods Instance Methods Concrete Methods 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.
-
-
-
Constructor Detail
-
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
public 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.- 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 Detail
-
getId
public UserInput.UserInputID 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.
-
-