Class CodeRequest

java.lang.Object
com.bandwidth.sdk.model.CodeRequest

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.6.0") public class CodeRequest extends Object
CodeRequest
  • Field Details

  • Constructor Details

    • CodeRequest

      public CodeRequest()
  • Method Details

    • 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 property
      value - 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
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class 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