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: "Security IR",
    serviceShapeName: "SecurityIncidentResponse",
});
const auth = T.AwsAuthSigv4({ name: "security-ir" });
const ver = T.ServiceVersion("2018-05-10");
const proto = T.AwsProtocolsRestJson1();
const rules = T.EndpointResolver((p, _) => {
    const { UseFIPS = false, Endpoint, Region } = 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");
        }
        return e(Endpoint);
    }
    if (Region != null) {
        {
            const PartitionResult = _.partition(Region);
            if (PartitionResult != null && PartitionResult !== false) {
                if (UseFIPS === true) {
                    return e(`https://security-ir-fips.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                }
                return e(`https://security-ir.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const ListTagsForResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ resourceArn: S.String.pipe(T.HttpLabel("resourceArn")) }).pipe(T.all(T.Http({ method: "GET", uri: "/v1/tags/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListTagsForResourceInput",
});
export const TagMap = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const ListTagsForResourceOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ tags: TagMap })).annotate({
    identifier: "ListTagsForResourceOutput",
});
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 TagResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceArn: S.String.pipe(T.HttpLabel("resourceArn")),
    tags: TagMap,
}).pipe(T.all(T.Http({ method: "POST", uri: "/v1/tags/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "TagResourceInput",
});
export const TagResourceOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "TagResourceOutput",
});
export const TagKeys = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const UntagResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceArn: S.String.pipe(T.HttpLabel("resourceArn")),
    tagKeys: TagKeys.pipe(T.HttpQuery("tagKeys")),
}).pipe(T.all(T.Http({ method: "DELETE", uri: "/v1/tags/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UntagResourceInput",
});
export const UntagResourceOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UntagResourceOutput",
});
export const ResolverType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const EngagementType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ImpactedAccounts = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const Watcher = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    email: SensitiveString,
    name: S.optional(SensitiveString),
    jobTitle: S.optional(SensitiveString),
})).annotate({ identifier: "Watcher" });
export const Watchers = /*@__PURE__*/ /*#__PURE__*/ S.Array(Watcher);
export const ThreatActorIp = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ipAddress: SensitiveString, userAgent: S.optional(S.String) })).annotate({ identifier: "ThreatActorIp" });
export const ThreatActorIpList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ThreatActorIp);
export const ImpactedServicesList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const AwsRegion = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ImpactedAwsRegion = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ region: AwsRegion })).annotate({
    identifier: "ImpactedAwsRegion",
});
export const ImpactedAwsRegionList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ImpactedAwsRegion);
export const CreateCaseRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    clientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
    resolverType: ResolverType,
    title: SensitiveString,
    description: SensitiveString,
    engagementType: EngagementType,
    reportedIncidentStartDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    impactedAccounts: ImpactedAccounts,
    watchers: Watchers,
    threatActorIpAddresses: S.optional(ThreatActorIpList),
    impactedServices: S.optional(ImpactedServicesList),
    impactedAwsRegions: S.optional(ImpactedAwsRegionList),
    tags: S.optional(TagMap),
}).pipe(T.all(T.Http({ method: "POST", uri: "/v1/create-case" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateCaseRequest",
});
export const CreateCaseResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ caseId: S.String })).annotate({
    identifier: "CreateCaseResponse",
});
export const GetCaseRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ caseId: S.String.pipe(T.HttpLabel("caseId")) }).pipe(T.all(T.Http({ method: "GET", uri: "/v1/cases/{caseId}/get-case" }), svc, auth, proto, ver, rules))).annotate({ identifier: "GetCaseRequest" });
export const CaseStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const PendingAction = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ClosureCode = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const CaseAttachmentStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const CaseAttachmentAttributes = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    attachmentId: S.String,
    fileName: SensitiveString,
    attachmentStatus: CaseAttachmentStatus,
    creator: S.String,
    createdDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
})).annotate({
    identifier: "CaseAttachmentAttributes",
});
export const CaseAttachmentsList = /*@__PURE__*/ /*#__PURE__*/ S.Array(CaseAttachmentAttributes);
export const CaseMetadataEntry = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ key: S.String, value: S.String })).annotate({
    identifier: "CaseMetadataEntry",
});
export const CaseMetadata = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(CaseMetadataEntry);
export const GetCaseResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    title: S.optional(SensitiveString),
    caseArn: S.optional(S.String),
    description: S.optional(SensitiveString),
    caseStatus: S.optional(CaseStatus),
    engagementType: S.optional(EngagementType),
    reportedIncidentStartDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    actualIncidentStartDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    impactedAwsRegions: S.optional(ImpactedAwsRegionList),
    threatActorIpAddresses: S.optional(ThreatActorIpList),
    pendingAction: S.optional(PendingAction),
    impactedAccounts: S.optional(ImpactedAccounts),
    watchers: S.optional(Watchers),
    createdDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    lastUpdatedDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    closureCode: S.optional(ClosureCode),
    resolverType: S.optional(ResolverType),
    impactedServices: S.optional(ImpactedServicesList),
    caseAttachments: S.optional(CaseAttachmentsList),
    closedDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    caseMetadata: S.optional(CaseMetadata),
})).annotate({
    identifier: "GetCaseResponse",
});
export const UpdateCaseRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    caseId: S.String.pipe(T.HttpLabel("caseId")),
    title: S.optional(SensitiveString),
    description: S.optional(SensitiveString),
    reportedIncidentStartDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    actualIncidentStartDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    engagementType: S.optional(EngagementType),
    watchersToAdd: S.optional(Watchers),
    watchersToDelete: S.optional(Watchers),
    threatActorIpAddressesToAdd: S.optional(ThreatActorIpList),
    threatActorIpAddressesToDelete: S.optional(ThreatActorIpList),
    impactedServicesToAdd: S.optional(ImpactedServicesList),
    impactedServicesToDelete: S.optional(ImpactedServicesList),
    impactedAwsRegionsToAdd: S.optional(ImpactedAwsRegionList),
    impactedAwsRegionsToDelete: S.optional(ImpactedAwsRegionList),
    impactedAccountsToAdd: S.optional(ImpactedAccounts),
    impactedAccountsToDelete: S.optional(ImpactedAccounts),
    caseMetadata: S.optional(CaseMetadata),
}).pipe(T.all(T.Http({ method: "POST", uri: "/v1/cases/{caseId}/update-case" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateCaseRequest",
});
export const UpdateCaseResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UpdateCaseResponse",
});
export const ListCasesRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/v1/list-cases" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListCasesRequest",
});
export const ListCasesItem = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    caseId: S.String,
    lastUpdatedDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    title: S.optional(SensitiveString),
    caseArn: S.optional(S.String),
    engagementType: S.optional(EngagementType),
    caseStatus: S.optional(CaseStatus),
    createdDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    closedDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    resolverType: S.optional(ResolverType),
    pendingAction: S.optional(PendingAction),
})).annotate({ identifier: "ListCasesItem" });
export const ListCasesItems = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ListCasesItem);
export const ListCasesResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String),
    items: S.optional(ListCasesItems),
    total: S.optional(S.Number),
})).annotate({
    identifier: "ListCasesResponse",
});
export const CloseCaseRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ caseId: S.String.pipe(T.HttpLabel("caseId")) }).pipe(T.all(T.Http({ method: "POST", uri: "/v1/cases/{caseId}/close-case" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CloseCaseRequest",
});
export const CloseCaseResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    caseStatus: S.optional(CaseStatus),
    closedDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "CloseCaseResponse",
});
export const CreateCaseCommentRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    caseId: S.String.pipe(T.HttpLabel("caseId")),
    clientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
    body: SensitiveString,
}).pipe(T.all(T.Http({ method: "POST", uri: "/v1/cases/{caseId}/create-comment" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateCaseCommentRequest",
});
export const CreateCaseCommentResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ commentId: S.String })).annotate({
    identifier: "CreateCaseCommentResponse",
});
export const GetCaseAttachmentDownloadUrlRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    caseId: S.String.pipe(T.HttpLabel("caseId")),
    attachmentId: S.String.pipe(T.HttpLabel("attachmentId")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/v1/cases/{caseId}/get-presigned-url/{attachmentId}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetCaseAttachmentDownloadUrlRequest",
});
export const GetCaseAttachmentDownloadUrlResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ attachmentPresignedUrl: SensitiveString })).annotate({
    identifier: "GetCaseAttachmentDownloadUrlResponse",
});
export const GetCaseAttachmentUploadUrlRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    caseId: S.String.pipe(T.HttpLabel("caseId")),
    fileName: SensitiveString,
    contentLength: S.Number,
    clientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
}).pipe(T.all(T.Http({ method: "POST", uri: "/v1/cases/{caseId}/get-presigned-url" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetCaseAttachmentUploadUrlRequest",
});
export const GetCaseAttachmentUploadUrlResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ attachmentPresignedUrl: SensitiveString })).annotate({
    identifier: "GetCaseAttachmentUploadUrlResponse",
});
export const ListCaseEditsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
    caseId: S.String.pipe(T.HttpLabel("caseId")),
}).pipe(T.all(T.Http({ method: "POST", uri: "/v1/cases/{caseId}/list-case-edits" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListCaseEditsRequest",
});
export const CaseEditItem = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    eventTimestamp: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    principal: S.optional(S.String),
    action: S.optional(S.String),
    message: S.optional(S.String),
})).annotate({ identifier: "CaseEditItem" });
export const CaseEditItems = /*@__PURE__*/ /*#__PURE__*/ S.Array(CaseEditItem);
export const ListCaseEditsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String),
    items: S.optional(CaseEditItems),
    total: S.optional(S.Number),
})).annotate({
    identifier: "ListCaseEditsResponse",
});
export const ListCommentsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
    caseId: S.String.pipe(T.HttpLabel("caseId")),
}).pipe(T.all(T.Http({ method: "POST", uri: "/v1/cases/{caseId}/list-comments" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListCommentsRequest",
});
export const ListCommentsItem = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    commentId: S.String,
    createdDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    lastUpdatedDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    creator: S.optional(S.String),
    lastUpdatedBy: S.optional(S.String),
    body: S.optional(SensitiveString),
})).annotate({
    identifier: "ListCommentsItem",
});
export const ListCommentsItems = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ListCommentsItem);
export const ListCommentsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String),
    items: S.optional(ListCommentsItems),
    total: S.optional(S.Number),
})).annotate({
    identifier: "ListCommentsResponse",
});
export const ListInvestigationsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String).pipe(T.HttpQuery("nextToken")),
    maxResults: S.optional(S.Number).pipe(T.HttpQuery("maxResults")),
    caseId: S.String.pipe(T.HttpLabel("caseId")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/v1/cases/{caseId}/list-investigations",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListInvestigationsRequest",
});
export const ActionType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ExecutionStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const UsefulnessRating = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const InvestigationFeedback = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    usefulness: S.optional(UsefulnessRating),
    comment: S.optional(S.String),
    submittedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "InvestigationFeedback",
});
export const InvestigationAction = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    investigationId: S.String,
    actionType: ActionType,
    title: S.String,
    content: S.String,
    status: ExecutionStatus,
    lastUpdated: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    feedback: S.optional(InvestigationFeedback),
})).annotate({
    identifier: "InvestigationAction",
});
export const InvestigationActionList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(InvestigationAction);
export const ListInvestigationsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String),
    investigationActions: InvestigationActionList,
})).annotate({
    identifier: "ListInvestigationsResponse",
});
export const SendFeedbackRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    caseId: S.String.pipe(T.HttpLabel("caseId")),
    resultId: S.String.pipe(T.HttpLabel("resultId")),
    usefulness: UsefulnessRating,
    comment: S.optional(S.String),
}).pipe(T.all(T.Http({
    method: "POST",
    uri: "/v1/cases/{caseId}/feedback/{resultId}/send-feedback",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "SendFeedbackRequest",
});
export const SendFeedbackResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "SendFeedbackResponse",
});
export const UpdateCaseCommentRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    caseId: S.String.pipe(T.HttpLabel("caseId")),
    commentId: S.String.pipe(T.HttpLabel("commentId")),
    body: SensitiveString,
}).pipe(T.all(T.Http({
    method: "PUT",
    uri: "/v1/cases/{caseId}/update-case-comment/{commentId}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateCaseCommentRequest",
});
export const UpdateCaseCommentResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ commentId: S.String, body: S.optional(SensitiveString) })).annotate({
    identifier: "UpdateCaseCommentResponse",
});
export const SelfManagedCaseStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const UpdateCaseStatusRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    caseId: S.String.pipe(T.HttpLabel("caseId")),
    caseStatus: SelfManagedCaseStatus,
}).pipe(T.all(T.Http({
    method: "POST",
    uri: "/v1/cases/{caseId}/update-case-status",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateCaseStatusRequest",
});
export const UpdateCaseStatusResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ caseStatus: S.optional(SelfManagedCaseStatus) })).annotate({
    identifier: "UpdateCaseStatusResponse",
});
export const UpdateResolverTypeRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    caseId: S.String.pipe(T.HttpLabel("caseId")),
    resolverType: ResolverType,
}).pipe(T.all(T.Http({
    method: "POST",
    uri: "/v1/cases/{caseId}/update-resolver-type",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateResolverTypeRequest",
});
export const UpdateResolverTypeResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    caseId: S.String,
    caseStatus: S.optional(CaseStatus),
    resolverType: S.optional(ResolverType),
})).annotate({
    identifier: "UpdateResolverTypeResponse",
});
export const CommunicationType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const CommunicationPreferences = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(CommunicationType);
export const IncidentResponder = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: SensitiveString,
    jobTitle: SensitiveString,
    email: SensitiveString,
    communicationPreferences: S.optional(CommunicationPreferences),
})).annotate({
    identifier: "IncidentResponder",
});
export const IncidentResponseTeam = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(IncidentResponder);
export const OptInFeatureName = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const OptInFeature = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ featureName: OptInFeatureName, isEnabled: S.Boolean })).annotate({ identifier: "OptInFeature" });
export const OptInFeatures = /*@__PURE__*/ /*#__PURE__*/ S.Array(OptInFeature);
export const CreateMembershipRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    clientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
    membershipName: SensitiveString,
    incidentResponseTeam: IncidentResponseTeam,
    optInFeatures: S.optional(OptInFeatures),
    tags: S.optional(TagMap),
    coverEntireOrganization: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/v1/membership" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateMembershipRequest",
});
export const CreateMembershipResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ membershipId: S.String })).annotate({
    identifier: "CreateMembershipResponse",
});
export const GetMembershipRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ membershipId: S.String.pipe(T.HttpLabel("membershipId")) }).pipe(T.all(T.Http({ method: "GET", uri: "/v1/membership/{membershipId}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetMembershipRequest",
});
export const MembershipStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const CustomerType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const OrganizationalUnits = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const MembershipAccountsConfigurations = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    coverEntireOrganization: S.optional(S.Boolean),
    organizationalUnits: S.optional(OrganizationalUnits),
})).annotate({
    identifier: "MembershipAccountsConfigurations",
});
export const GetMembershipResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    membershipId: S.String,
    accountId: S.optional(S.String),
    region: S.optional(AwsRegion),
    membershipName: S.optional(SensitiveString),
    membershipArn: S.optional(S.String),
    membershipStatus: S.optional(MembershipStatus),
    membershipActivationTimestamp: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    membershipDeactivationTimestamp: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    customerType: S.optional(CustomerType),
    numberOfAccountsCovered: S.optional(S.Number),
    incidentResponseTeam: S.optional(IncidentResponseTeam),
    optInFeatures: S.optional(OptInFeatures),
    membershipAccountsConfigurations: S.optional(MembershipAccountsConfigurations),
})).annotate({
    identifier: "GetMembershipResponse",
});
export const MembershipAccountsConfigurationsUpdate = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    coverEntireOrganization: S.optional(S.Boolean),
    organizationalUnitsToAdd: S.optional(OrganizationalUnits),
    organizationalUnitsToRemove: S.optional(OrganizationalUnits),
})).annotate({
    identifier: "MembershipAccountsConfigurationsUpdate",
});
export const UpdateMembershipRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    membershipId: S.String.pipe(T.HttpLabel("membershipId")),
    membershipName: S.optional(SensitiveString),
    incidentResponseTeam: S.optional(IncidentResponseTeam),
    optInFeatures: S.optional(OptInFeatures),
    membershipAccountsConfigurationsUpdate: S.optional(MembershipAccountsConfigurationsUpdate),
    undoMembershipCancellation: S.optional(S.Boolean),
}).pipe(T.all(T.Http({
    method: "PUT",
    uri: "/v1/membership/{membershipId}/update-membership",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateMembershipRequest",
});
export const UpdateMembershipResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UpdateMembershipResponse",
});
export const ListMembershipsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/v1/memberships" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListMembershipsRequest",
});
export const ListMembershipItem = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    membershipId: S.String,
    accountId: S.optional(S.String),
    region: S.optional(AwsRegion),
    membershipArn: S.optional(S.String),
    membershipStatus: S.optional(MembershipStatus),
})).annotate({
    identifier: "ListMembershipItem",
});
export const ListMembershipItems = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ListMembershipItem);
export const ListMembershipsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String),
    items: S.optional(ListMembershipItems),
})).annotate({
    identifier: "ListMembershipsResponse",
});
export const AWSAccountIds = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const BatchGetMemberAccountDetailsRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    membershipId: S.String.pipe(T.HttpLabel("membershipId")),
    accountIds: AWSAccountIds,
}).pipe(T.all(T.Http({
    method: "POST",
    uri: "/v1/membership/{membershipId}/batch-member-details",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "BatchGetMemberAccountDetailsRequest",
});
export const MembershipAccountRelationshipStatus = 
/*@__PURE__*/ /*#__PURE__*/ S.String;
export const MembershipAccountRelationshipType = 
/*@__PURE__*/ /*#__PURE__*/ S.String;
export const GetMembershipAccountDetailItem = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    accountId: S.optional(S.String),
    relationshipStatus: S.optional(MembershipAccountRelationshipStatus),
    relationshipType: S.optional(MembershipAccountRelationshipType),
})).annotate({
    identifier: "GetMembershipAccountDetailItem",
});
export const GetMembershipAccountDetailItems = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(GetMembershipAccountDetailItem);
export const GetMembershipAccountDetailError = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String, error: S.String, message: S.String })).annotate({
    identifier: "GetMembershipAccountDetailError",
});
export const GetMembershipAccountDetailErrors = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(GetMembershipAccountDetailError);
export const BatchGetMemberAccountDetailsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    items: S.optional(GetMembershipAccountDetailItems),
    errors: S.optional(GetMembershipAccountDetailErrors),
})).annotate({
    identifier: "BatchGetMemberAccountDetailsResponse",
});
export const CancelMembershipRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ membershipId: S.String.pipe(T.HttpLabel("membershipId")) }).pipe(T.all(T.Http({ method: "PUT", uri: "/v1/membership/{membershipId}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CancelMembershipRequest",
});
export const CancelMembershipResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ membershipId: S.String })).annotate({
    identifier: "CancelMembershipResponse",
});
//# Errors
export class AccessDeniedException extends S.TaggedErrorClass()("AccessDeniedException", { message: S.String }).pipe(C.withAuthError) {
}
export class ResourceNotFoundException extends S.TaggedErrorClass()("ResourceNotFoundException", { message: S.String }).pipe(C.withBadRequestError) {
}
export class ValidationException extends S.TaggedErrorClass()("ValidationException", {
    message: S.String,
    reason: ValidationExceptionReason,
    fieldList: S.optional(ValidationExceptionFieldList),
}).pipe(C.withBadRequestError) {
}
/**
 * Returns currently configured tags on a resource.
 */
