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: "S3Tables",
    serviceShapeName: "S3TableBuckets",
});
const auth = T.AwsAuthSigv4({ name: "s3tables" });
const ver = T.ServiceVersion("2018-05-10");
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://s3tables-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://s3tables-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://s3tables.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                return e(`https://s3tables.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const ListTagsForResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ resourceArn: S.String.pipe(T.HttpLabel("resourceArn")) }).pipe(T.all(T.Http({ method: "GET", uri: "/tag/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListTagsForResourceRequest",
});
export const Tags = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const ListTagsForResourceResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ tags: S.optional(Tags) })).annotate({
    identifier: "ListTagsForResourceResponse",
});
export const TagResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    resourceArn: S.String.pipe(T.HttpLabel("resourceArn")),
    tags: Tags,
}).pipe(T.all(T.Http({ method: "POST", uri: "/tag/{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: TagKeyList.pipe(T.HttpQuery("tagKeys")),
}).pipe(T.all(T.Http({ method: "DELETE", uri: "/tag/{resourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UntagResourceRequest",
});
export const UntagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UntagResourceResponse",
});
export const NamespaceList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const CreateNamespaceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: NamespaceList,
}).pipe(T.all(T.Http({ method: "PUT", uri: "/namespaces/{tableBucketARN}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateNamespaceRequest",
});
export const CreateNamespaceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ tableBucketARN: S.String, namespace: NamespaceList })).annotate({
    identifier: "CreateNamespaceResponse",
});
export const DeleteNamespaceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.String.pipe(T.HttpLabel("namespace")),
}).pipe(T.all(T.Http({
    method: "DELETE",
    uri: "/namespaces/{tableBucketARN}/{namespace}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteNamespaceRequest",
});
export const DeleteNamespaceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteNamespaceResponse",
});
export const GetNamespaceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.String.pipe(T.HttpLabel("namespace")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/namespaces/{tableBucketARN}/{namespace}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetNamespaceRequest",
});
export const GetNamespaceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    namespace: NamespaceList,
    createdAt: T.DateFromString.pipe(T.TimestampFormat("date-time")),
    createdBy: S.String,
    ownerAccountId: S.String,
    namespaceId: S.optional(S.String),
    tableBucketId: S.optional(S.String),
})).annotate({
    identifier: "GetNamespaceResponse",
});
export const ListNamespacesRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    prefix: S.optional(S.String).pipe(T.HttpQuery("prefix")),
    continuationToken: S.optional(S.String).pipe(T.HttpQuery("continuationToken")),
    maxNamespaces: S.optional(S.Number).pipe(T.HttpQuery("maxNamespaces")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/namespaces/{tableBucketARN}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListNamespacesRequest",
});
export const NamespaceSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    namespace: NamespaceList,
    createdAt: T.DateFromString.pipe(T.TimestampFormat("date-time")),
    createdBy: S.String,
    ownerAccountId: S.String,
    namespaceId: S.optional(S.String),
    tableBucketId: S.optional(S.String),
})).annotate({
    identifier: "NamespaceSummary",
});
export const NamespaceSummaryList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(NamespaceSummary);
export const ListNamespacesResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    namespaces: NamespaceSummaryList,
    continuationToken: S.optional(S.String),
})).annotate({
    identifier: "ListNamespacesResponse",
});
export const DeleteTableBucketEncryptionRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
}).pipe(T.all(T.Http({
    method: "DELETE",
    uri: "/buckets/{tableBucketARN}/encryption",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteTableBucketEncryptionRequest",
});
export const DeleteTableBucketEncryptionResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteTableBucketEncryptionResponse",
});
export const GetTableBucketEncryptionRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/buckets/{tableBucketARN}/encryption" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableBucketEncryptionRequest",
});
export const SSEAlgorithm = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const EncryptionConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ sseAlgorithm: SSEAlgorithm, kmsKeyArn: S.optional(S.String) })).annotate({
    identifier: "EncryptionConfiguration",
});
export const GetTableBucketEncryptionResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ encryptionConfiguration: EncryptionConfiguration })).annotate({
    identifier: "GetTableBucketEncryptionResponse",
});
export const PutTableBucketEncryptionRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    encryptionConfiguration: EncryptionConfiguration,
}).pipe(T.all(T.Http({ method: "PUT", uri: "/buckets/{tableBucketARN}/encryption" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutTableBucketEncryptionRequest",
});
export const PutTableBucketEncryptionResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "PutTableBucketEncryptionResponse",
});
export const DeleteTableBucketPolicyRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
}).pipe(T.all(T.Http({ method: "DELETE", uri: "/buckets/{tableBucketARN}/policy" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteTableBucketPolicyRequest",
});
export const DeleteTableBucketPolicyResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteTableBucketPolicyResponse",
});
export const GetTableBucketPolicyRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/buckets/{tableBucketARN}/policy" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableBucketPolicyRequest",
});
export const GetTableBucketPolicyResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ resourcePolicy: S.String })).annotate({
    identifier: "GetTableBucketPolicyResponse",
});
export const PutTableBucketPolicyRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    resourcePolicy: S.String,
}).pipe(T.all(T.Http({ method: "PUT", uri: "/buckets/{tableBucketARN}/policy" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutTableBucketPolicyRequest",
});
export const PutTableBucketPolicyResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "PutTableBucketPolicyResponse",
});
export const DeleteTableBucketReplicationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpQuery("tableBucketARN")),
    versionToken: S.optional(S.String).pipe(T.HttpQuery("versionToken")),
}).pipe(T.all(T.Http({ method: "DELETE", uri: "/table-bucket-replication" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteTableBucketReplicationRequest",
});
export const DeleteTableBucketReplicationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteTableBucketReplicationResponse",
});
export const GetTableBucketReplicationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpQuery("tableBucketARN")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/table-bucket-replication" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableBucketReplicationRequest",
});
export const ReplicationDestination = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ destinationTableBucketARN: S.String })).annotate({
    identifier: "ReplicationDestination",
});
export const ReplicationDestinations = /*@__PURE__*/ /*#__PURE__*/ S.Array(ReplicationDestination);
export const TableBucketReplicationRule = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ destinations: ReplicationDestinations })).annotate({
    identifier: "TableBucketReplicationRule",
});
export const TableBucketReplicationRules = /*@__PURE__*/ /*#__PURE__*/ S.Array(TableBucketReplicationRule);
export const TableBucketReplicationConfiguration = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ role: S.String, rules: TableBucketReplicationRules })).annotate({
    identifier: "TableBucketReplicationConfiguration",
});
export const GetTableBucketReplicationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    versionToken: S.String,
    configuration: TableBucketReplicationConfiguration,
})).annotate({
    identifier: "GetTableBucketReplicationResponse",
});
export const PutTableBucketReplicationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpQuery("tableBucketARN")),
    versionToken: S.optional(S.String).pipe(T.HttpQuery("versionToken")),
    configuration: TableBucketReplicationConfiguration,
}).pipe(T.all(T.Http({ method: "PUT", uri: "/table-bucket-replication" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutTableBucketReplicationRequest",
});
export const PutTableBucketReplicationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ versionToken: S.String, status: S.String })).annotate({
    identifier: "PutTableBucketReplicationResponse",
});
export const StorageClass = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const StorageClassConfiguration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ storageClass: StorageClass })).annotate({
    identifier: "StorageClassConfiguration",
});
export const CreateTableBucketRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: S.String,
    encryptionConfiguration: S.optional(EncryptionConfiguration),
    storageClassConfiguration: S.optional(StorageClassConfiguration),
    tags: S.optional(Tags),
}).pipe(T.all(T.Http({ method: "PUT", uri: "/buckets" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateTableBucketRequest",
});
export const CreateTableBucketResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ arn: S.String })).annotate({
    identifier: "CreateTableBucketResponse",
});
export const DeleteTableBucketRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
}).pipe(T.all(T.Http({ method: "DELETE", uri: "/buckets/{tableBucketARN}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteTableBucketRequest",
});
export const DeleteTableBucketResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteTableBucketResponse",
});
export const DeleteTableBucketMetricsConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
}).pipe(T.all(T.Http({ method: "DELETE", uri: "/buckets/{tableBucketARN}/metrics" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteTableBucketMetricsConfigurationRequest",
});
export const DeleteTableBucketMetricsConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteTableBucketMetricsConfigurationResponse",
});
export const GetTableBucketRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/buckets/{tableBucketARN}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableBucketRequest",
});
export const TableBucketType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const GetTableBucketResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    arn: S.String,
    name: S.String,
    ownerAccountId: S.String,
    createdAt: T.DateFromString.pipe(T.TimestampFormat("date-time")),
    tableBucketId: S.optional(S.String),
    type: S.optional(TableBucketType),
})).annotate({
    identifier: "GetTableBucketResponse",
});
export const GetTableBucketMaintenanceConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/buckets/{tableBucketARN}/maintenance" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableBucketMaintenanceConfigurationRequest",
});
export const TableBucketMaintenanceType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const MaintenanceStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const IcebergUnreferencedFileRemovalSettings = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    unreferencedDays: S.optional(S.Number),
    nonCurrentDays: S.optional(S.Number),
})).annotate({
    identifier: "IcebergUnreferencedFileRemovalSettings",
});
export const TableBucketMaintenanceSettings = 
/*@__PURE__*/ /*#__PURE__*/ S.Union([
    S.Struct({
        icebergUnreferencedFileRemoval: IcebergUnreferencedFileRemovalSettings,
    }),
]);
export const TableBucketMaintenanceConfigurationValue = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    status: S.optional(MaintenanceStatus),
    settings: S.optional(TableBucketMaintenanceSettings),
})).annotate({
    identifier: "TableBucketMaintenanceConfigurationValue",
});
export const TableBucketMaintenanceConfiguration = 
/*@__PURE__*/ /*#__PURE__*/ S.Record(TableBucketMaintenanceType, TableBucketMaintenanceConfigurationValue.pipe(S.optional));
export const GetTableBucketMaintenanceConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String,
    configuration: TableBucketMaintenanceConfiguration,
})).annotate({
    identifier: "GetTableBucketMaintenanceConfigurationResponse",
});
export const GetTableBucketMetricsConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/buckets/{tableBucketARN}/metrics" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableBucketMetricsConfigurationRequest",
});
export const GetTableBucketMetricsConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ tableBucketARN: S.String, id: S.optional(S.String) })).annotate({
    identifier: "GetTableBucketMetricsConfigurationResponse",
});
export const GetTableBucketStorageClassRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/buckets/{tableBucketARN}/storage-class",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableBucketStorageClassRequest",
});
export const GetTableBucketStorageClassResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ storageClassConfiguration: StorageClassConfiguration })).annotate({
    identifier: "GetTableBucketStorageClassResponse",
});
export const ListTableBucketsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    prefix: S.optional(S.String).pipe(T.HttpQuery("prefix")),
    continuationToken: S.optional(S.String).pipe(T.HttpQuery("continuationToken")),
    maxBuckets: S.optional(S.Number).pipe(T.HttpQuery("maxBuckets")),
    type: S.optional(TableBucketType).pipe(T.HttpQuery("type")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/buckets" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListTableBucketsRequest",
});
export const TableBucketSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    arn: S.String,
    name: S.String,
    ownerAccountId: S.String,
    createdAt: T.DateFromString.pipe(T.TimestampFormat("date-time")),
    tableBucketId: S.optional(S.String),
    type: S.optional(TableBucketType),
})).annotate({
    identifier: "TableBucketSummary",
});
export const TableBucketSummaryList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(TableBucketSummary);
export const ListTableBucketsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBuckets: TableBucketSummaryList,
    continuationToken: S.optional(S.String),
})).annotate({
    identifier: "ListTableBucketsResponse",
});
export const PutTableBucketMaintenanceConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    type: TableBucketMaintenanceType.pipe(T.HttpLabel("type")),
    value: TableBucketMaintenanceConfigurationValue,
}).pipe(T.all(T.Http({
    method: "PUT",
    uri: "/buckets/{tableBucketARN}/maintenance/{type}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutTableBucketMaintenanceConfigurationRequest",
});
export const PutTableBucketMaintenanceConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "PutTableBucketMaintenanceConfigurationResponse",
});
export const PutTableBucketMetricsConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
}).pipe(T.all(T.Http({ method: "PUT", uri: "/buckets/{tableBucketARN}/metrics" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutTableBucketMetricsConfigurationRequest",
});
export const PutTableBucketMetricsConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "PutTableBucketMetricsConfigurationResponse",
});
export const PutTableBucketStorageClassRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    storageClassConfiguration: StorageClassConfiguration,
}).pipe(T.all(T.Http({
    method: "PUT",
    uri: "/buckets/{tableBucketARN}/storage-class",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutTableBucketStorageClassRequest",
});
export const PutTableBucketStorageClassResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "PutTableBucketStorageClassResponse",
});
export const GetTableEncryptionRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.String.pipe(T.HttpLabel("namespace")),
    name: S.String.pipe(T.HttpLabel("name")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/tables/{tableBucketARN}/{namespace}/{name}/encryption",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableEncryptionRequest",
});
export const GetTableEncryptionResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ encryptionConfiguration: EncryptionConfiguration })).annotate({
    identifier: "GetTableEncryptionResponse",
});
export const DeleteTablePolicyRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.String.pipe(T.HttpLabel("namespace")),
    name: S.String.pipe(T.HttpLabel("name")),
}).pipe(T.all(T.Http({
    method: "DELETE",
    uri: "/tables/{tableBucketARN}/{namespace}/{name}/policy",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteTablePolicyRequest",
});
export const DeleteTablePolicyResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteTablePolicyResponse",
});
export const GetTablePolicyRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.String.pipe(T.HttpLabel("namespace")),
    name: S.String.pipe(T.HttpLabel("name")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/tables/{tableBucketARN}/{namespace}/{name}/policy",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTablePolicyRequest",
});
export const GetTablePolicyResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ resourcePolicy: S.String })).annotate({
    identifier: "GetTablePolicyResponse",
});
export const PutTablePolicyRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.String.pipe(T.HttpLabel("namespace")),
    name: S.String.pipe(T.HttpLabel("name")),
    resourcePolicy: S.String,
}).pipe(T.all(T.Http({
    method: "PUT",
    uri: "/tables/{tableBucketARN}/{namespace}/{name}/policy",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutTablePolicyRequest",
});
export const PutTablePolicyResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "PutTablePolicyResponse",
});
export const DeleteTableReplicationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableArn: S.String.pipe(T.HttpQuery("tableArn")),
    versionToken: S.String.pipe(T.HttpQuery("versionToken")),
}).pipe(T.all(T.Http({ method: "DELETE", uri: "/table-replication" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteTableReplicationRequest",
});
export const DeleteTableReplicationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteTableReplicationResponse",
});
export const GetTableReplicationRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ tableArn: S.String.pipe(T.HttpQuery("tableArn")) }).pipe(T.all(T.Http({ method: "GET", uri: "/table-replication" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableReplicationRequest",
});
export const TableReplicationRule = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ destinations: ReplicationDestinations })).annotate({
    identifier: "TableReplicationRule",
});
export const TableReplicationRules = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(TableReplicationRule);
export const TableReplicationConfiguration = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ role: S.String, rules: TableReplicationRules })).annotate({
    identifier: "TableReplicationConfiguration",
});
export const GetTableReplicationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    versionToken: S.String,
    configuration: TableReplicationConfiguration,
})).annotate({
    identifier: "GetTableReplicationResponse",
});
export const GetTableReplicationStatusRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ tableArn: S.String.pipe(T.HttpQuery("tableArn")) }).pipe(T.all(T.Http({ method: "GET", uri: "/replication-status" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableReplicationStatusRequest",
});
export const ReplicationStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const LastSuccessfulReplicatedUpdate = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    metadataLocation: S.String,
    timestamp: T.DateFromString.pipe(T.TimestampFormat("date-time")),
})).annotate({
    identifier: "LastSuccessfulReplicatedUpdate",
});
export const ReplicationDestinationStatusModel = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    replicationStatus: ReplicationStatus,
    destinationTableBucketArn: S.String,
    destinationTableArn: S.optional(S.String),
    lastSuccessfulReplicatedUpdate: S.optional(LastSuccessfulReplicatedUpdate),
    failureMessage: S.optional(S.String),
})).annotate({
    identifier: "ReplicationDestinationStatusModel",
});
export const ReplicationDestinationStatuses = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ReplicationDestinationStatusModel);
export const GetTableReplicationStatusResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    sourceTableArn: S.String,
    destinations: ReplicationDestinationStatuses,
})).annotate({
    identifier: "GetTableReplicationStatusResponse",
});
export const PutTableReplicationRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableArn: S.String.pipe(T.HttpQuery("tableArn")),
    versionToken: S.optional(S.String).pipe(T.HttpQuery("versionToken")),
    configuration: TableReplicationConfiguration,
}).pipe(T.all(T.Http({ method: "PUT", uri: "/table-replication" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutTableReplicationRequest",
});
export const PutTableReplicationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ versionToken: S.String, status: S.String })).annotate({
    identifier: "PutTableReplicationResponse",
});
export const OpenTableFormat = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const SchemaField = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.optional(S.Number),
    name: S.String,
    type: S.String,
    required: S.optional(S.Boolean),
})).annotate({ identifier: "SchemaField" });
export const SchemaFieldList = /*@__PURE__*/ /*#__PURE__*/ S.Array(SchemaField);
export const IcebergSchema = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ fields: SchemaFieldList })).annotate({ identifier: "IcebergSchema" });
export const SchemaV2FieldType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const SchemaV2Field = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.Number,
    name: S.String,
    type: S.Any,
    required: S.Boolean,
    doc: S.optional(S.String),
})).annotate({ identifier: "SchemaV2Field" });
export const SchemaV2FieldList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(SchemaV2Field);
export const IntegerList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.Number);
export const IcebergSchemaV2 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    type: SchemaV2FieldType,
    fields: SchemaV2FieldList,
    schemaId: S.optional(S.Number),
    identifierFieldIds: S.optional(IntegerList),
}).pipe(S.encodeKeys({
    schemaId: "schema-id",
    identifierFieldIds: "identifier-field-ids",
}))).annotate({
    identifier: "IcebergSchemaV2",
});
export const IcebergPartitionField = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    sourceId: S.Number,
    transform: S.String,
    name: S.String,
    fieldId: S.optional(S.Number),
}).pipe(S.encodeKeys({ sourceId: "source-id", fieldId: "field-id" }))).annotate({
    identifier: "IcebergPartitionField",
});
export const IcebergPartitionFieldList = /*@__PURE__*/ /*#__PURE__*/ S.Array(IcebergPartitionField);
export const IcebergPartitionSpec = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    fields: IcebergPartitionFieldList,
    specId: S.optional(S.Number),
}).pipe(S.encodeKeys({ specId: "spec-id" }))).annotate({
    identifier: "IcebergPartitionSpec",
});
export const IcebergSortDirection = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const IcebergNullOrder = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const IcebergSortField = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    sourceId: S.Number,
    transform: S.String,
    direction: IcebergSortDirection,
    nullOrder: IcebergNullOrder,
}).pipe(S.encodeKeys({ sourceId: "source-id", nullOrder: "null-order" }))).annotate({
    identifier: "IcebergSortField",
});
export const IcebergSortFieldList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(IcebergSortField);
export const IcebergSortOrder = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ orderId: S.Number, fields: IcebergSortFieldList }).pipe(S.encodeKeys({ orderId: "order-id" }))).annotate({
    identifier: "IcebergSortOrder",
});
export const TableProperties = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const IcebergMetadata = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    schema: S.optional(IcebergSchema),
    schemaV2: S.optional(IcebergSchemaV2),
    partitionSpec: S.optional(IcebergPartitionSpec),
    writeOrder: S.optional(IcebergSortOrder),
    properties: S.optional(TableProperties),
})).annotate({
    identifier: "IcebergMetadata",
});
export const TableMetadata = /*@__PURE__*/ /*#__PURE__*/ S.Union([
    S.Struct({ iceberg: IcebergMetadata }),
]);
export const CreateTableRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.String.pipe(T.HttpLabel("namespace")),
    name: S.String,
    format: OpenTableFormat,
    metadata: S.optional(TableMetadata),
    encryptionConfiguration: S.optional(EncryptionConfiguration),
    storageClassConfiguration: S.optional(StorageClassConfiguration),
    tags: S.optional(Tags),
}).pipe(T.all(T.Http({ method: "PUT", uri: "/tables/{tableBucketARN}/{namespace}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateTableRequest",
});
export const CreateTableResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ tableARN: S.String, versionToken: S.String })).annotate({
    identifier: "CreateTableResponse",
});
export const DeleteTableRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.String.pipe(T.HttpLabel("namespace")),
    name: S.String.pipe(T.HttpLabel("name")),
    versionToken: S.optional(S.String).pipe(T.HttpQuery("versionToken")),
}).pipe(T.all(T.Http({
    method: "DELETE",
    uri: "/tables/{tableBucketARN}/{namespace}/{name}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteTableRequest",
});
export const DeleteTableResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteTableResponse",
});
export const GetTableRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.optional(S.String).pipe(T.HttpQuery("tableBucketARN")),
    namespace: S.optional(S.String).pipe(T.HttpQuery("namespace")),
    name: S.optional(S.String).pipe(T.HttpQuery("name")),
    tableArn: S.optional(S.String).pipe(T.HttpQuery("tableArn")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/get-table" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableRequest",
});
export const TableType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ReplicationInformation = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ sourceTableARN: S.String })).annotate({
    identifier: "ReplicationInformation",
});
export const ManagedTableInformation = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ replicationInformation: S.optional(ReplicationInformation) })).annotate({
    identifier: "ManagedTableInformation",
});
export const GetTableResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: S.String,
    type: TableType,
    tableARN: S.String,
    namespace: NamespaceList,
    namespaceId: S.optional(S.String),
    versionToken: S.String,
    metadataLocation: S.optional(S.String),
    warehouseLocation: S.String,
    createdAt: T.DateFromString.pipe(T.TimestampFormat("date-time")),
    createdBy: S.String,
    managedByService: S.optional(S.String),
    modifiedAt: T.DateFromString.pipe(T.TimestampFormat("date-time")),
    modifiedBy: S.String,
    ownerAccountId: S.String,
    format: OpenTableFormat,
    tableBucketId: S.optional(S.String),
    managedTableInformation: S.optional(ManagedTableInformation),
})).annotate({
    identifier: "GetTableResponse",
});
export const GetTableMaintenanceConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.String.pipe(T.HttpLabel("namespace")),
    name: S.String.pipe(T.HttpLabel("name")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/tables/{tableBucketARN}/{namespace}/{name}/maintenance",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableMaintenanceConfigurationRequest",
});
export const TableMaintenanceType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const IcebergCompactionStrategy = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const IcebergCompactionSettings = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    targetFileSizeMB: S.optional(S.Number),
    strategy: S.optional(IcebergCompactionStrategy),
})).annotate({
    identifier: "IcebergCompactionSettings",
});
export const IcebergSnapshotManagementSettings = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    minSnapshotsToKeep: S.optional(S.Number),
    maxSnapshotAgeHours: S.optional(S.Number),
})).annotate({
    identifier: "IcebergSnapshotManagementSettings",
});
export const TableMaintenanceSettings = /*@__PURE__*/ /*#__PURE__*/ S.Union([
    S.Struct({ icebergCompaction: IcebergCompactionSettings }),
    S.Struct({ icebergSnapshotManagement: IcebergSnapshotManagementSettings }),
]);
export const TableMaintenanceConfigurationValue = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    status: S.optional(MaintenanceStatus),
    settings: S.optional(TableMaintenanceSettings),
})).annotate({
    identifier: "TableMaintenanceConfigurationValue",
});
export const TableMaintenanceConfiguration = 
/*@__PURE__*/ /*#__PURE__*/ S.Record(TableMaintenanceType, TableMaintenanceConfigurationValue.pipe(S.optional));
export const GetTableMaintenanceConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableARN: S.String,
    configuration: TableMaintenanceConfiguration,
})).annotate({
    identifier: "GetTableMaintenanceConfigurationResponse",
});
export const GetTableMaintenanceJobStatusRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.String.pipe(T.HttpLabel("namespace")),
    name: S.String.pipe(T.HttpLabel("name")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/tables/{tableBucketARN}/{namespace}/{name}/maintenance-job-status",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableMaintenanceJobStatusRequest",
});
export const TableMaintenanceJobType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const JobStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const TableMaintenanceJobStatusValue = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    status: JobStatus,
    lastRunTimestamp: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    failureMessage: S.optional(S.String),
})).annotate({
    identifier: "TableMaintenanceJobStatusValue",
});
export const TableMaintenanceJobStatus = /*@__PURE__*/ /*#__PURE__*/ S.Record(TableMaintenanceJobType, TableMaintenanceJobStatusValue.pipe(S.optional));
export const GetTableMaintenanceJobStatusResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ tableARN: S.String, status: TableMaintenanceJobStatus })).annotate({
    identifier: "GetTableMaintenanceJobStatusResponse",
});
export const GetTableMetadataLocationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.String.pipe(T.HttpLabel("namespace")),
    name: S.String.pipe(T.HttpLabel("name")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/tables/{tableBucketARN}/{namespace}/{name}/metadata-location",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableMetadataLocationRequest",
});
export const GetTableMetadataLocationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    versionToken: S.String,
    metadataLocation: S.optional(S.String),
    warehouseLocation: S.String,
})).annotate({
    identifier: "GetTableMetadataLocationResponse",
});
export const GetTableRecordExpirationConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ tableArn: S.String.pipe(T.HttpQuery("tableArn")) }).pipe(T.all(T.Http({ method: "GET", uri: "/table-record-expiration" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableRecordExpirationConfigurationRequest",
});
export const TableRecordExpirationStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const TableRecordExpirationSettings = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ days: S.optional(S.Number) })).annotate({
    identifier: "TableRecordExpirationSettings",
});
export const TableRecordExpirationConfigurationValue = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    status: S.optional(TableRecordExpirationStatus),
    settings: S.optional(TableRecordExpirationSettings),
})).annotate({
    identifier: "TableRecordExpirationConfigurationValue",
});
export const GetTableRecordExpirationConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ configuration: TableRecordExpirationConfigurationValue })).annotate({
    identifier: "GetTableRecordExpirationConfigurationResponse",
});
export const GetTableRecordExpirationJobStatusRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ tableArn: S.String.pipe(T.HttpQuery("tableArn")) }).pipe(T.all(T.Http({ method: "GET", uri: "/table-record-expiration-job-status" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableRecordExpirationJobStatusRequest",
});
export const TableRecordExpirationJobStatus = 
/*@__PURE__*/ /*#__PURE__*/ S.String;
export const TableRecordExpirationJobMetrics = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    deletedDataFiles: S.optional(S.Number),
    deletedRecords: S.optional(S.Number),
    removedFilesSize: S.optional(S.Number),
})).annotate({
    identifier: "TableRecordExpirationJobMetrics",
});
export const GetTableRecordExpirationJobStatusResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    status: TableRecordExpirationJobStatus,
    lastRunTimestamp: S.optional(T.DateFromString.pipe(T.TimestampFormat("date-time"))),
    failureMessage: S.optional(S.String),
    metrics: S.optional(TableRecordExpirationJobMetrics),
})).annotate({
    identifier: "GetTableRecordExpirationJobStatusResponse",
});
export const GetTableStorageClassRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.String.pipe(T.HttpLabel("namespace")),
    name: S.String.pipe(T.HttpLabel("name")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/tables/{tableBucketARN}/{namespace}/{name}/storage-class",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTableStorageClassRequest",
});
export const GetTableStorageClassResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ storageClassConfiguration: StorageClassConfiguration })).annotate({
    identifier: "GetTableStorageClassResponse",
});
export const ListTablesRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.optional(S.String).pipe(T.HttpQuery("namespace")),
    prefix: S.optional(S.String).pipe(T.HttpQuery("prefix")),
    continuationToken: S.optional(S.String).pipe(T.HttpQuery("continuationToken")),
    maxTables: S.optional(S.Number).pipe(T.HttpQuery("maxTables")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/tables/{tableBucketARN}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListTablesRequest",
});
export const TableSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    namespace: NamespaceList,
    name: S.String,
    type: TableType,
    tableARN: S.String,
    createdAt: T.DateFromString.pipe(T.TimestampFormat("date-time")),
    modifiedAt: T.DateFromString.pipe(T.TimestampFormat("date-time")),
    managedByService: S.optional(S.String),
    namespaceId: S.optional(S.String),
    tableBucketId: S.optional(S.String),
})).annotate({ identifier: "TableSummary" });
export const TableSummaryList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(TableSummary);
export const ListTablesResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tables: TableSummaryList,
    continuationToken: S.optional(S.String),
})).annotate({
    identifier: "ListTablesResponse",
});
export const PutTableMaintenanceConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.String.pipe(T.HttpLabel("namespace")),
    name: S.String.pipe(T.HttpLabel("name")),
    type: TableMaintenanceType.pipe(T.HttpLabel("type")),
    value: TableMaintenanceConfigurationValue,
}).pipe(T.all(T.Http({
    method: "PUT",
    uri: "/tables/{tableBucketARN}/{namespace}/{name}/maintenance/{type}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutTableMaintenanceConfigurationRequest",
});
export const PutTableMaintenanceConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "PutTableMaintenanceConfigurationResponse",
});
export const PutTableRecordExpirationConfigurationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableArn: S.String.pipe(T.HttpQuery("tableArn")),
    value: TableRecordExpirationConfigurationValue,
}).pipe(T.all(T.Http({ method: "PUT", uri: "/table-record-expiration" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutTableRecordExpirationConfigurationRequest",
});
export const PutTableRecordExpirationConfigurationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "PutTableRecordExpirationConfigurationResponse",
});
export const RenameTableRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.String.pipe(T.HttpLabel("namespace")),
    name: S.String.pipe(T.HttpLabel("name")),
    newNamespaceName: S.optional(S.String),
    newName: S.optional(S.String),
    versionToken: S.optional(S.String),
}).pipe(T.all(T.Http({
    method: "PUT",
    uri: "/tables/{tableBucketARN}/{namespace}/{name}/rename",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "RenameTableRequest",
});
export const RenameTableResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "RenameTableResponse",
});
export const UpdateTableMetadataLocationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    tableBucketARN: S.String.pipe(T.HttpLabel("tableBucketARN")),
    namespace: S.String.pipe(T.HttpLabel("namespace")),
    name: S.String.pipe(T.HttpLabel("name")),
    versionToken: S.String,
    metadataLocation: S.String,
}).pipe(T.all(T.Http({
    method: "PUT",
    uri: "/tables/{tableBucketARN}/{namespace}/{name}/metadata-location",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateTableMetadataLocationRequest",
});
export const UpdateTableMetadataLocationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: S.String,
    tableARN: S.String,
    namespace: NamespaceList,
    versionToken: S.String,
    metadataLocation: S.String,
})).annotate({
    identifier: "UpdateTableMetadataLocationResponse",
});
//# Errors
export class BadRequestException extends S.TaggedErrorClass()("BadRequestException", { message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ConflictException extends S.TaggedErrorClass()("ConflictException", { message: S.optional(S.String) }).pipe(C.withConflictError) {
}
export class ForbiddenException extends S.TaggedErrorClass()("ForbiddenException", { message: S.optional(S.String) }).pipe(C.withAuthError) {
}
export class InternalServerErrorException extends S.TaggedErrorClass()("InternalServerErrorException", { message: S.optional(S.String) }).pipe(C.withServerError) {
}
export class NotFoundException extends S.TaggedErrorClass()("NotFoundException", { message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class TooManyRequestsException extends S.TaggedErrorClass()("TooManyRequestsException", { message: S.optional(S.String) }).pipe(C.withThrottlingError) {
}
export class AccessDeniedException extends S.TaggedErrorClass()("AccessDeniedException", { message: S.optional(S.String) }).pipe(C.withAuthError) {
}
export class MethodNotAllowedException extends S.TaggedErrorClass()("MethodNotAllowedException", { message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
/**
 * Lists all of the tags applied to a specified Amazon S3 Tables resource. Each tag is a label consisting of a key and value pair. Tags can help you organize, track costs for, and control access to resources.
 *
 * For a list of S3 resources that support tagging, see Managing tags for Amazon S3 resources.
 *
 * ### Permissions
 *
 * For tables and table buckets, you must have the `s3tables:ListTagsForResource` permission to use this operation.
 */
export const listTagsForResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListTagsForResourceRequest,
    output: ListTagsForResourceResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Applies one or more user-defined tags to an Amazon S3 Tables resource or updates existing tags. Each tag is a label consisting of a key and value pair. Tags can help you organize, track costs for, and control access to your resources. You can add up to 50 tags for each S3 resource.
 *
 * For a list of S3 resources that support tagging, see Managing tags for Amazon S3 resources.
 *
 * ### Permissions
 *
 * For tables and table buckets, you must have the `s3tables:TagResource` permission to use this operation.
 */
export const tagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TagResourceRequest,
    output: TagResourceResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Removes the specified user-defined tags from an Amazon S3 Tables resource. You can pass one or more tag keys.
 *
 * For a list of S3 resources that support tagging, see Managing tags for Amazon S3 resources.
 *
 * ### Permissions
 *
 * For tables and table buckets, you must have the `s3tables:UntagResource` permission to use this operation.
 */
export const untagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UntagResourceRequest,
    output: UntagResourceResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Creates a namespace. A namespace is a logical grouping of tables within your table bucket, which you can use to organize tables. For more information, see Create a namespace in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:CreateNamespace` permission to use this operation.
 */
export const createNamespace = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateNamespaceRequest,
    output: CreateNamespaceResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Deletes a namespace. For more information, see Delete a namespace in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:DeleteNamespace` permission to use this operation.
 */
export const deleteNamespace = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteNamespaceRequest,
    output: DeleteNamespaceResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Gets details about a namespace. For more information, see Table namespaces in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetNamespace` permission to use this operation.
 */
export const getNamespace = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetNamespaceRequest,
    output: GetNamespaceResponse,
    errors: [
        AccessDeniedException,
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Lists the namespaces within a table bucket. For more information, see Table namespaces in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:ListNamespaces` permission to use this operation.
 */
export const listNamespaces = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListNamespacesRequest,
    output: ListNamespacesResponse,
    errors: [
        AccessDeniedException,
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
    pagination: {
        inputToken: "continuationToken",
        outputToken: "continuationToken",
        items: "namespaces",
        pageSize: "maxNamespaces",
    },
}));
/**
 * Deletes the encryption configuration for a table bucket.
 *
 * ### Permissions
 *
 * You must have the `s3tables:DeleteTableBucketEncryption` permission to use this operation.
 */
export const deleteTableBucketEncryption = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteTableBucketEncryptionRequest,
    output: DeleteTableBucketEncryptionResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Gets the encryption configuration for a table bucket.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTableBucketEncryption` permission to use this operation.
 */
export const getTableBucketEncryption = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableBucketEncryptionRequest,
    output: GetTableBucketEncryptionResponse,
    errors: [
        AccessDeniedException,
        BadRequestException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Sets the encryption configuration for a table bucket.
 *
 * ### Permissions
 *
 * You must have the `s3tables:PutTableBucketEncryption` permission to use this operation.
 *
 * If you choose SSE-KMS encryption you must grant the S3 Tables maintenance principal access to your KMS key. For more information, see Permissions requirements for S3 Tables SSE-KMS encryption in the *Amazon Simple Storage Service User Guide*.
 */
export const putTableBucketEncryption = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutTableBucketEncryptionRequest,
    output: PutTableBucketEncryptionResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Deletes a table bucket policy. For more information, see Deleting a table bucket policy in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:DeleteTableBucketPolicy` permission to use this operation.
 */
export const deleteTableBucketPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteTableBucketPolicyRequest,
    output: DeleteTableBucketPolicyResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Gets details about a table bucket policy. For more information, see Viewing a table bucket policy in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTableBucketPolicy` permission to use this operation.
 */
export const getTableBucketPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableBucketPolicyRequest,
    output: GetTableBucketPolicyResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Creates a new table bucket policy or replaces an existing table bucket policy for a table bucket. For more information, see Adding a table bucket policy in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:PutTableBucketPolicy` permission to use this operation.
 */
export const putTableBucketPolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutTableBucketPolicyRequest,
    output: PutTableBucketPolicyResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Deletes the replication configuration for a table bucket. After deletion, new table updates will no longer be replicated to destination buckets, though existing replicated tables will remain in destination buckets.
 *
 * ### Permissions
 *
 * You must have the `s3tables:DeleteTableBucketReplication` permission to use this operation.
 */
export const deleteTableBucketReplication = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteTableBucketReplicationRequest,
    output: DeleteTableBucketReplicationResponse,
    errors: [
        AccessDeniedException,
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Retrieves the replication configuration for a table bucket.This operation returns the IAM role, `versionToken`, and replication rules that define how tables in this bucket are replicated to other buckets.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTableBucketReplication` permission to use this operation.
 */
export const getTableBucketReplication = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableBucketReplicationRequest,
    output: GetTableBucketReplicationResponse,
    errors: [
        AccessDeniedException,
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Creates or updates the replication configuration for a table bucket. This operation defines how tables in the source bucket are replicated to destination buckets. Replication helps ensure data availability and disaster recovery across regions or accounts.
 *
 * ### Permissions
 *
 * - You must have the `s3tables:PutTableBucketReplication` permission to use this operation. The IAM role specified in the configuration must have permissions to read from the source bucket and write permissions to all destination buckets.
 *
 * - You must also have the following permissions:
 *
 * - `s3tables:GetTable` permission on the source table.
 *
 * - `s3tables:ListTables` permission on the bucket containing the table.
 *
 * - `s3tables:CreateTable` permission for the destination.
 *
 * - `s3tables:CreateNamespace` permission for the destination.
 *
 * - `s3tables:GetTableMaintenanceConfig` permission for the source bucket.
 *
 * - `s3tables:PutTableMaintenanceConfig` permission for the destination bucket.
 *
 * - You must have `iam:PassRole` permission with condition allowing roles to be passed to `replication.s3tables.amazonaws.com`.
 */
export const putTableBucketReplication = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutTableBucketReplicationRequest,
    output: PutTableBucketReplicationResponse,
    errors: [
        AccessDeniedException,
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Creates a table bucket. For more information, see Creating a table bucket in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * - You must have the `s3tables:CreateTableBucket` permission to use this operation.
 *
 * - If you use this operation with the optional `encryptionConfiguration` parameter you must have the `s3tables:PutTableBucketEncryption` permission.
 *
 * - If you use this operation with the `storageClassConfiguration` request parameter, you must have the `s3tables:PutTableBucketStorageClass` permission.
 *
 * - To create a table bucket with tags, you must have the `s3tables:TagResource` permission in addition to `s3tables:CreateTableBucket` permission.
 */
export const createTableBucket = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateTableBucketRequest,
    output: CreateTableBucketResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Deletes a table bucket. For more information, see Deleting a table bucket in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:DeleteTableBucket` permission to use this operation.
 */
export const deleteTableBucket = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteTableBucketRequest,
    output: DeleteTableBucketResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Deletes the metrics configuration for a table bucket.
 *
 * ### Permissions
 *
 * You must have the `s3tables:DeleteTableBucketMetricsConfiguration` permission to use this operation.
 */
export const deleteTableBucketMetricsConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteTableBucketMetricsConfigurationRequest,
    output: DeleteTableBucketMetricsConfigurationResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Gets details on a table bucket. For more information, see Viewing details about an Amazon S3 table bucket in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTableBucket` permission to use this operation.
 */
export const getTableBucket = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableBucketRequest,
    output: GetTableBucketResponse,
    errors: [
        AccessDeniedException,
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Gets details about a maintenance configuration for a given table bucket. For more information, see Amazon S3 table bucket maintenance in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTableBucketMaintenanceConfiguration` permission to use this operation.
 */
export const getTableBucketMaintenanceConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableBucketMaintenanceConfigurationRequest,
    output: GetTableBucketMaintenanceConfigurationResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Gets the metrics configuration for a table bucket.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTableBucketMetricsConfiguration` permission to use this operation.
 */
export const getTableBucketMetricsConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableBucketMetricsConfigurationRequest,
    output: GetTableBucketMetricsConfigurationResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Retrieves the storage class configuration for a specific table. This allows you to view the storage class settings that apply to an individual table, which may differ from the table bucket's default configuration.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTableBucketStorageClass` permission to use this operation.
 */
export const getTableBucketStorageClass = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableBucketStorageClassRequest,
    output: GetTableBucketStorageClassResponse,
    errors: [
        AccessDeniedException,
        BadRequestException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Lists table buckets for your account. For more information, see S3 Table buckets in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:ListTableBuckets` permission to use this operation.
 */
export const listTableBuckets = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListTableBucketsRequest,
    output: ListTableBucketsResponse,
    errors: [
        AccessDeniedException,
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
    pagination: {
        inputToken: "continuationToken",
        outputToken: "continuationToken",
        items: "tableBuckets",
        pageSize: "maxBuckets",
    },
}));
/**
 * Creates a new maintenance configuration or replaces an existing maintenance configuration for a table bucket. For more information, see Amazon S3 table bucket maintenance in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:PutTableBucketMaintenanceConfiguration` permission to use this operation.
 */
export const putTableBucketMaintenanceConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutTableBucketMaintenanceConfigurationRequest,
    output: PutTableBucketMaintenanceConfigurationResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Sets the metrics configuration for a table bucket.
 *
 * ### Permissions
 *
 * You must have the `s3tables:PutTableBucketMetricsConfiguration` permission to use this operation.
 */
export const putTableBucketMetricsConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutTableBucketMetricsConfigurationRequest,
    output: PutTableBucketMetricsConfigurationResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Sets or updates the storage class configuration for a table bucket. This configuration serves as the default storage class for all new tables created in the bucket, allowing you to optimize storage costs at the bucket level.
 *
 * ### Permissions
 *
 * You must have the `s3tables:PutTableBucketStorageClass` permission to use this operation.
 */
export const putTableBucketStorageClass = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutTableBucketStorageClassRequest,
    output: PutTableBucketStorageClassResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Gets the encryption configuration for a table.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTableEncryption` permission to use this operation.
 */
export const getTableEncryption = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableEncryptionRequest,
    output: GetTableEncryptionResponse,
    errors: [
        AccessDeniedException,
        BadRequestException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Deletes a table policy. For more information, see Deleting a table policy in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:DeleteTablePolicy` permission to use this operation.
 */
export const deleteTablePolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteTablePolicyRequest,
    output: DeleteTablePolicyResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Gets details about a table policy. For more information, see Viewing a table policy in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTablePolicy` permission to use this operation.
 */
export const getTablePolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTablePolicyRequest,
    output: GetTablePolicyResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Creates a new table policy or replaces an existing table policy for a table. For more information, see Adding a table policy in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:PutTablePolicy` permission to use this operation.
 */
export const putTablePolicy = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutTablePolicyRequest,
    output: PutTablePolicyResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Deletes the replication configuration for a specific table. After deletion, new updates to this table will no longer be replicated to destination tables, though existing replicated copies will remain in destination buckets.
 *
 * ### Permissions
 *
 * You must have the `s3tables:DeleteTableReplication` permission to use this operation.
 */
export const deleteTableReplication = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteTableReplicationRequest,
    output: DeleteTableReplicationResponse,
    errors: [
        AccessDeniedException,
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Retrieves the replication configuration for a specific table.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTableReplication` permission to use this operation.
 */
export const getTableReplication = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableReplicationRequest,
    output: GetTableReplicationResponse,
    errors: [
        AccessDeniedException,
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Retrieves the replication status for a table, including the status of replication to each destination. This operation provides visibility into replication health and progress.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTableReplicationStatus` permission to use this operation.
 */
export const getTableReplicationStatus = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableReplicationStatusRequest,
    output: GetTableReplicationStatusResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Creates or updates the replication configuration for a specific table. This operation allows you to define table-level replication independently of bucket-level replication, providing granular control over which tables are replicated and where.
 *
 * ### Permissions
 *
 * - You must have the `s3tables:PutTableReplication` permission to use this operation. The IAM role specified in the configuration must have permissions to read from the source table and write to all destination tables.
 *
 * - You must also have the following permissions:
 *
 * - `s3tables:GetTable` permission on the source table being replicated.
 *
 * - `s3tables:CreateTable` permission for the destination.
 *
 * - `s3tables:CreateNamespace` permission for the destination.
 *
 * - `s3tables:GetTableMaintenanceConfig` permission for the source table.
 *
 * - `s3tables:PutTableMaintenanceConfig` permission for the destination table.
 *
 * - You must have `iam:PassRole` permission with condition allowing roles to be passed to `replication.s3tables.amazonaws.com`.
 */
export const putTableReplication = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutTableReplicationRequest,
    output: PutTableReplicationResponse,
    errors: [
        AccessDeniedException,
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Creates a new table associated with the given namespace in a table bucket. For more information, see Creating an Amazon S3 table in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * - You must have the `s3tables:CreateTable` permission to use this operation.
 *
 * - If you use this operation with the optional `metadata` request parameter you must have the `s3tables:PutTableData` permission.
 *
 * - If you use this operation with the optional `encryptionConfiguration` request parameter you must have the `s3tables:PutTableEncryption` permission.
 *
 * - If you use this operation with the `storageClassConfiguration` request parameter, you must have the `s3tables:PutTableStorageClass` permission.
 *
 * - To create a table with tags, you must have the `s3tables:TagResource` permission in addition to `s3tables:CreateTable` permission.
 *
 * Additionally, If you choose SSE-KMS encryption you must grant the S3 Tables maintenance principal access to your KMS key. For more information, see Permissions requirements for S3 Tables SSE-KMS encryption.
 */
export const createTable = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateTableRequest,
    output: CreateTableResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Deletes a table. For more information, see Deleting an Amazon S3 table in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:DeleteTable` permission to use this operation.
 */
export const deleteTable = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteTableRequest,
    output: DeleteTableResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Gets details about a table. For more information, see S3 Tables in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTable` permission to use this operation.
 */
export const getTable = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableRequest,
    output: GetTableResponse,
    errors: [
        AccessDeniedException,
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Gets details about the maintenance configuration of a table. For more information, see S3 Tables maintenance in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * - You must have the `s3tables:GetTableMaintenanceConfiguration` permission to use this operation.
 *
 * - You must have the `s3tables:GetTableData` permission to use set the compaction strategy to `sort` or `zorder`.
 */
export const getTableMaintenanceConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableMaintenanceConfigurationRequest,
    output: GetTableMaintenanceConfigurationResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Gets the status of a maintenance job for a table. For more information, see S3 Tables maintenance in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTableMaintenanceJobStatus` permission to use this operation.
 */
export const getTableMaintenanceJobStatus = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableMaintenanceJobStatusRequest,
    output: GetTableMaintenanceJobStatusResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Gets the location of the table metadata.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTableMetadataLocation` permission to use this operation.
 */
export const getTableMetadataLocation = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableMetadataLocationRequest,
    output: GetTableMetadataLocationResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Retrieves the expiration configuration settings for records in a table, and the status of the configuration. If the status of the configuration is `enabled`, records expire and are automatically removed from the table after the specified number of days.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTableRecordExpirationConfiguration` permission to use this operation.
 */
export const getTableRecordExpirationConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableRecordExpirationConfigurationRequest,
    output: GetTableRecordExpirationConfigurationResponse,
    errors: [
        BadRequestException,
        ForbiddenException,
        InternalServerErrorException,
        MethodNotAllowedException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Retrieves the status, metrics, and details of the latest record expiration job for a table. This includes when the job ran, and whether it succeeded or failed. If the job ran successfully, this also includes statistics about the records that were removed.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTableRecordExpirationJobStatus` permission to use this operation.
 */
export const getTableRecordExpirationJobStatus = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableRecordExpirationJobStatusRequest,
    output: GetTableRecordExpirationJobStatusResponse,
    errors: [
        BadRequestException,
        ForbiddenException,
        InternalServerErrorException,
        MethodNotAllowedException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Retrieves the storage class configuration for a specific table. This allows you to view the storage class settings that apply to an individual table, which may differ from the table bucket's default configuration.
 *
 * ### Permissions
 *
 * You must have the `s3tables:GetTableStorageClass` permission to use this operation.
 */
export const getTableStorageClass = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTableStorageClassRequest,
    output: GetTableStorageClassResponse,
    errors: [
        AccessDeniedException,
        BadRequestException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * List tables in the given table bucket. For more information, see S3 Tables in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:ListTables` permission to use this operation.
 */
export const listTables = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListTablesRequest,
    output: ListTablesResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
    pagination: {
        inputToken: "continuationToken",
        outputToken: "continuationToken",
        items: "tables",
        pageSize: "maxTables",
    },
}));
/**
 * Creates a new maintenance configuration or replaces an existing maintenance configuration for a table. For more information, see S3 Tables maintenance in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:PutTableMaintenanceConfiguration` permission to use this operation.
 */
export const putTableMaintenanceConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutTableMaintenanceConfigurationRequest,
    output: PutTableMaintenanceConfigurationResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Creates or updates the expiration configuration settings for records in a table, including the status of the configuration. If you enable record expiration for a table, records expire and are automatically removed from the table after the number of days that you specify.
 *
 * ### Permissions
 *
 * You must have the `s3tables:PutTableRecordExpirationConfiguration` permission to use this operation.
 */
export const putTableRecordExpirationConfiguration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutTableRecordExpirationConfigurationRequest,
    output: PutTableRecordExpirationConfigurationResponse,
    errors: [
        BadRequestException,
        ForbiddenException,
        InternalServerErrorException,
        MethodNotAllowedException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Renames a table or a namespace. For more information, see S3 Tables in the *Amazon Simple Storage Service User Guide*.
 *
 * ### Permissions
 *
 * You must have the `s3tables:RenameTable` permission to use this operation.
 */
export const renameTable = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: RenameTableRequest,
    output: RenameTableResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
/**
 * Updates the metadata location for a table. The metadata location of a table must be an S3 URI that begins with the table's warehouse location. The metadata location for an Apache Iceberg table must end with `.metadata.json`, or if the metadata file is Gzip-compressed, `.metadata.json.gz`.
 *
 * ### Permissions
 *
 * You must have the `s3tables:UpdateTableMetadataLocation` permission to use this operation.
 */
export const updateTableMetadataLocation = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateTableMetadataLocationRequest,
    output: UpdateTableMetadataLocationResponse,
    errors: [
        BadRequestException,
        ConflictException,
        ForbiddenException,
        InternalServerErrorException,
        NotFoundException,
        TooManyRequestsException,
    ],
}));
//# sourceMappingURL=s3tables.js.map