Class 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
    • Constructor Detail

      • CodeRequest

        public CodeRequest()
    • Method Detail

      • getTo

        @Nonnull
        public String getTo()
        The phone number to send the mfa code to.
        Returns:
        to
      • setTo

        public void setTo​(String to)
      • getFrom

        @Nonnull
        public String getFrom()
        The application phone number, the sender of the mfa code.
        Returns:
        from
      • setFrom

        public void setFrom​(String from)
      • getApplicationId

        @Nonnull
        public String getApplicationId()
        The application unique ID, obtained from Bandwidth.
        Returns:
        applicationId
      • setApplicationId

        public void setApplicationId​(String applicationId)
      • 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)
      • 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)
      • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode 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