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";
const ns = T.XmlNamespace("https://mediastore.amazonaws.com/doc/2017-09-01");
const svc = T.AwsApiService({
    sdkId: "MediaStore",
    serviceShapeName: "MediaStore_20170901",
});
const auth = T.AwsAuthSigv4({ name: "mediastore" });
const ver = T.ServiceVersion("2017-09-01");
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://mediastore-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://mediastore-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://mediastore.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                return e(`https://mediastore.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const Tag = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Key: S.String, Value: S.optional(S.String) })).annotate({ identifier: "Tag" });
export const TagList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Tag);
export const CreateContainerInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String, Tags: S.optional(TagList) }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateContainerInput",
});
export const ContainerStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const Container = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Endpoint: S.optional(S.String),
    CreationTime: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    ARN: S.optional(S.String),
    Name: S.optional(S.String),
    Status: S.optional(ContainerStatus),
    AccessLoggingEnabled: S.optional(S.Boolean),
})).annotate({ identifier: "Container" });
export const CreateContainerOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Container: Container }).pipe(ns)).annotate({
    identifier: "CreateContainerOutput",
});
export const DeleteContainerInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteContainerInput",
});
export const DeleteContainerOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "DeleteContainerOutput",
});
export const DeleteContainerPolicyInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteContainerPolicyInput",
});
export const DeleteContainerPolicyOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "DeleteContainerPolicyOutput",
});
export const DeleteCorsPolicyInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteCorsPolicyInput",
});
export const DeleteCorsPolicyOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "DeleteCorsPolicyOutput",
});
export const DeleteLifecyclePolicyInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteLifecyclePolicyInput",
});
export const DeleteLifecyclePolicyOutput = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "DeleteLifecyclePolicyOutput",
});
export const DeleteMetricPolicyInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteMetricPolicyInput",
});
export const DeleteMetricPolicyOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "DeleteMetricPolicyOutput",
});
export const DescribeContainerInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.optional(S.String) }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeContainerInput",
});
export const DescribeContainerOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Container: S.optional(Container) }).pipe(ns)).annotate({
    identifier: "DescribeContainerOutput",
});
export const GetContainerPolicyInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetContainerPolicyInput",
});
export const GetContainerPolicyOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Policy: S.String }).pipe(ns)).annotate({
    identifier: "GetContainerPolicyOutput",
});
export const GetCorsPolicyInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetCorsPolicyInput",
});
export const AllowedOrigins = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const MethodName = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const AllowedMethods = /*@__PURE__*/ /*#__PURE__*/ S.Array(MethodName);
export const AllowedHeaders = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const ExposeHeaders = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const CorsRule = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AllowedOrigins: AllowedOrigins,
    AllowedMethods: S.optional(AllowedMethods),
    AllowedHeaders: AllowedHeaders,
    MaxAgeSeconds: S.optional(S.Number),
    ExposeHeaders: S.optional(ExposeHeaders),
})).annotate({ identifier: "CorsRule" });
export const CorsPolicy = /*@__PURE__*/ /*#__PURE__*/ S.Array(CorsRule);
export const GetCorsPolicyOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ CorsPolicy: CorsPolicy }).pipe(ns)).annotate({
    identifier: "GetCorsPolicyOutput",
});
export const GetLifecyclePolicyInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetLifecyclePolicyInput",
});
export const GetLifecyclePolicyOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ LifecyclePolicy: S.String }).pipe(ns)).annotate({
    identifier: "GetLifecyclePolicyOutput",
});
export const GetMetricPolicyInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetMetricPolicyInput",
});
export const ContainerLevelMetrics = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const MetricPolicyRule = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ObjectGroup: S.String, ObjectGroupName: S.String })).annotate({
    identifier: "MetricPolicyRule",
});
export const MetricPolicyRules = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(MetricPolicyRule);
export const MetricPolicy = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ContainerLevelMetrics: ContainerLevelMetrics,
    MetricPolicyRules: S.optional(MetricPolicyRules),
})).annotate({ identifier: "MetricPolicy" });
export const GetMetricPolicyOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ MetricPolicy: MetricPolicy }).pipe(ns)).annotate({
    identifier: "GetMetricPolicyOutput",
});
export const ListContainersInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    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: "ListContainersInput",
});
export const ContainerList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Container);
export const ListContainersOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Containers: ContainerList, NextToken: S.optional(S.String) }).pipe(ns)).annotate({
    identifier: "ListContainersOutput",
});
export const ListTagsForResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Resource: 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 PutContainerPolicyInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String, Policy: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutContainerPolicyInput",
});
export const PutContainerPolicyOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "PutContainerPolicyOutput",
});
export const PutCorsPolicyInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String, CorsPolicy: CorsPolicy }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutCorsPolicyInput",
});
export const PutCorsPolicyOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "PutCorsPolicyOutput",
});
export const PutLifecyclePolicyInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String, LifecyclePolicy: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutLifecyclePolicyInput",
});
export const PutLifecyclePolicyOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "PutLifecyclePolicyOutput",
});
export const PutMetricPolicyInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String, MetricPolicy: MetricPolicy }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutMetricPolicyInput",
});
export const PutMetricPolicyOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "PutMetricPolicyOutput",
});
export const StartAccessLoggingInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "StartAccessLoggingInput",
});
export const StartAccessLoggingOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "StartAccessLoggingOutput",
});
export const StopAccessLoggingInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ContainerName: S.String }).pipe(T.all(ns, T.Http({ method: "POST", uri: "/" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "StopAccessLoggingInput",
});
export const StopAccessLoggingOutput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "StopAccessLoggingOutput",
});
export const TagResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Resource: 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 TagKeyList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const UntagResourceInput = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Resource: 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",
});
//# Errors
export class ContainerInUseException extends S.TaggedErrorClass()("ContainerInUseException", { Message: S.optional(S.String) }) {
}
export class InternalServerError extends S.TaggedErrorClass()("InternalServerError", { Message: S.optional(S.String) }) {
}
export class LimitExceededException extends S.TaggedErrorClass()("LimitExceededException", { Message: S.optional(S.String) }) {
}
export class ContainerNotFoundException extends S.TaggedErrorClass()("ContainerNotFoundException", { Message: S.optional(S.String) }) {
}
export class PolicyNotFoundException extends S.TaggedErrorClass()("PolicyNotFoundException", { Message: S.optional(S.String) }) {
}
export class CorsPolicyNotFoundException extends S.TaggedErrorClass()("CorsPolicyNotFoundException", { Message: S.optional(S.String) }) {
}
/**
 * Creates a storage container to hold objects. A container is similar to a bucket in
 * the Amazon S3 service.
 */
export const createContainer = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateContainerInput,
    output: CreateContainerOutput,
    errors: [
        ContainerInUseException,
        InternalServerError,
        LimitExceededException,
    ],
}));
/**
 * Deletes the specified container. Before you make a `DeleteContainer`
 * request, delete any objects in the container or in any folders in the container. You can
 * delete only empty containers.
 */
export const deleteContainer = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteContainerInput,
    output: DeleteContainerOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
    ],
}));
/**
 * Deletes the access policy that is associated with the specified container.
 */
export const deleteContainerPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteContainerPolicyInput,
    output: DeleteContainerPolicyOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
        PolicyNotFoundException,
    ],
}));
/**
 * Deletes the cross-origin resource sharing (CORS) configuration information that is
 * set for the container.
 *
 * To use this operation, you must have permission to perform the
 * `MediaStore:DeleteCorsPolicy` action. The container owner has this permission
 * by default and can grant this permission to others.
 */
export const deleteCorsPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteCorsPolicyInput,
    output: DeleteCorsPolicyOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        CorsPolicyNotFoundException,
        InternalServerError,
    ],
}));
/**
 * Removes an object lifecycle policy from a container. It takes up to 20 minutes for the change to take effect.
 */
export const deleteLifecyclePolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteLifecyclePolicyInput,
    output: DeleteLifecyclePolicyOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
        PolicyNotFoundException,
    ],
}));
/**
 * Deletes the metric policy that is associated with the specified container. If there is no metric policy associated with the container, MediaStore doesn't send metrics to CloudWatch.
 */
export const deleteMetricPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteMetricPolicyInput,
    output: DeleteMetricPolicyOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
        PolicyNotFoundException,
    ],
}));
/**
 * Retrieves the properties of the requested container. This request is commonly used to
 * retrieve the endpoint of a container. An endpoint is a value assigned by the service when a
 * new container is created. A container's endpoint does not change after it has been
 * assigned. The `DescribeContainer` request returns a single
 * `Container` object based on `ContainerName`. To return all
 * `Container` objects that are associated with a specified AWS account, use
 * ListContainers.
 */
export const describeContainer = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribeContainerInput,
    output: DescribeContainerOutput,
    errors: [ContainerNotFoundException, InternalServerError],
}));
/**
 * Retrieves the access policy for the specified container. For information about the
 * data that is included in an access policy, see the AWS Identity and Access Management User
 * Guide.
 */
export const getContainerPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetContainerPolicyInput,
    output: GetContainerPolicyOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
        PolicyNotFoundException,
    ],
}));
/**
 * Returns the cross-origin resource sharing (CORS) configuration information that is
 * set for the container.
 *
 * To use this operation, you must have permission to perform the
 * `MediaStore:GetCorsPolicy` action. By default, the container owner has this
 * permission and can grant it to others.
 */
export const getCorsPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetCorsPolicyInput,
    output: GetCorsPolicyOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        CorsPolicyNotFoundException,
        InternalServerError,
    ],
}));
/**
 * Retrieves the object lifecycle policy that is assigned to a container.
 */
export const getLifecyclePolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetLifecyclePolicyInput,
    output: GetLifecyclePolicyOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
        PolicyNotFoundException,
    ],
}));
/**
 * Returns the metric policy for the specified container.
 */
export const getMetricPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetMetricPolicyInput,
    output: GetMetricPolicyOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
        PolicyNotFoundException,
    ],
}));
/**
 * Lists the properties of all containers in AWS Elemental MediaStore.
 *
 * You can query to receive all the containers in one response. Or you can include the
 * `MaxResults` parameter to receive a limited number of containers in each
 * response. In this case, the response includes a token. To get the next set of containers,
 * send the command again, this time with the `NextToken` parameter (with the
 * returned token as its value). The next set of responses appears, with a token if there are
 * still more containers to receive.
 *
 * See also DescribeContainer, which gets the properties of one
 * container.
 */
export const listContainers = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListContainersInput,
    output: ListContainersOutput,
    errors: [InternalServerError],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        pageSize: "MaxResults",
    },
}));
/**
 * Returns a list of the tags assigned to the specified container.
 */
export const listTagsForResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListTagsForResourceInput,
    output: ListTagsForResourceOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
    ],
}));
/**
 * Creates an access policy for the specified container to restrict the users and
 * clients that can access it. For information about the data that is included in an access
 * policy, see the AWS Identity and
 * Access Management User Guide.
 *
 * For this release of the REST API, you can create only one policy for a container. If
 * you enter `PutContainerPolicy` twice, the second command modifies the existing
 * policy.
 */
export const putContainerPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutContainerPolicyInput,
    output: PutContainerPolicyOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
    ],
}));
/**
 * Sets the cross-origin resource sharing (CORS) configuration on a container so that
 * the container can service cross-origin requests. For example, you might want to enable a
 * request whose origin is http://www.example.com to access your AWS Elemental MediaStore
 * container at my.example.container.com by using the browser's XMLHttpRequest
 * capability.
 *
 * To enable CORS on a container, you attach a CORS policy to the container. In the CORS
 * policy, you configure rules that identify origins and the HTTP methods that can be executed
 * on your container. The policy can contain up to 398,000 characters. You can add up to 100
 * rules to a CORS policy. If more than one rule applies, the service uses the first
 * applicable rule listed.
 *
 * To learn more about CORS, see Cross-Origin Resource Sharing (CORS) in AWS Elemental MediaStore.
 */
export const putCorsPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutCorsPolicyInput,
    output: PutCorsPolicyOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
    ],
}));
/**
 * Writes an object lifecycle policy to a container. If the container already has an object lifecycle policy, the service replaces the existing policy with the new policy. It takes up to 20 minutes for the change to take effect.
 *
 * For information about how to construct an object lifecycle policy, see Components of an Object Lifecycle Policy.
 */
export const putLifecyclePolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutLifecyclePolicyInput,
    output: PutLifecyclePolicyOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
    ],
}));
/**
 * The metric policy that you want to add to the container. A metric policy allows AWS Elemental MediaStore to send metrics to Amazon CloudWatch. It takes up to 20 minutes for the new policy to take effect.
 */
export const putMetricPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutMetricPolicyInput,
    output: PutMetricPolicyOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
    ],
}));
/**
 * Starts access logging on the specified container. When you enable access logging on a container, MediaStore delivers access logs for objects stored in that container to Amazon CloudWatch Logs.
 */
export const startAccessLogging = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: StartAccessLoggingInput,
    output: StartAccessLoggingOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
    ],
}));
/**
 * Stops access logging on the specified container. When you stop access logging on a container, MediaStore stops sending access logs to Amazon CloudWatch Logs. These access logs are not saved and are not retrievable.
 */
export const stopAccessLogging = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: StopAccessLoggingInput,
    output: StopAccessLoggingOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
    ],
}));
/**
 * Adds tags to the specified AWS Elemental MediaStore container. Tags are key:value pairs that you can associate with AWS resources. For example, the
 * tag key might be "customer" and the tag value might be "companyA." You can specify one or more tags to add to each container. You can add up to 50
 * tags to each container. For more information about tagging, including naming and usage conventions, see Tagging Resources in MediaStore.
 */
export const tagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TagResourceInput,
    output: TagResourceOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
    ],
}));
/**
 * Removes tags from the specified container. You can specify one or more tags to remove.
 */
export const untagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UntagResourceInput,
    output: UntagResourceOutput,
    errors: [
        ContainerInUseException,
        ContainerNotFoundException,
        InternalServerError,
    ],
}));
//# sourceMappingURL=mediastore.js.map