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

com.antonioaltieri.telegram.botapi.types.Contact Maven / Gradle / Ivy

package com.antonioaltieri.telegram.botapi.types;

import com.google.gson.annotations.SerializedName;

/**
 * This object represents a phone contact.
 *
 * Any getters labeled optional might return a default value (such as {@code null}).
 *
 * @see https://core.telegram.org/bots/api#contact
 */
public class Contact {

    @SerializedName("phone_number")
    private String phoneNumber;

    @SerializedName("first_name")
    private String firstName;

    @SerializedName("last_name")
    private String lastName;

    @SerializedName("user_id")
    private long userId;

    /**
     * @return Contact's phone number
     */
    public String getPhoneNumber() {
        return phoneNumber;
    }

    /**
     * @return Contact's first name
     */
    public String getFirstName() {
        return firstName;
    }

    /**
     * Optional.
     *
     * @return Contact's last name
     */
    public String getLastName() {
        return lastName;
    }

    /**
     * Optional.
     *
     * @return Contact's user identifier in Telegram
     */
    public long getUserId() {
        return userId;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy