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

org.whispersystems.signalservice.api.account.ChangePhoneNumberRequest Maven / Gradle / Ivy

There is a newer version: 2.15.3_unofficial_107
Show newest version
package org.whispersystems.signalservice.api.account;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import org.signal.libsignal.protocol.IdentityKey;
import org.whispersystems.signalservice.api.push.SignedPreKeyEntity;
import org.whispersystems.signalservice.internal.push.KyberPreKeyEntity;
import org.whispersystems.signalservice.internal.push.OutgoingPushMessage;
import org.whispersystems.signalservice.internal.util.JsonUtil;

import java.util.List;
import java.util.Map;

public final class ChangePhoneNumberRequest {
  @JsonProperty
  private String sessionId;

  @JsonProperty
  private String recoveryPassword;

  @JsonProperty
  private String number;

  @JsonProperty("reglock")
  private String registrationLock;

  @JsonProperty
  @JsonSerialize(using = JsonUtil.IdentityKeySerializer.class)
  @JsonDeserialize(using = JsonUtil.IdentityKeyDeserializer.class)
  private IdentityKey pniIdentityKey;

  @JsonProperty
  private List deviceMessages;

  @JsonProperty
  private Map devicePniSignedPrekeys;

  @JsonProperty("devicePniPqLastResortPrekeys")
  private Map devicePniLastResortKyberPrekeys;

  @JsonProperty
  private Map pniRegistrationIds;

  @SuppressWarnings("unused") 
  public ChangePhoneNumberRequest() {}

  public ChangePhoneNumberRequest(String sessionId,
                                  String recoveryPassword,
                                  String number,
                                  String registrationLock,
                                  IdentityKey pniIdentityKey,
                                  List deviceMessages,
                                  Map devicePniSignedPrekeys,
                                  Map devicePniLastResortKyberPrekeys,
                                  Map pniRegistrationIds)
  {
    this.sessionId                       = sessionId;
    this.recoveryPassword                = recoveryPassword;
    this.number                          = number;
    this.registrationLock                = registrationLock;
    this.pniIdentityKey                  = pniIdentityKey;
    this.deviceMessages                  = deviceMessages;
    this.devicePniSignedPrekeys          = devicePniSignedPrekeys;
    this.devicePniLastResortKyberPrekeys = devicePniLastResortKyberPrekeys;
    this.pniRegistrationIds              = pniRegistrationIds;
  }

  public String getNumber() {
    return number;
  }

  public String getRegistrationLock() {
    return registrationLock;
  }

  public IdentityKey getPniIdentityKey() {
    return pniIdentityKey;
  }

  public List getDeviceMessages() {
    return deviceMessages;
  }

  public Map getDevicePniSignedPrekeys() {
    return devicePniSignedPrekeys;
  }

  public Map getPniRegistrationIds() {
    return pniRegistrationIds;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy