Use camel casing for entry position field on key transparency monitor requests
This commit is contained in:
parent
d3d68c2a60
commit
2f51778421
|
@ -151,21 +151,21 @@ public class KeyTransparencyController {
|
||||||
try {
|
try {
|
||||||
final AciMonitorRequest aciMonitorRequest = AciMonitorRequest.newBuilder()
|
final AciMonitorRequest aciMonitorRequest = AciMonitorRequest.newBuilder()
|
||||||
.setAci(ByteString.copyFrom(request.aci().value().toCompactByteArray()))
|
.setAci(ByteString.copyFrom(request.aci().value().toCompactByteArray()))
|
||||||
.setEntryPosition(request.aci().entry_position())
|
.setEntryPosition(request.aci().entryPosition())
|
||||||
.setCommitmentIndex(ByteString.copyFrom(request.aci().commitmentIndex()))
|
.setCommitmentIndex(ByteString.copyFrom(request.aci().commitmentIndex()))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
final Optional<UsernameHashMonitorRequest> usernameHashMonitorRequest = request.usernameHash().map(usernameHash ->
|
final Optional<UsernameHashMonitorRequest> usernameHashMonitorRequest = request.usernameHash().map(usernameHash ->
|
||||||
UsernameHashMonitorRequest.newBuilder()
|
UsernameHashMonitorRequest.newBuilder()
|
||||||
.setUsernameHash(ByteString.copyFrom(usernameHash.value()))
|
.setUsernameHash(ByteString.copyFrom(usernameHash.value()))
|
||||||
.setEntryPosition(usernameHash.entry_position())
|
.setEntryPosition(usernameHash.entryPosition())
|
||||||
.setCommitmentIndex(ByteString.copyFrom(usernameHash.commitmentIndex()))
|
.setCommitmentIndex(ByteString.copyFrom(usernameHash.commitmentIndex()))
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
final Optional<E164MonitorRequest> e164MonitorRequest = request.e164().map(e164 ->
|
final Optional<E164MonitorRequest> e164MonitorRequest = request.e164().map(e164 ->
|
||||||
E164MonitorRequest.newBuilder()
|
E164MonitorRequest.newBuilder()
|
||||||
.setE164(e164.value())
|
.setE164(e164.value())
|
||||||
.setEntryPosition(e164.entry_position())
|
.setEntryPosition(e164.entryPosition())
|
||||||
.setCommitmentIndex(ByteString.copyFrom(e164.commitmentIndex()))
|
.setCommitmentIndex(ByteString.copyFrom(e164.commitmentIndex()))
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@ import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import jakarta.validation.constraints.Positive;
|
import jakarta.validation.constraints.Positive;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import org.whispersystems.textsecuregcm.identity.AciServiceIdentifier;
|
import org.whispersystems.textsecuregcm.identity.AciServiceIdentifier;
|
||||||
import org.whispersystems.textsecuregcm.util.ByteArrayAdapter;
|
import org.whispersystems.textsecuregcm.util.ByteArrayAdapter;
|
||||||
|
@ -51,7 +50,7 @@ public record KeyTransparencyMonitorRequest(
|
||||||
|
|
||||||
@Schema(description = "A log tree position maintained by the client for the aci.")
|
@Schema(description = "A log tree position maintained by the client for the aci.")
|
||||||
@Positive
|
@Positive
|
||||||
long entry_position,
|
long entryPosition,
|
||||||
|
|
||||||
@Schema(description = "The commitment index derived from a previous search request, encoded in standard unpadded base64")
|
@Schema(description = "The commitment index derived from a previous search request, encoded in standard unpadded base64")
|
||||||
@JsonSerialize(using = ByteArrayAdapter.Serializing.class)
|
@JsonSerialize(using = ByteArrayAdapter.Serializing.class)
|
||||||
|
@ -68,7 +67,7 @@ public record KeyTransparencyMonitorRequest(
|
||||||
|
|
||||||
@Schema(description = "A log tree position maintained by the client for the e164.")
|
@Schema(description = "A log tree position maintained by the client for the e164.")
|
||||||
@Positive
|
@Positive
|
||||||
long entry_position,
|
long entryPosition,
|
||||||
|
|
||||||
@Schema(description = "The commitment index derived from a previous search request, encoded in standard unpadded base64")
|
@Schema(description = "The commitment index derived from a previous search request, encoded in standard unpadded base64")
|
||||||
@JsonSerialize(using = ByteArrayAdapter.Serializing.class)
|
@JsonSerialize(using = ByteArrayAdapter.Serializing.class)
|
||||||
|
@ -89,7 +88,7 @@ public record KeyTransparencyMonitorRequest(
|
||||||
|
|
||||||
@Schema(description = "A log tree position maintained by the client for the username hash.")
|
@Schema(description = "A log tree position maintained by the client for the username hash.")
|
||||||
@Positive
|
@Positive
|
||||||
long entry_position,
|
long entryPosition,
|
||||||
|
|
||||||
@Schema(description = "The commitment index derived from a previous search request, encoded in standard unpadded base64")
|
@Schema(description = "The commitment index derived from a previous search request, encoded in standard unpadded base64")
|
||||||
@JsonSerialize(using = ByteArrayAdapter.Serializing.class)
|
@JsonSerialize(using = ByteArrayAdapter.Serializing.class)
|
||||||
|
|
Loading…
Reference in New Issue