All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fireblocks.sdk.model.TravelRuleCreateTransactionRequest Maven / Gradle / Ivy

/*
 * Fireblocks API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.6.2
 * 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.fireblocks.sdk.model;


import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.Objects;
import java.util.StringJoiner;

/** TravelRuleCreateTransactionRequest */
@JsonPropertyOrder({
    TravelRuleCreateTransactionRequest.JSON_PROPERTY_ORIGINATOR_V_A_S_PDID,
    TravelRuleCreateTransactionRequest.JSON_PROPERTY_BENEFICIARY_V_A_S_PDID,
    TravelRuleCreateTransactionRequest.JSON_PROPERTY_BENEFICIARY_V_A_S_PNAME,
    TravelRuleCreateTransactionRequest.JSON_PROPERTY_TRANSACTION_BLOCKCHAIN_INFO,
    TravelRuleCreateTransactionRequest.JSON_PROPERTY_ORIGINATOR,
    TravelRuleCreateTransactionRequest.JSON_PROPERTY_BENEFICIARY,
    TravelRuleCreateTransactionRequest.JSON_PROPERTY_ENCRYPTED,
    TravelRuleCreateTransactionRequest.JSON_PROPERTY_PROTOCOL,
    TravelRuleCreateTransactionRequest.JSON_PROPERTY_SKIP_BENEFICIARY_DATA_VALIDATION,
    TravelRuleCreateTransactionRequest.JSON_PROPERTY_TRAVEL_RULE_BEHAVIOR,
    TravelRuleCreateTransactionRequest.JSON_PROPERTY_ORIGINATOR_PROOF,
    TravelRuleCreateTransactionRequest.JSON_PROPERTY_BENEFICIARY_PROOF,
    TravelRuleCreateTransactionRequest.JSON_PROPERTY_PII
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class TravelRuleCreateTransactionRequest {
    public static final String JSON_PROPERTY_ORIGINATOR_V_A_S_PDID = "originatorVASPdid";
    private String originatorVASPdid;

    public static final String JSON_PROPERTY_BENEFICIARY_V_A_S_PDID = "beneficiaryVASPdid";
    private String beneficiaryVASPdid;

    public static final String JSON_PROPERTY_BENEFICIARY_V_A_S_PNAME = "beneficiaryVASPname";
    private String beneficiaryVASPname;

    public static final String JSON_PROPERTY_TRANSACTION_BLOCKCHAIN_INFO =
            "transactionBlockchainInfo";
    private TravelRuleTransactionBlockchainInfo transactionBlockchainInfo;

    public static final String JSON_PROPERTY_ORIGINATOR = "originator";
    private TravelRulePiiIVMS originator;

    public static final String JSON_PROPERTY_BENEFICIARY = "beneficiary";
    private TravelRulePiiIVMS beneficiary;

    public static final String JSON_PROPERTY_ENCRYPTED = "encrypted";
    private String encrypted;

    public static final String JSON_PROPERTY_PROTOCOL = "protocol";
    private String protocol;

    public static final String JSON_PROPERTY_SKIP_BENEFICIARY_DATA_VALIDATION =
            "skipBeneficiaryDataValidation";
    private Boolean skipBeneficiaryDataValidation;

    public static final String JSON_PROPERTY_TRAVEL_RULE_BEHAVIOR = "travelRuleBehavior";
    private Boolean travelRuleBehavior;

    public static final String JSON_PROPERTY_ORIGINATOR_PROOF = "originatorProof";
    private TravelRuleOwnershipProof originatorProof;

    public static final String JSON_PROPERTY_BENEFICIARY_PROOF = "beneficiaryProof";
    private TravelRuleOwnershipProof beneficiaryProof;

    public static final String JSON_PROPERTY_PII = "pii";
    private TravelRulePiiIVMS pii;

    public TravelRuleCreateTransactionRequest() {}

    public TravelRuleCreateTransactionRequest originatorVASPdid(String originatorVASPdid) {
        this.originatorVASPdid = originatorVASPdid;
        return this;
    }

    /**
     * The VASP ID of the transaction originator
     *
     * @return originatorVASPdid
     */
    @jakarta.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_ORIGINATOR_V_A_S_PDID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getOriginatorVASPdid() {
        return originatorVASPdid;
    }

    @JsonProperty(JSON_PROPERTY_ORIGINATOR_V_A_S_PDID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setOriginatorVASPdid(String originatorVASPdid) {
        this.originatorVASPdid = originatorVASPdid;
    }

    public TravelRuleCreateTransactionRequest beneficiaryVASPdid(String beneficiaryVASPdid) {
        this.beneficiaryVASPdid = beneficiaryVASPdid;
        return this;
    }

    /**
     * The VASP ID of the transaction beneficiary
     *
     * @return beneficiaryVASPdid
     */
    @jakarta.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_BENEFICIARY_V_A_S_PDID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getBeneficiaryVASPdid() {
        return beneficiaryVASPdid;
    }

    @JsonProperty(JSON_PROPERTY_BENEFICIARY_V_A_S_PDID)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setBeneficiaryVASPdid(String beneficiaryVASPdid) {
        this.beneficiaryVASPdid = beneficiaryVASPdid;
    }

    public TravelRuleCreateTransactionRequest beneficiaryVASPname(String beneficiaryVASPname) {
        this.beneficiaryVASPname = beneficiaryVASPname;
        return this;
    }

    /**
     * The name of the VASP acting as the beneficiary
     *
     * @return beneficiaryVASPname
     */
    @jakarta.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_BENEFICIARY_V_A_S_PNAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getBeneficiaryVASPname() {
        return beneficiaryVASPname;
    }

    @JsonProperty(JSON_PROPERTY_BENEFICIARY_V_A_S_PNAME)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setBeneficiaryVASPname(String beneficiaryVASPname) {
        this.beneficiaryVASPname = beneficiaryVASPname;
    }

    public TravelRuleCreateTransactionRequest transactionBlockchainInfo(
            TravelRuleTransactionBlockchainInfo transactionBlockchainInfo) {
        this.transactionBlockchainInfo = transactionBlockchainInfo;
        return this;
    }

    /**
     * Information about the blockchain transaction
     *
     * @return transactionBlockchainInfo
     */
    @jakarta.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_TRANSACTION_BLOCKCHAIN_INFO)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public TravelRuleTransactionBlockchainInfo getTransactionBlockchainInfo() {
        return transactionBlockchainInfo;
    }

    @JsonProperty(JSON_PROPERTY_TRANSACTION_BLOCKCHAIN_INFO)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setTransactionBlockchainInfo(
            TravelRuleTransactionBlockchainInfo transactionBlockchainInfo) {
        this.transactionBlockchainInfo = transactionBlockchainInfo;
    }

    public TravelRuleCreateTransactionRequest originator(TravelRulePiiIVMS originator) {
        this.originator = originator;
        return this;
    }

    /**
     * Information about the originator of the transaction
     *
     * @return originator
     */
    @jakarta.annotation.Nonnull
    @JsonProperty(JSON_PROPERTY_ORIGINATOR)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
    public TravelRulePiiIVMS getOriginator() {
        return originator;
    }

    @JsonProperty(JSON_PROPERTY_ORIGINATOR)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
    public void setOriginator(TravelRulePiiIVMS originator) {
        this.originator = originator;
    }

    public TravelRuleCreateTransactionRequest beneficiary(TravelRulePiiIVMS beneficiary) {
        this.beneficiary = beneficiary;
        return this;
    }

    /**
     * Information about the beneficiary of the transaction
     *
     * @return beneficiary
     */
    @jakarta.annotation.Nonnull
    @JsonProperty(JSON_PROPERTY_BENEFICIARY)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
    public TravelRulePiiIVMS getBeneficiary() {
        return beneficiary;
    }

    @JsonProperty(JSON_PROPERTY_BENEFICIARY)
    @JsonInclude(value = JsonInclude.Include.ALWAYS)
    public void setBeneficiary(TravelRulePiiIVMS beneficiary) {
        this.beneficiary = beneficiary;
    }

    public TravelRuleCreateTransactionRequest encrypted(String encrypted) {
        this.encrypted = encrypted;
        return this;
    }

    /**
     * Encrypted data related to the transaction
     *
     * @return encrypted
     */
    @jakarta.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_ENCRYPTED)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getEncrypted() {
        return encrypted;
    }

    @JsonProperty(JSON_PROPERTY_ENCRYPTED)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setEncrypted(String encrypted) {
        this.encrypted = encrypted;
    }

    public TravelRuleCreateTransactionRequest protocol(String protocol) {
        this.protocol = protocol;
        return this;
    }

    /**
     * The protocol used to perform the travel rule
     *
     * @return protocol
     */
    @jakarta.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_PROTOCOL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public String getProtocol() {
        return protocol;
    }

    @JsonProperty(JSON_PROPERTY_PROTOCOL)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setProtocol(String protocol) {
        this.protocol = protocol;
    }

    public TravelRuleCreateTransactionRequest skipBeneficiaryDataValidation(
            Boolean skipBeneficiaryDataValidation) {
        this.skipBeneficiaryDataValidation = skipBeneficiaryDataValidation;
        return this;
    }

    /**
     * Whether to skip validation of beneficiary data
     *
     * @return skipBeneficiaryDataValidation
     */
    @jakarta.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_SKIP_BENEFICIARY_DATA_VALIDATION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Boolean getSkipBeneficiaryDataValidation() {
        return skipBeneficiaryDataValidation;
    }

    @JsonProperty(JSON_PROPERTY_SKIP_BENEFICIARY_DATA_VALIDATION)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setSkipBeneficiaryDataValidation(Boolean skipBeneficiaryDataValidation) {
        this.skipBeneficiaryDataValidation = skipBeneficiaryDataValidation;
    }

    public TravelRuleCreateTransactionRequest travelRuleBehavior(Boolean travelRuleBehavior) {
        this.travelRuleBehavior = travelRuleBehavior;
        return this;
    }

    /**
     * Whether to check if the transaction is a TRAVEL_RULE in the beneficiary VASP's
     * jurisdiction
     *
     * @return travelRuleBehavior
     */
    @jakarta.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_TRAVEL_RULE_BEHAVIOR)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public Boolean getTravelRuleBehavior() {
        return travelRuleBehavior;
    }

    @JsonProperty(JSON_PROPERTY_TRAVEL_RULE_BEHAVIOR)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setTravelRuleBehavior(Boolean travelRuleBehavior) {
        this.travelRuleBehavior = travelRuleBehavior;
    }

    public TravelRuleCreateTransactionRequest originatorProof(
            TravelRuleOwnershipProof originatorProof) {
        this.originatorProof = originatorProof;
        return this;
    }

    /**
     * Ownership proof related to the originator of the transaction
     *
     * @return originatorProof
     */
    @jakarta.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_ORIGINATOR_PROOF)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public TravelRuleOwnershipProof getOriginatorProof() {
        return originatorProof;
    }

    @JsonProperty(JSON_PROPERTY_ORIGINATOR_PROOF)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setOriginatorProof(TravelRuleOwnershipProof originatorProof) {
        this.originatorProof = originatorProof;
    }

    public TravelRuleCreateTransactionRequest beneficiaryProof(
            TravelRuleOwnershipProof beneficiaryProof) {
        this.beneficiaryProof = beneficiaryProof;
        return this;
    }

    /**
     * Ownership proof related to the beneficiary of the transaction
     *
     * @return beneficiaryProof
     */
    @jakarta.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_BENEFICIARY_PROOF)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public TravelRuleOwnershipProof getBeneficiaryProof() {
        return beneficiaryProof;
    }

    @JsonProperty(JSON_PROPERTY_BENEFICIARY_PROOF)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setBeneficiaryProof(TravelRuleOwnershipProof beneficiaryProof) {
        this.beneficiaryProof = beneficiaryProof;
    }

    public TravelRuleCreateTransactionRequest pii(TravelRulePiiIVMS pii) {
        this.pii = pii;
        return this;
    }

    /**
     * Personal identifiable information related to the transaction
     *
     * @return pii
     */
    @jakarta.annotation.Nullable
    @JsonProperty(JSON_PROPERTY_PII)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public TravelRulePiiIVMS getPii() {
        return pii;
    }

    @JsonProperty(JSON_PROPERTY_PII)
    @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
    public void setPii(TravelRulePiiIVMS pii) {
        this.pii = pii;
    }

    /** Return true if this TravelRuleCreateTransactionRequest object is equal to o. */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        TravelRuleCreateTransactionRequest travelRuleCreateTransactionRequest =
                (TravelRuleCreateTransactionRequest) o;
        return Objects.equals(
                        this.originatorVASPdid,
                        travelRuleCreateTransactionRequest.originatorVASPdid)
                && Objects.equals(
                        this.beneficiaryVASPdid,
                        travelRuleCreateTransactionRequest.beneficiaryVASPdid)
                && Objects.equals(
                        this.beneficiaryVASPname,
                        travelRuleCreateTransactionRequest.beneficiaryVASPname)
                && Objects.equals(
                        this.transactionBlockchainInfo,
                        travelRuleCreateTransactionRequest.transactionBlockchainInfo)
                && Objects.equals(this.originator, travelRuleCreateTransactionRequest.originator)
                && Objects.equals(this.beneficiary, travelRuleCreateTransactionRequest.beneficiary)
                && Objects.equals(this.encrypted, travelRuleCreateTransactionRequest.encrypted)
                && Objects.equals(this.protocol, travelRuleCreateTransactionRequest.protocol)
                && Objects.equals(
                        this.skipBeneficiaryDataValidation,
                        travelRuleCreateTransactionRequest.skipBeneficiaryDataValidation)
                && Objects.equals(
                        this.travelRuleBehavior,
                        travelRuleCreateTransactionRequest.travelRuleBehavior)
                && Objects.equals(
                        this.originatorProof, travelRuleCreateTransactionRequest.originatorProof)
                && Objects.equals(
                        this.beneficiaryProof, travelRuleCreateTransactionRequest.beneficiaryProof)
                && Objects.equals(this.pii, travelRuleCreateTransactionRequest.pii);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                originatorVASPdid,
                beneficiaryVASPdid,
                beneficiaryVASPname,
                transactionBlockchainInfo,
                originator,
                beneficiary,
                encrypted,
                protocol,
                skipBeneficiaryDataValidation,
                travelRuleBehavior,
                originatorProof,
                beneficiaryProof,
                pii);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class TravelRuleCreateTransactionRequest {\n");
        sb.append("    originatorVASPdid: ")
                .append(toIndentedString(originatorVASPdid))
                .append("\n");
        sb.append("    beneficiaryVASPdid: ")
                .append(toIndentedString(beneficiaryVASPdid))
                .append("\n");
        sb.append("    beneficiaryVASPname: ")
                .append(toIndentedString(beneficiaryVASPname))
                .append("\n");
        sb.append("    transactionBlockchainInfo: ")
                .append(toIndentedString(transactionBlockchainInfo))
                .append("\n");
        sb.append("    originator: ").append(toIndentedString(originator)).append("\n");
        sb.append("    beneficiary: ").append(toIndentedString(beneficiary)).append("\n");
        sb.append("    encrypted: ").append(toIndentedString(encrypted)).append("\n");
        sb.append("    protocol: ").append(toIndentedString(protocol)).append("\n");
        sb.append("    skipBeneficiaryDataValidation: ")
                .append(toIndentedString(skipBeneficiaryDataValidation))
                .append("\n");
        sb.append("    travelRuleBehavior: ")
                .append(toIndentedString(travelRuleBehavior))
                .append("\n");
        sb.append("    originatorProof: ").append(toIndentedString(originatorProof)).append("\n");
        sb.append("    beneficiaryProof: ").append(toIndentedString(beneficiaryProof)).append("\n");
        sb.append("    pii: ").append(toIndentedString(pii)).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    ");
    }

    /**
     * Convert the instance into URL query string.
     *
     * @return URL query string
     */
    public String toUrlQueryString() {
        return toUrlQueryString(null);
    }

    /**
     * Convert the instance into URL query string.
     *
     * @param prefix prefix of the query string
     * @return URL query string
     */
    public String toUrlQueryString(String prefix) {
        String suffix = "";
        String containerSuffix = "";
        String containerPrefix = "";
        if (prefix == null) {
            // style=form, explode=true, e.g. /pet?name=cat&type=manx
            prefix = "";
        } else {
            // deepObject style e.g. /pet?id[name]=cat&id[type]=manx
            prefix = prefix + "[";
            suffix = "]";
            containerSuffix = "]";
            containerPrefix = "[";
        }

        StringJoiner joiner = new StringJoiner("&");

        // add `originatorVASPdid` to the URL query string
        if (getOriginatorVASPdid() != null) {
            joiner.add(
                    String.format(
                            "%soriginatorVASPdid%s=%s",
                            prefix,
                            suffix,
                            URLEncoder.encode(
                                            String.valueOf(getOriginatorVASPdid()),
                                            StandardCharsets.UTF_8)
                                    .replaceAll("\\+", "%20")));
        }

        // add `beneficiaryVASPdid` to the URL query string
        if (getBeneficiaryVASPdid() != null) {
            joiner.add(
                    String.format(
                            "%sbeneficiaryVASPdid%s=%s",
                            prefix,
                            suffix,
                            URLEncoder.encode(
                                            String.valueOf(getBeneficiaryVASPdid()),
                                            StandardCharsets.UTF_8)
                                    .replaceAll("\\+", "%20")));
        }

        // add `beneficiaryVASPname` to the URL query string
        if (getBeneficiaryVASPname() != null) {
            joiner.add(
                    String.format(
                            "%sbeneficiaryVASPname%s=%s",
                            prefix,
                            suffix,
                            URLEncoder.encode(
                                            String.valueOf(getBeneficiaryVASPname()),
                                            StandardCharsets.UTF_8)
                                    .replaceAll("\\+", "%20")));
        }

        // add `transactionBlockchainInfo` to the URL query string
        if (getTransactionBlockchainInfo() != null) {
            joiner.add(
                    getTransactionBlockchainInfo()
                            .toUrlQueryString(prefix + "transactionBlockchainInfo" + suffix));
        }

        // add `originator` to the URL query string
        if (getOriginator() != null) {
            joiner.add(getOriginator().toUrlQueryString(prefix + "originator" + suffix));
        }

        // add `beneficiary` to the URL query string
        if (getBeneficiary() != null) {
            joiner.add(getBeneficiary().toUrlQueryString(prefix + "beneficiary" + suffix));
        }

        // add `encrypted` to the URL query string
        if (getEncrypted() != null) {
            joiner.add(
                    String.format(
                            "%sencrypted%s=%s",
                            prefix,
                            suffix,
                            URLEncoder.encode(
                                            String.valueOf(getEncrypted()), StandardCharsets.UTF_8)
                                    .replaceAll("\\+", "%20")));
        }

        // add `protocol` to the URL query string
        if (getProtocol() != null) {
            joiner.add(
                    String.format(
                            "%sprotocol%s=%s",
                            prefix,
                            suffix,
                            URLEncoder.encode(String.valueOf(getProtocol()), StandardCharsets.UTF_8)
                                    .replaceAll("\\+", "%20")));
        }

        // add `skipBeneficiaryDataValidation` to the URL query string
        if (getSkipBeneficiaryDataValidation() != null) {
            joiner.add(
                    String.format(
                            "%sskipBeneficiaryDataValidation%s=%s",
                            prefix,
                            suffix,
                            URLEncoder.encode(
                                            String.valueOf(getSkipBeneficiaryDataValidation()),
                                            StandardCharsets.UTF_8)
                                    .replaceAll("\\+", "%20")));
        }

        // add `travelRuleBehavior` to the URL query string
        if (getTravelRuleBehavior() != null) {
            joiner.add(
                    String.format(
                            "%stravelRuleBehavior%s=%s",
                            prefix,
                            suffix,
                            URLEncoder.encode(
                                            String.valueOf(getTravelRuleBehavior()),
                                            StandardCharsets.UTF_8)
                                    .replaceAll("\\+", "%20")));
        }

        // add `originatorProof` to the URL query string
        if (getOriginatorProof() != null) {
            joiner.add(getOriginatorProof().toUrlQueryString(prefix + "originatorProof" + suffix));
        }

        // add `beneficiaryProof` to the URL query string
        if (getBeneficiaryProof() != null) {
            joiner.add(
                    getBeneficiaryProof().toUrlQueryString(prefix + "beneficiaryProof" + suffix));
        }

        // add `pii` to the URL query string
        if (getPii() != null) {
            joiner.add(getPii().toUrlQueryString(prefix + "pii" + suffix));
        }

        return joiner.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy