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 ns = T.XmlNamespace("http://swf.amazonaws.com/doc/2015-07-20/");
const svc = T.AwsApiService({
    sdkId: "SFN",
    serviceShapeName: "AWSStepFunctions",
});
const auth = T.AwsAuthSigv4({ name: "states" });
const ver = T.ServiceVersion("2016-11-23");
const proto = T.AwsProtocolsAwsJson1_0();
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://states-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) {
                        if (Region === "us-gov-west-1") {
                            return e("https://states.us-gov-west-1.amazonaws.com");
                        }
                        return e(`https://states-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://states.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                return e(`https://states.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const Tag = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ key: S.optional(S.String), value: S.optional(S.String) })).annotate({ identifier: "Tag" });
export const TagList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Tag);
export const EncryptionType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const EncryptionConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    kmsKeyId: S.optional(S.String),
    kmsDataKeyReusePeriodSeconds: S.optional(S.Number),
    type: EncryptionType,
})).annotate({
    identifier: "EncryptionConfiguration",
});
export const CreateActivityInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: S.String,
    tags: S.optional(TagList),
    encryptionConfiguration: S.optional(EncryptionConfiguration),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateActivityInput",
});
export const CreateActivityOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    activityArn: S.String,
    creationDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
}).pipe(ns)).annotate({
    identifier: "CreateActivityOutput",
});
export const StateMachineType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const LogLevel = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const CloudWatchLogsLogGroup = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ logGroupArn: S.optional(S.String) })).annotate({
    identifier: "CloudWatchLogsLogGroup",
});
export const LogDestination = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ cloudWatchLogsLogGroup: S.optional(CloudWatchLogsLogGroup) })).annotate({ identifier: "LogDestination" });
export const LogDestinationList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(LogDestination);
export const LoggingConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    level: S.optional(LogLevel),
    includeExecutionData: S.optional(S.Boolean),
    destinations: S.optional(LogDestinationList),
})).annotate({
    identifier: "LoggingConfiguration",
});
export const TracingConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ enabled: S.optional(S.Boolean) })).annotate({
    identifier: "TracingConfiguration",
});
export const CreateStateMachineInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: S.String,
    definition: SensitiveString,
    roleArn: S.String,
    type: S.optional(StateMachineType),
    loggingConfiguration: S.optional(LoggingConfiguration),
    tags: S.optional(TagList),
    tracingConfiguration: S.optional(TracingConfiguration),
    publish: S.optional(S.Boolean),
    versionDescription: S.optional(SensitiveString),
    encryptionConfiguration: S.optional(EncryptionConfiguration),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateStateMachineInput",
});
export const CreateStateMachineOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineArn: S.String,
    creationDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    stateMachineVersionArn: S.optional(S.String),
}).pipe(ns)).annotate({
    identifier: "CreateStateMachineOutput",
});
export const ValidationExceptionReason = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const RoutingConfigurationListItem = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ stateMachineVersionArn: S.String, weight: S.Number })).annotate({
    identifier: "RoutingConfigurationListItem",
});
export const RoutingConfigurationList = /*@__PURE__*/ /*#__PURE__*/ S.Array(RoutingConfigurationListItem);
export const CreateStateMachineAliasInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    description: S.optional(SensitiveString),
    name: S.String,
    routingConfiguration: RoutingConfigurationList,
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateStateMachineAliasInput",
});
export const CreateStateMachineAliasOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineAliasArn: S.String,
    creationDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
}).pipe(ns)).annotate({
    identifier: "CreateStateMachineAliasOutput",
});
export const DeleteActivityInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ activityArn: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteActivityInput",
});
export const DeleteActivityOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "DeleteActivityOutput",
});
export const DeleteStateMachineInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ stateMachineArn: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteStateMachineInput",
});
export const DeleteStateMachineOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "DeleteStateMachineOutput",
});
export const DeleteStateMachineAliasInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ stateMachineAliasArn: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteStateMachineAliasInput",
});
export const DeleteStateMachineAliasOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "DeleteStateMachineAliasOutput",
});
export const DeleteStateMachineVersionInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ stateMachineVersionArn: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteStateMachineVersionInput",
});
export const DeleteStateMachineVersionOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "DeleteStateMachineVersionOutput",
});
export const DescribeActivityInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ activityArn: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeActivityInput",
});
export const DescribeActivityOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    activityArn: S.String,
    name: S.String,
    creationDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    encryptionConfiguration: S.optional(EncryptionConfiguration),
}).pipe(ns)).annotate({
    identifier: "DescribeActivityOutput",
});
export const IncludedData = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const DescribeExecutionInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    executionArn: S.String,
    includedData: S.optional(IncludedData),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeExecutionInput",
});
export const ExecutionStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const CloudWatchEventsExecutionDataDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ included: S.optional(S.Boolean) })).annotate({
    identifier: "CloudWatchEventsExecutionDataDetails",
});
export const ExecutionRedriveStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const DescribeExecutionOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    executionArn: S.String,
    stateMachineArn: S.String,
    name: S.optional(S.String),
    status: ExecutionStatus,
    startDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    stopDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    input: S.optional(SensitiveString),
    inputDetails: S.optional(CloudWatchEventsExecutionDataDetails),
    output: S.optional(SensitiveString),
    outputDetails: S.optional(CloudWatchEventsExecutionDataDetails),
    traceHeader: S.optional(S.String),
    mapRunArn: S.optional(S.String),
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
    stateMachineVersionArn: S.optional(S.String),
    stateMachineAliasArn: S.optional(S.String),
    redriveCount: S.optional(S.Number),
    redriveDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    redriveStatus: S.optional(ExecutionRedriveStatus),
    redriveStatusReason: S.optional(SensitiveString),
}).pipe(ns)).annotate({
    identifier: "DescribeExecutionOutput",
});
export const KmsKeyState = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const DescribeMapRunInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ mapRunArn: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeMapRunInput",
});
export const MapRunStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const MapRunItemCounts = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    pending: S.Number,
    running: S.Number,
    succeeded: S.Number,
    failed: S.Number,
    timedOut: S.Number,
    aborted: S.Number,
    total: S.Number,
    resultsWritten: S.Number,
    failuresNotRedrivable: S.optional(S.Number),
    pendingRedrive: S.optional(S.Number),
})).annotate({
    identifier: "MapRunItemCounts",
});
export const MapRunExecutionCounts = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    pending: S.Number,
    running: S.Number,
    succeeded: S.Number,
    failed: S.Number,
    timedOut: S.Number,
    aborted: S.Number,
    total: S.Number,
    resultsWritten: S.Number,
    failuresNotRedrivable: S.optional(S.Number),
    pendingRedrive: S.optional(S.Number),
})).annotate({
    identifier: "MapRunExecutionCounts",
});
export const DescribeMapRunOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    mapRunArn: S.String,
    executionArn: S.String,
    status: MapRunStatus,
    startDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    stopDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    maxConcurrency: S.Number,
    toleratedFailurePercentage: S.Number,
    toleratedFailureCount: S.Number,
    itemCounts: MapRunItemCounts,
    executionCounts: MapRunExecutionCounts,
    redriveCount: S.optional(S.Number),
    redriveDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
}).pipe(ns)).annotate({
    identifier: "DescribeMapRunOutput",
});
export const DescribeStateMachineInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineArn: S.String,
    includedData: S.optional(IncludedData),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeStateMachineInput",
});
export const StateMachineStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const VariableNameList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(SensitiveString);
export const VariableReferences = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, VariableNameList.pipe(S.optional));
export const DescribeStateMachineOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineArn: S.String,
    name: S.String,
    status: S.optional(StateMachineStatus),
    definition: SensitiveString,
    roleArn: S.String,
    type: StateMachineType,
    creationDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    loggingConfiguration: S.optional(LoggingConfiguration),
    tracingConfiguration: S.optional(TracingConfiguration),
    label: S.optional(S.String),
    revisionId: S.optional(S.String),
    description: S.optional(SensitiveString),
    encryptionConfiguration: S.optional(EncryptionConfiguration),
    variableReferences: S.optional(VariableReferences),
}).pipe(ns)).annotate({
    identifier: "DescribeStateMachineOutput",
});
export const DescribeStateMachineAliasInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ stateMachineAliasArn: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeStateMachineAliasInput",
});
export const DescribeStateMachineAliasOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineAliasArn: S.optional(S.String),
    name: S.optional(S.String),
    description: S.optional(SensitiveString),
    routingConfiguration: S.optional(RoutingConfigurationList),
    creationDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    updateDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
}).pipe(ns)).annotate({
    identifier: "DescribeStateMachineAliasOutput",
});
export const DescribeStateMachineForExecutionInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    executionArn: S.String,
    includedData: S.optional(IncludedData),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeStateMachineForExecutionInput",
});
export const DescribeStateMachineForExecutionOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineArn: S.String,
    name: S.String,
    definition: SensitiveString,
    roleArn: S.String,
    updateDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    loggingConfiguration: S.optional(LoggingConfiguration),
    tracingConfiguration: S.optional(TracingConfiguration),
    mapRunArn: S.optional(S.String),
    label: S.optional(S.String),
    revisionId: S.optional(S.String),
    encryptionConfiguration: S.optional(EncryptionConfiguration),
    variableReferences: S.optional(VariableReferences),
}).pipe(ns)).annotate({
    identifier: "DescribeStateMachineForExecutionOutput",
});
export const GetActivityTaskInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ activityArn: S.String, workerName: S.optional(S.String) }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetActivityTaskInput",
});
export const GetActivityTaskOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    taskToken: S.optional(S.String),
    input: S.optional(SensitiveString),
}).pipe(ns)).annotate({
    identifier: "GetActivityTaskOutput",
});
export const GetExecutionHistoryInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    executionArn: S.String,
    maxResults: S.optional(S.Number),
    reverseOrder: S.optional(S.Boolean),
    nextToken: S.optional(S.String),
    includeExecutionData: S.optional(S.Boolean),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetExecutionHistoryInput",
});
export const HistoryEventType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ActivityFailedEventDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "ActivityFailedEventDetails",
});
export const ActivityScheduleFailedEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "ActivityScheduleFailedEventDetails",
});
export const HistoryEventExecutionDataDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ truncated: S.optional(S.Boolean) })).annotate({
    identifier: "HistoryEventExecutionDataDetails",
});
export const ActivityScheduledEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resource: S.String,
    input: S.optional(SensitiveString),
    inputDetails: S.optional(HistoryEventExecutionDataDetails),
    timeoutInSeconds: S.optional(S.Number),
    heartbeatInSeconds: S.optional(S.Number),
})).annotate({
    identifier: "ActivityScheduledEventDetails",
});
export const ActivityStartedEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ workerName: S.optional(S.String) })).annotate({
    identifier: "ActivityStartedEventDetails",
});
export const ActivitySucceededEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    output: S.optional(SensitiveString),
    outputDetails: S.optional(HistoryEventExecutionDataDetails),
})).annotate({
    identifier: "ActivitySucceededEventDetails",
});
export const ActivityTimedOutEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "ActivityTimedOutEventDetails",
});
export const TaskFailedEventDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceType: S.String,
    resource: S.String,
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "TaskFailedEventDetails",
});
export const TaskCredentials = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ roleArn: S.optional(S.String) })).annotate({
    identifier: "TaskCredentials",
});
export const TaskScheduledEventDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceType: S.String,
    resource: S.String,
    region: S.String,
    parameters: SensitiveString,
    timeoutInSeconds: S.optional(S.Number),
    heartbeatInSeconds: S.optional(S.Number),
    taskCredentials: S.optional(TaskCredentials),
})).annotate({
    identifier: "TaskScheduledEventDetails",
});
export const TaskStartFailedEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceType: S.String,
    resource: S.String,
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "TaskStartFailedEventDetails",
});
export const TaskStartedEventDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ resourceType: S.String, resource: S.String })).annotate({
    identifier: "TaskStartedEventDetails",
});
export const TaskSubmitFailedEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceType: S.String,
    resource: S.String,
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "TaskSubmitFailedEventDetails",
});
export const TaskSubmittedEventDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceType: S.String,
    resource: S.String,
    output: S.optional(SensitiveString),
    outputDetails: S.optional(HistoryEventExecutionDataDetails),
})).annotate({
    identifier: "TaskSubmittedEventDetails",
});
export const TaskSucceededEventDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceType: S.String,
    resource: S.String,
    output: S.optional(SensitiveString),
    outputDetails: S.optional(HistoryEventExecutionDataDetails),
})).annotate({
    identifier: "TaskSucceededEventDetails",
});
export const TaskTimedOutEventDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceType: S.String,
    resource: S.String,
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "TaskTimedOutEventDetails",
});
export const ExecutionFailedEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "ExecutionFailedEventDetails",
});
export const ExecutionStartedEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    input: S.optional(SensitiveString),
    inputDetails: S.optional(HistoryEventExecutionDataDetails),
    roleArn: S.optional(S.String),
    stateMachineAliasArn: S.optional(S.String),
    stateMachineVersionArn: S.optional(S.String),
})).annotate({
    identifier: "ExecutionStartedEventDetails",
});
export const ExecutionSucceededEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    output: S.optional(SensitiveString),
    outputDetails: S.optional(HistoryEventExecutionDataDetails),
})).annotate({
    identifier: "ExecutionSucceededEventDetails",
});
export const ExecutionAbortedEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "ExecutionAbortedEventDetails",
});
export const ExecutionTimedOutEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "ExecutionTimedOutEventDetails",
});
export const ExecutionRedrivenEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ redriveCount: S.optional(S.Number) })).annotate({
    identifier: "ExecutionRedrivenEventDetails",
});
export const MapStateStartedEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ length: S.optional(S.Number) })).annotate({
    identifier: "MapStateStartedEventDetails",
});
export const MapIterationEventDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ name: S.optional(S.String), index: S.optional(S.Number) })).annotate({
    identifier: "MapIterationEventDetails",
});
export const LambdaFunctionFailedEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "LambdaFunctionFailedEventDetails",
});
export const LambdaFunctionScheduleFailedEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "LambdaFunctionScheduleFailedEventDetails",
});
export const LambdaFunctionScheduledEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resource: S.String,
    input: S.optional(SensitiveString),
    inputDetails: S.optional(HistoryEventExecutionDataDetails),
    timeoutInSeconds: S.optional(S.Number),
    taskCredentials: S.optional(TaskCredentials),
})).annotate({
    identifier: "LambdaFunctionScheduledEventDetails",
});
export const LambdaFunctionStartFailedEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "LambdaFunctionStartFailedEventDetails",
});
export const LambdaFunctionSucceededEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    output: S.optional(SensitiveString),
    outputDetails: S.optional(HistoryEventExecutionDataDetails),
})).annotate({
    identifier: "LambdaFunctionSucceededEventDetails",
});
export const LambdaFunctionTimedOutEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "LambdaFunctionTimedOutEventDetails",
});
export const StateEnteredEventDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: S.String,
    input: S.optional(SensitiveString),
    inputDetails: S.optional(HistoryEventExecutionDataDetails),
})).annotate({
    identifier: "StateEnteredEventDetails",
});
export const AssignedVariables = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, SensitiveString.pipe(S.optional));
export const AssignedVariablesDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ truncated: S.optional(S.Boolean) })).annotate({
    identifier: "AssignedVariablesDetails",
});
export const StateExitedEventDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: S.String,
    output: S.optional(SensitiveString),
    outputDetails: S.optional(HistoryEventExecutionDataDetails),
    assignedVariables: S.optional(AssignedVariables),
    assignedVariablesDetails: S.optional(AssignedVariablesDetails),
})).annotate({
    identifier: "StateExitedEventDetails",
});
export const MapRunStartedEventDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ mapRunArn: S.optional(S.String) })).annotate({
    identifier: "MapRunStartedEventDetails",
});
export const MapRunFailedEventDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "MapRunFailedEventDetails",
});
export const MapRunRedrivenEventDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    mapRunArn: S.optional(S.String),
    redriveCount: S.optional(S.Number),
})).annotate({
    identifier: "MapRunRedrivenEventDetails",
});
export const EvaluationFailedEventDetails = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
    location: S.optional(SensitiveString),
    state: S.String,
})).annotate({
    identifier: "EvaluationFailedEventDetails",
});
export const HistoryEvent = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    timestamp: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    type: HistoryEventType,
    id: S.Number,
    previousEventId: S.optional(S.Number),
    activityFailedEventDetails: S.optional(ActivityFailedEventDetails),
    activityScheduleFailedEventDetails: S.optional(ActivityScheduleFailedEventDetails),
    activityScheduledEventDetails: S.optional(ActivityScheduledEventDetails),
    activityStartedEventDetails: S.optional(ActivityStartedEventDetails),
    activitySucceededEventDetails: S.optional(ActivitySucceededEventDetails),
    activityTimedOutEventDetails: S.optional(ActivityTimedOutEventDetails),
    taskFailedEventDetails: S.optional(TaskFailedEventDetails),
    taskScheduledEventDetails: S.optional(TaskScheduledEventDetails),
    taskStartFailedEventDetails: S.optional(TaskStartFailedEventDetails),
    taskStartedEventDetails: S.optional(TaskStartedEventDetails),
    taskSubmitFailedEventDetails: S.optional(TaskSubmitFailedEventDetails),
    taskSubmittedEventDetails: S.optional(TaskSubmittedEventDetails),
    taskSucceededEventDetails: S.optional(TaskSucceededEventDetails),
    taskTimedOutEventDetails: S.optional(TaskTimedOutEventDetails),
    executionFailedEventDetails: S.optional(ExecutionFailedEventDetails),
    executionStartedEventDetails: S.optional(ExecutionStartedEventDetails),
    executionSucceededEventDetails: S.optional(ExecutionSucceededEventDetails),
    executionAbortedEventDetails: S.optional(ExecutionAbortedEventDetails),
    executionTimedOutEventDetails: S.optional(ExecutionTimedOutEventDetails),
    executionRedrivenEventDetails: S.optional(ExecutionRedrivenEventDetails),
    mapStateStartedEventDetails: S.optional(MapStateStartedEventDetails),
    mapIterationStartedEventDetails: S.optional(MapIterationEventDetails),
    mapIterationSucceededEventDetails: S.optional(MapIterationEventDetails),
    mapIterationFailedEventDetails: S.optional(MapIterationEventDetails),
    mapIterationAbortedEventDetails: S.optional(MapIterationEventDetails),
    lambdaFunctionFailedEventDetails: S.optional(LambdaFunctionFailedEventDetails),
    lambdaFunctionScheduleFailedEventDetails: S.optional(LambdaFunctionScheduleFailedEventDetails),
    lambdaFunctionScheduledEventDetails: S.optional(LambdaFunctionScheduledEventDetails),
    lambdaFunctionStartFailedEventDetails: S.optional(LambdaFunctionStartFailedEventDetails),
    lambdaFunctionSucceededEventDetails: S.optional(LambdaFunctionSucceededEventDetails),
    lambdaFunctionTimedOutEventDetails: S.optional(LambdaFunctionTimedOutEventDetails),
    stateEnteredEventDetails: S.optional(StateEnteredEventDetails),
    stateExitedEventDetails: S.optional(StateExitedEventDetails),
    mapRunStartedEventDetails: S.optional(MapRunStartedEventDetails),
    mapRunFailedEventDetails: S.optional(MapRunFailedEventDetails),
    mapRunRedrivenEventDetails: S.optional(MapRunRedrivenEventDetails),
    evaluationFailedEventDetails: S.optional(EvaluationFailedEventDetails),
})).annotate({ identifier: "HistoryEvent" });
export const HistoryEventList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(HistoryEvent);
export const GetExecutionHistoryOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    events: HistoryEventList,
    nextToken: S.optional(S.String),
}).pipe(ns)).annotate({
    identifier: "GetExecutionHistoryOutput",
});
export const ListActivitiesInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    maxResults: S.optional(S.Number),
    nextToken: S.optional(S.String),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListActivitiesInput",
});
export const ActivityListItem = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    activityArn: S.String,
    name: S.String,
    creationDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
})).annotate({
    identifier: "ActivityListItem",
});
export const ActivityList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ActivityListItem);
export const ListActivitiesOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ activities: ActivityList, nextToken: S.optional(S.String) }).pipe(ns)).annotate({
    identifier: "ListActivitiesOutput",
});
export const ExecutionRedriveFilter = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ListExecutionsInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineArn: S.optional(S.String),
    statusFilter: S.optional(ExecutionStatus),
    maxResults: S.optional(S.Number),
    nextToken: S.optional(S.String),
    mapRunArn: S.optional(S.String),
    redriveFilter: S.optional(ExecutionRedriveFilter),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListExecutionsInput",
});
export const ExecutionListItem = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    executionArn: S.String,
    stateMachineArn: S.String,
    name: S.String,
    status: ExecutionStatus,
    startDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    stopDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    mapRunArn: S.optional(S.String),
    itemCount: S.optional(S.Number),
    stateMachineVersionArn: S.optional(S.String),
    stateMachineAliasArn: S.optional(S.String),
    redriveCount: S.optional(S.Number),
    redriveDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "ExecutionListItem",
});
export const ExecutionList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ExecutionListItem);
export const ListExecutionsOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ executions: ExecutionList, nextToken: S.optional(S.String) }).pipe(ns)).annotate({
    identifier: "ListExecutionsOutput",
});
export const ListMapRunsInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    executionArn: S.String,
    maxResults: S.optional(S.Number),
    nextToken: S.optional(S.String),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListMapRunsInput",
});
export const MapRunListItem = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    executionArn: S.String,
    mapRunArn: S.String,
    stateMachineArn: S.String,
    startDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    stopDate: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({ identifier: "MapRunListItem" });
export const MapRunList = /*@__PURE__*/ /*#__PURE__*/ S.Array(MapRunListItem);
export const ListMapRunsOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ mapRuns: MapRunList, nextToken: S.optional(S.String) }).pipe(ns)).annotate({
    identifier: "ListMapRunsOutput",
});
export const ListStateMachineAliasesInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineArn: S.String,
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListStateMachineAliasesInput",
});
export const StateMachineAliasListItem = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineAliasArn: S.String,
    creationDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
})).annotate({
    identifier: "StateMachineAliasListItem",
});
export const StateMachineAliasList = /*@__PURE__*/ /*#__PURE__*/ S.Array(StateMachineAliasListItem);
export const ListStateMachineAliasesOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineAliases: StateMachineAliasList,
    nextToken: S.optional(S.String),
}).pipe(ns)).annotate({
    identifier: "ListStateMachineAliasesOutput",
});
export const ListStateMachinesInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    maxResults: S.optional(S.Number),
    nextToken: S.optional(S.String),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListStateMachinesInput",
});
export const StateMachineListItem = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineArn: S.String,
    name: S.String,
    type: StateMachineType,
    creationDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
})).annotate({
    identifier: "StateMachineListItem",
});
export const StateMachineList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(StateMachineListItem);
export const ListStateMachinesOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachines: StateMachineList,
    nextToken: S.optional(S.String),
}).pipe(ns)).annotate({
    identifier: "ListStateMachinesOutput",
});
export const ListStateMachineVersionsInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineArn: S.String,
    nextToken: S.optional(S.String),
    maxResults: S.optional(S.Number),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListStateMachineVersionsInput",
});
export const StateMachineVersionListItem = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineVersionArn: S.String,
    creationDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
})).annotate({
    identifier: "StateMachineVersionListItem",
});
export const StateMachineVersionList = /*@__PURE__*/ /*#__PURE__*/ S.Array(StateMachineVersionListItem);
export const ListStateMachineVersionsOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineVersions: StateMachineVersionList,
    nextToken: S.optional(S.String),
}).pipe(ns)).annotate({
    identifier: "ListStateMachineVersionsOutput",
});
export const ListTagsForResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ resourceArn: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListTagsForResourceInput",
});
export const ListTagsForResourceOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ tags: S.optional(TagList) }).pipe(ns)).annotate({
    identifier: "ListTagsForResourceOutput",
});
export const PublishStateMachineVersionInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineArn: S.String,
    revisionId: S.optional(S.String),
    description: S.optional(SensitiveString),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "PublishStateMachineVersionInput",
});
export const PublishStateMachineVersionOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    creationDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    stateMachineVersionArn: S.String,
}).pipe(ns)).annotate({
    identifier: "PublishStateMachineVersionOutput",
});
export const RedriveExecutionInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    executionArn: S.String,
    clientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "RedriveExecutionInput",
});
export const RedriveExecutionOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    redriveDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
}).pipe(ns)).annotate({
    identifier: "RedriveExecutionOutput",
});
export const SendTaskFailureInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    taskToken: S.String,
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "SendTaskFailureInput",
});
export const SendTaskFailureOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "SendTaskFailureOutput",
});
export const SendTaskHeartbeatInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ taskToken: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "SendTaskHeartbeatInput",
});
export const SendTaskHeartbeatOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "SendTaskHeartbeatOutput",
});
export const SendTaskSuccessInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ taskToken: S.String, output: SensitiveString }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "SendTaskSuccessInput",
});
export const SendTaskSuccessOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "SendTaskSuccessOutput",
});
export const StartExecutionInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineArn: S.String,
    name: S.optional(S.String),
    input: S.optional(SensitiveString),
    traceHeader: S.optional(S.String),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "StartExecutionInput",
});
export const StartExecutionOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    executionArn: S.String,
    startDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
}).pipe(ns)).annotate({
    identifier: "StartExecutionOutput",
});
export const StartSyncExecutionInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineArn: S.String,
    name: S.optional(S.String),
    input: S.optional(SensitiveString),
    traceHeader: S.optional(S.String),
    includedData: S.optional(IncludedData),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "StartSyncExecutionInput",
});
export const SyncExecutionStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const BillingDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    billedMemoryUsedInMB: S.optional(S.Number),
    billedDurationInMilliseconds: S.optional(S.Number),
})).annotate({ identifier: "BillingDetails" });
export const StartSyncExecutionOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    executionArn: S.String,
    stateMachineArn: S.optional(S.String),
    name: S.optional(S.String),
    startDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    stopDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    status: SyncExecutionStatus,
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
    input: S.optional(SensitiveString),
    inputDetails: S.optional(CloudWatchEventsExecutionDataDetails),
    output: S.optional(SensitiveString),
    outputDetails: S.optional(CloudWatchEventsExecutionDataDetails),
    traceHeader: S.optional(S.String),
    billingDetails: S.optional(BillingDetails),
}).pipe(ns)).annotate({
    identifier: "StartSyncExecutionOutput",
});
export const StopExecutionInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    executionArn: S.String,
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "StopExecutionInput",
});
export const StopExecutionOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ stopDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")) }).pipe(ns)).annotate({
    identifier: "StopExecutionOutput",
});
export const TagResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ resourceArn: S.String, tags: TagList }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "TagResourceInput",
});
export const TagResourceOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "TagResourceOutput",
});
export const InspectionLevel = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const MockErrorOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
})).annotate({
    identifier: "MockErrorOutput",
});
export const MockResponseValidationMode = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const MockInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    result: S.optional(SensitiveString),
    errorOutput: S.optional(MockErrorOutput),
    fieldValidationMode: S.optional(MockResponseValidationMode),
})).annotate({ identifier: "MockInput" });
export const TestStateConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    retrierRetryCount: S.optional(S.Number),
    errorCausedByState: S.optional(SensitiveString),
    mapIterationFailureCount: S.optional(S.Number),
    mapItemReaderData: S.optional(SensitiveString),
})).annotate({
    identifier: "TestStateConfiguration",
});
export const TestStateInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    definition: SensitiveString,
    roleArn: S.optional(S.String),
    input: S.optional(SensitiveString),
    inspectionLevel: S.optional(InspectionLevel),
    revealSecrets: S.optional(S.Boolean),
    variables: S.optional(SensitiveString),
    stateName: S.optional(SensitiveString),
    mock: S.optional(MockInput),
    context: S.optional(SensitiveString),
    stateConfiguration: S.optional(TestStateConfiguration),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({ identifier: "TestStateInput" });
export const InspectionDataRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    protocol: S.optional(S.String),
    method: S.optional(S.String),
    url: S.optional(S.String),
    headers: S.optional(S.String),
    body: S.optional(S.String),
})).annotate({
    identifier: "InspectionDataRequest",
});
export const InspectionDataResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    protocol: S.optional(S.String),
    statusCode: S.optional(S.String),
    statusMessage: S.optional(S.String),
    headers: S.optional(S.String),
    body: S.optional(S.String),
})).annotate({
    identifier: "InspectionDataResponse",
});
export const InspectionErrorDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    catchIndex: S.optional(S.Number),
    retryIndex: S.optional(S.Number),
    retryBackoffIntervalSeconds: S.optional(S.Number),
})).annotate({
    identifier: "InspectionErrorDetails",
});
export const InspectionData = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    input: S.optional(SensitiveString),
    afterArguments: S.optional(SensitiveString),
    afterInputPath: S.optional(SensitiveString),
    afterParameters: S.optional(SensitiveString),
    result: S.optional(SensitiveString),
    afterResultSelector: S.optional(SensitiveString),
    afterResultPath: S.optional(SensitiveString),
    request: S.optional(InspectionDataRequest),
    response: S.optional(InspectionDataResponse),
    variables: S.optional(SensitiveString),
    errorDetails: S.optional(InspectionErrorDetails),
    afterItemsPath: S.optional(SensitiveString),
    afterItemSelector: S.optional(SensitiveString),
    afterItemBatcher: S.optional(SensitiveString),
    afterItemsPointer: S.optional(SensitiveString),
    toleratedFailureCount: S.optional(S.Number),
    toleratedFailurePercentage: S.optional(S.Number),
    maxConcurrency: S.optional(S.Number),
})).annotate({ identifier: "InspectionData" });
export const TestExecutionStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const TestStateOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    output: S.optional(SensitiveString),
    error: S.optional(SensitiveString),
    cause: S.optional(SensitiveString),
    inspectionData: S.optional(InspectionData),
    nextState: S.optional(S.String),
    status: S.optional(TestExecutionStatus),
}).pipe(ns)).annotate({
    identifier: "TestStateOutput",
});
export const TagKeyList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const UntagResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ resourceArn: S.String, tagKeys: TagKeyList }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UntagResourceInput",
});
export const UntagResourceOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "UntagResourceOutput",
});
export const UpdateMapRunInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    mapRunArn: S.String,
    maxConcurrency: S.optional(S.Number),
    toleratedFailurePercentage: S.optional(S.Number),
    toleratedFailureCount: S.optional(S.Number),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateMapRunInput",
});
export const UpdateMapRunOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "UpdateMapRunOutput",
});
export const UpdateStateMachineInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineArn: S.String,
    definition: S.optional(SensitiveString),
    roleArn: S.optional(S.String),
    loggingConfiguration: S.optional(LoggingConfiguration),
    tracingConfiguration: S.optional(TracingConfiguration),
    publish: S.optional(S.Boolean),
    versionDescription: S.optional(SensitiveString),
    encryptionConfiguration: S.optional(EncryptionConfiguration),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateStateMachineInput",
});
export const UpdateStateMachineOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    updateDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    revisionId: S.optional(S.String),
    stateMachineVersionArn: S.optional(S.String),
}).pipe(ns)).annotate({
    identifier: "UpdateStateMachineOutput",
});
export const UpdateStateMachineAliasInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    stateMachineAliasArn: S.String,
    description: S.optional(SensitiveString),
    routingConfiguration: S.optional(RoutingConfigurationList),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateStateMachineAliasInput",
});
export const UpdateStateMachineAliasOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    updateDate: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
}).pipe(ns)).annotate({
    identifier: "UpdateStateMachineAliasOutput",
});
export const ValidateStateMachineDefinitionSeverity = 
/*@__PURE__*/ /*#__PURE__*/ S.String;
export const ValidateStateMachineDefinitionInput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    definition: SensitiveString,
    type: S.optional(StateMachineType),
    severity: S.optional(ValidateStateMachineDefinitionSeverity),
    maxResults: S.optional(S.Number),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ValidateStateMachineDefinitionInput",
});
export const ValidateStateMachineDefinitionResultCode = 
/*@__PURE__*/ /*#__PURE__*/ S.String;
export const ValidateStateMachineDefinitionDiagnostic = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    severity: ValidateStateMachineDefinitionSeverity,
    code: SensitiveString,
    message: SensitiveString,
    location: S.optional(SensitiveString),
})).annotate({
    identifier: "ValidateStateMachineDefinitionDiagnostic",
});
export const ValidateStateMachineDefinitionDiagnosticList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ValidateStateMachineDefinitionDiagnostic);
export const ValidateStateMachineDefinitionOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    result: ValidateStateMachineDefinitionResultCode,
    diagnostics: ValidateStateMachineDefinitionDiagnosticList,
    truncated: S.optional(S.Boolean),
}).pipe(ns)).annotate({
    identifier: "ValidateStateMachineDefinitionOutput",
});
//# Errors
export class ActivityAlreadyExists extends S.TaggedErrorClass()("ActivityAlreadyExists", { message: S.optional(S.String) }).pipe(C.withAlreadyExistsError) {
}
export class ActivityLimitExceeded extends S.TaggedErrorClass()("ActivityLimitExceeded", { message: S.optional(S.String) }).pipe(C.withThrottlingError) {
}
export class InvalidEncryptionConfiguration extends S.TaggedErrorClass()("InvalidEncryptionConfiguration", { message: S.optional(S.String) }) {
}
export class InvalidName extends S.TaggedErrorClass()("InvalidName", { message: S.optional(S.String) }) {
}
export class KmsAccessDeniedException extends S.TaggedErrorClass()("KmsAccessDeniedException", { message: S.optional(S.String) }).pipe(C.withAuthError) {
}
export class KmsThrottlingException extends S.TaggedErrorClass()("KmsThrottlingException", { message: S.optional(S.String) }) {
}
export class TooManyTags extends S.TaggedErrorClass()("TooManyTags", { message: S.optional(S.String), resourceName: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ConflictException extends S.TaggedErrorClass()("ConflictException", { message: S.optional(S.String) }).pipe(C.withConflictError) {
}
export class InvalidArn extends S.TaggedErrorClass()("InvalidArn", {
    message: S.optional(S.String),
}) {
}
export class InvalidDefinition extends S.TaggedErrorClass()("InvalidDefinition", { message: S.optional(S.String) }) {
}
export class InvalidLoggingConfiguration extends S.TaggedErrorClass()("InvalidLoggingConfiguration", { message: S.optional(S.String) }) {
}
export class InvalidTracingConfiguration extends S.TaggedErrorClass()("InvalidTracingConfiguration", { message: S.optional(S.String) }) {
}
export class StateMachineAlreadyExists extends S.TaggedErrorClass()("StateMachineAlreadyExists", { message: S.optional(S.String) }).pipe(C.withAlreadyExistsError) {
}
export class StateMachineDeleting extends S.TaggedErrorClass()("StateMachineDeleting", { message: S.optional(S.String) }) {
}
export class StateMachineLimitExceeded extends S.TaggedErrorClass()("StateMachineLimitExceeded", { message: S.optional(S.String) }).pipe(C.withThrottlingError) {
}
export class StateMachineTypeNotSupported extends S.TaggedErrorClass()("StateMachineTypeNotSupported", { message: S.optional(S.String) }) {
}
export class ValidationException extends S.TaggedErrorClass()("ValidationException", {
    message: S.optional(S.String),
    reason: S.optional(ValidationExceptionReason),
}).pipe(C.withBadRequestError) {
}
export class ResourceNotFound extends S.TaggedErrorClass()("ResourceNotFound", { message: S.optional(S.String), resourceName: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ServiceQuotaExceededException extends S.TaggedErrorClass()("ServiceQuotaExceededException", { message: S.optional(S.String) }).pipe(C.withQuotaError) {
}
export class ActivityDoesNotExist extends S.TaggedErrorClass()("ActivityDoesNotExist", { message: S.optional(S.String) }) {
}
export class ExecutionDoesNotExist extends S.TaggedErrorClass()("ExecutionDoesNotExist", { message: S.optional(S.String) }) {
}
export class KmsInvalidStateException extends S.TaggedErrorClass()("KmsInvalidStateException", { kmsKeyState: S.optional(KmsKeyState), message: S.optional(S.String) }) {
}
export class StateMachineDoesNotExist extends S.TaggedErrorClass()("StateMachineDoesNotExist", { message: S.optional(S.String) }) {
}
export class ActivityWorkerLimitExceeded extends S.TaggedErrorClass()("ActivityWorkerLimitExceeded", { message: S.optional(S.String) }).pipe(C.withThrottlingError) {
}
export class InvalidToken extends S.TaggedErrorClass()("InvalidToken", { message: S.optional(S.String) }) {
}
export class ExecutionLimitExceeded extends S.TaggedErrorClass()("ExecutionLimitExceeded", { message: S.optional(S.String) }).pipe(C.withThrottlingError) {
}
export class ExecutionNotRedrivable extends S.TaggedErrorClass()("ExecutionNotRedrivable", { message: S.optional(S.String) }) {
}
export class TaskDoesNotExist extends S.TaggedErrorClass()("TaskDoesNotExist", { message: S.optional(S.String) }) {
}
export class TaskTimedOut extends S.TaggedErrorClass()("TaskTimedOut", { message: S.optional(S.String) }) {
}
export class InvalidOutput extends S.TaggedErrorClass()("InvalidOutput", { message: S.optional(S.String) }) {
}
export class ExecutionAlreadyExists extends S.TaggedErrorClass()("ExecutionAlreadyExists", { message: S.optional(S.String) }).pipe(C.withAlreadyExistsError) {
}
export class InvalidExecutionInput extends S.TaggedErrorClass()("InvalidExecutionInput", { message: S.optional(S.String) }) {
}
export class MissingRequiredParameter extends S.TaggedErrorClass()("MissingRequiredParameter", { message: S.optional(S.String) }) {
}
/**
 * Creates an activity. An activity is a task that you write in any programming language and
 * host on any machine that has access to Step Functions. Activities must poll Step Functions using the
 * `GetActivityTask` API action and respond using `SendTask*` API
 * actions. This function lets Step Functions know the existence of your activity and returns an
 * identifier for use in a state machine and when polling from the activity.
 *
 * This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.
 *
 * `CreateActivity` is an idempotent API. Subsequent requests won’t create a
 * duplicate resource if it was already created. `CreateActivity`'s idempotency
 * check is based on the activity `name`. If a following request has different
 * `tags` values, Step Functions will ignore these differences and treat it as an
 * idempotent request of the previous. In this case, `tags` will not be updated,
 * even if they are different.
 */
export const createActivity = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateActivityInput,
    output: CreateActivityOutput,
    errors: [
        ActivityAlreadyExists,
        ActivityLimitExceeded,
        InvalidEncryptionConfiguration,
        InvalidName,
        KmsAccessDeniedException,
        KmsThrottlingException,
        TooManyTags,
    ],
}));
/**
 * Creates a state machine. A state machine consists of a collection of states that can do
 * work (`Task` states), determine to which states to transition next
 * (`Choice` states), stop an execution with an error (`Fail` states),
 * and so on. State machines are specified using a JSON-based, structured language. For more
 * information, see Amazon States
 * Language in the Step Functions User Guide.
 *
 * If you set the `publish` parameter of this API action to `true`, it
 * publishes version `1` as the first revision of the state machine.
 *
 * For additional control over security, you can encrypt your data using a **customer-managed key** for Step Functions state machines. You can configure a symmetric KMS key and data key reuse period when creating or updating a **State Machine**. The execution history and state machine definition will be encrypted with the key applied to the State Machine.
 *
 * This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.
 *
 * `CreateStateMachine` is an idempotent API. Subsequent requests won’t create a
 * duplicate resource if it was already created. `CreateStateMachine`'s idempotency
 * check is based on the state machine `name`, `definition`,
 * `type`, `LoggingConfiguration`,
 * `TracingConfiguration`, and `EncryptionConfiguration` The check is also based on the `publish` and `versionDescription` parameters. If a following request has a different
 * `roleArn` or `tags`, Step Functions will ignore these differences and treat
 * it as an idempotent request of the previous. In this case, `roleArn` and
 * `tags` will not be updated, even if they are different.
 */
export const createStateMachine = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateStateMachineInput,
    output: CreateStateMachineOutput,
    errors: [
        ConflictException,
        InvalidArn,
        InvalidDefinition,
        InvalidEncryptionConfiguration,
        InvalidLoggingConfiguration,
        InvalidName,
        InvalidTracingConfiguration,
        KmsAccessDeniedException,
        KmsThrottlingException,
        StateMachineAlreadyExists,
        StateMachineDeleting,
        StateMachineLimitExceeded,
        StateMachineTypeNotSupported,
        TooManyTags,
        ValidationException,
    ],
}));
/**
 * Creates an alias for a state machine that points to one or two versions of the same state machine. You can set your application to call StartExecution with an alias and update the version the alias uses without changing the client's code.
 *
 * You can also map an alias to split StartExecution requests between two
 * versions of a state machine. To do this, add a second `RoutingConfig` object in the
 * `routingConfiguration` parameter. You must also specify the percentage of
 * execution run requests each version should receive in both `RoutingConfig` objects.
 * Step Functions randomly chooses which version runs a given execution based on the
 * percentage you specify.
 *
 * To create an alias that points to a single version, specify a single
 * `RoutingConfig` object with a `weight` set to 100.
 *
 * You can create up to 100 aliases for each state machine. You must delete unused aliases using the DeleteStateMachineAlias API action.
 *
 * `CreateStateMachineAlias` is an idempotent API. Step Functions bases the
 * idempotency check on the `stateMachineArn`, `description`,
 * `name`, and `routingConfiguration` parameters. Requests that contain
 * the same values for these parameters return a successful idempotent response without creating
 * a duplicate resource.
 *
 * **Related operations:**
 *
 * - DescribeStateMachineAlias
 *
 * - ListStateMachineAliases
 *
 * - UpdateStateMachineAlias
 *
 * - DeleteStateMachineAlias
 */
export const createStateMachineAlias = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateStateMachineAliasInput,
    output: CreateStateMachineAliasOutput,
    errors: [
        ConflictException,
        InvalidArn,
        InvalidName,
        ResourceNotFound,
        ServiceQuotaExceededException,
        StateMachineDeleting,
        ValidationException,
    ],
}));
/**
 * Deletes an activity.
 */
export const deleteActivity = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteActivityInput,
    output: DeleteActivityOutput,
    errors: [InvalidArn],
}));
/**
 * Deletes a state machine. This is an asynchronous operation. It sets the state machine's
 * status to `DELETING` and begins the deletion process. A state machine is deleted only when all its executions are completed. On the next state transition, the state machine's executions are terminated.
 *
 * A qualified state machine ARN can either refer to a *Distributed Map state* defined within a state machine, a version ARN, or an alias ARN.
 *
 * The following are some examples of qualified and unqualified state machine ARNs:
 *
 * - The following qualified state machine ARN refers to a *Distributed Map state* with a label `mapStateLabel` in a state machine named `myStateMachine`.
 *
 * `arn:partition:states:region:account-id:stateMachine:myStateMachine/mapStateLabel`
 *
 * If you provide a qualified state machine ARN that refers to a *Distributed Map state*, the request fails with `ValidationException`.
 *
 * - The following unqualified state machine ARN refers to a state machine named `myStateMachine`.
 *
 * `arn:partition:states:region:account-id:stateMachine:myStateMachine`
 *
 * This API action also deletes all versions and aliases associated with a state machine.
 *
 * For `EXPRESS` state machines, the deletion happens eventually (usually in
 * less than a minute). Running executions may emit logs after `DeleteStateMachine`
 * API is called.
 */
export const deleteStateMachine = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteStateMachineInput,
    output: DeleteStateMachineOutput,
    errors: [InvalidArn, ValidationException],
}));
/**
 * Deletes a state machine alias.
 *
 * After you delete a state machine alias, you can't use it to start executions. When you
 * delete a state machine alias, Step Functions doesn't delete the state machine versions
 * that alias references.
 *
 * **Related operations:**
 *
 * - CreateStateMachineAlias
 *
 * - DescribeStateMachineAlias
 *
 * - ListStateMachineAliases
 *
 * - UpdateStateMachineAlias
 */
export const deleteStateMachineAlias = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteStateMachineAliasInput,
    output: DeleteStateMachineAliasOutput,
    errors: [
        ConflictException,
        InvalidArn,
        ResourceNotFound,
        ValidationException,
    ],
}));
/**
 * Deletes a state machine version. After
 * you delete a version, you can't call StartExecution using that version's ARN
 * or use the version with a state machine alias.
 *
 * Deleting a state machine version won't terminate its in-progress executions.
 *
 * You can't delete a state machine version currently referenced by one or more aliases. Before you delete a version, you must either delete the aliases or update them to point to another state machine version.
 *
 * **Related operations:**
 *
 * - PublishStateMachineVersion
 *
 * - ListStateMachineVersions
 */
export const deleteStateMachineVersion = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteStateMachineVersionInput,
    output: DeleteStateMachineVersionOutput,
    errors: [ConflictException, InvalidArn, ValidationException],
}));
/**
 * Describes an activity.
 *
 * This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.
 */
export const describeActivity = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribeActivityInput,
    output: DescribeActivityOutput,
    errors: [ActivityDoesNotExist, InvalidArn],
}));
/**
 * Provides information about a state machine execution, such as the state machine associated with the execution, the execution input and output, and relevant execution metadata. If you've redriven an execution, you can use this API action to return information about the redrives of that execution. In addition, you can use this API action to return the Map Run Amazon Resource Name (ARN) if the execution was dispatched by a Map Run.
 *
 * If you specify a version or alias ARN when you call the StartExecution
 * API action, `DescribeExecution` returns that ARN.
 *
 * This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.
 *
 * Executions of an `EXPRESS` state machine aren't supported by `DescribeExecution` unless a Map Run dispatched them.
 */
export const describeExecution = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribeExecutionInput,
    output: DescribeExecutionOutput,
    errors: [
        ExecutionDoesNotExist,
        InvalidArn,
        KmsAccessDeniedException,
        KmsInvalidStateException,
        KmsThrottlingException,
    ],
}));
/**
 * Provides information about a Map Run's configuration, progress, and results. If you've redriven a Map Run, this API action also returns information about the redrives of that Map Run. For more information, see Examining Map Run in the *Step Functions Developer Guide*.
 */
export const describeMapRun = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribeMapRunInput,
    output: DescribeMapRunOutput,
    errors: [InvalidArn, ResourceNotFound],
}));
/**
 * Provides information about a state machine's definition, its IAM role Amazon Resource Name (ARN), and configuration.
 *
 * A qualified state machine ARN can either refer to a *Distributed Map state* defined within a state machine, a version ARN, or an alias ARN.
 *
 * The following are some examples of qualified and unqualified state machine ARNs:
 *
 * - The following qualified state machine ARN refers to a *Distributed Map state* with a label `mapStateLabel` in a state machine named `myStateMachine`.
 *
 * `arn:partition:states:region:account-id:stateMachine:myStateMachine/mapStateLabel`
 *
 * If you provide a qualified state machine ARN that refers to a *Distributed Map state*, the request fails with `ValidationException`.
 *
 * - The following qualified state machine ARN refers to an alias named `PROD`.
 *
 * `arn::states:::stateMachine:`
 *
 * If you provide a qualified state machine ARN that refers to a version ARN or an alias ARN, the request starts execution for that version or alias.
 *
 * - The following unqualified state machine ARN refers to a state machine named `myStateMachine`.
 *
 * `arn::states:::stateMachine:`
 *
 * This API action returns the details for a state machine version if the
 * `stateMachineArn` you specify is a state machine version ARN.
 *
 * This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.
 */
export const describeStateMachine = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribeStateMachineInput,
    output: DescribeStateMachineOutput,
    errors: [
        InvalidArn,
        KmsAccessDeniedException,
        KmsInvalidStateException,
        KmsThrottlingException,
        StateMachineDoesNotExist,
    ],
}));
/**
 * Returns details about a state machine alias.
 *
 * **Related operations:**
 *
 * - CreateStateMachineAlias
 *
 * - ListStateMachineAliases
 *
 * - UpdateStateMachineAlias
 *
 * - DeleteStateMachineAlias
 */
export const describeStateMachineAlias = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribeStateMachineAliasInput,
    output: DescribeStateMachineAliasOutput,
    errors: [InvalidArn, ResourceNotFound, ValidationException],
}));
/**
 * Provides information about a state machine's definition, its execution role ARN, and
 * configuration. If a Map Run dispatched the execution, this action returns the Map Run
 * Amazon Resource Name (ARN) in the response. The state machine returned is the state machine associated with the
 * Map Run.
 *
 * This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.
 *
 * This API action is not supported by `EXPRESS` state machines.
 */
export const describeStateMachineForExecution = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribeStateMachineForExecutionInput,
    output: DescribeStateMachineForExecutionOutput,
    errors: [
        ExecutionDoesNotExist,
        InvalidArn,
        KmsAccessDeniedException,
        KmsInvalidStateException,
        KmsThrottlingException,
    ],
}));
/**
 * Used by workers to retrieve a task (with the specified activity ARN) which has been
 * scheduled for execution by a running state machine. This initiates a long poll, where the
 * service holds the HTTP connection open and responds as soon as a task becomes available (i.e.
 * an execution of a task of this type is needed.) The maximum time the service holds on to the
 * request before responding is 60 seconds. If no task is available within 60 seconds, the poll
 * returns a `taskToken` with a null string.
 *
 * This API action isn't logged in CloudTrail.
 *
 * Workers should set their client side socket timeout to at least 65 seconds (5 seconds
 * higher than the maximum time the service may hold the poll request).
 *
 * Polling with `GetActivityTask` can cause latency in some implementations. See
 * Avoid
 * Latency When Polling for Activity Tasks in the Step Functions Developer Guide.
 */
export const getActivityTask = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetActivityTaskInput,
    output: GetActivityTaskOutput,
    errors: [
        ActivityDoesNotExist,
        ActivityWorkerLimitExceeded,
        InvalidArn,
        KmsAccessDeniedException,
        KmsInvalidStateException,
        KmsThrottlingException,
    ],
}));
/**
 * Returns the history of the specified execution as a list of events. By default, the
 * results are returned in ascending order of the `timeStamp` of the events. Use the
 * `reverseOrder` parameter to get the latest events first.
 *
 * If `nextToken` is returned, there are more results available. The value of `nextToken` is a unique pagination token for each page.
 * Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an *HTTP 400 InvalidToken* error.
 *
 * This API action is not supported by `EXPRESS` state machines.
 */
export const getExecutionHistory = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: GetExecutionHistoryInput,
    output: GetExecutionHistoryOutput,
    errors: [
        ExecutionDoesNotExist,
        InvalidArn,
        InvalidToken,
        KmsAccessDeniedException,
        KmsInvalidStateException,
        KmsThrottlingException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "events",
        pageSize: "maxResults",
    },
}));
/**
 * Lists the existing activities.
 *
 * If `nextToken` is returned, there are more results available. The value of `nextToken` is a unique pagination token for each page.
 * Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an *HTTP 400 InvalidToken* error.
 *
 * This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.
 */
export const listActivities = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListActivitiesInput,
    output: ListActivitiesOutput,
    errors: [InvalidToken],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "activities",
        pageSize: "maxResults",
    },
}));
/**
 * Lists all executions of a state machine or a Map Run. You can list all executions related to a state machine by specifying a state machine Amazon Resource Name (ARN), or those related to a Map Run by specifying a Map Run ARN. Using this API action, you can also list all redriven executions.
 *
 * You can also provide a state machine alias ARN or version ARN to list the executions associated with a specific alias or version.
 *
 * Results are
 * sorted by time, with the most recent execution first.
 *
 * If `nextToken` is returned, there are more results available. The value of `nextToken` is a unique pagination token for each page.
 * Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an *HTTP 400 InvalidToken* error.
 *
 * This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.
 *
 * This API action is not supported by `EXPRESS` state machines.
 */
export const listExecutions = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListExecutionsInput,
    output: ListExecutionsOutput,
    errors: [
        InvalidArn,
        InvalidToken,
        ResourceNotFound,
        StateMachineDoesNotExist,
        StateMachineTypeNotSupported,
        ValidationException,
    ],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "executions",
        pageSize: "maxResults",
    },
}));
/**
 * Lists all Map Runs that were started by a given state machine execution. Use this API action to obtain Map Run ARNs, and then call `DescribeMapRun` to obtain more information, if needed.
 */
export const listMapRuns = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListMapRunsInput,
    output: ListMapRunsOutput,
    errors: [ExecutionDoesNotExist, InvalidArn, InvalidToken],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "mapRuns",
        pageSize: "maxResults",
    },
}));
/**
 * Lists aliases for a specified state machine ARN. Results are sorted by time, with the most recently created aliases listed first.
 *
 * To list aliases that reference a state machine version, you can specify the version ARN in the `stateMachineArn` parameter.
 *
 * If `nextToken` is returned, there are more results available. The value of `nextToken` is a unique pagination token for each page.
 * Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an *HTTP 400 InvalidToken* error.
 *
 * **Related operations:**
 *
 * - CreateStateMachineAlias
 *
 * - DescribeStateMachineAlias
 *
 * - UpdateStateMachineAlias
 *
 * - DeleteStateMachineAlias
 */
export const listStateMachineAliases = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListStateMachineAliasesInput,
    output: ListStateMachineAliasesOutput,
    errors: [
        InvalidArn,
        InvalidToken,
        ResourceNotFound,
        StateMachineDeleting,
        StateMachineDoesNotExist,
    ],
}));
/**
 * Lists the existing state machines.
 *
 * If `nextToken` is returned, there are more results available. The value of `nextToken` is a unique pagination token for each page.
 * Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an *HTTP 400 InvalidToken* error.
 *
 * This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.
 */
export const listStateMachines = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListStateMachinesInput,
    output: ListStateMachinesOutput,
    errors: [InvalidToken],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "stateMachines",
        pageSize: "maxResults",
    },
}));
/**
 * Lists versions for the specified state machine Amazon Resource Name (ARN).
 *
 * The results are sorted in descending order of the version creation time.
 *
 * If `nextToken` is returned, there are more results available. The value of `nextToken` is a unique pagination token for each page.
 * Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an *HTTP 400 InvalidToken* error.
 *
 * **Related operations:**
 *
 * - PublishStateMachineVersion
 *
 * - DeleteStateMachineVersion
 */
export const listStateMachineVersions = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListStateMachineVersionsInput,
    output: ListStateMachineVersionsOutput,
    errors: [InvalidArn, InvalidToken, ValidationException],
}));
/**
 * List tags for a given resource.
 *
 * Tags may only contain Unicode letters, digits, white space, or these symbols: `_ . : / = + - @`.
 */
export const listTagsForResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListTagsForResourceInput,
    output: ListTagsForResourceOutput,
    errors: [InvalidArn, ResourceNotFound],
}));
/**
 * Creates a version from the
 * current revision of a state machine. Use versions to create immutable snapshots of your state
 * machine. You can start executions from versions either directly or with an alias. To create an
 * alias, use CreateStateMachineAlias.
 *
 * You can publish up to 1000 versions for each state machine. You must manually delete unused versions using the DeleteStateMachineVersion API action.
 *
 * `PublishStateMachineVersion` is an idempotent API. It doesn't create a
 * duplicate state machine version if it already exists for the current revision. Step Functions bases `PublishStateMachineVersion`'s idempotency check on the
 * `stateMachineArn`, `name`, and `revisionId` parameters.
 * Requests with the same parameters return a successful idempotent response. If you don't
 * specify a `revisionId`, Step Functions checks for a previously published
 * version of the state machine's current revision.
 *
 * **Related operations:**
 *
 * - DeleteStateMachineVersion
 *
 * - ListStateMachineVersions
 */
export const publishStateMachineVersion = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PublishStateMachineVersionInput,
    output: PublishStateMachineVersionOutput,
    errors: [
        ConflictException,
        InvalidArn,
        ServiceQuotaExceededException,
        StateMachineDeleting,
        StateMachineDoesNotExist,
        ValidationException,
    ],
}));
/**
 * Restarts unsuccessful executions of Standard workflows that didn't complete successfully in the last 14 days. These include failed, aborted, or timed out executions. When you redrive an execution, it continues the failed execution from the unsuccessful step and uses the same input. Step Functions preserves the results and execution history of the successful steps, and doesn't rerun these steps when you redrive an execution. Redriven executions use the same state machine definition and execution ARN as the original execution attempt.
 *
 * For workflows that include an Inline Map or Parallel state, `RedriveExecution` API action reschedules and redrives only the iterations and branches that failed or aborted.
 *
 * To redrive a workflow that includes a Distributed Map state whose Map Run failed, you must redrive the parent workflow. The parent workflow redrives all the unsuccessful states, including a failed Map Run. If a Map Run was not started in the original execution attempt, the redriven parent workflow starts the Map Run.
 *
 * This API action is not supported by `EXPRESS` state machines.
 *
 * However, you can restart the unsuccessful executions of Express child workflows in a Distributed Map by redriving its Map Run. When you redrive a Map Run, the Express child workflows are rerun using the StartExecution API action. For more information, see Redriving Map Runs.
 *
 * You can redrive executions if your original execution meets the following conditions:
 *
 * - The execution status isn't `SUCCEEDED`.
 *
 * - Your workflow execution has not exceeded the redrivable period of 14 days. Redrivable period refers to the time during which you can redrive a given execution. This period starts from the day a state machine completes its execution.
 *
 * - The workflow execution has not exceeded the maximum open time of one year. For more information about state machine quotas, see Quotas related to state machine executions.
 *
 * - The execution event history count is less than 24,999. Redriven executions append their event history to the existing event history. Make sure your workflow execution contains less than 24,999 events to accommodate the `ExecutionRedriven` history event and at least one other history event.
 */
export const redriveExecution = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: RedriveExecutionInput,
    output: RedriveExecutionOutput,
    errors: [
        ExecutionDoesNotExist,
        ExecutionLimitExceeded,
        ExecutionNotRedrivable,
        InvalidArn,
        ValidationException,
    ],
}));
/**
 * Used by activity workers, Task states using the callback
 * pattern, and optionally Task states using the job run pattern to report that the task identified by the `taskToken` failed.
 *
 * For an execution with encryption enabled, Step Functions will encrypt the error and cause fields using the KMS key for the execution role.
 *
 * A caller can mark a task as fail without using any KMS permissions in the execution role if the caller provides a null value for both `error` and `cause` fields because no data needs to be encrypted.
 */
export const sendTaskFailure = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: SendTaskFailureInput,
    output: SendTaskFailureOutput,
    errors: [
        InvalidToken,
        KmsAccessDeniedException,
        KmsInvalidStateException,
        KmsThrottlingException,
        TaskDoesNotExist,
        TaskTimedOut,
    ],
}));
/**
 * Used by activity workers and Task states using the callback
 * pattern, and optionally Task states using the job run pattern to report to Step Functions that the task represented by the specified
 * `taskToken` is still making progress. This action resets the
 * `Heartbeat` clock. The `Heartbeat` threshold is specified in the state
 * machine's Amazon States Language definition (`HeartbeatSeconds`). This action does not in itself
 * create an event in the execution history. However, if the task times out, the execution
 * history contains an `ActivityTimedOut` entry for activities, or a
 * `TaskTimedOut` entry for tasks using the job run or
 * callback
 * pattern.
 *
 * The `Timeout` of a task, defined in the state machine's Amazon States Language definition, is
 * its maximum allowed duration, regardless of the number of SendTaskHeartbeat requests received. Use `HeartbeatSeconds` to configure the timeout interval
 * for heartbeats.
 */
export const sendTaskHeartbeat = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: SendTaskHeartbeatInput,
    output: SendTaskHeartbeatOutput,
    errors: [InvalidToken, TaskDoesNotExist, TaskTimedOut],
}));
/**
 * Used by activity workers, Task states using the callback
 * pattern, and optionally Task states using the job run pattern to report that the task identified by the `taskToken` completed
 * successfully.
 */
export const sendTaskSuccess = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: SendTaskSuccessInput,
    output: SendTaskSuccessOutput,
    errors: [
        InvalidOutput,
        InvalidToken,
        KmsAccessDeniedException,
        KmsInvalidStateException,
        KmsThrottlingException,
        TaskDoesNotExist,
        TaskTimedOut,
    ],
}));
/**
 * Starts a state machine execution.
 *
 * A qualified state machine ARN can either refer to a *Distributed Map state* defined within a state machine, a version ARN, or an alias ARN.
 *
 * The following are some examples of qualified and unqualified state machine ARNs:
 *
 * - The following qualified state machine ARN refers to a *Distributed Map state* with a label `mapStateLabel` in a state machine named `myStateMachine`.
 *
 * `arn:partition:states:region:account-id:stateMachine:myStateMachine/mapStateLabel`
 *
 * If you provide a qualified state machine ARN that refers to a *Distributed Map state*, the request fails with `ValidationException`.
 *
 * - The following qualified state machine ARN refers to an alias named `PROD`.
 *
 * `arn::states:::stateMachine:`
 *
 * If you provide a qualified state machine ARN that refers to a version ARN or an alias ARN, the request starts execution for that version or alias.
 *
 * - The following unqualified state machine ARN refers to a state machine named `myStateMachine`.
 *
 * `arn::states:::stateMachine:`
 *
 * If you start an execution with an unqualified state machine ARN, Step Functions uses the latest revision of the state machine for the execution.
 *
 * To start executions of a state machine version, call
 * `StartExecution` and provide the version ARN or the ARN of an alias that points to the version.
 *
 * `StartExecution` is idempotent for `STANDARD` workflows. For a
 * `STANDARD` workflow, if you call `StartExecution` with the same name
 * and input as a running execution, the call succeeds and return the same response as the
 * original request. If the execution is closed or if the input is different, it returns a
 * `400 ExecutionAlreadyExists` error. You can reuse names after 90 days.
 *
 * `StartExecution` isn't idempotent for `EXPRESS` workflows.
 */
export const startExecution = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: StartExecutionInput,
    output: StartExecutionOutput,
    errors: [
        ExecutionAlreadyExists,
        ExecutionLimitExceeded,
        InvalidArn,
        InvalidExecutionInput,
        InvalidName,
        KmsAccessDeniedException,
        KmsInvalidStateException,
        KmsThrottlingException,
        StateMachineDeleting,
        StateMachineDoesNotExist,
        ValidationException,
    ],
}));
/**
 * Starts a Synchronous Express state machine execution. `StartSyncExecution`
 * is not available for `STANDARD` workflows.
 *
 * `StartSyncExecution` will return a `200 OK` response, even if your
 * execution fails, because the status code in the API response doesn't reflect function
 * errors. Error codes are reserved for errors that prevent your execution from running, such
 * as permissions errors, limit errors, or issues with your state machine code and
 * configuration.
 *
 * This API action isn't logged in CloudTrail.
 */
export const startSyncExecution = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: StartSyncExecutionInput,
    output: StartSyncExecutionOutput,
    errors: [
        InvalidArn,
        InvalidExecutionInput,
        InvalidName,
        KmsAccessDeniedException,
        KmsInvalidStateException,
        KmsThrottlingException,
        StateMachineDeleting,
        StateMachineDoesNotExist,
        StateMachineTypeNotSupported,
    ],
}));
/**
 * Stops an execution.
 *
 * This API action is not supported by `EXPRESS` state machines.
 *
 * For an execution with encryption enabled, Step Functions will encrypt the error and cause fields using the KMS key for the execution role.
 *
 * A caller can stop an execution without using any KMS permissions in the execution role if the caller provides a null value for both `error` and `cause` fields because no data needs to be encrypted.
 */
export const stopExecution = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: StopExecutionInput,
    output: StopExecutionOutput,
    errors: [
        ExecutionDoesNotExist,
        InvalidArn,
        KmsAccessDeniedException,
        KmsInvalidStateException,
        KmsThrottlingException,
        ValidationException,
    ],
}));
/**
 * Add a tag to a Step Functions resource.
 *
 * An array of key-value pairs. For more information, see Using
 * Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User
 * Guide, and Controlling Access Using IAM
 * Tags.
 *
 * Tags may only contain Unicode letters, digits, white space, or these symbols: `_ . : / = + - @`.
 */
export const tagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TagResourceInput,
    output: TagResourceOutput,
    errors: [InvalidArn, ResourceNotFound, TooManyTags],
}));
/**
 * Accepts the definition of a single state and executes it. You can test a state without creating a state machine or updating an existing state machine. Using this API, you can test the following:
 *
 * - A state's input and output processing data flow
 *
 * - An Amazon Web Services service integration request and response
 *
 * - An HTTP Task request and response
 *
 * You can call this API on only one state at a time. The states that you can test include the following:
 *
 * - All Task types except Activity
 *
 * - Pass
 *
 * - Wait
 *
 * - Choice
 *
 * - Succeed
 *
 * - Fail
 *
 * The `TestState` API assumes an IAM role which must contain the required IAM permissions for the resources your state is accessing. For information about the permissions a state might need, see IAM permissions to test a state.
 *
 * The `TestState` API can run for up to five minutes. If the execution of a state exceeds this duration, it fails with the `States.Timeout` error.
 *
 * `TestState` only supports the following when a mock is specified: Activity tasks, `.sync` or `.waitForTaskToken`
 * service integration patterns, Parallel, or Map states.
 */
export const testState = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TestStateInput,
    output: TestStateOutput,
    errors: [
        InvalidArn,
        InvalidDefinition,
        InvalidExecutionInput,
        ValidationException,
    ],
}));
/**
 * Remove a tag from a Step Functions resource
 */
export const untagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UntagResourceInput,
    output: UntagResourceOutput,
    errors: [InvalidArn, ResourceNotFound],
}));
/**
 * Updates an in-progress Map Run's configuration to include changes to the settings that control maximum concurrency and Map Run failure.
 */
export const updateMapRun = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateMapRunInput,
    output: UpdateMapRunOutput,
    errors: [InvalidArn, ResourceNotFound, ValidationException],
}));
/**
 * Updates an existing state machine by modifying its `definition`,
 * `roleArn`, `loggingConfiguration`, or `EncryptionConfiguration`. Running executions will continue
 * to use the previous `definition` and `roleArn`. You must include at
 * least one of `definition` or `roleArn` or you will receive a
 * `MissingRequiredParameter` error.
 *
 * A qualified state machine ARN refers to a *Distributed Map state* defined within a state machine. For example, the qualified state machine ARN `arn:partition:states:region:account-id:stateMachine:stateMachineName/mapStateLabel` refers to a *Distributed Map state* with a label `mapStateLabel` in the state machine named `stateMachineName`.
 *
 * A qualified state machine ARN can either refer to a *Distributed Map state* defined within a state machine, a version ARN, or an alias ARN.
 *
 * The following are some examples of qualified and unqualified state machine ARNs:
 *
 * - The following qualified state machine ARN refers to a *Distributed Map state* with a label `mapStateLabel` in a state machine named `myStateMachine`.
 *
 * `arn:partition:states:region:account-id:stateMachine:myStateMachine/mapStateLabel`
 *
 * If you provide a qualified state machine ARN that refers to a *Distributed Map state*, the request fails with `ValidationException`.
 *
 * - The following qualified state machine ARN refers to an alias named `PROD`.
 *
 * `arn::states:::stateMachine:`
 *
 * If you provide a qualified state machine ARN that refers to a version ARN or an alias ARN, the request starts execution for that version or alias.
 *
 * - The following unqualified state machine ARN refers to a state machine named `myStateMachine`.
 *
 * `arn::states:::stateMachine:`
 *
 * After you update your state machine, you can set the `publish` parameter to
 * `true` in the same action to publish a new version. This
 * way, you can opt-in to strict versioning of your state machine.
 *
 * Step Functions assigns monotonically increasing integers for state machine versions, starting at version number 1.
 *
 * All `StartExecution` calls within a few seconds use the updated
 * `definition` and `roleArn`. Executions started immediately after you
 * call `UpdateStateMachine` may use the previous state machine
 * `definition` and `roleArn`.
 */
export const updateStateMachine = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateStateMachineInput,
    output: UpdateStateMachineOutput,
    errors: [
        ConflictException,
        InvalidArn,
        InvalidDefinition,
        InvalidEncryptionConfiguration,
        InvalidLoggingConfiguration,
        InvalidTracingConfiguration,
        KmsAccessDeniedException,
        KmsThrottlingException,
        MissingRequiredParameter,
        ServiceQuotaExceededException,
        StateMachineDeleting,
        StateMachineDoesNotExist,
        ValidationException,
    ],
}));
/**
 * Updates the configuration of an existing state machine alias by modifying its `description` or `routingConfiguration`.
 *
 * You must specify at least one of the `description` or `routingConfiguration` parameters to update a state machine alias.
 *
 * `UpdateStateMachineAlias` is an idempotent API. Step Functions bases the
 * idempotency check on the `stateMachineAliasArn`, `description`, and
 * `routingConfiguration` parameters. Requests with the same parameters return an
 * idempotent response.
 *
 * This operation is eventually consistent. All StartExecution requests
 * made within a few seconds use the latest alias configuration. Executions started immediately
 * after calling `UpdateStateMachineAlias` may use the previous routing
 * configuration.
 *
 * **Related operations:**
 *
 * - CreateStateMachineAlias
 *
 * - DescribeStateMachineAlias
 *
 * - ListStateMachineAliases
 *
 * - DeleteStateMachineAlias
 */
export const updateStateMachineAlias = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateStateMachineAliasInput,
    output: UpdateStateMachineAliasOutput,
    errors: [
        ConflictException,
        InvalidArn,
        ResourceNotFound,
        StateMachineDeleting,
        ValidationException,
    ],
}));
/**
 * Validates the syntax of a state machine definition specified in Amazon States Language (ASL), a
 * JSON-based, structured language.
 *
 * You can validate that a state machine definition is correct without creating a state
 * machine resource.
 *
 * Suggested uses for `ValidateStateMachineDefinition`:
 *
 * - Integrate automated checks into your code review or Continuous Integration
 * (CI) process to check state machine definitions before starting
 * deployments.
 *
 * - Run validation from a Git pre-commit hook to verify the definition before
 * committing to your source repository.
 *
 * Validation will look for problems in your state machine definition and return a
 * **result** and a list of diagnostic
 * elements.
 *
 * The **result** value will be `OK` when your
 * workflow definition can be successfully created or updated. Note the result can be
 * `OK` even when diagnostic warnings are present in the response. The
 * **result** value will be `FAIL` when the
 * workflow definition contains errors that would prevent you from creating or updating
 * your state machine.
 *
 * The list of ValidateStateMachineDefinitionDiagnostic data elements can contain zero or more **WARNING** and/or **ERROR** elements.
 *
 * The **ValidateStateMachineDefinition API** might add
 * new diagnostics in the future, adjust diagnostic codes, or change the message
 * wording. Your automated processes should only rely on the value of the **result** field value (OK, FAIL). Do **not** rely on the exact order, count, or
 * wording of diagnostic messages.
 */
export const validateStateMachineDefinition = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ValidateStateMachineDefinitionInput,
    output: ValidateStateMachineDefinitionOutput,
    errors: [ValidationException],
}));
//# sourceMappingURL=sfn.js.map