de.adorsys.multibanking.banking_gateway_b2c.model.ChallengeDataTO Maven / Gradle / Ivy
/*
* Bankinggateway B2C Rest API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 0.2-SNAPSHOT
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package de.adorsys.multibanking.banking_gateway_b2c.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* It is contained in addition to the data element 'chosenScaMethod' if challenge data is needed for SCA
*/
@Schema(description = "It is contained in addition to the data element 'chosenScaMethod' if challenge data is needed for SCA")
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2020-03-31T11:42:30.614Z[UTC]")
public class ChallengeDataTO {
@SerializedName("image")
private byte[] image = null;
@SerializedName("data")
private List data = null;
@SerializedName("imageLink")
private String imageLink = null;
@SerializedName("otpMaxLength")
private Integer otpMaxLength = null;
@SerializedName("otpFormat")
private String otpFormat = null;
@SerializedName("additionalInformation")
private String additionalInformation = null;
public ChallengeDataTO image(byte[] image) {
this.image = image;
return this;
}
/**
* PNG data (max. 512 kilobyte) to be displayed to the PSU, Base64 encoding, cp. [RFC4648]. This attribute is used only, when PHOTO_OTP or CHIP_OTP is the selected SCA method.
* @return image
**/
@Schema(description = "PNG data (max. 512 kilobyte) to be displayed to the PSU, Base64 encoding, cp. [RFC4648]. This attribute is used only, when PHOTO_OTP or CHIP_OTP is the selected SCA method.")
public byte[] getImage() {
return image;
}
public void setImage(byte[] image) {
this.image = image;
}
public ChallengeDataTO data(List data) {
this.data = data;
return this;
}
public ChallengeDataTO addDataItem(String dataItem) {
if (this.data == null) {
this.data = new ArrayList<>();
}
this.data.add(dataItem);
return this;
}
/**
* String challenge data
* @return data
**/
@Schema(description = "String challenge data")
public List getData() {
return data;
}
public void setData(List data) {
this.data = data;
}
public ChallengeDataTO imageLink(String imageLink) {
this.imageLink = imageLink;
return this;
}
/**
* A link where the ASPSP will provides the challenge image
* @return imageLink
**/
@Schema(description = "A link where the ASPSP will provides the challenge image")
public String getImageLink() {
return imageLink;
}
public void setImageLink(String imageLink) {
this.imageLink = imageLink;
}
public ChallengeDataTO otpMaxLength(Integer otpMaxLength) {
this.otpMaxLength = otpMaxLength;
return this;
}
/**
* The maximal length for the OTP to be typed in by the PSU
* @return otpMaxLength
**/
@Schema(description = "The maximal length for the OTP to be typed in by the PSU")
public Integer getOtpMaxLength() {
return otpMaxLength;
}
public void setOtpMaxLength(Integer otpMaxLength) {
this.otpMaxLength = otpMaxLength;
}
public ChallengeDataTO otpFormat(String otpFormat) {
this.otpFormat = otpFormat;
return this;
}
/**
* The format type of the OTP to be typed in. The admitted values are \"characters\" or \"integer\"
* @return otpFormat
**/
@Schema(description = "The format type of the OTP to be typed in. The admitted values are \"characters\" or \"integer\"")
public String getOtpFormat() {
return otpFormat;
}
public void setOtpFormat(String otpFormat) {
this.otpFormat = otpFormat;
}
public ChallengeDataTO additionalInformation(String additionalInformation) {
this.additionalInformation = additionalInformation;
return this;
}
/**
* Additional explanation for the PSU to explain e.g. fallback mechanism for the chosen SCA method
* @return additionalInformation
**/
@Schema(description = "Additional explanation for the PSU to explain e.g. fallback mechanism for the chosen SCA method")
public String getAdditionalInformation() {
return additionalInformation;
}
public void setAdditionalInformation(String additionalInformation) {
this.additionalInformation = additionalInformation;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ChallengeDataTO challengeDataTO = (ChallengeDataTO) o;
return Arrays.equals(this.image, challengeDataTO.image) &&
Objects.equals(this.data, challengeDataTO.data) &&
Objects.equals(this.imageLink, challengeDataTO.imageLink) &&
Objects.equals(this.otpMaxLength, challengeDataTO.otpMaxLength) &&
Objects.equals(this.otpFormat, challengeDataTO.otpFormat) &&
Objects.equals(this.additionalInformation, challengeDataTO.additionalInformation);
}
@Override
public int hashCode() {
return Objects.hash(Arrays.hashCode(image), data, imageLink, otpMaxLength, otpFormat, additionalInformation);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ChallengeDataTO {\n");
sb.append(" image: ").append(toIndentedString(image)).append("\n");
sb.append(" data: ").append(toIndentedString(data)).append("\n");
sb.append(" imageLink: ").append(toIndentedString(imageLink)).append("\n");
sb.append(" otpMaxLength: ").append(toIndentedString(otpMaxLength)).append("\n");
sb.append(" otpFormat: ").append(toIndentedString(otpFormat)).append("\n");
sb.append(" additionalInformation: ").append(toIndentedString(additionalInformation)).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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}