import * as HttpClient from "effect/unstable/http/HttpClient";
import * as redacted from "effect/Redacted";
import * as S from "effect/Schema";
import * as stream from "effect/Stream";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import * as C from "../category.js";
import { SensitiveString } from "../sensitive.js";
const ns = T.XmlNamespace("http://directoryservicedata.amazonaws.com/doc/2023-05-31/");
const svc = T.AwsApiService({
    sdkId: "Directory Service Data",
    serviceShapeName: "DirectoryServiceData",
});
const auth = T.AwsAuthSigv4({ name: "ds-data" });
const ver = T.ServiceVersion("2023-05-31");
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://ds-data-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://ds-data-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://ds-data.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                return e(`https://ds-data.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const AddGroupMemberRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    GroupName: S.String,
    MemberName: S.String,
    MemberRealm: S.optional(S.String),
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/GroupMemberships/AddGroupMember" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "AddGroupMemberRequest",
});
export const AddGroupMemberResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "AddGroupMemberResult",
});
export const AccessDeniedReason = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const DirectoryUnavailableReason = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ValidationExceptionReason = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const GroupType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const GroupScope = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const StringSetAttributeValue = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(SensitiveString);
export const AttributeValue = /*@__PURE__*/ /*#__PURE__*/ S.Union([
    S.Struct({ S: SensitiveString }),
    S.Struct({ N: S.Number }),
    S.Struct({ BOOL: S.Boolean }),
    S.Struct({ SS: StringSetAttributeValue }),
]);
export const Attributes = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, AttributeValue.pipe(S.optional));
export const CreateGroupRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    SAMAccountName: S.String,
    GroupType: S.optional(GroupType),
    GroupScope: S.optional(GroupScope),
    OtherAttributes: S.optional(Attributes),
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/Groups/CreateGroup" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateGroupRequest",
});
export const CreateGroupResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.optional(S.String),
    SAMAccountName: S.optional(S.String),
    SID: S.optional(S.String),
}).pipe(ns)).annotate({
    identifier: "CreateGroupResult",
});
export const CreateUserRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    SAMAccountName: S.String,
    EmailAddress: S.optional(SensitiveString),
    GivenName: S.optional(SensitiveString),
    Surname: S.optional(SensitiveString),
    OtherAttributes: S.optional(Attributes),
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/Users/CreateUser" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateUserRequest",
});
export const CreateUserResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.optional(S.String),
    SID: S.optional(S.String),
    SAMAccountName: S.optional(S.String),
}).pipe(ns)).annotate({
    identifier: "CreateUserResult",
});
export const DeleteGroupRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    SAMAccountName: S.String,
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/Groups/DeleteGroup" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteGroupRequest",
});
export const DeleteGroupResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "DeleteGroupResult",
});
export const DeleteUserRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    SAMAccountName: S.String,
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/Users/DeleteUser" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteUserRequest",
});
export const DeleteUserResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "DeleteUserResult",
});
export const LdapDisplayNameList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const DescribeGroupRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    Realm: S.optional(S.String),
    SAMAccountName: S.String,
    OtherAttributes: S.optional(LdapDisplayNameList),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/Groups/DescribeGroup" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeGroupRequest",
});
export const DescribeGroupResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.optional(S.String),
    Realm: S.optional(S.String),
    SID: S.optional(S.String),
    SAMAccountName: S.optional(S.String),
    DistinguishedName: S.optional(SensitiveString),
    GroupType: S.optional(GroupType),
    GroupScope: S.optional(GroupScope),
    OtherAttributes: S.optional(Attributes),
}).pipe(ns)).annotate({
    identifier: "DescribeGroupResult",
});
export const DescribeUserRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    SAMAccountName: S.String,
    OtherAttributes: S.optional(LdapDisplayNameList),
    Realm: S.optional(S.String),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/Users/DescribeUser" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeUserRequest",
});
export const DescribeUserResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.optional(S.String),
    Realm: S.optional(S.String),
    SID: S.optional(S.String),
    SAMAccountName: S.optional(S.String),
    DistinguishedName: S.optional(SensitiveString),
    UserPrincipalName: S.optional(SensitiveString),
    EmailAddress: S.optional(SensitiveString),
    GivenName: S.optional(SensitiveString),
    Surname: S.optional(SensitiveString),
    Enabled: S.optional(S.Boolean),
    OtherAttributes: S.optional(Attributes),
}).pipe(ns)).annotate({
    identifier: "DescribeUserResult",
});
export const DisableUserRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    SAMAccountName: S.String,
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/Users/DisableUser" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DisableUserRequest",
});
export const DisableUserResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "DisableUserResult",
});
export const ListGroupMembersRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    Realm: S.optional(S.String),
    MemberRealm: S.optional(S.String),
    SAMAccountName: S.String,
    NextToken: S.optional(SensitiveString),
    MaxResults: S.optional(S.Number),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/GroupMemberships/ListGroupMembers" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListGroupMembersRequest",
});
export const MemberType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const Member = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ SID: S.String, SAMAccountName: S.String, MemberType: MemberType })).annotate({ identifier: "Member" });
export const MemberList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Member);
export const ListGroupMembersResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.optional(S.String),
    Realm: S.optional(S.String),
    MemberRealm: S.optional(S.String),
    Members: S.optional(MemberList),
    NextToken: S.optional(SensitiveString),
}).pipe(ns)).annotate({
    identifier: "ListGroupMembersResult",
});
export const ListGroupsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    Realm: S.optional(S.String),
    NextToken: S.optional(SensitiveString),
    MaxResults: S.optional(S.Number),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/Groups/ListGroups" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListGroupsRequest",
});
export const GroupSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    SID: S.String,
    SAMAccountName: S.String,
    GroupType: GroupType,
    GroupScope: GroupScope,
})).annotate({ identifier: "GroupSummary" });
export const GroupSummaryList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(GroupSummary);
export const ListGroupsResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.optional(S.String),
    Realm: S.optional(S.String),
    Groups: S.optional(GroupSummaryList),
    NextToken: S.optional(SensitiveString),
}).pipe(ns)).annotate({
    identifier: "ListGroupsResult",
});
export const ListGroupsForMemberRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    Realm: S.optional(S.String),
    MemberRealm: S.optional(S.String),
    SAMAccountName: S.String,
    NextToken: S.optional(SensitiveString),
    MaxResults: S.optional(S.Number),
}).pipe(T.all(ns, T.Http({
    method: "POST",
    uri: "/GroupMemberships/ListGroupsForMember",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListGroupsForMemberRequest",
});
export const ListGroupsForMemberResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.optional(S.String),
    Realm: S.optional(S.String),
    MemberRealm: S.optional(S.String),
    Groups: S.optional(GroupSummaryList),
    NextToken: S.optional(SensitiveString),
}).pipe(ns)).annotate({
    identifier: "ListGroupsForMemberResult",
});
export const ListUsersRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    Realm: S.optional(S.String),
    NextToken: S.optional(SensitiveString),
    MaxResults: S.optional(S.Number),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/Users/ListUsers" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListUsersRequest",
});
export const UserSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    SID: S.String,
    SAMAccountName: S.String,
    GivenName: S.optional(SensitiveString),
    Surname: S.optional(SensitiveString),
    Enabled: S.Boolean,
})).annotate({ identifier: "UserSummary" });
export const UserSummaryList = /*@__PURE__*/ /*#__PURE__*/ S.Array(UserSummary);
export const ListUsersResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.optional(S.String),
    Realm: S.optional(S.String),
    Users: S.optional(UserSummaryList),
    NextToken: S.optional(SensitiveString),
}).pipe(ns)).annotate({
    identifier: "ListUsersResult",
});
export const RemoveGroupMemberRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    GroupName: S.String,
    MemberName: S.String,
    MemberRealm: S.optional(S.String),
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/GroupMemberships/RemoveGroupMember" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "RemoveGroupMemberRequest",
});
export const RemoveGroupMemberResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "RemoveGroupMemberResult",
});
export const SearchGroupsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    SearchString: SensitiveString,
    SearchAttributes: LdapDisplayNameList,
    Realm: S.optional(S.String),
    NextToken: S.optional(SensitiveString),
    MaxResults: S.optional(S.Number),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/Groups/SearchGroups" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "SearchGroupsRequest",
});
export const Group = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    SID: S.optional(S.String),
    SAMAccountName: S.String,
    DistinguishedName: S.optional(SensitiveString),
    GroupType: S.optional(GroupType),
    GroupScope: S.optional(GroupScope),
    OtherAttributes: S.optional(Attributes),
})).annotate({ identifier: "Group" });
export const GroupList = /*@__PURE__*/ /*#__PURE__*/ S.Array(Group);
export const SearchGroupsResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.optional(S.String),
    Realm: S.optional(S.String),
    Groups: S.optional(GroupList),
    NextToken: S.optional(SensitiveString),
}).pipe(ns)).annotate({
    identifier: "SearchGroupsResult",
});
export const SearchUsersRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    Realm: S.optional(S.String),
    SearchString: SensitiveString,
    SearchAttributes: LdapDisplayNameList,
    NextToken: S.optional(SensitiveString),
    MaxResults: S.optional(S.Number),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/Users/SearchUsers" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "SearchUsersRequest",
});
export const User = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    SID: S.optional(S.String),
    SAMAccountName: S.String,
    DistinguishedName: S.optional(SensitiveString),
    UserPrincipalName: S.optional(SensitiveString),
    EmailAddress: S.optional(SensitiveString),
    GivenName: S.optional(SensitiveString),
    Surname: S.optional(SensitiveString),
    Enabled: S.optional(S.Boolean),
    OtherAttributes: S.optional(Attributes),
})).annotate({ identifier: "User" });
export const UserList = /*@__PURE__*/ /*#__PURE__*/ S.Array(User);
export const SearchUsersResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.optional(S.String),
    Realm: S.optional(S.String),
    Users: S.optional(UserList),
    NextToken: S.optional(SensitiveString),
}).pipe(ns)).annotate({
    identifier: "SearchUsersResult",
});
export const UpdateType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const UpdateGroupRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    SAMAccountName: S.String,
    GroupType: S.optional(GroupType),
    GroupScope: S.optional(GroupScope),
    OtherAttributes: S.optional(Attributes),
    UpdateType: S.optional(UpdateType),
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/Groups/UpdateGroup" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateGroupRequest",
});
export const UpdateGroupResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "UpdateGroupResult",
});
export const UpdateUserRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String.pipe(T.HttpQuery("DirectoryId")),
    SAMAccountName: S.String,
    EmailAddress: S.optional(SensitiveString),
    GivenName: S.optional(SensitiveString),
    Surname: S.optional(SensitiveString),
    OtherAttributes: S.optional(Attributes),
    UpdateType: S.optional(UpdateType),
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
}).pipe(T.all(ns, T.Http({ method: "POST", uri: "/Users/UpdateUser" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateUserRequest",
});
export const UpdateUserResult = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({}).pipe(ns)).annotate({
    identifier: "UpdateUserResult",
});
//# Errors
export class AccessDeniedException extends S.TaggedErrorClass()("AccessDeniedException", { Message: S.optional(S.String), Reason: S.optional(AccessDeniedReason) }).pipe(C.withAuthError) {
}
export class ConflictException extends S.TaggedErrorClass()("ConflictException", { Message: S.optional(S.String) }).pipe(C.withConflictError) {
}
export class DirectoryUnavailableException extends S.TaggedErrorClass()("DirectoryUnavailableException", {
    Message: S.optional(S.String),
    Reason: S.optional(DirectoryUnavailableReason),
}, T.Retryable()).pipe(C.withBadRequestError, C.withRetryableError) {
}
export class InternalServerException extends S.TaggedErrorClass()("InternalServerException", { Message: S.optional(S.String) }, T.Retryable()).pipe(C.withServerError, C.withRetryableError) {
}
export class ResourceNotFoundException extends S.TaggedErrorClass()("ResourceNotFoundException", { Message: S.optional(S.String) }).pipe(C.withBadRequestError) {
}
export class ThrottlingException extends S.TaggedErrorClass()("ThrottlingException", {
    Message: S.String,
    RetryAfterSeconds: S.optional(S.Number).pipe(T.HttpHeader("Retry-After")),
}, T.Retryable({ throttling: true })).pipe(C.withThrottlingError, C.withRetryableError) {
}
export class ValidationException extends S.TaggedErrorClass()("ValidationException", {
    Message: S.optional(S.String),
    Reason: S.optional(ValidationExceptionReason),
}).pipe(C.withBadRequestError) {
}
/**
 * Adds an existing user, group, or computer as a group member.
 */
export const addGroupMember = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: AddGroupMemberRequest,
    output: AddGroupMemberResult,
    errors: [
        AccessDeniedException,
        ConflictException,
        DirectoryUnavailableException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Creates a new group.
 */
export const createGroup = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateGroupRequest,
    output: CreateGroupResult,
    errors: [
        AccessDeniedException,
        ConflictException,
        DirectoryUnavailableException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Creates a new user.
 */
export const createUser = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateUserRequest,
    output: CreateUserResult,
    errors: [
        AccessDeniedException,
        ConflictException,
        DirectoryUnavailableException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Deletes a group.
 */
export const deleteGroup = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteGroupRequest,
    output: DeleteGroupResult,
    errors: [
        AccessDeniedException,
        ConflictException,
        DirectoryUnavailableException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Deletes a user.
 */
export const deleteUser = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteUserRequest,
    output: DeleteUserResult,
    errors: [
        AccessDeniedException,
        ConflictException,
        DirectoryUnavailableException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Returns information about a specific group.
 */
export const describeGroup = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribeGroupRequest,
    output: DescribeGroupResult,
    errors: [
        AccessDeniedException,
        DirectoryUnavailableException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Returns information about a specific user.
 */
export const describeUser = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribeUserRequest,
    output: DescribeUserResult,
    errors: [
        AccessDeniedException,
        DirectoryUnavailableException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Deactivates an active user account. For information about how to enable an inactive user
 * account, see ResetUserPassword
 * in the *Directory Service API Reference*.
 */
export const disableUser = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DisableUserRequest,
    output: DisableUserResult,
    errors: [
        AccessDeniedException,
        ConflictException,
        DirectoryUnavailableException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Returns member information for the specified group.
 *
 * This operation supports pagination with the use of the `NextToken` request and
 * response parameters. If more results are available, the
 * `ListGroupMembers.NextToken` member contains a token that you pass in the next
 * call to `ListGroupMembers`. This retrieves the next set of items.
 *
 * You can also specify a maximum number of return results with the `MaxResults`
 * parameter.
 */
export const listGroupMembers = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListGroupMembersRequest,
    output: ListGroupMembersResult,
    errors: [
        AccessDeniedException,
        DirectoryUnavailableException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Members",
        pageSize: "MaxResults",
    },
}));
/**
 * Returns group information for the specified directory.
 *
 * This operation supports pagination with the use of the `NextToken` request and
 * response parameters. If more results are available, the `ListGroups.NextToken`
 * member contains a token that you pass in the next call to `ListGroups`. This
 * retrieves the next set of items.
 *
 * You can also specify a maximum number of return results with the `MaxResults`
 * parameter.
 */
export const listGroups = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListGroupsRequest,
    output: ListGroupsResult,
    errors: [
        AccessDeniedException,
        DirectoryUnavailableException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Groups",
        pageSize: "MaxResults",
    },
}));
/**
 * Returns group information for the specified member.
 *
 * This operation supports pagination with the use of the `NextToken` request and
 * response parameters. If more results are available, the
 * `ListGroupsForMember.NextToken` member contains a token that you pass in the next
 * call to `ListGroupsForMember`. This retrieves the next set of items.
 *
 * You can also specify a maximum number of return results with the `MaxResults`
 * parameter.
 */
export const listGroupsForMember = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListGroupsForMemberRequest,
    output: ListGroupsForMemberResult,
    errors: [
        AccessDeniedException,
        DirectoryUnavailableException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Groups",
        pageSize: "MaxResults",
    },
}));
/**
 * Returns user information for the specified directory.
 *
 * This operation supports pagination with the use of the `NextToken` request and
 * response parameters. If more results are available, the `ListUsers.NextToken`
 * member contains a token that you pass in the next call to `ListUsers`. This
 * retrieves the next set of items.
 *
 * You can also specify a maximum number of return results with the `MaxResults`
 * parameter.
 */
export const listUsers = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListUsersRequest,
    output: ListUsersResult,
    errors: [
        AccessDeniedException,
        DirectoryUnavailableException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Users",
        pageSize: "MaxResults",
    },
}));
/**
 * Removes a member from a group.
 */
export const removeGroupMember = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: RemoveGroupMemberRequest,
    output: RemoveGroupMemberResult,
    errors: [
        AccessDeniedException,
        ConflictException,
        DirectoryUnavailableException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Searches the specified directory for a group. You can find groups that match the
 * `SearchString` parameter with the value of their attributes included in the
 * `SearchString` parameter.
 *
 * This operation supports pagination with the use of the `NextToken` request and
 * response parameters. If more results are available, the `SearchGroups.NextToken`
 * member contains a token that you pass in the next call to `SearchGroups`. This
 * retrieves the next set of items.
 *
 * You can also specify a maximum number of return results with the `MaxResults`
 * parameter.
 */
export const searchGroups = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: SearchGroupsRequest,
    output: SearchGroupsResult,
    errors: [
        AccessDeniedException,
        DirectoryUnavailableException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Groups",
        pageSize: "MaxResults",
    },
}));
/**
 * Searches the specified directory for a user. You can find users that match the
 * `SearchString` parameter with the value of their attributes included in the
 * `SearchString` parameter.
 *
 * This operation supports pagination with the use of the `NextToken` request and
 * response parameters. If more results are available, the `SearchUsers.NextToken`
 * member contains a token that you pass in the next call to `SearchUsers`. This
 * retrieves the next set of items.
 *
 * You can also specify a maximum number of return results with the `MaxResults`
 * parameter.
 */
export const searchUsers = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: SearchUsersRequest,
    output: SearchUsersResult,
    errors: [
        AccessDeniedException,
        DirectoryUnavailableException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Users",
        pageSize: "MaxResults",
    },
}));
/**
 * Updates group information.
 */
export const updateGroup = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateGroupRequest,
    output: UpdateGroupResult,
    errors: [
        AccessDeniedException,
        ConflictException,
        DirectoryUnavailableException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Updates user information.
 */
export const updateUser = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateUserRequest,
    output: UpdateUserResult,
    errors: [
        AccessDeniedException,
        ConflictException,
        DirectoryUnavailableException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
//# sourceMappingURL=directory-service-data.js.map