public static void validateRequest()

in services/library/src/main/java/com/google/cloud/pso/bq_snapshot_manager/functions/f03_snapshoter/GCSSnapshoter.java [78:93]


    public static void validateRequest(SnapshoterRequest request){
        // validate required params
        if (! (request.getBackupPolicyAndState().getMethod().equals(BackupMethod.GCS_SNAPSHOT) ||
                request.getBackupPolicyAndState().getMethod().equals(BackupMethod.BOTH))) {
            throw new IllegalArgumentException(String.format("BackupMethod must be GCS_SNAPSHOT or BOTH. Received %s",
                    request.getBackupPolicyAndState().getMethod()));
        }
        if (request.getBackupPolicyAndState().getGcsExportFormat() == null) {
            throw new IllegalArgumentException(String.format("GCSExportFormat is missing in the BackupPolicy %s",
                    request.getBackupPolicyAndState()));
        }
        if (request.getBackupPolicyAndState().getGcsSnapshotStorageLocation() == null) {
            throw new IllegalArgumentException(String.format("GcsSnapshotStorageLocation is missing in the BackupPolicy %s",
                    request.getBackupPolicyAndState()));
        }
    }