import * as HttpClient from "effect/unstable/http/HttpClient";
import * as S from "effect/Schema";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import * as C from "../category.js";
const svc = T.AwsApiService({ sdkId: "DLM", serviceShapeName: "dlm_20180112" });
const auth = T.AwsAuthSigv4({ name: "dlm" });
const ver = T.ServiceVersion("2018-01-12");
const proto = T.AwsProtocolsRestJson1();
const rules = T.EndpointResolver((p, _) => {
    const { Region, UseDualStack = false, UseFIPS = false, Endpoint } = p;
    const e = (u, p = {}, h = {}) => ({
        type: "endpoint",
        endpoint: { url: u, properties: p, headers: h },
    });
    const err = (m) => ({
        type: "error",
        message: m,
    });
    if (Endpoint != null) {
        if (UseFIPS === true) {
            return err("Invalid Configuration: FIPS and custom endpoint are not supported");
        }
        if (UseDualStack === true) {
            return err("Invalid Configuration: Dualstack and custom endpoint are not supported");
        }
        return e(Endpoint);
    }
    if (Region != null) {
        {
            const PartitionResult = _.partition(Region);
            if (PartitionResult != null && PartitionResult !== false) {
                if (UseFIPS === true && UseDualStack === true) {
                    if (true === _.getAttr(PartitionResult, "supportsFIPS") &&
                        true === _.getAttr(PartitionResult, "supportsDualStack")) {
                        return e(`https://dlm-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 (_.getAttr(PartitionResult, "name") === "aws-us-gov") {
                            return e(`https://dlm.${Region}.amazonaws.com`);
                        }
                        return e(`https://dlm-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://dlm.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                return e(`https://dlm.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const SettablePolicyStateValues = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const PolicyTypeValues = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ResourceTypeValues = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ResourceTypeValuesList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ResourceTypeValues);
export const ResourceLocationValues = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ResourceLocationList = /*@__PURE__*/ /*#__PURE__*/ S.Array(ResourceLocationValues);
export const Tag = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Key: S.optional(S.String), Value: S.optional(S.String) })).annotate({ identifier: "Tag" });
export const TargetTagList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Tag);
export const TagsToAddList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Tag);
export const VariableTagsList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Tag);
export const LocationValues = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const IntervalUnitValues = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const TimesList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const StageValues = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const StagesList = /*@__PURE__*/ /*#__PURE__*/ S.Array(StageValues);
export const ExecutionHandlerServiceValues = 
/*@__PURE__*/ /*#__PURE__*/ S.String;
export const Script = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Stages: S.optional(StagesList),
    ExecutionHandlerService: S.optional(ExecutionHandlerServiceValues),
    ExecutionHandler: S.optional(S.String),
    ExecuteOperationOnScriptFailure: S.optional(S.Boolean),
    ExecutionTimeout: S.optional(S.Number),
    MaximumRetryCount: S.optional(S.Number),
})).annotate({ identifier: "Script" });
export const ScriptsList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Script);
export const CreateRule = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Location: S.optional(LocationValues),
    Interval: S.optional(S.Number),
    IntervalUnit: S.optional(IntervalUnitValues),
    Times: S.optional(TimesList),
    CronExpression: S.optional(S.String),
    Scripts: S.optional(ScriptsList),
})).annotate({ identifier: "CreateRule" });
export const RetentionIntervalUnitValues = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const RetainRule = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Count: S.optional(S.Number),
    Interval: S.optional(S.Number),
    IntervalUnit: S.optional(RetentionIntervalUnitValues),
})).annotate({ identifier: "RetainRule" });
export const AvailabilityZoneList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const AvailabilityZoneIdList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const FastRestoreRule = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Count: S.optional(S.Number),
    Interval: S.optional(S.Number),
    IntervalUnit: S.optional(RetentionIntervalUnitValues),
    AvailabilityZones: S.optional(AvailabilityZoneList),
    AvailabilityZoneIds: S.optional(AvailabilityZoneIdList),
})).annotate({
    identifier: "FastRestoreRule",
});
export const CrossRegionCopyRetainRule = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Interval: S.optional(S.Number),
    IntervalUnit: S.optional(RetentionIntervalUnitValues),
})).annotate({
    identifier: "CrossRegionCopyRetainRule",
});
export const CrossRegionCopyDeprecateRule = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Interval: S.optional(S.Number),
    IntervalUnit: S.optional(RetentionIntervalUnitValues),
})).annotate({
    identifier: "CrossRegionCopyDeprecateRule",
});
export const CrossRegionCopyRule = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    TargetRegion: S.optional(S.String),
    Target: S.optional(S.String),
    Encrypted: S.optional(S.Boolean),
    CmkArn: S.optional(S.String),
    CopyTags: S.optional(S.Boolean),
    RetainRule: S.optional(CrossRegionCopyRetainRule),
    DeprecateRule: S.optional(CrossRegionCopyDeprecateRule),
})).annotate({
    identifier: "CrossRegionCopyRule",
});
export const CrossRegionCopyRules = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(CrossRegionCopyRule);
export const ShareTargetAccountList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const ShareRule = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    TargetAccounts: S.optional(ShareTargetAccountList),
    UnshareInterval: S.optional(S.Number),
    UnshareIntervalUnit: S.optional(RetentionIntervalUnitValues),
})).annotate({ identifier: "ShareRule" });
export const ShareRules = /*@__PURE__*/ /*#__PURE__*/ S.Array(ShareRule);
export const DeprecateRule = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Count: S.optional(S.Number),
    Interval: S.optional(S.Number),
    IntervalUnit: S.optional(RetentionIntervalUnitValues),
})).annotate({ identifier: "DeprecateRule" });
export const RetentionArchiveTier = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Count: S.optional(S.Number),
    Interval: S.optional(S.Number),
    IntervalUnit: S.optional(RetentionIntervalUnitValues),
})).annotate({
    identifier: "RetentionArchiveTier",
});
export const ArchiveRetainRule = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ RetentionArchiveTier: S.optional(RetentionArchiveTier) })).annotate({
    identifier: "ArchiveRetainRule",
});
export const ArchiveRule = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ RetainRule: S.optional(ArchiveRetainRule) })).annotate({ identifier: "ArchiveRule" });
export const Schedule = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Name: S.optional(S.String),
    CopyTags: S.optional(S.Boolean),
    TagsToAdd: S.optional(TagsToAddList),
    VariableTags: S.optional(VariableTagsList),
    CreateRule: S.optional(CreateRule),
    RetainRule: S.optional(RetainRule),
    FastRestoreRule: S.optional(FastRestoreRule),
    CrossRegionCopyRules: S.optional(CrossRegionCopyRules),
    ShareRules: S.optional(ShareRules),
    DeprecateRule: S.optional(DeprecateRule),
    ArchiveRule: S.optional(ArchiveRule),
})).annotate({ identifier: "Schedule" });
export const ScheduleList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Schedule);
export const ExcludeDataVolumeTagList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(Tag);
export const Parameters = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ExcludeBootVolume: S.optional(S.Boolean),
    NoReboot: S.optional(S.Boolean),
    ExcludeDataVolumeTags: S.optional(ExcludeDataVolumeTagList),
})).annotate({ identifier: "Parameters" });
export const EventSourceValues = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const EventTypeValues = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const SnapshotOwnerList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const EventParameters = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    EventType: S.optional(EventTypeValues),
    SnapshotOwner: S.optional(SnapshotOwnerList),
    DescriptionRegex: S.optional(S.String),
})).annotate({
    identifier: "EventParameters",
});
export const EventSource = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Type: S.optional(EventSourceValues),
    Parameters: S.optional(EventParameters),
})).annotate({ identifier: "EventSource" });
export const EncryptionConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Encrypted: S.optional(S.Boolean),
    CmkArn: S.optional(S.String),
})).annotate({
    identifier: "EncryptionConfiguration",
});
export const CrossRegionCopyAction = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Target: S.optional(S.String),
    EncryptionConfiguration: S.optional(EncryptionConfiguration),
    RetainRule: S.optional(CrossRegionCopyRetainRule),
})).annotate({
    identifier: "CrossRegionCopyAction",
});
export const CrossRegionCopyActionList = /*@__PURE__*/ /*#__PURE__*/ S.Array(CrossRegionCopyAction);
export const Action = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Name: S.optional(S.String),
    CrossRegionCopy: S.optional(CrossRegionCopyActionList),
})).annotate({ identifier: "Action" });
export const ActionList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Action);
export const PolicyLanguageValues = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const CrossRegionCopyTarget = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ TargetRegion: S.optional(S.String) })).annotate({
    identifier: "CrossRegionCopyTarget",
});
export const CrossRegionCopyTargetList = /*@__PURE__*/ /*#__PURE__*/ S.Array(CrossRegionCopyTarget);
export const ExcludeVolumeTypesList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const ExcludeTagsList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Tag);
export const Exclusions = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ExcludeBootVolumes: S.optional(S.Boolean),
    ExcludeVolumeTypes: S.optional(ExcludeVolumeTypesList),
    ExcludeTags: S.optional(ExcludeTagsList),
})).annotate({ identifier: "Exclusions" });
export const PolicyDetails = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    PolicyType: S.optional(PolicyTypeValues),
    ResourceTypes: S.optional(ResourceTypeValuesList),
    ResourceLocations: S.optional(ResourceLocationList),
    TargetTags: S.optional(TargetTagList),
    Schedules: S.optional(ScheduleList),
    Parameters: S.optional(Parameters),
    EventSource: S.optional(EventSource),
    Actions: S.optional(ActionList),
    PolicyLanguage: S.optional(PolicyLanguageValues),
    ResourceType: S.optional(ResourceTypeValues),
    CreateInterval: S.optional(S.Number),
    RetainInterval: S.optional(S.Number),
    CopyTags: S.optional(S.Boolean),
    CrossRegionCopyTargets: S.optional(CrossRegionCopyTargetList),
    ExtendDeletion: S.optional(S.Boolean),
    Exclusions: S.optional(Exclusions),
})).annotate({ identifier: "PolicyDetails" });
export const TagMap = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const DefaultPolicyTypeValues = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const CreateLifecyclePolicyRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ExecutionRoleArn: S.optional(S.String),
    Description: S.optional(S.String),
    State: S.optional(SettablePolicyStateValues),
    PolicyDetails: S.optional(PolicyDetails),
    Tags: S.optional(TagMap),
    DefaultPolicy: S.optional(DefaultPolicyTypeValues),
    CreateInterval: S.optional(S.Number),
    RetainInterval: S.optional(S.Number),
    CopyTags: S.optional(S.Boolean),
    ExtendDeletion: S.optional(S.Boolean),
    CrossRegionCopyTargets: S.optional(CrossRegionCopyTargetList),
    Exclusions: S.optional(Exclusions),
}).pipe(T.all(T.Http({ method: "POST", uri: "/policies" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateLifecyclePolicyRequest",
});
export const CreateLifecyclePolicyResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ PolicyId: S.optional(S.String) })).annotate({
    identifier: "CreateLifecyclePolicyResponse",
});
export const ParameterList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const DeleteLifecyclePolicyRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ PolicyId: S.String.pipe(T.HttpLabel("PolicyId")) }).pipe(T.all(T.Http({ method: "DELETE", uri: "/policies/{PolicyId}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteLifecyclePolicyRequest",
});
export const DeleteLifecyclePolicyResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteLifecyclePolicyResponse",
});
export const PolicyIdList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const GettablePolicyStateValues = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const TargetTagsFilterList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const TagsToAddFilterList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const DefaultPoliciesTypeValues = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const GetLifecyclePoliciesRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    PolicyIds: S.optional(PolicyIdList).pipe(T.HttpQuery("policyIds")),
    State: S.optional(GettablePolicyStateValues).pipe(T.HttpQuery("state")),
    ResourceTypes: S.optional(ResourceTypeValuesList).pipe(T.HttpQuery("resourceTypes")),
    TargetTags: S.optional(TargetTagsFilterList).pipe(T.HttpQuery("targetTags")),
    TagsToAdd: S.optional(TagsToAddFilterList).pipe(T.HttpQuery("tagsToAdd")),
    DefaultPolicyType: S.optional(DefaultPoliciesTypeValues).pipe(T.HttpQuery("defaultPolicyType")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/policies" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetLifecyclePoliciesRequest",
});
export const LifecyclePolicySummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    PolicyId: S.optional(S.String),
    Description: S.optional(S.String),
    State: S.optional(GettablePolicyStateValues),
    Tags: S.optional(TagMap),
    PolicyType: S.optional(PolicyTypeValues),
    DefaultPolicy: S.optional(S.Boolean),
})).annotate({
    identifier: "LifecyclePolicySummary",
});
export const LifecyclePolicySummaryList = /*@__PURE__*/ /*#__PURE__*/ S.Array(LifecyclePolicySummary);
export const GetLifecyclePoliciesResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Policies: S.optional(LifecyclePolicySummaryList) })).annotate({
    identifier: "GetLifecyclePoliciesResponse",
});
export const GetLifecyclePolicyRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ PolicyId: S.String.pipe(T.HttpLabel("PolicyId")) }).pipe(T.all(T.Http({ method: "GET", uri: "/policies/{PolicyId}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetLifecyclePolicyRequest",
});
export const LifecyclePolicy = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    PolicyId: S.optional(S.String),
    Description: S.optional(S.String),
    State: S.optional(GettablePolicyStateValues),
    StatusMessage: S.optional(S.String),
    ExecutionRoleArn: S.optional(S.String),
    DateCreated: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    DateModified: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    PolicyDetails: S.optional(PolicyDetails),
    Tags: S.optional(TagMap),
    PolicyArn: S.optional(S.String),
    DefaultPolicy: S.optional(S.Boolean),
})).annotate({
    identifier: "LifecyclePolicy",
});
export const GetLifecyclePolicyResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Policy: S.optional(LifecyclePolicy) })).annotate({
    identifier: "GetLifecyclePolicyResponse",
});
export const ListTagsForResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ResourceArn: S.String.pipe(T.HttpLabel("ResourceArn")) }).pipe(T.all(T.Http({ method: "GET", uri: "/tags/{ResourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListTagsForResourceRequest",
});
export const ListTagsForResourceResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Tags: S.optional(TagMap) })).annotate({
    identifier: "ListTagsForResourceResponse",
});
export const TagResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ResourceArn: S.String.pipe(T.HttpLabel("ResourceArn")),
    Tags: S.optional(TagMap),
}).pipe(T.all(T.Http({ method: "POST", uri: "/tags/{ResourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "TagResourceRequest",
});
export const TagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "TagResourceResponse",
});
export const TagKeyList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const UntagResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ResourceArn: S.String.pipe(T.HttpLabel("ResourceArn")),
    TagKeys: S.optional(TagKeyList).pipe(T.HttpQuery("tagKeys")),
}).pipe(T.all(T.Http({ method: "DELETE", uri: "/tags/{ResourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UntagResourceRequest",
});
export const UntagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UntagResourceResponse",
});
export const UpdateLifecyclePolicyRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    PolicyId: S.String.pipe(T.HttpLabel("PolicyId")),
    ExecutionRoleArn: S.optional(S.String),
    State: S.optional(SettablePolicyStateValues),
    Description: S.optional(S.String),
    PolicyDetails: S.optional(PolicyDetails),
    CreateInterval: S.optional(S.Number),
    RetainInterval: S.optional(S.Number),
    CopyTags: S.optional(S.Boolean),
    ExtendDeletion: S.optional(S.Boolean),
    CrossRegionCopyTargets: S.optional(CrossRegionCopyTargetList),
    Exclusions: S.optional(Exclusions),
}).pipe(T.all(T.Http({ method: "PATCH", uri: "/policies/{PolicyId}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateLifecyclePolicyRequest",
});
export const UpdateLifecyclePolicyResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UpdateLifecyclePolicyResponse",
});
//# Errors
export class InternalServerException extends S.TaggedErrorClass()("InternalServerException", { Message: S.optional(S.String), Code: S.optional(S.String) }).pipe(C.withServerError) {
}
export class InvalidRequestException extends S.TaggedErrorClass()("InvalidRequestException", {
    Message: S.optional(S.String),
    Code: S.optional(S.String),
    RequiredParameters: S.optional(ParameterList),
    MutuallyExclusiveParameters: S.optional(ParameterList),
}).pipe(C.withBadRequestError) {
}
export class LimitExceededException extends S.TaggedErrorClass()("LimitExceededException", {
    Message: S.optional(S.String),
    Code: S.optional(S.String),
    ResourceType: S.optional(S.String),
}).pipe(C.withThrottlingError) {
}
export class ResourceNotFoundException extends S.TaggedErrorClass()("ResourceNotFoundException", {
    Message: S.optional(S.String),
    Code: S.optional(S.String),
    ResourceType: S.optional(S.String),
    ResourceIds: S.optional(PolicyIdList),
}).pipe(C.withBadRequestError) {
}
/**
 * Creates an Amazon Data Lifecycle Manager lifecycle policy. Amazon Data Lifecycle Manager supports the following policy types:
 *
 * - Custom EBS snapshot policy
 *
 * - Custom EBS-backed AMI policy
 *
 * - Cross-account copy event policy
 *
 * - Default policy for EBS snapshots
 *
 * - Default policy for EBS-backed AMIs
 *
 * For more information, see
 * Default policies vs custom policies.
 *
 * If you create a default policy, you can specify the request parameters either in
 * the request body, or in the PolicyDetails request structure, but not both.
 */
