in services/library/src/main/java/com/google/cloud/pso/bq_snapshot_manager/functions/f03_snapshoter/BigQuerySnapshoter.java [74:92]
public static void validateInput(SnapshoterRequest request){
if (! (request.getBackupPolicyAndState().getMethod().equals(BackupMethod.BIGQUERY_SNAPSHOT) ||
request.getBackupPolicyAndState().getMethod().equals(BackupMethod.BOTH))) {
throw new IllegalArgumentException(String.format("BackupMethod must be BIGQUERY_SNAPSHOT or BOTH. Received %s",
request.getBackupPolicyAndState().getMethod()));
}
if (request.getBackupPolicyAndState().getBigQuerySnapshotExpirationDays() == null) {
throw new IllegalArgumentException(String.format("BigQuerySnapshotExpirationDays is missing in the BackupPolicy %s",
request.getBackupPolicyAndState()));
}
if (request.getBackupPolicyAndState().getBackupStorageProject() == null) {
throw new IllegalArgumentException(String.format("BigQuerySnapshotStorageProject is missing in the BackupPolicy %s",
request.getBackupPolicyAndState()));
}
if (request.getBackupPolicyAndState().getBigQuerySnapshotStorageDataset() == null) {
throw new IllegalArgumentException(String.format("BigQuerySnapshotStorageDataset is missing in the BackupPolicy %s",
request.getBackupPolicyAndState()));
}
}