export const listTagsForResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListTagsForResourceInput,
    output: ListTagsForResourceOutput,
    errors: [
        AccessDeniedException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Adds a tag(s) to a designated resource.
 */
export const tagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TagResourceInput,
    output: TagResourceOutput,
    errors: [
        AccessDeniedException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Removes a tag(s) from a designate resource.
 */
export const untagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UntagResourceInput,
    output: UntagResourceOutput,
    errors: [
        AccessDeniedException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Creates a new case.
 */
export const createCase = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateCaseRequest,
    output: CreateCaseResponse,
    errors: [],
}));
/**
 * Returns the attributes of a case.
 */
export const getCase = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetCaseRequest,
    output: GetCaseResponse,
    errors: [],
}));
/**
 * Updates an existing case.
 */
export const updateCase = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateCaseRequest,
    output: UpdateCaseResponse,
    errors: [],
}));
/**
 * Lists all cases the requester has access to.
 */
export const listCases = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListCasesRequest,
    output: ListCasesResponse,
    errors: [],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "items",
        pageSize: "maxResults",
    },
}));
/**
 * Closes an existing case.
 */
export const closeCase = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CloseCaseRequest,
    output: CloseCaseResponse,
    errors: [],
}));
/**
 * Adds a comment to an existing case.
 */
