Package com.bandwidth.sdk.model
Class CodeRequest
- java.lang.Object
-
- com.bandwidth.sdk.model.CodeRequest
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2023-08-29T14:24:34.966664-04:00[America/New_York]") public class CodeRequest extends Object
CodeRequest
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CodeRequest.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_APPLICATION_ID
static String
SERIALIZED_NAME_DIGITS
static String
SERIALIZED_NAME_FROM
static String
SERIALIZED_NAME_MESSAGE
static String
SERIALIZED_NAME_SCOPE
static String
SERIALIZED_NAME_TO
-
Constructor Summary
Constructors Constructor Description CodeRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CodeRequest
applicationId(String applicationId)
CodeRequest
digits(Integer digits)
boolean
equals(Object o)
CodeRequest
from(String from)
static CodeRequest
fromJson(String jsonString)
Create an instance of CodeRequest given an JSON stringMap<String,Object>
getAdditionalProperties()
Return the additional (undeclared) property.Object
getAdditionalProperty(String key)
Return the additional (undeclared) property with the specified name.String
getApplicationId()
The application unique ID, obtained from Bandwidth.Integer
getDigits()
The number of digits for your mfa code.String
getFrom()
The application phone number, the sender of the mfa code.String
getMessage()
The message format of the mfa code.String
getScope()
An optional field to denote what scope or action the mfa code is addressing.String
getTo()
The phone number to send the mfa code to.int
hashCode()
CodeRequest
message(String message)
CodeRequest
putAdditionalProperty(String key, Object value)
Set the additional (undeclared) property with the specified name and value.CodeRequest
scope(String scope)
void
setApplicationId(String applicationId)
void
setDigits(Integer digits)
void
setFrom(String from)
void
setMessage(String message)
void
setScope(String scope)
void
setTo(String to)
CodeRequest
to(String to)
String
toJson()
Convert an instance of CodeRequest to an JSON stringString
toString()
static void
validateJsonElement(com.google.gson.JsonElement jsonElement)
Validates the JSON Element and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_TO
public static final String SERIALIZED_NAME_TO
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FROM
public static final String SERIALIZED_NAME_FROM
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_APPLICATION_ID
public static final String SERIALIZED_NAME_APPLICATION_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SCOPE
public static final String SERIALIZED_NAME_SCOPE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MESSAGE
public static final String SERIALIZED_NAME_MESSAGE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DIGITS
public static final String SERIALIZED_NAME_DIGITS
- See Also:
- Constant Field Values
-
-
Method Detail
-
to
public CodeRequest to(String to)
-
getTo
@Nonnull public String getTo()
The phone number to send the mfa code to.- Returns:
- to
-
setTo
public void setTo(String to)
-
from
public CodeRequest from(String from)
-
getFrom
@Nonnull public String getFrom()
The application phone number, the sender of the mfa code.- Returns:
- from
-
setFrom
public void setFrom(String from)
-
applicationId
public CodeRequest applicationId(String applicationId)
-
getApplicationId
@Nonnull public String getApplicationId()
The application unique ID, obtained from Bandwidth.- Returns:
- applicationId
-
setApplicationId
public void setApplicationId(String applicationId)
-
scope
public CodeRequest scope(String scope)
-
getScope
@Nullable public String getScope()
An optional field to denote what scope or action the mfa code is addressing. If not supplied, defaults to \"2FA\".- Returns:
- scope
-
setScope
public void setScope(String scope)
-
message
public CodeRequest message(String message)
-
getMessage
@Nonnull public String getMessage()
The message format of the mfa code. There are three values that the system will replace \"{CODE}\", \"{NAME}\", \"{SCOPE}\". The \"{SCOPE}\" and \"{NAME} value template are optional, while \"{CODE}\" must be supplied. As the name would suggest, code will be replace with the actual mfa code. Name is replaced with the application name, configured during provisioning of mfa. The scope value is the same value sent during the call and partitioned by the server.- Returns:
- message
-
setMessage
public void setMessage(String message)
-
digits
public CodeRequest digits(Integer digits)
-
getDigits
@Nonnull public Integer getDigits()
The number of digits for your mfa code. The valid number ranges from 2 to 8, inclusively. minimum: 4 maximum: 8- Returns:
- digits
-
setDigits
public void setDigits(Integer digits)
-
putAdditionalProperty
public CodeRequest putAdditionalProperty(String key, Object value)
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.- Parameters:
key
- name of the propertyvalue
- value of the property- Returns:
- the CodeRequest instance itself
-
getAdditionalProperties
public Map<String,Object> getAdditionalProperties()
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
public Object getAdditionalProperty(String key)
Return the additional (undeclared) property with the specified name.- Parameters:
key
- name of the property- Returns:
- an object
-
validateJsonElement
public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement
- JSON Element- Throws:
IOException
- if the JSON Element is invalid with respect to CodeRequest
-
fromJson
public static CodeRequest fromJson(String jsonString) throws IOException
Create an instance of CodeRequest given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of CodeRequest
- Throws:
IOException
- if the JSON string is invalid with respect to CodeRequest
-
toJson
public String toJson()
Convert an instance of CodeRequest to an JSON string- Returns:
- JSON string
-
-