/** * * @param _tag Discriminating tag for this instance. */ private GetAccountBatchError withTag(Tag _tag) { GetAccountBatchError result = new GetAccountBatchError(); result._tag = _tag; return result; }
/** * * @param noAccountValue The value is an account ID specified in {@link * GetAccountBatchArg#getAccountIds} that does not exist. Must have * length of at least 40, have length of at most 40, and not be {@code * null}. * @param _tag Discriminating tag for this instance. * * @throws IllegalArgumentException If any argument does not meet its * preconditions. */ private GetAccountBatchError withTagAndNoAccount(Tag _tag, String noAccountValue) { GetAccountBatchError result = new GetAccountBatchError(); result._tag = _tag; result.noAccountValue = noAccountValue; return result; }
/** * 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); }