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

org.telegram.telegrambots.meta.api.objects.passport.PassportData Maven / Gradle / Ivy

There is a newer version: 7.9.1
Show newest version
package org.telegram.telegrambots.meta.api.objects.passport;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.telegram.telegrambots.meta.api.interfaces.BotApiObject;

import java.util.List;

/**
 * @author Ruben Bermudez
 * @version 4.0.0
 * Contains information about Telegram Passport data shared with the bot by the user.
 */
public class PassportData implements BotApiObject {
    private static final String DATA_FIELD = "data";
    private static final String CREDENTIALS_FIELD = "credentials";

    @JsonProperty(DATA_FIELD)
    private List data; ///< Array with information about documents and other Telegram Passport data that was shared with the bot
    @JsonProperty(CREDENTIALS_FIELD)
    private EncryptedCredentials credentials; ///< Array with information about documents and other Telegram Passport data shared with the bot.

    public PassportData() {
    }

    public PassportData(List data, EncryptedCredentials credentials) {
        this.data = data;
        this.credentials = credentials;
    }

    public List getData() {
        return data;
    }

    public EncryptedCredentials getCredentials() {
        return credentials;
    }

    @Override
    public String toString() {
        return "PassportData{" +
                "data=" + data +
                ", credentials=" + credentials +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy