// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.analytics.purview.scanning.generated;

import com.azure.analytics.purview.scanning.PurviewScanningClientBuilder;
import com.azure.analytics.purview.scanning.ScanResultClient;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import com.azure.identity.DefaultAzureCredentialBuilder;

public class ScanResultRunScan {
    public static void main(String[] args) {
        ScanResultClient scanResultClient =
                new PurviewScanningClientBuilder()
                        .credential(new DefaultAzureCredentialBuilder().build())
                        .endpoint("{Endpoint}")
                        .buildScanResultClient();
        // BEGIN:com.azure.analytics.purview.scanning.generated.scanresultrunscan.scanresultrunscan
        RequestOptions requestOptions = new RequestOptions().addQueryParam("scanLevel", "Full");
        Response<BinaryData> response =
                scanResultClient.runScanWithResponse(
                        "testDataSourceName", "scan1", "138301e4-f4f9-4ab5-b734-bac446b236e7", requestOptions);
        // END:com.azure.analytics.purview.scanning.generated.scanresultrunscan.scanresultrunscan
    }
}