export const createLifecyclePolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateLifecyclePolicyRequest,
    output: CreateLifecyclePolicyResponse,
    errors: [
        InternalServerException,
        InvalidRequestException,
        LimitExceededException,
    ],
}));
/**
 * Deletes the specified lifecycle policy and halts the automated operations that the
 * policy specified.
 *
 * For more information about deleting a policy, see Delete lifecycle
 * policies.
 */
export const deleteLifecyclePolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteLifecyclePolicyRequest,
    output: DeleteLifecyclePolicyResponse,
    errors: [
        InternalServerException,
        LimitExceededException,
        ResourceNotFoundException,
    ],
}));
/**
 * Gets summary information about all or the specified data lifecycle policies.
 *
 * To get complete information about a policy, use GetLifecyclePolicy.
 */
export const getLifecyclePolicies = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetLifecyclePoliciesRequest,
    output: GetLifecyclePoliciesResponse,
    errors: [
        InternalServerException,
        InvalidRequestException,
        LimitExceededException,
        ResourceNotFoundException,
    ],
}));
/**
 * Gets detailed information about the specified lifecycle policy.
 */
export const getLifecyclePolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetLifecyclePolicyRequest,
    output: GetLifecyclePolicyResponse,
    errors: [
        InternalServerException,
        LimitExceededException,
        ResourceNotFoundException,
    ],
}));
/**
 * Lists the tags for the specified resource.
 */
export const listTagsForResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListTagsForResourceRequest,
    output: ListTagsForResourceResponse,
    errors: [
        InternalServerException,
        InvalidRequestException,
        ResourceNotFoundException,
    ],
}));
/**
 * Adds the specified tags to the specified resource.
 */
export const tagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TagResourceRequest,
    output: TagResourceResponse,
    errors: [
        InternalServerException,
        InvalidRequestException,
        ResourceNotFoundException,
    ],
}));
/**
 * Removes the specified tags from the specified resource.
 */
export const untagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UntagResourceRequest,
    output: UntagResourceResponse,
    errors: [
        InternalServerException,
        InvalidRequestException,
        ResourceNotFoundException,
    ],
}));
/**
 * Updates the specified lifecycle policy.
 *
 * For more information about updating a policy, see Modify lifecycle
 * policies.
 */
export const updateLifecyclePolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateLifecyclePolicyRequest,
    output: UpdateLifecyclePolicyResponse,
    errors: [
        InternalServerException,
        InvalidRequestException,
        LimitExceededException,
        ResourceNotFoundException,
    ],
}));
//# sourceMappingURL=dlm.js.map