org.telegram.api.input.media.TLInputMediaContact Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of telegramapi Show documentation
Show all versions of telegramapi Show documentation
Java library to create Telegram Clients
package org.telegram.api.input.media;
import org.telegram.tl.StreamingUtils;
import org.telegram.tl.TLContext;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* The type TL input media contact.
*/
public class TLInputMediaContact extends TLAbsInputMedia {
/**
* The constant CLASS_ID.
*/
public static final int CLASS_ID = 0xa6e45987;
private String phoneNumber;
private String firstName;
private String lastName;
/**
* Instantiates a new TL input media contact.
*/
public TLInputMediaContact() {
super();
}
public int getClassId() {
return CLASS_ID;
}
/**
* Gets phone number.
*
* @return the phone number
*/
public String getPhoneNumber() {
return this.phoneNumber;
}
/**
* Sets phone number.
*
* @param phoneNumber the phone number
*/
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
/**
* Gets first name.
*
* @return the first name
*/
public String getFirstName() {
return this.firstName;
}
/**
* Sets first name.
*
* @param firstName the first name
*/
public void setFirstName(String firstName) {
this.firstName = firstName;
}
/**
* Gets last name.
*
* @return the last name
*/
public String getLastName() {
return this.lastName;
}
/**
* Sets last name.
*
* @param lastName the last name
*/
public void setLastName(String lastName) {
this.lastName = lastName;
}
public void serializeBody(OutputStream stream)
throws IOException {
StreamingUtils.writeTLString(this.phoneNumber, stream);
StreamingUtils.writeTLString(this.firstName, stream);
StreamingUtils.writeTLString(this.lastName, stream);
}
public void deserializeBody(InputStream stream, TLContext context)
throws IOException {
this.phoneNumber = StreamingUtils.readTLString(stream);
this.firstName = StreamingUtils.readTLString(stream);
this.lastName = StreamingUtils.readTLString(stream);
}
public String toString() {
return "inputMediaContact#a6e45987";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy