import * as HttpClient from "effect/unstable/http/HttpClient";
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";
const svc = T.AwsApiService({
    sdkId: "Migration Hub",
    serviceShapeName: "AWSMigrationHub",
});
const auth = T.AwsAuthSigv4({ name: "mgh" });
const ver = T.ServiceVersion("2017-05-31");
const proto = T.AwsProtocolsAwsJson1_1();
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://mgh-fips.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("FIPS and DualStack are enabled, but this partition does not support one or both");
                }
                if (UseFIPS === true) {
                    if (_.getAttr(PartitionResult, "supportsFIPS") === true) {
                        return e(`https://mgh-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://mgh.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                return e(`https://mgh.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const CreatedArtifact = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Name: S.String, Description: S.optional(S.String) })).annotate({
    identifier: "CreatedArtifact",
});
export const AssociateCreatedArtifactRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.String,
    MigrationTaskName: S.String,
    CreatedArtifact: CreatedArtifact,
    DryRun: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "AssociateCreatedArtifactRequest",
});
export const AssociateCreatedArtifactResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "AssociateCreatedArtifactResult",
});
export const DiscoveredResource = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ConfigurationId: S.String, Description: S.optional(S.String) })).annotate({
    identifier: "DiscoveredResource",
});
export const AssociateDiscoveredResourceRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.String,
    MigrationTaskName: S.String,
    DiscoveredResource: DiscoveredResource,
    DryRun: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "AssociateDiscoveredResourceRequest",
});
export const AssociateDiscoveredResourceResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "AssociateDiscoveredResourceResult",
});
export const SourceResource = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Name: S.String,
    Description: S.optional(S.String),
    StatusDetail: S.optional(S.String),
})).annotate({ identifier: "SourceResource" });
export const AssociateSourceResourceRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.String,
    MigrationTaskName: S.String,
    SourceResource: SourceResource,
    DryRun: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "AssociateSourceResourceRequest",
});
export const AssociateSourceResourceResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "AssociateSourceResourceResult",
});
export const CreateProgressUpdateStreamRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStreamName: S.String,
    DryRun: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateProgressUpdateStreamRequest",
});
export const CreateProgressUpdateStreamResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "CreateProgressUpdateStreamResult",
});
export const DeleteProgressUpdateStreamRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStreamName: S.String,
    DryRun: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteProgressUpdateStreamRequest",
});
export const DeleteProgressUpdateStreamResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteProgressUpdateStreamResult",
});
export const DescribeApplicationStateRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ApplicationId: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeApplicationStateRequest",
});
export const ApplicationStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const DescribeApplicationStateResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ApplicationStatus: S.optional(ApplicationStatus),
    LastUpdatedTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "DescribeApplicationStateResult",
});
export const DescribeMigrationTaskRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.String,
    MigrationTaskName: S.String,
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeMigrationTaskRequest",
});
export const Status = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const Task = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Status: Status,
    StatusDetail: S.optional(S.String),
    ProgressPercent: S.optional(S.Number),
})).annotate({ identifier: "Task" });
export const ResourceAttributeType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ResourceAttribute = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Type: ResourceAttributeType, Value: S.String })).annotate({
    identifier: "ResourceAttribute",
});
export const LatestResourceAttributeList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ResourceAttribute);
export const MigrationTask = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.optional(S.String),
    MigrationTaskName: S.optional(S.String),
    Task: S.optional(Task),
    UpdateDateTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    ResourceAttributeList: S.optional(LatestResourceAttributeList),
})).annotate({ identifier: "MigrationTask" });
export const DescribeMigrationTaskResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ MigrationTask: S.optional(MigrationTask) })).annotate({
    identifier: "DescribeMigrationTaskResult",
});
export const DisassociateCreatedArtifactRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.String,
    MigrationTaskName: S.String,
    CreatedArtifactName: S.String,
    DryRun: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DisassociateCreatedArtifactRequest",
});
export const DisassociateCreatedArtifactResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DisassociateCreatedArtifactResult",
});
export const DisassociateDiscoveredResourceRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.String,
    MigrationTaskName: S.String,
    ConfigurationId: S.String,
    DryRun: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DisassociateDiscoveredResourceRequest",
});
export const DisassociateDiscoveredResourceResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DisassociateDiscoveredResourceResult",
});
export const DisassociateSourceResourceRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.String,
    MigrationTaskName: S.String,
    SourceResourceName: S.String,
    DryRun: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DisassociateSourceResourceRequest",
});
export const DisassociateSourceResourceResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DisassociateSourceResourceResult",
});
export const ImportMigrationTaskRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.String,
    MigrationTaskName: S.String,
    DryRun: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ImportMigrationTaskRequest",
});
export const ImportMigrationTaskResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "ImportMigrationTaskResult",
});
export const ApplicationIds = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const ListApplicationStatesRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ApplicationIds: S.optional(ApplicationIds),
    NextToken: S.optional(S.String),
    MaxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListApplicationStatesRequest",
});
export const ApplicationState = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ApplicationId: S.optional(S.String),
    ApplicationStatus: S.optional(ApplicationStatus),
    LastUpdatedTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "ApplicationState",
});
export const ApplicationStateList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ApplicationState);
export const ListApplicationStatesResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ApplicationStateList: S.optional(ApplicationStateList),
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "ListApplicationStatesResult",
});
export const ListCreatedArtifactsRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.String,
    MigrationTaskName: S.String,
    NextToken: S.optional(S.String),
    MaxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListCreatedArtifactsRequest",
});
export const CreatedArtifactList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(CreatedArtifact);
export const ListCreatedArtifactsResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    NextToken: S.optional(S.String),
    CreatedArtifactList: S.optional(CreatedArtifactList),
})).annotate({
    identifier: "ListCreatedArtifactsResult",
});
export const ListDiscoveredResourcesRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.String,
    MigrationTaskName: S.String,
    NextToken: S.optional(S.String),
    MaxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListDiscoveredResourcesRequest",
});
export const DiscoveredResourceList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(DiscoveredResource);
export const ListDiscoveredResourcesResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    NextToken: S.optional(S.String),
    DiscoveredResourceList: S.optional(DiscoveredResourceList),
})).annotate({
    identifier: "ListDiscoveredResourcesResult",
});
export const ListMigrationTasksRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    NextToken: S.optional(S.String),
    MaxResults: S.optional(S.Number),
    ResourceName: S.optional(S.String),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListMigrationTasksRequest",
});
export const MigrationTaskSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.optional(S.String),
    MigrationTaskName: S.optional(S.String),
    Status: S.optional(Status),
    ProgressPercent: S.optional(S.Number),
    StatusDetail: S.optional(S.String),
    UpdateDateTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "MigrationTaskSummary",
});
export const MigrationTaskSummaryList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(MigrationTaskSummary);
export const ListMigrationTasksResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    NextToken: S.optional(S.String),
    MigrationTaskSummaryList: S.optional(MigrationTaskSummaryList),
})).annotate({
    identifier: "ListMigrationTasksResult",
});
export const ListMigrationTaskUpdatesRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.String,
    MigrationTaskName: S.String,
    NextToken: S.optional(S.String),
    MaxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListMigrationTaskUpdatesRequest",
});
export const UpdateType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const MigrationTaskUpdate = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    UpdateDateTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    UpdateType: S.optional(UpdateType),
    MigrationTaskState: S.optional(Task),
})).annotate({
    identifier: "MigrationTaskUpdate",
});
export const MigrationTaskUpdateList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(MigrationTaskUpdate);
export const ListMigrationTaskUpdatesResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    NextToken: S.optional(S.String),
    MigrationTaskUpdateList: S.optional(MigrationTaskUpdateList),
})).annotate({
    identifier: "ListMigrationTaskUpdatesResult",
});
export const ListProgressUpdateStreamsRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    NextToken: S.optional(S.String),
    MaxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListProgressUpdateStreamsRequest",
});
export const ProgressUpdateStreamSummary = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ProgressUpdateStreamName: S.optional(S.String) })).annotate({
    identifier: "ProgressUpdateStreamSummary",
});
export const ProgressUpdateStreamSummaryList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ProgressUpdateStreamSummary);
export const ListProgressUpdateStreamsResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStreamSummaryList: S.optional(ProgressUpdateStreamSummaryList),
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "ListProgressUpdateStreamsResult",
});
export const ListSourceResourcesRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.String,
    MigrationTaskName: S.String,
    NextToken: S.optional(S.String),
    MaxResults: S.optional(S.Number),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListSourceResourcesRequest",
});
export const SourceResourceList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(SourceResource);
export const ListSourceResourcesResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    NextToken: S.optional(S.String),
    SourceResourceList: S.optional(SourceResourceList),
})).annotate({
    identifier: "ListSourceResourcesResult",
});
export const NotifyApplicationStateRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ApplicationId: S.String,
    Status: ApplicationStatus,
    UpdateDateTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    DryRun: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "NotifyApplicationStateRequest",
});
export const NotifyApplicationStateResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "NotifyApplicationStateResult",
});
export const NotifyMigrationTaskStateRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.String,
    MigrationTaskName: S.String,
    Task: Task,
    UpdateDateTime: S.Date.pipe(T.TimestampFormat("epoch-seconds")),
    NextUpdateSeconds: S.Number,
    DryRun: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "NotifyMigrationTaskStateRequest",
});
export const NotifyMigrationTaskStateResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "NotifyMigrationTaskStateResult",
});
export const ResourceAttributeList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ResourceAttribute);
export const PutResourceAttributesRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ProgressUpdateStream: S.String,
    MigrationTaskName: S.String,
    ResourceAttributeList: ResourceAttributeList,
    DryRun: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutResourceAttributesRequest",
});
export const PutResourceAttributesResult = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "PutResourceAttributesResult",
});
//# Errors
export class AccessDeniedException extends S.TaggedErrorClass()("AccessDeniedException", { Message: S.optional(S.String) }).pipe(C.withAuthError) {
}
export class DryRunOperation extends S.TaggedErrorClass()("DryRunOperation", { Message: S.optional(S.String) }) {
}
export class HomeRegionNotSetException extends S.TaggedErrorClass()("HomeRegionNotSetException", { Message: S.optional(S.String) }) {
}
export class InternalServerError extends S.TaggedErrorClass()("InternalServerError", { Message: S.optional(S.String) }) {
}
export class InvalidInputException extends S.TaggedErrorClass()("InvalidInputException", { Message: S.optional(S.String) }) {
}
export class ResourceNotFoundException extends S.TaggedErrorClass()("ResourceNotFoundException", { Message: S.optional(S.String) }) {
}
export class ServiceUnavailableException extends S.TaggedErrorClass()("ServiceUnavailableException", { Message: S.optional(S.String) }).pipe(C.withServerError) {
}
export class ThrottlingException extends S.TaggedErrorClass()("ThrottlingException", {
    Message: S.String,
    RetryAfterSeconds: S.optional(S.Number).pipe(T.HttpHeader("Retry-After")),
}).pipe(C.withThrottlingError) {
}
export class UnauthorizedOperation extends S.TaggedErrorClass()("UnauthorizedOperation", { Message: S.optional(S.String) }).pipe(C.withAuthError) {
}
export class PolicyErrorException extends S.TaggedErrorClass()("PolicyErrorException", { Message: S.optional(S.String) }) {
}
/**
 * Associates a created artifact of an AWS cloud resource, the target receiving the
 * migration, with the migration task performed by a migration tool. This API has the
 * following traits:
 *
 * - Migration tools can call the `AssociateCreatedArtifact` operation to
 * indicate which AWS artifact is associated with a migration task.
 *
 * - The created artifact name must be provided in ARN (Amazon Resource Name) format
 * which will contain information about type and region; for example:
 * `arn:aws:ec2:us-east-1:488216288981:image/ami-6d0ba87b`.
 *
 * - Examples of the AWS resource behind the created artifact are, AMI's, EC2 instance,
 * or DMS endpoint, etc.
 */
export const associateCreatedArtifact = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: AssociateCreatedArtifactRequest,
    output: AssociateCreatedArtifactResult,
    errors: [
        AccessDeniedException,
        DryRunOperation,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
        UnauthorizedOperation,
    ],
}));
/**
 * Associates a discovered resource ID from Application Discovery Service with a migration
 * task.
 */
export const associateDiscoveredResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: AssociateDiscoveredResourceRequest,
    output: AssociateDiscoveredResourceResult,
    errors: [
        AccessDeniedException,
        DryRunOperation,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        PolicyErrorException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
        UnauthorizedOperation,
    ],
}));
/**
 * Associates a source resource with a migration task. For example, the source resource can
 * be a source server, an application, or a migration wave.
 */
export const associateSourceResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: AssociateSourceResourceRequest,
    output: AssociateSourceResourceResult,
    errors: [
        AccessDeniedException,
        DryRunOperation,
        InternalServerError,
        InvalidInputException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
        UnauthorizedOperation,
    ],
}));
/**
 * Creates a progress update stream which is an AWS resource used for access control as
 * well as a namespace for migration task names that is implicitly linked to your AWS account.
 * It must uniquely identify the migration tool as it is used for all updates made by the
 * tool; however, it does not need to be unique for each AWS account because it is scoped to
 * the AWS account.
 */
export const createProgressUpdateStream = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateProgressUpdateStreamRequest,
    output: CreateProgressUpdateStreamResult,
    errors: [
        AccessDeniedException,
        DryRunOperation,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        ServiceUnavailableException,
        ThrottlingException,
        UnauthorizedOperation,
    ],
}));
/**
 * Deletes a progress update stream, including all of its tasks, which was previously
 * created as an AWS resource used for access control. This API has the following
 * traits:
 *
 * - The only parameter needed for `DeleteProgressUpdateStream` is the
 * stream name (same as a `CreateProgressUpdateStream` call).
 *
 * - The call will return, and a background process will asynchronously delete the
 * stream and all of its resources (tasks, associated resources, resource attributes,
 * created artifacts).
 *
 * - If the stream takes time to be deleted, it might still show up on a
 * `ListProgressUpdateStreams` call.
 *
 * - `CreateProgressUpdateStream`, `ImportMigrationTask`,
 * `NotifyMigrationTaskState`, and all Associate[*] APIs related to the
 * tasks belonging to the stream will throw "InvalidInputException" if the stream of the
 * same name is in the process of being deleted.
 *
 * - Once the stream and all of its resources are deleted,
 * `CreateProgressUpdateStream` for a stream of the same name will
 * succeed, and that stream will be an entirely new logical resource (without any
 * resources associated with the old stream).
 */
export const deleteProgressUpdateStream = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteProgressUpdateStreamRequest,
    output: DeleteProgressUpdateStreamResult,
    errors: [
        AccessDeniedException,
        DryRunOperation,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
        UnauthorizedOperation,
    ],
}));
/**
 * Gets the migration status of an application.
 */
export const describeApplicationState = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribeApplicationStateRequest,
    output: DescribeApplicationStateResult,
    errors: [
        AccessDeniedException,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        PolicyErrorException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
    ],
}));
/**
 * Retrieves a list of all attributes associated with a specific migration task.
 */
export const describeMigrationTask = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribeMigrationTaskRequest,
    output: DescribeMigrationTaskResult,
    errors: [
        AccessDeniedException,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
    ],
}));
/**
 * Disassociates a created artifact of an AWS resource with a migration task performed by a
 * migration tool that was previously associated. This API has the following traits:
 *
 * - A migration user can call the `DisassociateCreatedArtifacts` operation
 * to disassociate a created AWS Artifact from a migration task.
 *
 * - The created artifact name must be provided in ARN (Amazon Resource Name) format
 * which will contain information about type and region; for example:
 * `arn:aws:ec2:us-east-1:488216288981:image/ami-6d0ba87b`.
 *
 * - Examples of the AWS resource behind the created artifact are, AMI's, EC2 instance,
 * or RDS instance, etc.
 */
export const disassociateCreatedArtifact = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DisassociateCreatedArtifactRequest,
    output: DisassociateCreatedArtifactResult,
    errors: [
        AccessDeniedException,
        DryRunOperation,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
        UnauthorizedOperation,
    ],
}));
/**
 * Disassociate an Application Discovery Service discovered resource from a migration
 * task.
 */
export const disassociateDiscoveredResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DisassociateDiscoveredResourceRequest,
    output: DisassociateDiscoveredResourceResult,
    errors: [
        AccessDeniedException,
        DryRunOperation,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
        UnauthorizedOperation,
    ],
}));
/**
 * Removes the association between a source resource and a migration task.
 */
export const disassociateSourceResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DisassociateSourceResourceRequest,
    output: DisassociateSourceResourceResult,
    errors: [
        AccessDeniedException,
        DryRunOperation,
        InternalServerError,
        InvalidInputException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
        UnauthorizedOperation,
    ],
}));
/**
 * Registers a new migration task which represents a server, database, etc., being migrated
 * to AWS by a migration tool.
 *
 * This API is a prerequisite to calling the `NotifyMigrationTaskState` API as
 * the migration tool must first register the migration task with Migration Hub.
 */
export const importMigrationTask = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ImportMigrationTaskRequest,
    output: ImportMigrationTaskResult,
    errors: [
        AccessDeniedException,
        DryRunOperation,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
        UnauthorizedOperation,
    ],
}));
/**
 * Lists all the migration statuses for your applications. If you use the optional
 * `ApplicationIds` parameter, only the migration statuses for those
 * applications will be returned.
 */
export const listApplicationStates = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListApplicationStatesRequest,
    output: ListApplicationStatesResult,
    errors: [
        AccessDeniedException,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        ServiceUnavailableException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "ApplicationStateList",
        pageSize: "MaxResults",
    },
}));
/**
 * Lists the created artifacts attached to a given migration task in an update stream. This
 * API has the following traits:
 *
 * - Gets the list of the created artifacts while
 * migration is taking place.
 *
 * - Shows the artifacts created by the migration tool that was associated by the
 * `AssociateCreatedArtifact` API.
 *
 * - Lists created artifacts in a paginated interface.
 */
export const listCreatedArtifacts = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListCreatedArtifactsRequest,
    output: ListCreatedArtifactsResult,
    errors: [
        AccessDeniedException,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "CreatedArtifactList",
        pageSize: "MaxResults",
    },
}));
/**
 * Lists discovered resources associated with the given `MigrationTask`.
 */
export const listDiscoveredResources = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListDiscoveredResourcesRequest,
    output: ListDiscoveredResourcesResult,
    errors: [
        AccessDeniedException,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "DiscoveredResourceList",
        pageSize: "MaxResults",
    },
}));
/**
 * Lists all, or filtered by resource name, migration tasks associated with the user
 * account making this call. This API has the following traits:
 *
 * - Can show a summary list of the most recent migration tasks.
 *
 * - Can show a summary list of migration tasks associated with a given discovered
 * resource.
 *
 * - Lists migration tasks in a paginated interface.
 */
export const listMigrationTasks = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListMigrationTasksRequest,
    output: ListMigrationTasksResult,
    errors: [
        AccessDeniedException,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        PolicyErrorException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "MigrationTaskSummaryList",
        pageSize: "MaxResults",
    },
}));
/**
 * This is a paginated API that returns all the migration-task states for the specified
 * `MigrationTaskName` and `ProgressUpdateStream`.
 */
export const listMigrationTaskUpdates = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListMigrationTaskUpdatesRequest,
    output: ListMigrationTaskUpdatesResult,
    errors: [
        AccessDeniedException,
        InternalServerError,
        InvalidInputException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "MigrationTaskUpdateList",
        pageSize: "MaxResults",
    },
}));
/**
 * Lists progress update streams associated with the user account making this call.
 */
export const listProgressUpdateStreams = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListProgressUpdateStreamsRequest,
    output: ListProgressUpdateStreamsResult,
    errors: [
        AccessDeniedException,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        ServiceUnavailableException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "ProgressUpdateStreamSummaryList",
        pageSize: "MaxResults",
    },
}));
/**
 * Lists all the source resource that are associated with the specified
 * `MigrationTaskName` and `ProgressUpdateStream`.
 */
export const listSourceResources = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListSourceResourcesRequest,
    output: ListSourceResourcesResult,
    errors: [
        AccessDeniedException,
        InternalServerError,
        InvalidInputException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "SourceResourceList",
        pageSize: "MaxResults",
    },
}));
/**
 * Sets the migration state of an application. For a given application identified by the
 * value passed to `ApplicationId`, its status is set or updated by passing one of
 * three values to `Status`: NOT_STARTED | IN_PROGRESS |
 * COMPLETED.
 */
export const notifyApplicationState = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: NotifyApplicationStateRequest,
    output: NotifyApplicationStateResult,
    errors: [
        AccessDeniedException,
        DryRunOperation,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        PolicyErrorException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
        UnauthorizedOperation,
    ],
}));
/**
 * Notifies Migration Hub of the current status, progress, or other detail regarding a
 * migration task. This API has the following traits:
 *
 * - Migration tools will call the `NotifyMigrationTaskState` API to share
 * the latest progress and status.
 *
 * - `MigrationTaskName` is used for addressing updates to the correct
 * target.
 *
 * - `ProgressUpdateStream` is used for access control and to provide a
 * namespace for each migration tool.
 */
export const notifyMigrationTaskState = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: NotifyMigrationTaskStateRequest,
    output: NotifyMigrationTaskStateResult,
    errors: [
        AccessDeniedException,
        DryRunOperation,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
        UnauthorizedOperation,
    ],
}));
/**
 * Provides identifying details of the resource being migrated so that it can be associated
 * in the Application Discovery Service repository. This association occurs asynchronously
 * after `PutResourceAttributes` returns.
 *
 * - Keep in mind that subsequent calls to PutResourceAttributes will override
 * previously stored attributes. For example, if it is first called with a MAC
 * address, but later, it is desired to *add* an IP address, it
 * will then be required to call it with *both* the IP and MAC
 * addresses to prevent overriding the MAC address.
 *
 * - Note the instructions regarding the special use case of the
 * `ResourceAttributeList`
 * parameter when specifying any
 * "VM" related value.
 *
 * Because this is an asynchronous call, it will always return 200, whether an
 * association occurs or not. To confirm if an association was found based on the provided
 * details, call `ListDiscoveredResources`.
 */
export const putResourceAttributes = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutResourceAttributesRequest,
    output: PutResourceAttributesResult,
    errors: [
        AccessDeniedException,
        DryRunOperation,
        HomeRegionNotSetException,
        InternalServerError,
        InvalidInputException,
        ResourceNotFoundException,
        ServiceUnavailableException,
        ThrottlingException,
        UnauthorizedOperation,
    ],
}));
//# sourceMappingURL=migration-hub.js.map