export const createCaseComment = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateCaseCommentRequest,
    output: CreateCaseCommentResponse,
    errors: [],
}));
/**
 * Returns a Pre-Signed URL for uploading attachments into a case.
 */
export const getCaseAttachmentDownloadUrl = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetCaseAttachmentDownloadUrlRequest,
    output: GetCaseAttachmentDownloadUrlResponse,
    errors: [],
}));
/**
 * Uploads an attachment to a case.
 */
export const getCaseAttachmentUploadUrl = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetCaseAttachmentUploadUrlRequest,
    output: GetCaseAttachmentUploadUrlResponse,
    errors: [],
}));
/**
 * Views the case history for edits made to a designated case.
 */
export const listCaseEdits = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListCaseEditsRequest,
    output: ListCaseEditsResponse,
    errors: [],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "items",
        pageSize: "maxResults",
    },
}));
/**
 * Returns comments for a designated case.
 */
export const listComments = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListCommentsRequest,
    output: ListCommentsResponse,
    errors: [],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "items",
        pageSize: "maxResults",
    },
}));
/**
 * Investigation performed by an agent for a security incident...
 */
export const listInvestigations = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListInvestigationsRequest,
    output: ListInvestigationsResponse,
    errors: [],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "investigationActions",
        pageSize: "maxResults",
    },
}));
/**
 * Send feedback based on response investigation action
 */
