import * as HttpClient from "effect/unstable/http/HttpClient";
import * as redacted from "effect/Redacted";
import * as S from "effect/Schema";
import * as stream from "effect/Stream";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import * as C from "../category.js";
import { SensitiveString } from "../sensitive.js";
const svc = T.AwsApiService({
    sdkId: "CodeGuru Security",
    serviceShapeName: "AwsCodeGuruSecurity",
});
const auth = T.AwsAuthSigv4({ name: "codeguru-security" });
const ver = T.ServiceVersion("2018-05-10");
const proto = T.AwsProtocolsRestJson1();
const rules = T.EndpointResolver((p, _) => {
    const { Region, UseDualStack = false, UseFIPS = false, Endpoint } = p;
    const e = (u, p = {}, h = {}) => ({
        type: "endpoint",
        endpoint: { url: u, properties: p, headers: h },
    });
    const err = (m) => ({
        type: "error",
        message: m,
    });
    if (Endpoint != null) {
        if (UseFIPS === true) {
            return err("Invalid Configuration: FIPS and custom endpoint are not supported");
        }
        if (UseDualStack === true) {
            return err("Invalid Configuration: Dualstack and custom endpoint are not supported");
        }
        return e(Endpoint);
    }
    if (Region != null) {
        {
            const PartitionResult = _.partition(Region);
            if (PartitionResult != null && PartitionResult !== false) {
                if (UseFIPS === true && UseDualStack === true) {
                    if (true === _.getAttr(PartitionResult, "supportsFIPS") &&
                        true === _.getAttr(PartitionResult, "supportsDualStack")) {
                        return e(`https://codeguru-security-fips.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("FIPS and DualStack are enabled, but this partition does not support one or both");
                }
                if (UseFIPS === true) {
                    if (_.getAttr(PartitionResult, "supportsFIPS") === true) {
                        return e(`https://codeguru-security-fips.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
                    }
                    return err("FIPS is enabled but this partition does not support FIPS");
                }
                if (UseDualStack === true) {
                    if (true === _.getAttr(PartitionResult, "supportsDualStack")) {
                        return e(`https://codeguru-security.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                return e(`https://codeguru-security.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const FindingIdentifier = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ scanName: S.String, findingId: S.String })).annotate({
    identifier: "FindingIdentifier",
});
export const FindingIdentifiers = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(FindingIdentifier);
export const BatchGetFindingsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ findingIdentifiers: FindingIdentifiers }).pipe(T.all(T.Http({ method: "POST", uri: "/batchGetFindings" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "BatchGetFindingsRequest",
});
export const Status = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const Resource = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.String), subResourceId: S.optional(S.String) })).annotate({ identifier: "Resource" });
export const ReferenceUrls = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const RelatedVulnerabilities = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const CodeLine = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ number: S.optional(S.Number), content: S.optional(S.String) })).annotate({ identifier: "CodeLine" });
export const CodeSnippet = /*@__PURE__*/ /*#__PURE__*/ S.Array(CodeLine);
export const FilePath = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: S.optional(S.String),
    path: S.optional(S.String),
    startLine: S.optional(S.Number),
    endLine: S.optional(S.Number),
    codeSnippet: S.optional(CodeSnippet),
})).annotate({ identifier: "FilePath" });
export const Vulnerability = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    referenceUrls: S.optional(ReferenceUrls),
    relatedVulnerabilities: S.optional(RelatedVulnerabilities),
    id: S.optional(S.String),
    filePath: S.optional(FilePath),
    itemCount: S.optional(S.Number),
})).annotate({ identifier: "Vulnerability" });
export const Severity = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const Recommendation = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ text: S.optional(S.String), url: S.optional(S.String) })).annotate({ identifier: "Recommendation" });
export const SuggestedFix = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ description: S.optional(S.String), code: S.optional(S.String) })).annotate({ identifier: "SuggestedFix" });
export const SuggestedFixes = /*@__PURE__*/ /*#__PURE__*/ S.Array(SuggestedFix);
export const Remediation = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    recommendation: S.optional(Recommendation),
    suggestedFixes: S.optional(SuggestedFixes),
})).annotate({ identifier: "Remediation" });
export const DetectorTags = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const Finding = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    createdAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    description: S.optional(S.String),
    generatorId: S.optional(S.String),
    id: S.optional(S.String),
    updatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    type: S.optional(S.String),
    status: S.optional(Status),
    resource: S.optional(Resource),
    vulnerability: S.optional(Vulnerability),
    severity: S.optional(Severity),
    remediation: S.optional(Remediation),
    title: S.optional(S.String),
    detectorTags: S.optional(DetectorTags),
    detectorId: S.optional(S.String),
    detectorName: S.optional(S.String),
    ruleId: S.optional(S.String),
})).annotate({ identifier: "Finding" });
export const Findings = /*@__PURE__*/ /*#__PURE__*/ S.Array(Finding);
export const ErrorCode = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const BatchGetFindingsError_ = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    scanName: S.String,
    findingId: S.String,
    errorCode: ErrorCode,
    message: S.String,
})).annotate({
    identifier: "BatchGetFindingsError",
});
export const BatchGetFindingsErrors = /*@__PURE__*/ /*#__PURE__*/ S.Array(BatchGetFindingsError_);
export const BatchGetFindingsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ findings: Findings, failedFindings: BatchGetFindingsErrors })).annotate({
    identifier: "BatchGetFindingsResponse",
});
export const ValidationExceptionReason = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ValidationExceptionField = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ name: S.String, message: S.String })).annotate({
    identifier: "ValidationExceptionField",
});
export const ValidationExceptionFieldList = /*@__PURE__*/ /*#__PURE__*/ S.Array(ValidationExceptionField);
export const ResourceId = /*@__PURE__*/ /*#__PURE__*/ S.Union([
    S.Struct({ codeArtifactId: S.String }),
]);
export const ScanType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const AnalysisType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const TagMap = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const CreateScanRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    clientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
    resourceId: ResourceId,
    scanName: S.String,
    scanType: S.optional(ScanType),
    analysisType: S.optional(AnalysisType),
    tags: S.optional(TagMap),
}).pipe(T.all(T.Http({ method: "POST", uri: "/scans" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateScanRequest",
});
export const ScanState = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const CreateScanResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    scanName: S.String,
    runId: S.String,
    resourceId: ResourceId,
    scanState: ScanState,
    scanNameArn: S.optional(S.String),
})).annotate({
    identifier: "CreateScanResponse",
});
export const CreateUploadUrlRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ scanName: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/uploadUrl" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateUploadUrlRequest",
});
export const RequestHeaderMap = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const CreateUploadUrlResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    s3Url: SensitiveString,
    requestHeaders: RequestHeaderMap,
    codeArtifactId: S.String,
})).annotate({
    identifier: "CreateUploadUrlResponse",
});
export const GetAccountConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.all(T.Http({ method: "GET", uri: "/accountConfiguration/get" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetAccountConfigurationRequest",
});
export const EncryptionConfig = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ kmsKeyArn: S.optional(S.String) })).annotate({
    identifier: "EncryptionConfig",
});
export const GetAccountConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ encryptionConfig: EncryptionConfig })).annotate({
    identifier: "GetAccountConfigurationResponse",
});
export const GetFindingsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    scanName: S.String.pipe(T.HttpLabel("scanName")),
    nextToken: S.optional(S.String).pipe(T.HttpQuery("nextToken")),
    maxResults: S.optional(S.Number).pipe(T.HttpQuery("maxResults")),
    status: S.optional(Status).pipe(T.HttpQuery("status")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/findings/{scanName}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetFindingsRequest",
});
export const GetFindingsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ findings: S.optional(Findings), nextToken: S.optional(S.String) })).annotate({
    identifier: "GetFindingsResponse",
});
export const GetMetricsSummaryRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    date: S.Date.pipe(T.TimestampFormat("epoch-seconds")).pipe(T.HttpQuery("date")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/metrics/summary" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetMetricsSummaryRequest",
});
export const FindingMetricsValuePerSeverity = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    info: S.optional(S.Number),
    low: S.optional(S.Number),
    medium: S.optional(S.Number),
    high: S.optional(S.Number),
    critical: S.optional(S.Number),
})).annotate({
    identifier: "FindingMetricsValuePerSeverity",
});
export const CategoryWithFindingNum = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    categoryName: S.optional(S.String),
    findingNumber: S.optional(S.Number),
})).annotate({
    identifier: "CategoryWithFindingNum",
});
export const CategoriesWithMostFindings = /*@__PURE__*/ /*#__PURE__*/ S.Array(CategoryWithFindingNum);
export const ScanNameWithFindingNum = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    scanName: S.optional(S.String),
    findingNumber: S.optional(S.Number),
})).annotate({
    identifier: "ScanNameWithFindingNum",
});
export const ScansWithMostOpenFindings = /*@__PURE__*/ /*#__PURE__*/ S.Array(ScanNameWithFindingNum);
export const ScansWithMostOpenCriticalFindings = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ScanNameWithFindingNum);
export const MetricsSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    date: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    openFindings: S.optional(FindingMetricsValuePerSeverity),
    categoriesWithMostFindings: S.optional(CategoriesWithMostFindings),
    scansWithMostOpenFindings: S.optional(ScansWithMostOpenFindings),
    scansWithMostOpenCriticalFindings: S.optional(ScansWithMostOpenCriticalFindings),
})).annotate({ identifier: "MetricsSummary" });
export const GetMetricsSummaryResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ metricsSummary: S.optional(MetricsSummary) })).annotate({
    identifier: "GetMetricsSummaryResponse",
});
export const GetScanRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    scanName: S.String.pipe(T.HttpLabel("scanName")),
    runId: S.optional(S.String).pipe(T.HttpQuery("runId")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/scans/{scanName}" }), svc, auth, proto, ver, rules))).annotate({ identifier: "GetScanRequest" });
export const GetScanResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    scanName: S.String,
    runId: S.String,
    scanState: ScanState,
    createdAt: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    analysisType: AnalysisType,
    updatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    numberOfRevisions: S.optional(S.Number),
    scanNameArn: S.optional(S.String),
    errorMessage: S.optional(S.String),
})).annotate({
    identifier: "GetScanResponse",
});
export const ListFindingsMetricsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String).pipe(T.HttpQuery("nextToken")),
    maxResults: S.optional(S.Number).pipe(T.HttpQuery("maxResults")),
    startDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")).pipe(T.HttpQuery("startDate")),
    endDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")).pipe(T.HttpQuery("endDate")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/metrics/findings" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListFindingsMetricsRequest",
});
export const AccountFindingsMetric = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    date: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    newFindings: S.optional(FindingMetricsValuePerSeverity),
    closedFindings: S.optional(FindingMetricsValuePerSeverity),
    openFindings: S.optional(FindingMetricsValuePerSeverity),
    meanTimeToClose: S.optional(FindingMetricsValuePerSeverity),
})).annotate({
    identifier: "AccountFindingsMetric",
});
export const FindingsMetricList = /*@__PURE__*/ /*#__PURE__*/ S.Array(AccountFindingsMetric);
export const ListFindingsMetricsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    findingsMetrics: S.optional(FindingsMetricList),
    nextToken: S.optional(S.String),
})).annotate({
    identifier: "ListFindingsMetricsResponse",
});
export const ListScansRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String).pipe(T.HttpQuery("nextToken")),
    maxResults: S.optional(S.Number).pipe(T.HttpQuery("maxResults")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/scans" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListScansRequest",
});
export const ScanSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    scanState: ScanState,
    createdAt: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    updatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    scanName: S.String,
    runId: S.String,
    scanNameArn: S.optional(S.String),
})).annotate({ identifier: "ScanSummary" });
export const ScanSummaries = /*@__PURE__*/ /*#__PURE__*/ S.Array(ScanSummary);
export const ListScansResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    summaries: S.optional(ScanSummaries),
    nextToken: S.optional(S.String),
})).annotate({
    identifier: "ListScansResponse",
});
export const ListTagsForResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ resourceArn: S.String.pipe(T.HttpLabel("resourceArn")) }).pipe(T.all(T.Http({ method: "GET", uri: "/tags/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListTagsForResourceRequest",
});
export const ListTagsForResourceResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ tags: S.optional(TagMap) })).annotate({
    identifier: "ListTagsForResourceResponse",
});
export const TagResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceArn: S.String.pipe(T.HttpLabel("resourceArn")),
    tags: TagMap,
}).pipe(T.all(T.Http({ method: "POST", uri: "/tags/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "TagResourceRequest",
});
export const TagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "TagResourceResponse",
});
export const TagKeyList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const UntagResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceArn: S.String.pipe(T.HttpLabel("resourceArn")),
    tagKeys: TagKeyList.pipe(T.HttpQuery("tagKeys")),
}).pipe(T.all(T.Http({ method: "DELETE", uri: "/tags/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UntagResourceRequest",
});
export const UntagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UntagResourceResponse",
});
export const UpdateAccountConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ encryptionConfig: EncryptionConfig }).pipe(T.all(T.Http({ method: "PUT", uri: "/updateAccountConfiguration" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateAccountConfigurationRequest",
});
export const UpdateAccountConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ encryptionConfig: EncryptionConfig })).annotate({
    identifier: "UpdateAccountConfigurationResponse",
});
//# Errors
export class AccessDeniedException extends S.TaggedErrorClass()("AccessDeniedException", {
    errorCode: S.String,
    message: S.String,
    resourceId: S.optional(S.String),
    resourceType: S.optional(S.String),
}).pipe(C.withAuthError) {
}
export class InternalServerException extends S.TaggedErrorClass()("InternalServerException", { error: S.optional(S.String), message: S.optional(S.String) }, T.Retryable()).pipe(C.withServerError, C.withRetryableError) {
}
export class ThrottlingException extends S.TaggedErrorClass()("ThrottlingException", {
    errorCode: S.String,
    message: S.String,
    serviceCode: S.optional(S.String),
    quotaCode: S.optional(S.String),
}, T.Retryable({ throttling: true })).pipe(C.withThrottlingError, C.withRetryableError) {
}
export class ValidationException extends S.TaggedErrorClass()("ValidationException", {
    errorCode: S.String,
    message: S.String,
    reason: ValidationExceptionReason,
    fieldList: S.optional(ValidationExceptionFieldList),
}).pipe(C.withBadRequestError) {
}
export class ConflictException extends S.TaggedErrorClass()("ConflictException", {
    errorCode: S.String,
    message: S.String,
    resourceId: S.String,
    resourceType: S.String,
}).pipe(C.withConflictError) {
}
export class ResourceNotFoundException extends S.TaggedErrorClass()("ResourceNotFoundException", {
    errorCode: S.String,
    message: S.String,
    resourceId: S.String,
    resourceType: S.String,
}).pipe(C.withBadRequestError) {
}
/**
 * Returns a list of requested findings from standard scans.
 */
export const batchGetFindings = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: BatchGetFindingsRequest,
    output: BatchGetFindingsResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Use to create a scan using code uploaded to an Amazon S3 bucket.
 */
export const createScan = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateScanRequest,
    output: CreateScanResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Generates a pre-signed URL, request headers used to upload a code resource, and code artifact identifier for the uploaded resource.
 *
 * You can upload your code resource to the URL with the request headers using any HTTP client.
 */
export const createUploadUrl = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateUploadUrlRequest,
    output: CreateUploadUrlResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Use to get the encryption configuration for an account.
 */
export const getAccountConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetAccountConfigurationRequest,
    output: GetAccountConfigurationResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Returns a list of all findings generated by a particular scan.
 */
export const getFindings = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: GetFindingsRequest,
    output: GetFindingsResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "findings",
        pageSize: "maxResults",
    },
}));
/**
 * Returns a summary of metrics for an account from a specified date, including number of open findings, the categories with most findings, the scans with most open findings, and scans with most open critical findings.
 */
export const getMetricsSummary = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetMetricsSummaryRequest,
    output: GetMetricsSummaryResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Returns details about a scan, including whether or not a scan has completed.
 */
export const getScan = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetScanRequest,
    output: GetScanResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Returns metrics about all findings in an account within a specified time range.
 */
export const listFindingsMetrics = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListFindingsMetricsRequest,
    output: ListFindingsMetricsResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "findingsMetrics",
        pageSize: "maxResults",
    },
}));
/**
 * Returns a list of all scans in an account. Does not return `EXPRESS` scans.
 */
export const listScans = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListScansRequest,
    output: ListScansResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "summaries",
        pageSize: "maxResults",
    },
}));
/**
 * Returns a list of all tags associated with a scan.
 */
export const listTagsForResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListTagsForResourceRequest,
    output: ListTagsForResourceResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Use to add one or more tags to an existing scan.
 */
export const tagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TagResourceRequest,
    output: TagResourceResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Use to remove one or more tags from an existing scan.
 */
export const untagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UntagResourceRequest,
    output: UntagResourceResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Use to update the encryption configuration for an account.
 */
export const updateAccountConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateAccountConfigurationRequest,
    output: UpdateAccountConfigurationResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
//# sourceMappingURL=codeguru-security.js.map