com.sinch.sdk.domains.verification.models.dto.v1.InitiateVerificationResponseDto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sinch-sdk-java Show documentation
Show all versions of sinch-sdk-java Show documentation
SDK providing a Java API for the Sinch REST APIs.
/*
* Verification
* Verification REST API for verifying phone numbers and users. Support of FlashCall verification, PIN SMS verification and Callout verification. **Note:** OTP CODE must be the full valid E.164 number that we called from. ## Overview For general information on how to use the Sinch APIs including methods, types, errors and authorization, please check the [Using REST](doc:using-rest) page. Use the Sinch Verification Service to verify end-user's mobile phone numbers. The Sinch Verification APIs should be used in combination with the Verification SDKs for a complete end-to-end solution, though it is possible to only use the APIs. Currently, there are three verification methods supported: - FlashCall verification - Android only - PIN SMS verification - iOS, Android, Javascript - Callout verification (voice call) - iOS only - Data verification (distinguished by method = `seamless`) - iOS, Android #### FlashCall verification With the flashCall verification method, a user's phone number is verified by triggering a \"missed call\" towards this number. The call is intercepted by the Android SDK in the mobile app and blocked automatically. To initiate a flashCall verification, check the [Android SDK documentation](doc:verification-android-the-verification-process#flash-call-verification). For additional security, it is recommended that you control which verification requests should proceed and which ones not, by listening in your backend for the [Verification Request Event](doc:verification-rest-verification-api#verification-request) and respond accordingly. Your backend will be notified on the result of the verification with the [Verification Result Event](doc:verification-rest-callback-api#verification-result-event). #### PIN SMS verification With the PIN SMS verification method, a user's phone number is verified by sending an SMS containing a PIN code to this number. In the case of iOS or Javascript, the user needs to enter the PIN manually in the app, while for Android there is an option of intercepting the SMS message delivery and capturing the PIN code automatically. To initiate a PIN SMS verification, check the [iOS](doc:verification-ios-sms-verification), [Android](doc:verification-for-android) and [Javascript](doc:verification-for-javascript) documentation. For additional security, it is recommended that you control which verification requests should proceed and which ones not, by listening in your backend for the [Verification Request Event](doc:verification-rest-verification-api#verification-request) and respond accordingly. Your backend will be notified on the result of the verification with the [Verification Result Event](doc:verification-rest-callback-api#verification-result-event). #### Callout verification With the callout verification method, a user's phone number is verified by receiving a phone call and hearing a pre-recorded or text-to-speech message, advising the user to press a digit code. When the user presses the digit code in the dialpad, the verification is successful. To initiate a callout verification, check the [iOS documentation](doc:verification-ios-callout-verification). For additional security, it is recommended that you control which verification requests should proceed and which ones not, by listening in your backend for the [Verification Request Event](doc:verification-rest-verification-api#verification-request) and respond accordingly. Your backend will be notified on the result of the verification with the [Verification Result Event](doc:verification-rest-callback-api#verification-result-event). #### Data verification With the data verification method, a user's phone number is verified by carrier using mobile data network. For additional security, it is recommended that you control which verification requests should proceed and which ones not, by listening in your backend for the [Verification Request Event](doc:verification-rest-verification-api#verification-request) and respond accordingly. Your backend will be notified on the result of the verification with the [Verification Result Event](doc:verification-rest-callback-api#verification-result-event). > 📘 For information about webhooks and the verifications events [Callbacks](/docs/verification-rest-callback-api).
*
* The version of the OpenAPI document: 1.0.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.sinch.sdk.domains.verification.models.dto.v1;
import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/** InitiateVerificationResponseDto */
@JsonPropertyOrder({
InitiateVerificationResponseDto.JSON_PROPERTY_ID,
InitiateVerificationResponseDto.JSON_PROPERTY_METHOD,
InitiateVerificationResponseDto.JSON_PROPERTY_SMS,
InitiateVerificationResponseDto.JSON_PROPERTY_FLASH_CALL,
InitiateVerificationResponseDto.JSON_PROPERTY_CALLOUT,
InitiateVerificationResponseDto.JSON_PROPERTY_SEAMLESS,
InitiateVerificationResponseDto.JSON_PROPERTY_WHATSAPP,
InitiateVerificationResponseDto.JSON_PROPERTY_AUTO,
InitiateVerificationResponseDto.JSON_PROPERTY_EARLY_REJECT,
InitiateVerificationResponseDto.JSON_PROPERTY_EARLY_REJECT_MESSAGE,
InitiateVerificationResponseDto.JSON_PROPERTY_MAX_PRICE,
InitiateVerificationResponseDto.JSON_PROPERTY_LINKS
})
@JsonFilter("uninitializedFilter")
@JsonInclude(value = JsonInclude.Include.CUSTOM)
public class InitiateVerificationResponseDto {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_ID = "id";
private String id;
private boolean idDefined = false;
public static final String JSON_PROPERTY_METHOD = "method";
private VerificationMethodDto method;
private boolean methodDefined = false;
public static final String JSON_PROPERTY_SMS = "sms";
private InitiateVerificationResponseSmsDto sms;
private boolean smsDefined = false;
public static final String JSON_PROPERTY_FLASH_CALL = "flashCall";
private InitiateVerificationResponseFlashCallDto flashCall;
private boolean flashCallDefined = false;
public static final String JSON_PROPERTY_CALLOUT = "callout";
private InitiateVerificationResponseCalloutDto callout;
private boolean calloutDefined = false;
public static final String JSON_PROPERTY_SEAMLESS = "seamless";
private InitiateVerificationResponseSeamlessDto seamless;
private boolean seamlessDefined = false;
public static final String JSON_PROPERTY_WHATSAPP = "whatsapp";
private InitiateVerificationResponseWhatsappDto whatsapp;
private boolean whatsappDefined = false;
public static final String JSON_PROPERTY_AUTO = "auto";
private InitiateVerificationResponseAutoDto auto;
private boolean autoDefined = false;
public static final String JSON_PROPERTY_EARLY_REJECT = "earlyReject";
private Boolean earlyReject;
private boolean earlyRejectDefined = false;
public static final String JSON_PROPERTY_EARLY_REJECT_MESSAGE = "earlyRejectMessage";
private String earlyRejectMessage;
private boolean earlyRejectMessageDefined = false;
public static final String JSON_PROPERTY_MAX_PRICE = "maxPrice";
private InitiateVerificationResponseMaxPriceDto maxPrice;
private boolean maxPriceDefined = false;
public static final String JSON_PROPERTY_LINKS = "_links";
private List links;
private boolean linksDefined = false;
public InitiateVerificationResponseDto() {}
public InitiateVerificationResponseDto id(String id) {
this.id = id;
this.idDefined = true;
return this;
}
/**
* Verification identifier used to query for status.
*
* @return id
*/
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getId() {
return id;
}
@JsonIgnore
public boolean getIdDefined() {
return idDefined;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(String id) {
this.id = id;
this.idDefined = true;
}
public InitiateVerificationResponseDto method(VerificationMethodDto method) {
this.method = method;
this.methodDefined = true;
return this;
}
/**
* Get method
*
* @return method
*/
@JsonProperty(JSON_PROPERTY_METHOD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public VerificationMethodDto getMethod() {
return method;
}
@JsonIgnore
public boolean getMethodDefined() {
return methodDefined;
}
@JsonProperty(JSON_PROPERTY_METHOD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMethod(VerificationMethodDto method) {
this.method = method;
this.methodDefined = true;
}
public InitiateVerificationResponseDto sms(InitiateVerificationResponseSmsDto sms) {
this.sms = sms;
this.smsDefined = true;
return this;
}
/**
* Get sms
*
* @return sms
*/
@JsonProperty(JSON_PROPERTY_SMS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public InitiateVerificationResponseSmsDto getSms() {
return sms;
}
@JsonIgnore
public boolean getSmsDefined() {
return smsDefined;
}
@JsonProperty(JSON_PROPERTY_SMS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSms(InitiateVerificationResponseSmsDto sms) {
this.sms = sms;
this.smsDefined = true;
}
public InitiateVerificationResponseDto flashCall(
InitiateVerificationResponseFlashCallDto flashCall) {
this.flashCall = flashCall;
this.flashCallDefined = true;
return this;
}
/**
* Get flashCall
*
* @return flashCall
*/
@JsonProperty(JSON_PROPERTY_FLASH_CALL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public InitiateVerificationResponseFlashCallDto getFlashCall() {
return flashCall;
}
@JsonIgnore
public boolean getFlashCallDefined() {
return flashCallDefined;
}
@JsonProperty(JSON_PROPERTY_FLASH_CALL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFlashCall(InitiateVerificationResponseFlashCallDto flashCall) {
this.flashCall = flashCall;
this.flashCallDefined = true;
}
public InitiateVerificationResponseDto callout(InitiateVerificationResponseCalloutDto callout) {
this.callout = callout;
this.calloutDefined = true;
return this;
}
/**
* Get callout
*
* @return callout
*/
@JsonProperty(JSON_PROPERTY_CALLOUT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public InitiateVerificationResponseCalloutDto getCallout() {
return callout;
}
@JsonIgnore
public boolean getCalloutDefined() {
return calloutDefined;
}
@JsonProperty(JSON_PROPERTY_CALLOUT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCallout(InitiateVerificationResponseCalloutDto callout) {
this.callout = callout;
this.calloutDefined = true;
}
public InitiateVerificationResponseDto seamless(
InitiateVerificationResponseSeamlessDto seamless) {
this.seamless = seamless;
this.seamlessDefined = true;
return this;
}
/**
* Get seamless
*
* @return seamless
*/
@JsonProperty(JSON_PROPERTY_SEAMLESS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public InitiateVerificationResponseSeamlessDto getSeamless() {
return seamless;
}
@JsonIgnore
public boolean getSeamlessDefined() {
return seamlessDefined;
}
@JsonProperty(JSON_PROPERTY_SEAMLESS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSeamless(InitiateVerificationResponseSeamlessDto seamless) {
this.seamless = seamless;
this.seamlessDefined = true;
}
public InitiateVerificationResponseDto whatsapp(
InitiateVerificationResponseWhatsappDto whatsapp) {
this.whatsapp = whatsapp;
this.whatsappDefined = true;
return this;
}
/**
* Get whatsapp
*
* @return whatsapp
*/
@JsonProperty(JSON_PROPERTY_WHATSAPP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public InitiateVerificationResponseWhatsappDto getWhatsapp() {
return whatsapp;
}
@JsonIgnore
public boolean getWhatsappDefined() {
return whatsappDefined;
}
@JsonProperty(JSON_PROPERTY_WHATSAPP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setWhatsapp(InitiateVerificationResponseWhatsappDto whatsapp) {
this.whatsapp = whatsapp;
this.whatsappDefined = true;
}
public InitiateVerificationResponseDto auto(InitiateVerificationResponseAutoDto auto) {
this.auto = auto;
this.autoDefined = true;
return this;
}
/**
* Get auto
*
* @return auto
*/
@JsonProperty(JSON_PROPERTY_AUTO)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public InitiateVerificationResponseAutoDto getAuto() {
return auto;
}
@JsonIgnore
public boolean getAutoDefined() {
return autoDefined;
}
@JsonProperty(JSON_PROPERTY_AUTO)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAuto(InitiateVerificationResponseAutoDto auto) {
this.auto = auto;
this.autoDefined = true;
}
public InitiateVerificationResponseDto earlyReject(Boolean earlyReject) {
this.earlyReject = earlyReject;
this.earlyRejectDefined = true;
return this;
}
/**
* Whether or not verification has been early rejected.
*
* @return earlyReject
*/
@JsonProperty(JSON_PROPERTY_EARLY_REJECT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getEarlyReject() {
return earlyReject;
}
@JsonIgnore
public boolean getEarlyRejectDefined() {
return earlyRejectDefined;
}
@JsonProperty(JSON_PROPERTY_EARLY_REJECT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEarlyReject(Boolean earlyReject) {
this.earlyReject = earlyReject;
this.earlyRejectDefined = true;
}
public InitiateVerificationResponseDto earlyRejectMessage(String earlyRejectMessage) {
this.earlyRejectMessage = earlyRejectMessage;
this.earlyRejectMessageDefined = true;
return this;
}
/**
* In case verification has been early rejected a detailed reason.
*
* @return earlyRejectMessage
*/
@JsonProperty(JSON_PROPERTY_EARLY_REJECT_MESSAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getEarlyRejectMessage() {
return earlyRejectMessage;
}
@JsonIgnore
public boolean getEarlyRejectMessageDefined() {
return earlyRejectMessageDefined;
}
@JsonProperty(JSON_PROPERTY_EARLY_REJECT_MESSAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEarlyRejectMessage(String earlyRejectMessage) {
this.earlyRejectMessage = earlyRejectMessage;
this.earlyRejectMessageDefined = true;
}
public InitiateVerificationResponseDto maxPrice(
InitiateVerificationResponseMaxPriceDto maxPrice) {
this.maxPrice = maxPrice;
this.maxPriceDefined = true;
return this;
}
/**
* Get maxPrice
*
* @return maxPrice
*/
@JsonProperty(JSON_PROPERTY_MAX_PRICE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public InitiateVerificationResponseMaxPriceDto getMaxPrice() {
return maxPrice;
}
@JsonIgnore
public boolean getMaxPriceDefined() {
return maxPriceDefined;
}
@JsonProperty(JSON_PROPERTY_MAX_PRICE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMaxPrice(InitiateVerificationResponseMaxPriceDto maxPrice) {
this.maxPrice = maxPrice;
this.maxPriceDefined = true;
}
public InitiateVerificationResponseDto links(List links) {
this.links = links;
this.linksDefined = true;
return this;
}
public InitiateVerificationResponseDto addLinksItem(VerificationResourceLinkDto linksItem) {
if (this.links == null) {
this.links = new ArrayList<>();
}
this.linksDefined = true;
this.links.add(linksItem);
return this;
}
/**
* Get links
*
* @return links
*/
@JsonProperty(JSON_PROPERTY_LINKS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getLinks() {
return links;
}
@JsonIgnore
public boolean getLinksDefined() {
return linksDefined;
}
@JsonProperty(JSON_PROPERTY_LINKS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLinks(List links) {
this.links = links;
this.linksDefined = true;
}
/** Return true if this InitiateVerificationResponse object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InitiateVerificationResponseDto initiateVerificationResponse =
(InitiateVerificationResponseDto) o;
return Objects.equals(this.id, initiateVerificationResponse.id)
&& Objects.equals(this.method, initiateVerificationResponse.method)
&& Objects.equals(this.sms, initiateVerificationResponse.sms)
&& Objects.equals(this.flashCall, initiateVerificationResponse.flashCall)
&& Objects.equals(this.callout, initiateVerificationResponse.callout)
&& Objects.equals(this.seamless, initiateVerificationResponse.seamless)
&& Objects.equals(this.whatsapp, initiateVerificationResponse.whatsapp)
&& Objects.equals(this.auto, initiateVerificationResponse.auto)
&& Objects.equals(this.earlyReject, initiateVerificationResponse.earlyReject)
&& Objects.equals(this.earlyRejectMessage, initiateVerificationResponse.earlyRejectMessage)
&& Objects.equals(this.maxPrice, initiateVerificationResponse.maxPrice)
&& Objects.equals(this.links, initiateVerificationResponse.links);
}
@Override
public int hashCode() {
return Objects.hash(
id,
method,
sms,
flashCall,
callout,
seamless,
whatsapp,
auto,
earlyReject,
earlyRejectMessage,
maxPrice,
links);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InitiateVerificationResponseDto {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" method: ").append(toIndentedString(method)).append("\n");
sb.append(" sms: ").append(toIndentedString(sms)).append("\n");
sb.append(" flashCall: ").append(toIndentedString(flashCall)).append("\n");
sb.append(" callout: ").append(toIndentedString(callout)).append("\n");
sb.append(" seamless: ").append(toIndentedString(seamless)).append("\n");
sb.append(" whatsapp: ").append(toIndentedString(whatsapp)).append("\n");
sb.append(" auto: ").append(toIndentedString(auto)).append("\n");
sb.append(" earlyReject: ").append(toIndentedString(earlyReject)).append("\n");
sb.append(" earlyRejectMessage: ").append(toIndentedString(earlyRejectMessage)).append("\n");
sb.append(" maxPrice: ").append(toIndentedString(maxPrice)).append("\n");
sb.append(" links: ").append(toIndentedString(links)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy