/** * Returns an instance of {@code GetAccountBatchError} that has its tag set * to {@link Tag#NO_ACCOUNT}. * * <p> The value is an account ID specified in {@link * GetAccountBatchArg#getAccountIds} that does not exist. </p> * * @param value value to assign to this instance. * * @return Instance of {@code GetAccountBatchError} with its tag set to * {@link Tag#NO_ACCOUNT}. * * @throws IllegalArgumentException if {@code value} is shorter than 40, is * longer than 40, or is {@code null}. */ public static GetAccountBatchError noAccount(String value) { if (value == null) { throw new IllegalArgumentException("Value is null"); } if (value.length() < 40) { throw new IllegalArgumentException("String is shorter than 40"); } if (value.length() > 40) { throw new IllegalArgumentException("String is longer than 40"); } return new GetAccountBatchError().withTagAndNoAccount(Tag.NO_ACCOUNT, value); }