export const sendFeedback = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: SendFeedbackRequest,
    output: SendFeedbackResponse,
    errors: [],
}));
/**
 * Updates an existing case comment.
 */
export const updateCaseComment = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateCaseCommentRequest,
    output: UpdateCaseCommentResponse,
    errors: [],
}));
/**
 * Updates the state transitions for a designated cases.
 *
 * **Self-managed**: the following states are available for self-managed cases.
 *
 * - Submitted → Detection and Analysis
 *
 * - Detection and Analysis → Containment, Eradication, and Recovery
 *
 * - Detection and Analysis → Post-incident Activities
 *
 * - Containment, Eradication, and Recovery → Detection and Analysis
 *
 * - Containment, Eradication, and Recovery → Post-incident Activities
 *
 * - Post-incident Activities → Containment, Eradication, and Recovery
 *
 * - Post-incident Activities → Detection and Analysis
 *
 * - Any → Closed
 *
 * **AWS supported**: You must use the `CloseCase` API to close.
 */
export const updateCaseStatus = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateCaseStatusRequest,
    output: UpdateCaseStatusResponse,
    errors: [],
}));
/**
 * Updates the resolver type for a case.
 *
 * This is a one-way action and cannot be reversed.
 */
export const updateResolverType = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateResolverTypeRequest,
    output: UpdateResolverTypeResponse,
    errors: [],
}));
/**
 * Creates a new membership.
 */
export const createMembership = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateMembershipRequest,
    output: CreateMembershipResponse,
    errors: [],
}));
/**
 * Returns the attributes of a membership.
 */
export const getMembership = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetMembershipRequest,
    output: GetMembershipResponse,
    errors: [],
}));
/**
 * Updates membership configuration.
 */
export const updateMembership = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateMembershipRequest,
    output: UpdateMembershipResponse,
    errors: [],
}));
/**
 * Returns the memberships that the calling principal can access.
 */
export const listMemberships = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListMembershipsRequest,
    output: ListMembershipsResponse,
    errors: [],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "items",
        pageSize: "maxResults",
    },
}));
/**
 * Provides information on whether the supplied account IDs are associated with a membership.
 *
 * AWS account ID's may appear less than 12 characters and need to be zero-prepended. An example would be `123123123` which is nine digits, and with zero-prepend would be `000123123123`. Not zero-prepending to 12 digits could result in errors.
 */
export const batchGetMemberAccountDetails = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: BatchGetMemberAccountDetailsRequest,
    output: BatchGetMemberAccountDetailsResponse,
    errors: [],
}));
/**
 * Cancels an existing membership.
 */
export const cancelMembership = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CancelMembershipRequest,
    output: CancelMembershipResponse,
    errors: [],
}));
//# sourceMappingURL=security-ir.js.map