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: "Pca Connector Ad",
    serviceShapeName: "PcaConnectorAd",
});
const auth = T.AwsAuthSigv4({ name: "pca-connector-ad" });
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://pca-connector-ad-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://pca-connector-ad-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://pca-connector-ad.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                return e(`https://pca-connector-ad.${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: "/tags/{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 ValidationExceptionReason = /*@__PURE__*/ /*#__PURE__*/ S.String;
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: "/tags/{ResourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "TagResourceRequest",
});
export const TagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "TagResourceResponse",
});
export const TagKeyList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const UntagResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ResourceArn: S.String.pipe(T.HttpLabel("ResourceArn")),
    TagKeys: TagKeyList.pipe(T.HttpQuery("tagKeys")),
}).pipe(T.all(T.Http({ method: "DELETE", uri: "/tags/{ResourceArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UntagResourceRequest",
});
export const UntagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UntagResourceResponse",
});
export const IpAddressType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const SecurityGroupIdList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const VpcInformation = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    IpAddressType: S.optional(IpAddressType),
    SecurityGroupIds: SecurityGroupIdList,
})).annotate({ identifier: "VpcInformation" });
export const CreateConnectorRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String,
    CertificateAuthorityArn: S.String,
    VpcInformation: VpcInformation,
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
    Tags: S.optional(Tags),
}).pipe(T.all(T.Http({ method: "POST", uri: "/connectors" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateConnectorRequest",
});
export const CreateConnectorResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ConnectorArn: S.optional(S.String) })).annotate({
    identifier: "CreateConnectorResponse",
});
export const GetConnectorRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ConnectorArn: S.String.pipe(T.HttpLabel("ConnectorArn")) }).pipe(T.all(T.Http({ method: "GET", uri: "/connectors/{ConnectorArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetConnectorRequest",
});
export const ConnectorStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ConnectorStatusReason = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const Connector = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    CertificateAuthorityArn: S.optional(S.String),
    CertificateEnrollmentPolicyServerEndpoint: S.optional(S.String),
    DirectoryId: S.optional(S.String),
    VpcInformation: S.optional(VpcInformation),
    Status: S.optional(ConnectorStatus),
    StatusReason: S.optional(ConnectorStatusReason),
    CreatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    UpdatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({ identifier: "Connector" });
export const GetConnectorResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Connector: S.optional(Connector) })).annotate({
    identifier: "GetConnectorResponse",
});
export const DeleteConnectorRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ConnectorArn: S.String.pipe(T.HttpLabel("ConnectorArn")) }).pipe(T.all(T.Http({ method: "DELETE", uri: "/connectors/{ConnectorArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteConnectorRequest",
});
export const DeleteConnectorResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteConnectorResponse",
});
export const ListConnectorsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MaxResults: S.optional(S.Number).pipe(T.HttpQuery("MaxResults")),
    NextToken: S.optional(S.String).pipe(T.HttpQuery("NextToken")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/connectors" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListConnectorsRequest",
});
export const ConnectorSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    CertificateAuthorityArn: S.optional(S.String),
    CertificateEnrollmentPolicyServerEndpoint: S.optional(S.String),
    DirectoryId: S.optional(S.String),
    VpcInformation: S.optional(VpcInformation),
    Status: S.optional(ConnectorStatus),
    StatusReason: S.optional(ConnectorStatusReason),
    CreatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    UpdatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "ConnectorSummary",
});
export const ConnectorList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ConnectorSummary);
export const ListConnectorsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Connectors: S.optional(ConnectorList),
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "ListConnectorsResponse",
});
export const CreateDirectoryRegistrationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryId: S.String,
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
    Tags: S.optional(Tags),
}).pipe(T.all(T.Http({ method: "POST", uri: "/directoryRegistrations" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateDirectoryRegistrationRequest",
});
export const CreateDirectoryRegistrationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ DirectoryRegistrationArn: S.optional(S.String) })).annotate({
    identifier: "CreateDirectoryRegistrationResponse",
});
export const GetDirectoryRegistrationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryRegistrationArn: S.String.pipe(T.HttpLabel("DirectoryRegistrationArn")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/directoryRegistrations/{DirectoryRegistrationArn}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetDirectoryRegistrationRequest",
});
export const DirectoryRegistrationStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const DirectoryRegistrationStatusReason = 
/*@__PURE__*/ /*#__PURE__*/ S.String;
export const DirectoryRegistration = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    DirectoryId: S.optional(S.String),
    Status: S.optional(DirectoryRegistrationStatus),
    StatusReason: S.optional(DirectoryRegistrationStatusReason),
    CreatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    UpdatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "DirectoryRegistration",
});
export const GetDirectoryRegistrationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ DirectoryRegistration: S.optional(DirectoryRegistration) })).annotate({
    identifier: "GetDirectoryRegistrationResponse",
});
export const DeleteDirectoryRegistrationRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryRegistrationArn: S.String.pipe(T.HttpLabel("DirectoryRegistrationArn")),
}).pipe(T.all(T.Http({
    method: "DELETE",
    uri: "/directoryRegistrations/{DirectoryRegistrationArn}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteDirectoryRegistrationRequest",
});
export const DeleteDirectoryRegistrationResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteDirectoryRegistrationResponse",
});
export const ListDirectoryRegistrationsRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MaxResults: S.optional(S.Number).pipe(T.HttpQuery("MaxResults")),
    NextToken: S.optional(S.String).pipe(T.HttpQuery("NextToken")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/directoryRegistrations" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListDirectoryRegistrationsRequest",
});
export const DirectoryRegistrationSummary = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    DirectoryId: S.optional(S.String),
    Status: S.optional(DirectoryRegistrationStatus),
    StatusReason: S.optional(DirectoryRegistrationStatusReason),
    CreatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    UpdatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "DirectoryRegistrationSummary",
});
export const DirectoryRegistrationList = /*@__PURE__*/ /*#__PURE__*/ S.Array(DirectoryRegistrationSummary);
export const ListDirectoryRegistrationsResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryRegistrations: S.optional(DirectoryRegistrationList),
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "ListDirectoryRegistrationsResponse",
});
export const CreateServicePrincipalNameRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryRegistrationArn: S.String.pipe(T.HttpLabel("DirectoryRegistrationArn")),
    ConnectorArn: S.String.pipe(T.HttpLabel("ConnectorArn")),
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
}).pipe(T.all(T.Http({
    method: "POST",
    uri: "/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames/{ConnectorArn}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateServicePrincipalNameRequest",
});
export const CreateServicePrincipalNameResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "CreateServicePrincipalNameResponse",
});
export const GetServicePrincipalNameRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryRegistrationArn: S.String.pipe(T.HttpLabel("DirectoryRegistrationArn")),
    ConnectorArn: S.String.pipe(T.HttpLabel("ConnectorArn")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames/{ConnectorArn}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetServicePrincipalNameRequest",
});
export const ServicePrincipalNameStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ServicePrincipalNameStatusReason = 
/*@__PURE__*/ /*#__PURE__*/ S.String;
export const ServicePrincipalName = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryRegistrationArn: S.optional(S.String),
    ConnectorArn: S.optional(S.String),
    Status: S.optional(ServicePrincipalNameStatus),
    StatusReason: S.optional(ServicePrincipalNameStatusReason),
    CreatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    UpdatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "ServicePrincipalName",
});
export const GetServicePrincipalNameResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ServicePrincipalName: S.optional(ServicePrincipalName) })).annotate({
    identifier: "GetServicePrincipalNameResponse",
});
export const DeleteServicePrincipalNameRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryRegistrationArn: S.String.pipe(T.HttpLabel("DirectoryRegistrationArn")),
    ConnectorArn: S.String.pipe(T.HttpLabel("ConnectorArn")),
}).pipe(T.all(T.Http({
    method: "DELETE",
    uri: "/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames/{ConnectorArn}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteServicePrincipalNameRequest",
});
export const DeleteServicePrincipalNameResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteServicePrincipalNameResponse",
});
export const ListServicePrincipalNamesRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MaxResults: S.optional(S.Number).pipe(T.HttpQuery("MaxResults")),
    NextToken: S.optional(S.String).pipe(T.HttpQuery("NextToken")),
    DirectoryRegistrationArn: S.String.pipe(T.HttpLabel("DirectoryRegistrationArn")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListServicePrincipalNamesRequest",
});
export const ServicePrincipalNameSummary = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DirectoryRegistrationArn: S.optional(S.String),
    ConnectorArn: S.optional(S.String),
    Status: S.optional(ServicePrincipalNameStatus),
    StatusReason: S.optional(ServicePrincipalNameStatusReason),
    CreatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    UpdatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "ServicePrincipalNameSummary",
});
export const ServicePrincipalNameList = /*@__PURE__*/ /*#__PURE__*/ S.Array(ServicePrincipalNameSummary);
export const ListServicePrincipalNamesResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ServicePrincipalNames: S.optional(ServicePrincipalNameList),
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "ListServicePrincipalNamesResponse",
});
export const AccessRight = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const AccessRights = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Enroll: S.optional(AccessRight),
    AutoEnroll: S.optional(AccessRight),
})).annotate({ identifier: "AccessRights" });
export const CreateTemplateGroupAccessControlEntryRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    TemplateArn: S.String.pipe(T.HttpLabel("TemplateArn")),
    GroupSecurityIdentifier: S.String,
    GroupDisplayName: S.String,
    AccessRights: AccessRights,
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
}).pipe(T.all(T.Http({
    method: "POST",
    uri: "/templates/{TemplateArn}/accessControlEntries",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateTemplateGroupAccessControlEntryRequest",
});
export const CreateTemplateGroupAccessControlEntryResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "CreateTemplateGroupAccessControlEntryResponse",
});
export const GetTemplateGroupAccessControlEntryRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    TemplateArn: S.String.pipe(T.HttpLabel("TemplateArn")),
    GroupSecurityIdentifier: S.String.pipe(T.HttpLabel("GroupSecurityIdentifier")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/templates/{TemplateArn}/accessControlEntries/{GroupSecurityIdentifier}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTemplateGroupAccessControlEntryRequest",
});
export const AccessControlEntry = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    GroupDisplayName: S.optional(S.String),
    GroupSecurityIdentifier: S.optional(S.String),
    AccessRights: S.optional(AccessRights),
    TemplateArn: S.optional(S.String),
    CreatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    UpdatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "AccessControlEntry",
});
export const GetTemplateGroupAccessControlEntryResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ AccessControlEntry: S.optional(AccessControlEntry) })).annotate({
    identifier: "GetTemplateGroupAccessControlEntryResponse",
});
export const UpdateTemplateGroupAccessControlEntryRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    TemplateArn: S.String.pipe(T.HttpLabel("TemplateArn")),
    GroupSecurityIdentifier: S.String.pipe(T.HttpLabel("GroupSecurityIdentifier")),
    GroupDisplayName: S.optional(S.String),
    AccessRights: S.optional(AccessRights),
}).pipe(T.all(T.Http({
    method: "PATCH",
    uri: "/templates/{TemplateArn}/accessControlEntries/{GroupSecurityIdentifier}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateTemplateGroupAccessControlEntryRequest",
});
export const UpdateTemplateGroupAccessControlEntryResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UpdateTemplateGroupAccessControlEntryResponse",
});
export const DeleteTemplateGroupAccessControlEntryRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    TemplateArn: S.String.pipe(T.HttpLabel("TemplateArn")),
    GroupSecurityIdentifier: S.String.pipe(T.HttpLabel("GroupSecurityIdentifier")),
}).pipe(T.all(T.Http({
    method: "DELETE",
    uri: "/templates/{TemplateArn}/accessControlEntries/{GroupSecurityIdentifier}",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteTemplateGroupAccessControlEntryRequest",
});
export const DeleteTemplateGroupAccessControlEntryResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteTemplateGroupAccessControlEntryResponse",
});
export const ListTemplateGroupAccessControlEntriesRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MaxResults: S.optional(S.Number).pipe(T.HttpQuery("MaxResults")),
    NextToken: S.optional(S.String).pipe(T.HttpQuery("NextToken")),
    TemplateArn: S.String.pipe(T.HttpLabel("TemplateArn")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/templates/{TemplateArn}/accessControlEntries",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListTemplateGroupAccessControlEntriesRequest",
});
export const AccessControlEntrySummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    GroupDisplayName: S.optional(S.String),
    GroupSecurityIdentifier: S.optional(S.String),
    AccessRights: S.optional(AccessRights),
    TemplateArn: S.optional(S.String),
    CreatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    UpdatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "AccessControlEntrySummary",
});
export const AccessControlEntryList = /*@__PURE__*/ /*#__PURE__*/ S.Array(AccessControlEntrySummary);
export const ListTemplateGroupAccessControlEntriesResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AccessControlEntries: S.optional(AccessControlEntryList),
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "ListTemplateGroupAccessControlEntriesResponse",
});
export const ValidityPeriodType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ValidityPeriod = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ PeriodType: ValidityPeriodType, Period: S.Number })).annotate({ identifier: "ValidityPeriod" });
export const CertificateValidity = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ ValidityPeriod: ValidityPeriod, RenewalPeriod: ValidityPeriod })).annotate({
    identifier: "CertificateValidity",
});
export const TemplateNameList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const KeySpec = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const CryptoProvidersList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const PrivateKeyAttributesV2 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MinimalKeyLength: S.Number,
    KeySpec: KeySpec,
    CryptoProviders: S.optional(CryptoProvidersList),
})).annotate({
    identifier: "PrivateKeyAttributesV2",
});
export const ClientCompatibilityV2 = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const PrivateKeyFlagsV2 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ExportableKey: S.optional(S.Boolean),
    StrongKeyProtectionRequired: S.optional(S.Boolean),
    ClientVersion: ClientCompatibilityV2,
})).annotate({
    identifier: "PrivateKeyFlagsV2",
});
export const EnrollmentFlagsV2 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    IncludeSymmetricAlgorithms: S.optional(S.Boolean),
    UserInteractionRequired: S.optional(S.Boolean),
    RemoveInvalidCertificateFromPersonalStore: S.optional(S.Boolean),
    NoSecurityExtension: S.optional(S.Boolean),
    EnableKeyReuseOnNtTokenKeysetStorageFull: S.optional(S.Boolean),
})).annotate({
    identifier: "EnrollmentFlagsV2",
});
export const SubjectNameFlagsV2 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    SanRequireDomainDns: S.optional(S.Boolean),
    SanRequireSpn: S.optional(S.Boolean),
    SanRequireDirectoryGuid: S.optional(S.Boolean),
    SanRequireUpn: S.optional(S.Boolean),
    SanRequireEmail: S.optional(S.Boolean),
    SanRequireDns: S.optional(S.Boolean),
    RequireDnsAsCn: S.optional(S.Boolean),
    RequireEmail: S.optional(S.Boolean),
    RequireCommonName: S.optional(S.Boolean),
    RequireDirectoryPath: S.optional(S.Boolean),
})).annotate({
    identifier: "SubjectNameFlagsV2",
});
export const GeneralFlagsV2 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AutoEnrollment: S.optional(S.Boolean),
    MachineType: S.optional(S.Boolean),
})).annotate({ identifier: "GeneralFlagsV2" });
export const KeyUsageFlags = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    DigitalSignature: S.optional(S.Boolean),
    NonRepudiation: S.optional(S.Boolean),
    KeyEncipherment: S.optional(S.Boolean),
    DataEncipherment: S.optional(S.Boolean),
    KeyAgreement: S.optional(S.Boolean),
})).annotate({ identifier: "KeyUsageFlags" });
export const KeyUsage = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Critical: S.optional(S.Boolean), UsageFlags: KeyUsageFlags })).annotate({ identifier: "KeyUsage" });
export const ApplicationPolicyType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ApplicationPolicy = /*@__PURE__*/ /*#__PURE__*/ S.Union([
    S.Struct({ PolicyType: ApplicationPolicyType }),
    S.Struct({ PolicyObjectIdentifier: S.String }),
]);
export const ApplicationPolicyList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(ApplicationPolicy);
export const ApplicationPolicies = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Critical: S.optional(S.Boolean),
    Policies: ApplicationPolicyList,
})).annotate({
    identifier: "ApplicationPolicies",
});
export const ExtensionsV2 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    KeyUsage: KeyUsage,
    ApplicationPolicies: S.optional(ApplicationPolicies),
})).annotate({ identifier: "ExtensionsV2" });
export const TemplateV2 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    CertificateValidity: CertificateValidity,
    SupersededTemplates: S.optional(TemplateNameList),
    PrivateKeyAttributes: PrivateKeyAttributesV2,
    PrivateKeyFlags: PrivateKeyFlagsV2,
    EnrollmentFlags: EnrollmentFlagsV2,
    SubjectNameFlags: SubjectNameFlagsV2,
    GeneralFlags: GeneralFlagsV2,
    Extensions: ExtensionsV2,
})).annotate({ identifier: "TemplateV2" });
export const KeyUsagePropertyType = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const KeyUsagePropertyFlags = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Decrypt: S.optional(S.Boolean),
    KeyAgreement: S.optional(S.Boolean),
    Sign: S.optional(S.Boolean),
})).annotate({
    identifier: "KeyUsagePropertyFlags",
});
export const KeyUsageProperty = /*@__PURE__*/ /*#__PURE__*/ S.Union([
    S.Struct({ PropertyType: KeyUsagePropertyType }),
    S.Struct({ PropertyFlags: KeyUsagePropertyFlags }),
]);
export const PrivateKeyAlgorithm = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const PrivateKeyAttributesV3 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MinimalKeyLength: S.Number,
    KeySpec: KeySpec,
    CryptoProviders: S.optional(CryptoProvidersList),
    KeyUsageProperty: KeyUsageProperty,
    Algorithm: PrivateKeyAlgorithm,
})).annotate({
    identifier: "PrivateKeyAttributesV3",
});
export const ClientCompatibilityV3 = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const PrivateKeyFlagsV3 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ExportableKey: S.optional(S.Boolean),
    StrongKeyProtectionRequired: S.optional(S.Boolean),
    RequireAlternateSignatureAlgorithm: S.optional(S.Boolean),
    ClientVersion: ClientCompatibilityV3,
})).annotate({
    identifier: "PrivateKeyFlagsV3",
});
export const EnrollmentFlagsV3 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    IncludeSymmetricAlgorithms: S.optional(S.Boolean),
    UserInteractionRequired: S.optional(S.Boolean),
    RemoveInvalidCertificateFromPersonalStore: S.optional(S.Boolean),
    NoSecurityExtension: S.optional(S.Boolean),
    EnableKeyReuseOnNtTokenKeysetStorageFull: S.optional(S.Boolean),
})).annotate({
    identifier: "EnrollmentFlagsV3",
});
export const SubjectNameFlagsV3 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    SanRequireDomainDns: S.optional(S.Boolean),
    SanRequireSpn: S.optional(S.Boolean),
    SanRequireDirectoryGuid: S.optional(S.Boolean),
    SanRequireUpn: S.optional(S.Boolean),
    SanRequireEmail: S.optional(S.Boolean),
    SanRequireDns: S.optional(S.Boolean),
    RequireDnsAsCn: S.optional(S.Boolean),
    RequireEmail: S.optional(S.Boolean),
    RequireCommonName: S.optional(S.Boolean),
    RequireDirectoryPath: S.optional(S.Boolean),
})).annotate({
    identifier: "SubjectNameFlagsV3",
});
export const GeneralFlagsV3 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AutoEnrollment: S.optional(S.Boolean),
    MachineType: S.optional(S.Boolean),
})).annotate({ identifier: "GeneralFlagsV3" });
export const HashAlgorithm = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const ExtensionsV3 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    KeyUsage: KeyUsage,
    ApplicationPolicies: S.optional(ApplicationPolicies),
})).annotate({ identifier: "ExtensionsV3" });
export const TemplateV3 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    CertificateValidity: CertificateValidity,
    SupersededTemplates: S.optional(TemplateNameList),
    PrivateKeyAttributes: PrivateKeyAttributesV3,
    PrivateKeyFlags: PrivateKeyFlagsV3,
    EnrollmentFlags: EnrollmentFlagsV3,
    SubjectNameFlags: SubjectNameFlagsV3,
    GeneralFlags: GeneralFlagsV3,
    HashAlgorithm: HashAlgorithm,
    Extensions: ExtensionsV3,
})).annotate({ identifier: "TemplateV3" });
export const PrivateKeyAttributesV4 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MinimalKeyLength: S.Number,
    KeySpec: KeySpec,
    CryptoProviders: S.optional(CryptoProvidersList),
    KeyUsageProperty: S.optional(KeyUsageProperty),
    Algorithm: S.optional(PrivateKeyAlgorithm),
})).annotate({
    identifier: "PrivateKeyAttributesV4",
});
export const ClientCompatibilityV4 = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const PrivateKeyFlagsV4 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ExportableKey: S.optional(S.Boolean),
    StrongKeyProtectionRequired: S.optional(S.Boolean),
    RequireAlternateSignatureAlgorithm: S.optional(S.Boolean),
    RequireSameKeyRenewal: S.optional(S.Boolean),
    UseLegacyProvider: S.optional(S.Boolean),
    ClientVersion: ClientCompatibilityV4,
})).annotate({
    identifier: "PrivateKeyFlagsV4",
});
export const EnrollmentFlagsV4 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    IncludeSymmetricAlgorithms: S.optional(S.Boolean),
    UserInteractionRequired: S.optional(S.Boolean),
    RemoveInvalidCertificateFromPersonalStore: S.optional(S.Boolean),
    NoSecurityExtension: S.optional(S.Boolean),
    EnableKeyReuseOnNtTokenKeysetStorageFull: S.optional(S.Boolean),
})).annotate({
    identifier: "EnrollmentFlagsV4",
});
export const SubjectNameFlagsV4 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    SanRequireDomainDns: S.optional(S.Boolean),
    SanRequireSpn: S.optional(S.Boolean),
    SanRequireDirectoryGuid: S.optional(S.Boolean),
    SanRequireUpn: S.optional(S.Boolean),
    SanRequireEmail: S.optional(S.Boolean),
    SanRequireDns: S.optional(S.Boolean),
    RequireDnsAsCn: S.optional(S.Boolean),
    RequireEmail: S.optional(S.Boolean),
    RequireCommonName: S.optional(S.Boolean),
    RequireDirectoryPath: S.optional(S.Boolean),
})).annotate({
    identifier: "SubjectNameFlagsV4",
});
export const GeneralFlagsV4 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    AutoEnrollment: S.optional(S.Boolean),
    MachineType: S.optional(S.Boolean),
})).annotate({ identifier: "GeneralFlagsV4" });
export const ExtensionsV4 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    KeyUsage: KeyUsage,
    ApplicationPolicies: S.optional(ApplicationPolicies),
})).annotate({ identifier: "ExtensionsV4" });
export const TemplateV4 = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    CertificateValidity: CertificateValidity,
    SupersededTemplates: S.optional(TemplateNameList),
    PrivateKeyAttributes: PrivateKeyAttributesV4,
    PrivateKeyFlags: PrivateKeyFlagsV4,
    EnrollmentFlags: EnrollmentFlagsV4,
    SubjectNameFlags: SubjectNameFlagsV4,
    GeneralFlags: GeneralFlagsV4,
    HashAlgorithm: S.optional(HashAlgorithm),
    Extensions: ExtensionsV4,
})).annotate({ identifier: "TemplateV4" });
export const TemplateDefinition = /*@__PURE__*/ /*#__PURE__*/ S.Union([
    S.Struct({ TemplateV2: TemplateV2 }),
    S.Struct({ TemplateV3: TemplateV3 }),
    S.Struct({ TemplateV4: TemplateV4 }),
]);
export const CreateTemplateRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    ConnectorArn: S.String,
    Name: S.String,
    Definition: TemplateDefinition,
    ClientToken: S.optional(S.String).pipe(T.IdempotencyToken()),
    Tags: S.optional(Tags),
}).pipe(T.all(T.Http({ method: "POST", uri: "/templates" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateTemplateRequest",
});
export const CreateTemplateResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ TemplateArn: S.optional(S.String) })).annotate({
    identifier: "CreateTemplateResponse",
});
export const GetTemplateRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ TemplateArn: S.String.pipe(T.HttpLabel("TemplateArn")) }).pipe(T.all(T.Http({ method: "GET", uri: "/templates/{TemplateArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetTemplateRequest",
});
export const TemplateStatus = /*@__PURE__*/ /*#__PURE__*/ S.String;
export const TemplateRevision = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ MajorRevision: S.Number, MinorRevision: S.Number })).annotate({
    identifier: "TemplateRevision",
});
export const Template = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    ConnectorArn: S.optional(S.String),
    Definition: S.optional(TemplateDefinition),
    Name: S.optional(S.String),
    ObjectIdentifier: S.optional(S.String),
    PolicySchema: S.optional(S.Number),
    Status: S.optional(TemplateStatus),
    Revision: S.optional(TemplateRevision),
    CreatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    UpdatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({ identifier: "Template" });
export const GetTemplateResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ Template: S.optional(Template) })).annotate({
    identifier: "GetTemplateResponse",
});
export const UpdateTemplateRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    TemplateArn: S.String.pipe(T.HttpLabel("TemplateArn")),
    Definition: S.optional(TemplateDefinition),
    ReenrollAllCertificateHolders: S.optional(S.Boolean),
}).pipe(T.all(T.Http({ method: "PATCH", uri: "/templates/{TemplateArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateTemplateRequest",
});
export const UpdateTemplateResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UpdateTemplateResponse",
});
export const DeleteTemplateRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ TemplateArn: S.String.pipe(T.HttpLabel("TemplateArn")) }).pipe(T.all(T.Http({ method: "DELETE", uri: "/templates/{TemplateArn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteTemplateRequest",
});
export const DeleteTemplateResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteTemplateResponse",
});
export const ListTemplatesRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    MaxResults: S.optional(S.Number).pipe(T.HttpQuery("MaxResults")),
    NextToken: S.optional(S.String).pipe(T.HttpQuery("NextToken")),
    ConnectorArn: S.String.pipe(T.HttpQuery("ConnectorArn")),
}).pipe(T.all(T.Http({ method: "GET", uri: "/templates" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListTemplatesRequest",
});
export const TemplateSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Arn: S.optional(S.String),
    ConnectorArn: S.optional(S.String),
    Definition: S.optional(TemplateDefinition),
    Name: S.optional(S.String),
    ObjectIdentifier: S.optional(S.String),
    PolicySchema: S.optional(S.Number),
    Status: S.optional(TemplateStatus),
    Revision: S.optional(TemplateRevision),
    CreatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
    UpdatedAt: S.optional(S.Date.pipe(T.TimestampFormat("epoch-seconds"))),
})).annotate({
    identifier: "TemplateSummary",
});
export const TemplateList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(TemplateSummary);
export const ListTemplatesResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    Templates: S.optional(TemplateList),
    NextToken: S.optional(S.String),
})).annotate({
    identifier: "ListTemplatesResponse",
});
//# Errors
export class AccessDeniedException extends S.TaggedErrorClass()("AccessDeniedException", { Message: S.String }).pipe(C.withAuthError) {
}
export class InternalServerException extends S.TaggedErrorClass()("InternalServerException", { Message: S.String }, T.Retryable()).pipe(C.withServerError, C.withRetryableError) {
}
export class ResourceNotFoundException extends S.TaggedErrorClass()("ResourceNotFoundException", { Message: S.String, ResourceId: S.String, ResourceType: S.String }).pipe(C.withBadRequestError) {
}
export class ThrottlingException extends S.TaggedErrorClass()("ThrottlingException", {
    Message: S.String,
    ServiceCode: S.optional(S.String),
    QuotaCode: S.optional(S.String),
}, T.Retryable({ throttling: true })).pipe(C.withThrottlingError, C.withRetryableError) {
}
export class ValidationException extends S.TaggedErrorClass()("ValidationException", { Message: S.String, Reason: S.optional(ValidationExceptionReason) }).pipe(C.withBadRequestError) {
}
export class ConflictException extends S.TaggedErrorClass()("ConflictException", { Message: S.String, ResourceId: S.String, ResourceType: S.String }).pipe(C.withConflictError) {
}
export class ServiceQuotaExceededException extends S.TaggedErrorClass()("ServiceQuotaExceededException", {
    Message: S.String,
    ResourceId: S.String,
    ResourceType: S.String,
    ServiceCode: S.String,
    QuotaCode: S.String,
}).pipe(C.withQuotaError) {
}
/**
 * Lists the tags, if any, that are associated with your resource.
 */
export const listTagsForResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListTagsForResourceRequest,
    output: ListTagsForResourceResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Adds one or more tags to your resource.
 */
export const tagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TagResourceRequest,
    output: TagResourceResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Removes one or more tags from your resource.
 */
export const untagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UntagResourceRequest,
    output: UntagResourceResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Creates a connector between Amazon Web Services Private CA and an Active Directory. You must specify the private CA,
 * directory ID, and security groups.
 */
export const createConnector = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateConnectorRequest,
    output: CreateConnectorResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ServiceQuotaExceededException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Lists information about your connector. You specify the connector on input by its ARN
 * (Amazon Resource Name).
 */
export const getConnector = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetConnectorRequest,
    output: GetConnectorResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Deletes a connector for Active Directory. You must provide the Amazon Resource Name (ARN) of the
 * connector that you want to delete. You can find the ARN by calling the https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_ListConnectors
 * action. Deleting a connector does not deregister your directory with Amazon Web Services Private CA. You can
 * deregister your directory by calling the https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_DeleteDirectoryRegistration
 * action.
 */
export const deleteConnector = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteConnectorRequest,
    output: DeleteConnectorResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Lists the connectors that you created by using the https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateConnector action.
 */
export const listConnectors = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListConnectorsRequest,
    output: ListConnectorsResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Connectors",
        pageSize: "MaxResults",
    },
}));
/**
 * Creates a directory registration that authorizes communication between Amazon Web Services Private CA and an
 * Active Directory
 */
export const createDirectoryRegistration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateDirectoryRegistrationRequest,
    output: CreateDirectoryRegistrationResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * A structure that contains information about your directory registration.
 */
export const getDirectoryRegistration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetDirectoryRegistrationRequest,
    output: GetDirectoryRegistrationResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Deletes a directory registration. Deleting a directory registration deauthorizes
 * Amazon Web Services Private CA with the directory.
 */
export const deleteDirectoryRegistration = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteDirectoryRegistrationRequest,
    output: DeleteDirectoryRegistrationResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Lists the directory registrations that you created by using the https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateDirectoryRegistration
 * action.
 */
export const listDirectoryRegistrations = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListDirectoryRegistrationsRequest,
    output: ListDirectoryRegistrationsResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "DirectoryRegistrations",
        pageSize: "MaxResults",
    },
}));
/**
 * Creates a service principal name (SPN) for the service account in Active Directory. Kerberos
 * authentication uses SPNs to associate a service instance with a service sign-in
 * account.
 */
export const createServicePrincipalName = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateServicePrincipalNameRequest,
    output: CreateServicePrincipalNameResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Lists the service principal name that the connector uses to authenticate with
 * Active Directory.
 */
export const getServicePrincipalName = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetServicePrincipalNameRequest,
    output: GetServicePrincipalNameResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Deletes the service principal name (SPN) used by a connector to authenticate with your
 * Active Directory.
 */
