on, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     Telegram Server is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.telegram.tl.auth;

import org.telegram.mtproto.ProtocolBuffer;
import org.telegram.tl.*;

public class BindTempAuthKey extends TLObject {

    public static final int ID = -841733627;

    public long perm_auth_key_id;
    public long nonce;
    public int expires_at;
    public byte[] encrypted_message;

    public BindTempAuthKey() {
    }

    public BindTempAuthKey(long perm_auth_key_id, long nonce, int expires_at, byte[] encrypted_message){
        this.perm_auth_key_id = perm_auth_key_id;
        this.nonce = nonce;
        this.expires_at = expires_at;
        this.encrypted_message = encrypted_message;
    }

    @Override
    public void deserialize(ProtocolBuffer buffer) {
        perm_auth_key_id = buffer.readLong();
        nonce = buffer.readLong();
        expires_at = buffer.readInt();
        encrypted_message = buffer.readBytes();
    }

    @Override
    public ProtocolBuffer serialize() {
        ProtocolBuffer buffer = new ProtocolBuffer(32);
        serializeTo(buffer);
        return buffer;
    }

    @Override
    public void serializeTo(ProtocolBuffer buff) {
        buff.writeInt(getConstructor());
        buff.writeLong(perm_auth_key_id);
        buff.writeLong(nonce);
        buff.writeInt(expires_at);
        buff.writeBytes(encrypted_message);
    }

    public int getConstructor() {
        return ID;
    }
}

{
  "images" : [
    {
      "idiom" : "universal",
      "filename" : "chat-file-pause-big.png",
      "scale" : "1x"
    },
    {
      "idiom" : "universal",
   