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 svc = T.AwsApiService({
    sdkId: "ConnectCampaigns",
    serviceShapeName: "AmazonConnectCampaignService",
});
const auth = T.AwsAuthSigv4({ name: "connect-campaigns" });
const ver = T.ServiceVersion("2021-01-30");
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://connect-campaigns-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://connect-campaigns-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://connect-campaigns.${Region}.${_.getAttr(PartitionResult, "dualStackDnsSuffix")}`);
                    }
                    return err("DualStack is enabled but this partition does not support DualStack");
                }
                return e(`https://connect-campaigns.${Region}.${_.getAttr(PartitionResult, "dnsSuffix")}`);
            }
        }
    }
    return err("Invalid Configuration: Missing Region");
});
export const ProgressiveDialerConfig = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    bandwidthAllocation: S.Number,
    dialingCapacity: S.optional(S.Number),
})).annotate({
    identifier: "ProgressiveDialerConfig",
});
export const PredictiveDialerConfig = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    bandwidthAllocation: S.Number,
    dialingCapacity: S.optional(S.Number),
})).annotate({
    identifier: "PredictiveDialerConfig",
});
export const AgentlessDialerConfig = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ dialingCapacity: S.optional(S.Number) })).annotate({
    identifier: "AgentlessDialerConfig",
});
export const DialerConfig = /*@__PURE__*/ /*#__PURE__*/ S.Union([
    S.Struct({ progressiveDialerConfig: ProgressiveDialerConfig }),
    S.Struct({ predictiveDialerConfig: PredictiveDialerConfig }),
    S.Struct({ agentlessDialerConfig: AgentlessDialerConfig }),
]);
export const AnswerMachineDetectionConfig = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    enableAnswerMachineDetection: S.Boolean,
    awaitAnswerMachinePrompt: S.optional(S.Boolean),
})).annotate({
    identifier: "AnswerMachineDetectionConfig",
});
export const OutboundCallConfig = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    connectContactFlowId: S.String,
    connectSourcePhoneNumber: S.optional(S.String),
    connectQueueId: S.optional(S.String),
    answerMachineDetectionConfig: S.optional(AnswerMachineDetectionConfig),
})).annotate({
    identifier: "OutboundCallConfig",
});
export const TagMap = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const CreateCampaignRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    name: S.String,
    connectInstanceId: S.String,
    dialerConfig: DialerConfig,
    outboundCallConfig: OutboundCallConfig,
    tags: S.optional(TagMap),
}).pipe(T.all(T.Http({ method: "PUT", uri: "/campaigns" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "CreateCampaignRequest",
});
export const CreateCampaignResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.optional(S.String),
    arn: S.optional(S.String),
    tags: S.optional(TagMap),
})).annotate({
    identifier: "CreateCampaignResponse",
});
export const DeleteCampaignRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.String.pipe(T.HttpLabel("id")) }).pipe(T.all(T.Http({ method: "DELETE", uri: "/campaigns/{id}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteCampaignRequest",
});
export const DeleteCampaignResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteCampaignResponse",
});
export const DeleteConnectInstanceConfigRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    connectInstanceId: S.String.pipe(T.HttpLabel("connectInstanceId")),
}).pipe(T.all(T.Http({
    method: "DELETE",
    uri: "/connect-instance/{connectInstanceId}/config",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteConnectInstanceConfigRequest",
});
export const DeleteConnectInstanceConfigResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteConnectInstanceConfigResponse",
});
export const DeleteInstanceOnboardingJobRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    connectInstanceId: S.String.pipe(T.HttpLabel("connectInstanceId")),
}).pipe(T.all(T.Http({
    method: "DELETE",
    uri: "/connect-instance/{connectInstanceId}/onboarding",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "DeleteInstanceOnboardingJobRequest",
});
export const DeleteInstanceOnboardingJobResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "DeleteInstanceOnboardingJobResponse",
});
export const DescribeCampaignRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.String.pipe(T.HttpLabel("id")) }).pipe(T.all(T.Http({ method: "GET", uri: "/campaigns/{id}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "DescribeCampaignRequest",
});
export const Campaign = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.String,
    arn: S.String,
    name: S.String,
    connectInstanceId: S.String,
    dialerConfig: DialerConfig,
    outboundCallConfig: OutboundCallConfig,
    tags: S.optional(TagMap),
})).annotate({ identifier: "Campaign" });
export const DescribeCampaignResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ campaign: S.optional(Campaign) })).annotate({
    identifier: "DescribeCampaignResponse",
});
export const GetCampaignStateRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.String.pipe(T.HttpLabel("id")) }).pipe(T.all(T.Http({ method: "GET", uri: "/campaigns/{id}/state" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetCampaignStateRequest",
});
export const GetCampaignStateResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ state: S.optional(S.String) })).annotate({
    identifier: "GetCampaignStateResponse",
});
export const CampaignIdList = /*@__PURE__*/ /*#__PURE__*/ S.Array(S.String);
export const GetCampaignStateBatchRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ campaignIds: CampaignIdList }).pipe(T.all(T.Http({ method: "POST", uri: "/campaigns-state" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetCampaignStateBatchRequest",
});
export const SuccessfulCampaignStateResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ campaignId: S.optional(S.String), state: S.optional(S.String) })).annotate({
    identifier: "SuccessfulCampaignStateResponse",
});
export const SuccessfulCampaignStateResponseList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(SuccessfulCampaignStateResponse);
export const FailedCampaignStateResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    campaignId: S.optional(S.String),
    failureCode: S.optional(S.String),
})).annotate({
    identifier: "FailedCampaignStateResponse",
});
export const FailedCampaignStateResponseList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(FailedCampaignStateResponse);
export const GetCampaignStateBatchResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    successfulRequests: S.optional(SuccessfulCampaignStateResponseList),
    failedRequests: S.optional(FailedCampaignStateResponseList),
})).annotate({
    identifier: "GetCampaignStateBatchResponse",
});
export const GetConnectInstanceConfigRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    connectInstanceId: S.String.pipe(T.HttpLabel("connectInstanceId")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/connect-instance/{connectInstanceId}/config",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetConnectInstanceConfigRequest",
});
export const EncryptionConfig = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    enabled: S.Boolean,
    encryptionType: S.optional(S.String),
    keyArn: S.optional(S.String),
})).annotate({
    identifier: "EncryptionConfig",
});
export const InstanceConfig = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    connectInstanceId: S.String,
    serviceLinkedRoleArn: S.String,
    encryptionConfig: EncryptionConfig,
})).annotate({ identifier: "InstanceConfig" });
export const GetConnectInstanceConfigResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ connectInstanceConfig: S.optional(InstanceConfig) })).annotate({
    identifier: "GetConnectInstanceConfigResponse",
});
export const GetInstanceOnboardingJobStatusRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    connectInstanceId: S.String.pipe(T.HttpLabel("connectInstanceId")),
}).pipe(T.all(T.Http({
    method: "GET",
    uri: "/connect-instance/{connectInstanceId}/onboarding",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "GetInstanceOnboardingJobStatusRequest",
});
export const InstanceOnboardingJobStatus = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    connectInstanceId: S.String,
    status: S.String,
    failureCode: S.optional(S.String),
})).annotate({
    identifier: "InstanceOnboardingJobStatus",
});
export const GetInstanceOnboardingJobStatusResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    connectInstanceOnboardingJobStatus: S.optional(InstanceOnboardingJobStatus),
})).annotate({
    identifier: "GetInstanceOnboardingJobStatusResponse",
});
export const InstanceIdFilter = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ value: S.String, operator: S.String })).annotate({
    identifier: "InstanceIdFilter",
});
export const CampaignFilters = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ instanceIdFilter: S.optional(InstanceIdFilter) })).annotate({
    identifier: "CampaignFilters",
});
export const ListCampaignsRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    maxResults: S.optional(S.Number),
    nextToken: S.optional(S.String),
    filters: S.optional(CampaignFilters),
}).pipe(T.all(T.Http({ method: "POST", uri: "/campaigns-summary" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListCampaignsRequest",
});
export const CampaignSummary = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.String,
    arn: S.String,
    name: S.String,
    connectInstanceId: S.String,
})).annotate({
    identifier: "CampaignSummary",
});
export const CampaignSummaryList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(CampaignSummary);
export const ListCampaignsResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    nextToken: S.optional(S.String),
    campaignSummaryList: S.optional(CampaignSummaryList),
})).annotate({
    identifier: "ListCampaignsResponse",
});
export const ListTagsForResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ arn: S.String.pipe(T.HttpLabel("arn")) }).pipe(T.all(T.Http({ method: "GET", uri: "/tags/{arn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ListTagsForResourceRequest",
});
export const ListTagsForResourceResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ tags: S.optional(TagMap) })).annotate({
    identifier: "ListTagsForResourceResponse",
});
export const PauseCampaignRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.String.pipe(T.HttpLabel("id")) }).pipe(T.all(T.Http({ method: "POST", uri: "/campaigns/{id}/pause" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "PauseCampaignRequest",
});
export const PauseCampaignResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "PauseCampaignResponse",
});
export const Attributes = /*@__PURE__*/ /*#__PURE__*/ S.Record(S.String, S.String.pipe(S.optional));
export const DialRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    clientToken: S.String,
    phoneNumber: SensitiveString,
    expirationTime: T.DateFromString.pipe(T.TimestampFormat("date-time")),
    attributes: Attributes,
})).annotate({ identifier: "DialRequest" });
export const DialRequestList = /*@__PURE__*/ /*#__PURE__*/ S.Array(DialRequest);
export const PutDialRequestBatchRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.String.pipe(T.HttpLabel("id")),
    dialRequests: DialRequestList,
}).pipe(T.all(T.Http({ method: "PUT", uri: "/campaigns/{id}/dial-requests" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "PutDialRequestBatchRequest",
});
export const SuccessfulRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ clientToken: S.optional(S.String), id: S.optional(S.String) })).annotate({
    identifier: "SuccessfulRequest",
});
export const SuccessfulRequestList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(SuccessfulRequest);
export const FailedRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    clientToken: S.optional(S.String),
    id: S.optional(S.String),
    failureCode: S.optional(S.String),
})).annotate({ identifier: "FailedRequest" });
export const FailedRequestList = 
/*@__PURE__*/ /*#__PURE__*/ S.Array(FailedRequest);
export const PutDialRequestBatchResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    successfulRequests: S.optional(SuccessfulRequestList),
    failedRequests: S.optional(FailedRequestList),
})).annotate({
    identifier: "PutDialRequestBatchResponse",
});
export const ResumeCampaignRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.String.pipe(T.HttpLabel("id")) }).pipe(T.all(T.Http({ method: "POST", uri: "/campaigns/{id}/resume" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "ResumeCampaignRequest",
});
export const ResumeCampaignResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "ResumeCampaignResponse",
});
export const StartCampaignRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.String.pipe(T.HttpLabel("id")) }).pipe(T.all(T.Http({ method: "POST", uri: "/campaigns/{id}/start" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "StartCampaignRequest",
});
export const StartCampaignResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "StartCampaignResponse",
});
export const StartInstanceOnboardingJobRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    connectInstanceId: S.String.pipe(T.HttpLabel("connectInstanceId")),
    encryptionConfig: EncryptionConfig,
}).pipe(T.all(T.Http({
    method: "PUT",
    uri: "/connect-instance/{connectInstanceId}/onboarding",
}), svc, auth, proto, ver, rules))).annotate({
    identifier: "StartInstanceOnboardingJobRequest",
});
export const StartInstanceOnboardingJobResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    connectInstanceOnboardingJobStatus: S.optional(InstanceOnboardingJobStatus),
})).annotate({
    identifier: "StartInstanceOnboardingJobResponse",
});
export const StopCampaignRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.String.pipe(T.HttpLabel("id")) }).pipe(T.all(T.Http({ method: "POST", uri: "/campaigns/{id}/stop" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "StopCampaignRequest",
});
export const StopCampaignResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "StopCampaignResponse",
});
export const TagResourceRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ arn: S.String.pipe(T.HttpLabel("arn")), tags: TagMap }).pipe(T.all(T.Http({ method: "POST", uri: "/tags/{arn}" }), 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({
    arn: S.String.pipe(T.HttpLabel("arn")),
    tagKeys: TagKeyList.pipe(T.HttpQuery("tagKeys")),
}).pipe(T.all(T.Http({ method: "DELETE", uri: "/tags/{arn}" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UntagResourceRequest",
});
export const UntagResourceResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UntagResourceResponse",
});
export const UpdateCampaignDialerConfigRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.String.pipe(T.HttpLabel("id")),
    dialerConfig: DialerConfig,
}).pipe(T.all(T.Http({ method: "POST", uri: "/campaigns/{id}/dialer-config" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateCampaignDialerConfigRequest",
});
export const UpdateCampaignDialerConfigResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UpdateCampaignDialerConfigResponse",
});
export const UpdateCampaignNameRequest = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({ id: S.String.pipe(T.HttpLabel("id")), name: S.String }).pipe(T.all(T.Http({ method: "POST", uri: "/campaigns/{id}/name" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateCampaignNameRequest",
});
export const UpdateCampaignNameResponse = /*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UpdateCampaignNameResponse",
});
export const UpdateCampaignOutboundCallConfigRequest = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({
    id: S.String.pipe(T.HttpLabel("id")),
    connectContactFlowId: S.optional(S.String),
    connectSourcePhoneNumber: S.optional(S.String),
    answerMachineDetectionConfig: S.optional(AnswerMachineDetectionConfig),
}).pipe(T.all(T.Http({ method: "POST", uri: "/campaigns/{id}/outbound-call-config" }), svc, auth, proto, ver, rules))).annotate({
    identifier: "UpdateCampaignOutboundCallConfigRequest",
});
export const UpdateCampaignOutboundCallConfigResponse = 
/*@__PURE__*/ /*#__PURE__*/ S.suspend(() => S.Struct({})).annotate({
    identifier: "UpdateCampaignOutboundCallConfigResponse",
});
//# Errors
export class AccessDeniedException extends S.TaggedErrorClass()("AccessDeniedException", {
    message: S.String,
    xAmzErrorType: S.optional(S.String).pipe(T.HttpHeader("x-amzn-ErrorType")),
}).pipe(C.withAuthError) {
}
export class ConflictException extends S.TaggedErrorClass()("ConflictException", {
    message: S.String,
    xAmzErrorType: S.optional(S.String).pipe(T.HttpHeader("x-amzn-ErrorType")),
}).pipe(C.withConflictError) {
}
export class InternalServerException extends S.TaggedErrorClass()("InternalServerException", {
    message: S.String,
    xAmzErrorType: S.optional(S.String).pipe(T.HttpHeader("x-amzn-ErrorType")),
}, T.Retryable()).pipe(C.withServerError, C.withRetryableError) {
}
export class ResourceNotFoundException extends S.TaggedErrorClass()("ResourceNotFoundException", {
    message: S.String,
    xAmzErrorType: S.optional(S.String).pipe(T.HttpHeader("x-amzn-ErrorType")),
}).pipe(C.withBadRequestError) {
}
export class ServiceQuotaExceededException extends S.TaggedErrorClass()("ServiceQuotaExceededException", {
    message: S.String,
    xAmzErrorType: S.optional(S.String).pipe(T.HttpHeader("x-amzn-ErrorType")),
}).pipe(C.withQuotaError) {
}
export class ThrottlingException extends S.TaggedErrorClass()("ThrottlingException", {
    message: S.String,
    xAmzErrorType: S.optional(S.String).pipe(T.HttpHeader("x-amzn-ErrorType")),
}, T.Retryable()).pipe(C.withThrottlingError, C.withRetryableError) {
}
export class ValidationException extends S.TaggedErrorClass()("ValidationException", {
    message: S.String,
    xAmzErrorType: S.optional(S.String).pipe(T.HttpHeader("x-amzn-ErrorType")),
}).pipe(C.withBadRequestError) {
}
export class InvalidStateException extends S.TaggedErrorClass()("InvalidStateException", {
    message: S.String,
    xAmzErrorType: S.optional(S.String).pipe(T.HttpHeader("x-amzn-ErrorType")),
}).pipe(C.withConflictError) {
}
export class InvalidCampaignStateException extends S.TaggedErrorClass()("InvalidCampaignStateException", {
    state: S.String,
    message: S.String,
    xAmzErrorType: S.optional(S.String).pipe(T.HttpHeader("x-amzn-ErrorType")),
}).pipe(C.withConflictError) {
}
/**
 * Creates a campaign for the specified Amazon Connect account. This API is idempotent.
 */
export const createCampaign = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateCampaignRequest,
    output: CreateCampaignResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ServiceQuotaExceededException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Deletes a campaign from the specified Amazon Connect account.
 */
export const deleteCampaign = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteCampaignRequest,
    output: DeleteCampaignResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Deletes a connect instance config from the specified AWS account.
 */
export const deleteConnectInstanceConfig = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteConnectInstanceConfigRequest,
    output: DeleteConnectInstanceConfigResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        InvalidStateException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Delete the Connect Campaigns onboarding job for the specified Amazon Connect instance.
 */
export const deleteInstanceOnboardingJob = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteInstanceOnboardingJobRequest,
    output: DeleteInstanceOnboardingJobResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        InvalidStateException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Describes the specific campaign.
 */
export const describeCampaign = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DescribeCampaignRequest,
    output: DescribeCampaignResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Get state of a campaign for the specified Amazon Connect account.
 */
export const getCampaignState = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetCampaignStateRequest,
    output: GetCampaignStateResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Get state of campaigns for the specified Amazon Connect account.
 */
export const getCampaignStateBatch = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetCampaignStateBatchRequest,
    output: GetCampaignStateBatchResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Get the specific Connect instance config.
 */
export const getConnectInstanceConfig = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetConnectInstanceConfigRequest,
    output: GetConnectInstanceConfigResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Get the specific instance onboarding job status.
 */
export const getInstanceOnboardingJobStatus = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetInstanceOnboardingJobStatusRequest,
    output: GetInstanceOnboardingJobStatusResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Provides summary information about the campaigns under the specified Amazon Connect account.
 */
export const listCampaigns = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListCampaignsRequest,
    output: ListCampaignsResponse,
    errors: [AccessDeniedException, InternalServerException, ValidationException],
    pagination: {
        inputToken: "nextToken",
        outputToken: "nextToken",
        items: "campaignSummaryList",
        pageSize: "maxResults",
    },
}));
/**
 * List tags for a resource.
 */