export const deleteServicePrincipalName = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteServicePrincipalNameRequest,
    output: DeleteServicePrincipalNameResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Lists the service principal names that the connector uses to authenticate with
 * Active Directory.
 */
export const listServicePrincipalNames = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListServicePrincipalNamesRequest,
    output: ListServicePrincipalNamesResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "ServicePrincipalNames",
        pageSize: "MaxResults",
    },
}));
/**
 * Create a group access control entry. Allow or deny Active Directory groups from enrolling and/or
 * autoenrolling with the template based on the group security identifiers (SIDs).
 */
export const createTemplateGroupAccessControlEntry = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateTemplateGroupAccessControlEntryRequest,
    output: CreateTemplateGroupAccessControlEntryResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ServiceQuotaExceededException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Retrieves the group access control entries for a template.
 */
export const getTemplateGroupAccessControlEntry = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTemplateGroupAccessControlEntryRequest,
    output: GetTemplateGroupAccessControlEntryResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Update a group access control entry you created using CreateTemplateGroupAccessControlEntry.
 */
export const updateTemplateGroupAccessControlEntry = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateTemplateGroupAccessControlEntryRequest,
    output: UpdateTemplateGroupAccessControlEntryResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Deletes a group access control entry.
 */
export const deleteTemplateGroupAccessControlEntry = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteTemplateGroupAccessControlEntryRequest,
    output: DeleteTemplateGroupAccessControlEntryResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Lists group access control entries you created.
 */
