public AesGcmParameters build() throws GeneralSecurityException {
      if (keySizeBytes == null) {
        throw new GeneralSecurityException("Key size is not set");
      }
      if (variant == null) {
        throw new GeneralSecurityException("Variant is not set");
      }
      if (ivSizeBytes == null) {
        throw new GeneralSecurityException("IV size is not set");
      }

      if (tagSizeBytes == null) {
        throw new GeneralSecurityException("Tag size is not set");
      }

      return new AesGcmParameters(keySizeBytes, ivSizeBytes, tagSizeBytes, variant);
    }
Tag size must be between 12 and 16 bytes.
java_src/src/main/java/com/google/crypto/tink/aead/AesGcmParameters.java