export const listTagsForResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ListTagsForResourceRequest,
    output: ListTagsForResourceResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Pauses a campaign for the specified Amazon Connect account.
 */
export const pauseCampaign = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PauseCampaignRequest,
    output: PauseCampaignResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        InvalidCampaignStateException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Creates dials requests for the specified campaign Amazon Connect account. This API is idempotent.
 */
export const putDialRequestBatch = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutDialRequestBatchRequest,
    output: PutDialRequestBatchResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        InvalidCampaignStateException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Stops a campaign for the specified Amazon Connect account.
 */
export const resumeCampaign = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ResumeCampaignRequest,
    output: ResumeCampaignResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        InvalidCampaignStateException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Starts a campaign for the specified Amazon Connect account.
 */
export const startCampaign = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: StartCampaignRequest,
    output: StartCampaignResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        InvalidCampaignStateException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Onboard the specific Amazon Connect instance to Connect Campaigns.
 */
export const startInstanceOnboardingJob = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: StartInstanceOnboardingJobRequest,
    output: StartInstanceOnboardingJobResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Stops a campaign for the specified Amazon Connect account.
 */
export const stopCampaign = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: StopCampaignRequest,
    output: StopCampaignResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        InvalidCampaignStateException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Tag a resource.
 */
export const tagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: TagResourceRequest,
    output: TagResourceResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Untag a resource.
 */
export const untagResource = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UntagResourceRequest,
    output: UntagResourceResponse,
    errors: [
        AccessDeniedException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
/**
 * Updates the dialer config of a campaign. This API is idempotent.
 */
export const updateCampaignDialerConfig = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateCampaignDialerConfigRequest,
    output: UpdateCampaignDialerConfigResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Updates the name of a campaign. This API is idempotent.
 */
export const updateCampaignName = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateCampaignNameRequest,
    output: UpdateCampaignNameResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ValidationException,
    ],
}));
/**
 * Updates the outbound call config of a campaign. This API is idempotent.
 */
export const updateCampaignOutboundCallConfig = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateCampaignOutboundCallConfigRequest,
    output: UpdateCampaignOutboundCallConfigResponse,
    errors: [
        AccessDeniedException,
        ConflictException,
        InternalServerException,
        ResourceNotFoundException,
        ThrottlingException,
        ValidationException,
    ],
}));
//# sourceMappingURL=connectcampaigns.js.map