export const listTemplateGroupAccessControlEntries = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListTemplateGroupAccessControlEntriesRequest,
    output: ListTemplateGroupAccessControlEntriesResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "AccessControlEntries",
        pageSize: "MaxResults",
    },
}));
/**
 * Creates an Active Directory compatible certificate template. The connectors issues certificates
 * using these templates based on the requester’s Active Directory group membership.
 */
export const createTemplate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateTemplateRequest,
    output: CreateTemplateResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ServiceQuotaExceededException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Retrieves a certificate template that the connector uses to issue certificates from a
 * private CA.
 */
export const getTemplate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTemplateRequest,
    output: GetTemplateResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Update template configuration to define the information included in certificates.
 */
export const updateTemplate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateTemplateRequest,
    output: UpdateTemplateResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Deletes a template. Certificates issued using the template are still valid until they
 * are revoked or expired.
 */
export const deleteTemplate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteTemplateRequest,
    output: DeleteTemplateResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Lists the templates, if any, that are associated with a connector.
 */
export const listTemplates = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListTemplatesRequest,
    output: ListTemplatesResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
    pagination: {
        inputToken: "NextToken",
        outputToken: "NextToken",
        items: "Templates",
        pageSize: "MaxResults",
    },
}));
//# sourceMappingURL=pca-connector-ad.js.map