/*
 * Copyright 2024 Signal Messenger, LLC
 * SPDX-License-Identifier: AGPL-3.0-only
 */
package org.whispersystems.textsecuregcm.entities;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.swagger.v3.oas.annotations.media.Schema;
import org.whispersystems.textsecuregcm.util.ByteArrayAdapter;
import org.whispersystems.textsecuregcm.util.ExactlySize;
import javax.validation.constraints.NotEmpty;

public record SetShareSetRequest(
    @Schema(description = """
        A share-set generated by a client after storing a value in SVR3, serialized in un-padded standard base64
        """, implementation = String.class)
    @JsonDeserialize(using = ByteArrayAdapter.Deserializing.class)
    @NotEmpty
    @ExactlySize(SHARE_SET_SIZE)
    byte[] shareSet) {
  public static final int SHARE_SET_SIZE = 169;
}
