Class CreateCall

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

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

  • Constructor Details

    • CreateCall

      public CreateCall()
  • Method Details

    • to

      public CreateCall to(String to)
    • getTo

      @Nonnull public String getTo()
      The destination to call (must be an E.164 formatted number (e.g. `+15555551212`) or a SIP URI (e.g. `sip:[email protected]`)).
      Returns:
      to
    • setTo

      public void setTo(String to)
    • from

      public CreateCall from(String from)
    • getFrom

      @Nonnull public String getFrom()
      A Bandwidth phone number on your account the call should come from (must be in E.164 format, like `+15555551212`) even if `privacy` is set to true.
      Returns:
      from
    • setFrom

      public void setFrom(String from)
    • privacy

      public CreateCall privacy(Boolean privacy)
    • getPrivacy

      @Nullable public Boolean getPrivacy()
      Hide the calling number. The `displayName` field can be used to customize the displayed name.
      Returns:
      privacy
    • setPrivacy

      public void setPrivacy(Boolean privacy)
    • displayName

      public CreateCall displayName(String displayName)
    • getDisplayName

      @Nullable public String getDisplayName()
      The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. If `privacy` is true, only the following values are valid: `Restricted`, `Anonymous`, `Private`, or `Unavailable`.
      Returns:
      displayName
    • setDisplayName

      public void setDisplayName(String displayName)
    • uui

      public CreateCall uui(String uui)
    • getUui

      @Nullable public String getUui()
      A comma-separated list of 'User-To-User' headers to be sent in the INVITE when calling a SIP URI. Each value must end with an 'encoding' parameter as described in <a href='https://tools.ietf.org/html/rfc7433'>RFC 7433</a>. Only 'jwt' and 'base64' encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
      Returns:
      uui
    • setUui

      public void setUui(String uui)
    • applicationId

      public CreateCall applicationId(String applicationId)
    • getApplicationId

      @Nonnull public String getApplicationId()
      The id of the application associated with the `from` number.
      Returns:
      applicationId
    • setApplicationId

      public void setApplicationId(String applicationId)
    • answerUrl

      public CreateCall answerUrl(URI answerUrl)
    • getAnswerUrl

      @Nonnull public URI getAnswerUrl()
      The full URL to send the <a href='/docs/voice/webhooks/answer'>Answer</a> event to when the called party answers. This endpoint should return the first <a href='/docs/voice/bxml'>BXML document</a> to be executed in the call. Must use `https` if specifying `username` and `password`.
      Returns:
      answerUrl
    • setAnswerUrl

      public void setAnswerUrl(URI answerUrl)
    • answerMethod

      public CreateCall answerMethod(CallbackMethodEnum answerMethod)
    • getAnswerMethod

      @Nullable public CallbackMethodEnum getAnswerMethod()
      Get answerMethod
      Returns:
      answerMethod
    • setAnswerMethod

      public void setAnswerMethod(CallbackMethodEnum answerMethod)
    • username

      public CreateCall username(String username)
    • getUsername

      @Nullable public String getUsername()
      Basic auth username.
      Returns:
      username
    • setUsername

      public void setUsername(String username)
    • password

      public CreateCall password(String password)
    • getPassword

      @Nullable public String getPassword()
      Basic auth password.
      Returns:
      password
    • setPassword

      public void setPassword(String password)
    • answerFallbackUrl

      public CreateCall answerFallbackUrl(URI answerFallbackUrl)
    • getAnswerFallbackUrl

      @Nullable public URI getAnswerFallbackUrl()
      A fallback url which, if provided, will be used to retry the `answer` webhook delivery in case `answerUrl` fails to respond Must use `https` if specifying `fallbackUsername` and `fallbackPassword`.
      Returns:
      answerFallbackUrl
    • setAnswerFallbackUrl

      public void setAnswerFallbackUrl(URI answerFallbackUrl)
    • answerFallbackMethod

      public CreateCall answerFallbackMethod(CallbackMethodEnum answerFallbackMethod)
    • getAnswerFallbackMethod

      @Nullable public CallbackMethodEnum getAnswerFallbackMethod()
      Get answerFallbackMethod
      Returns:
      answerFallbackMethod
    • setAnswerFallbackMethod

      public void setAnswerFallbackMethod(CallbackMethodEnum answerFallbackMethod)
    • fallbackUsername

      public CreateCall fallbackUsername(String fallbackUsername)
    • getFallbackUsername

      @Nullable public String getFallbackUsername()
      Basic auth username.
      Returns:
      fallbackUsername
    • setFallbackUsername

      public void setFallbackUsername(String fallbackUsername)
    • fallbackPassword

      public CreateCall fallbackPassword(String fallbackPassword)
    • getFallbackPassword

      @Nullable public String getFallbackPassword()
      Basic auth password.
      Returns:
      fallbackPassword
    • setFallbackPassword

      public void setFallbackPassword(String fallbackPassword)
    • disconnectUrl

      public CreateCall disconnectUrl(URI disconnectUrl)
    • getDisconnectUrl

      @Nullable public URI getDisconnectUrl()
      The URL to send the <a href='/docs/voice/webhooks/disconnect'>Disconnect</a> event to when the call ends. This event does not expect a BXML response.
      Returns:
      disconnectUrl
    • setDisconnectUrl

      public void setDisconnectUrl(URI disconnectUrl)
    • disconnectMethod

      public CreateCall disconnectMethod(CallbackMethodEnum disconnectMethod)
    • getDisconnectMethod

      @Nullable public CallbackMethodEnum getDisconnectMethod()
      Get disconnectMethod
      Returns:
      disconnectMethod
    • setDisconnectMethod

      public void setDisconnectMethod(CallbackMethodEnum disconnectMethod)
    • callTimeout

      public CreateCall callTimeout(Double callTimeout)
    • getCallTimeout

      @Nullable public Double getCallTimeout()
      The timeout (in seconds) for the callee to answer the call after it starts ringing. If the call does not start ringing within 30s, the call will be cancelled regardless of this value. Can be any numeric value (including decimals) between 1 and 300. minimum: 1 maximum: 300
      Returns:
      callTimeout
    • setCallTimeout

      public void setCallTimeout(Double callTimeout)
    • callbackTimeout

      public CreateCall callbackTimeout(Double callbackTimeout)
    • getCallbackTimeout

      @Nullable public Double getCallbackTimeout()
      This is the timeout (in seconds) to use when delivering webhooks for the call. Can be any numeric value (including decimals) between 1 and 25. minimum: 1 maximum: 25
      Returns:
      callbackTimeout
    • setCallbackTimeout

      public void setCallbackTimeout(Double callbackTimeout)
    • machineDetection

      public CreateCall machineDetection(MachineDetectionConfiguration machineDetection)
    • getMachineDetection

      @Nullable public MachineDetectionConfiguration getMachineDetection()
      Get machineDetection
      Returns:
      machineDetection
    • setMachineDetection

      public void setMachineDetection(MachineDetectionConfiguration machineDetection)
    • priority

      public CreateCall priority(Integer priority)
    • getPriority

      @Nullable public Integer getPriority()
      The priority of this call over other calls from your account. For example, if during a call your application needs to place a new call and bridge it with the current call, you might want to create the call with priority 1 so that it will be the next call picked off your queue, ahead of other less time sensitive calls. A lower value means higher priority, so a priority 1 call takes precedence over a priority 2 call. minimum: 1 maximum: 5
      Returns:
      priority
    • setPriority

      public void setPriority(Integer priority)
    • tag

      public CreateCall tag(String tag)
    • getTag

      @Nullable public String getTag()
      A custom string that will be sent with all webhooks for this call unless overwritten by a future <a href='/docs/voice/bxml/tag'>`<Tag>`</a> verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 256 characters.
      Returns:
      tag
    • setTag

      public void setTag(String tag)
    • putAdditionalProperty

      public CreateCall 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 CreateCall 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 CreateCall
    • fromJson

      public static CreateCall fromJson(String jsonString) throws IOException
      Create an instance of CreateCall given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of CreateCall
      Throws:
      IOException - if the JSON string is invalid with respect to CreateCall
    • toJson

      public String toJson()
      Convert an instance of CreateCall to an JSON string
      Returns:
      JSON string