'use strict';

var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
var middlewareLogger = require('@aws-sdk/middleware-logger');
var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
var configResolver = require('@smithy/config-resolver');
var core = require('@smithy/core');
var schema = require('@smithy/core/schema');
var middlewareContentLength = require('@smithy/middleware-content-length');
var middlewareEndpoint = require('@smithy/middleware-endpoint');
var middlewareRetry = require('@smithy/middleware-retry');
var smithyClient = require('@smithy/smithy-client');
var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
var runtimeConfig = require('./runtimeConfig');
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
var protocolHttp = require('@smithy/protocol-http');
var schemas_0 = require('./schemas/schemas_0');
var errors = require('./models/errors');
var SNSServiceException = require('./models/SNSServiceException');

const resolveClientEndpointParameters = (options) => {
    return Object.assign(options, {
        useDualstackEndpoint: options.useDualstackEndpoint ?? false,
        useFipsEndpoint: options.useFipsEndpoint ?? false,
        defaultSigningName: "sns",
    });
};
const commonParams = {
    UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
    Endpoint: { type: "builtInParams", name: "endpoint" },
    Region: { type: "builtInParams", name: "region" },
    UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};

const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
    const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
    let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
    let _credentials = runtimeConfig.credentials;
    return {
        setHttpAuthScheme(httpAuthScheme) {
            const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
            if (index === -1) {
                _httpAuthSchemes.push(httpAuthScheme);
            }
            else {
                _httpAuthSchemes.splice(index, 1, httpAuthScheme);
            }
        },
        httpAuthSchemes() {
            return _httpAuthSchemes;
        },
        setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
            _httpAuthSchemeProvider = httpAuthSchemeProvider;
        },
        httpAuthSchemeProvider() {
            return _httpAuthSchemeProvider;
        },
        setCredentials(credentials) {
            _credentials = credentials;
        },
        credentials() {
            return _credentials;
        },
    };
};
const resolveHttpAuthRuntimeConfig = (config) => {
    return {
        httpAuthSchemes: config.httpAuthSchemes(),
        httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
        credentials: config.credentials(),
    };
};

const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
    const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
    extensions.forEach((extension) => extension.configure(extensionConfiguration));
    return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
};

class SNSClient extends smithyClient.Client {
    config;
    constructor(...[configuration]) {
        const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
        super(_config_0);
        this.initConfig = _config_0;
        const _config_1 = resolveClientEndpointParameters(_config_0);
        const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
        const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
        const _config_4 = configResolver.resolveRegionConfig(_config_3);
        const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
        const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
        const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
        const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
        this.config = _config_8;
        this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
        this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
        this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
        this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
        this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
        this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
        this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
        this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
            httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSNSHttpAuthSchemeParametersProvider,
            identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
                "aws.auth#sigv4": config.credentials,
            }),
        }));
        this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
    }
    destroy() {
        super.destroy();
    }
}

class AddPermissionCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "AddPermission", {})
    .n("SNSClient", "AddPermissionCommand")
    .sc(schemas_0.AddPermission$)
    .build() {
}

class CheckIfPhoneNumberIsOptedOutCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "CheckIfPhoneNumberIsOptedOut", {})
    .n("SNSClient", "CheckIfPhoneNumberIsOptedOutCommand")
    .sc(schemas_0.CheckIfPhoneNumberIsOptedOut$)
    .build() {
}

class ConfirmSubscriptionCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "ConfirmSubscription", {})
    .n("SNSClient", "ConfirmSubscriptionCommand")
    .sc(schemas_0.ConfirmSubscription$)
    .build() {
}

class CreatePlatformApplicationCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "CreatePlatformApplication", {})
    .n("SNSClient", "CreatePlatformApplicationCommand")
    .sc(schemas_0.CreatePlatformApplication$)
    .build() {
}

class CreatePlatformEndpointCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "CreatePlatformEndpoint", {})
    .n("SNSClient", "CreatePlatformEndpointCommand")
    .sc(schemas_0.CreatePlatformEndpoint$)
    .build() {
}

class CreateSMSSandboxPhoneNumberCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "CreateSMSSandboxPhoneNumber", {})
    .n("SNSClient", "CreateSMSSandboxPhoneNumberCommand")
    .sc(schemas_0.CreateSMSSandboxPhoneNumber$)
    .build() {
}

class CreateTopicCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "CreateTopic", {})
    .n("SNSClient", "CreateTopicCommand")
    .sc(schemas_0.CreateTopic$)
    .build() {
}

class DeleteEndpointCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "DeleteEndpoint", {})
    .n("SNSClient", "DeleteEndpointCommand")
    .sc(schemas_0.DeleteEndpoint$)
    .build() {
}

class DeletePlatformApplicationCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "DeletePlatformApplication", {})
    .n("SNSClient", "DeletePlatformApplicationCommand")
    .sc(schemas_0.DeletePlatformApplication$)
    .build() {
}

class DeleteSMSSandboxPhoneNumberCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "DeleteSMSSandboxPhoneNumber", {})
    .n("SNSClient", "DeleteSMSSandboxPhoneNumberCommand")
    .sc(schemas_0.DeleteSMSSandboxPhoneNumber$)
    .build() {
}

class DeleteTopicCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "DeleteTopic", {})
    .n("SNSClient", "DeleteTopicCommand")
    .sc(schemas_0.DeleteTopic$)
    .build() {
}

class GetDataProtectionPolicyCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "GetDataProtectionPolicy", {})
    .n("SNSClient", "GetDataProtectionPolicyCommand")
    .sc(schemas_0.GetDataProtectionPolicy$)
    .build() {
}

class GetEndpointAttributesCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "GetEndpointAttributes", {})
    .n("SNSClient", "GetEndpointAttributesCommand")
    .sc(schemas_0.GetEndpointAttributes$)
    .build() {
}

class GetPlatformApplicationAttributesCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "GetPlatformApplicationAttributes", {})
    .n("SNSClient", "GetPlatformApplicationAttributesCommand")
    .sc(schemas_0.GetPlatformApplicationAttributes$)
    .build() {
}

class GetSMSAttributesCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "GetSMSAttributes", {})
    .n("SNSClient", "GetSMSAttributesCommand")
    .sc(schemas_0.GetSMSAttributes$)
    .build() {
}

class GetSMSSandboxAccountStatusCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "GetSMSSandboxAccountStatus", {})
    .n("SNSClient", "GetSMSSandboxAccountStatusCommand")
    .sc(schemas_0.GetSMSSandboxAccountStatus$)
    .build() {
}

class GetSubscriptionAttributesCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "GetSubscriptionAttributes", {})
    .n("SNSClient", "GetSubscriptionAttributesCommand")
    .sc(schemas_0.GetSubscriptionAttributes$)
    .build() {
}

class GetTopicAttributesCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "GetTopicAttributes", {})
    .n("SNSClient", "GetTopicAttributesCommand")
    .sc(schemas_0.GetTopicAttributes$)
    .build() {
}

class ListEndpointsByPlatformApplicationCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "ListEndpointsByPlatformApplication", {})
    .n("SNSClient", "ListEndpointsByPlatformApplicationCommand")
    .sc(schemas_0.ListEndpointsByPlatformApplication$)
    .build() {
}

class ListOriginationNumbersCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "ListOriginationNumbers", {})
    .n("SNSClient", "ListOriginationNumbersCommand")
    .sc(schemas_0.ListOriginationNumbers$)
    .build() {
}

class ListPhoneNumbersOptedOutCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "ListPhoneNumbersOptedOut", {})
    .n("SNSClient", "ListPhoneNumbersOptedOutCommand")
    .sc(schemas_0.ListPhoneNumbersOptedOut$)
    .build() {
}

class ListPlatformApplicationsCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "ListPlatformApplications", {})
    .n("SNSClient", "ListPlatformApplicationsCommand")
    .sc(schemas_0.ListPlatformApplications$)
    .build() {
}

class ListSMSSandboxPhoneNumbersCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "ListSMSSandboxPhoneNumbers", {})
    .n("SNSClient", "ListSMSSandboxPhoneNumbersCommand")
    .sc(schemas_0.ListSMSSandboxPhoneNumbers$)
    .build() {
}

class ListSubscriptionsByTopicCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "ListSubscriptionsByTopic", {})
    .n("SNSClient", "ListSubscriptionsByTopicCommand")
    .sc(schemas_0.ListSubscriptionsByTopic$)
    .build() {
}

class ListSubscriptionsCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "ListSubscriptions", {})
    .n("SNSClient", "ListSubscriptionsCommand")
    .sc(schemas_0.ListSubscriptions$)
    .build() {
}

class ListTagsForResourceCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "ListTagsForResource", {})
    .n("SNSClient", "ListTagsForResourceCommand")
    .sc(schemas_0.ListTagsForResource$)
    .build() {
}

class ListTopicsCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "ListTopics", {})
    .n("SNSClient", "ListTopicsCommand")
    .sc(schemas_0.ListTopics$)
    .build() {
}

class OptInPhoneNumberCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "OptInPhoneNumber", {})
    .n("SNSClient", "OptInPhoneNumberCommand")
    .sc(schemas_0.OptInPhoneNumber$)
    .build() {
}

class PublishBatchCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "PublishBatch", {})
    .n("SNSClient", "PublishBatchCommand")
    .sc(schemas_0.PublishBatch$)
    .build() {
}

class PublishCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "Publish", {})
    .n("SNSClient", "PublishCommand")
    .sc(schemas_0.Publish$)
    .build() {
}

class PutDataProtectionPolicyCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "PutDataProtectionPolicy", {})
    .n("SNSClient", "PutDataProtectionPolicyCommand")
    .sc(schemas_0.PutDataProtectionPolicy$)
    .build() {
}

class RemovePermissionCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "RemovePermission", {})
    .n("SNSClient", "RemovePermissionCommand")
    .sc(schemas_0.RemovePermission$)
    .build() {
}

class SetEndpointAttributesCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "SetEndpointAttributes", {})
    .n("SNSClient", "SetEndpointAttributesCommand")
    .sc(schemas_0.SetEndpointAttributes$)
    .build() {
}

class SetPlatformApplicationAttributesCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "SetPlatformApplicationAttributes", {})
    .n("SNSClient", "SetPlatformApplicationAttributesCommand")
    .sc(schemas_0.SetPlatformApplicationAttributes$)
    .build() {
}

class SetSMSAttributesCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "SetSMSAttributes", {})
    .n("SNSClient", "SetSMSAttributesCommand")
    .sc(schemas_0.SetSMSAttributes$)
    .build() {
}

class SetSubscriptionAttributesCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "SetSubscriptionAttributes", {})
    .n("SNSClient", "SetSubscriptionAttributesCommand")
    .sc(schemas_0.SetSubscriptionAttributes$)
    .build() {
}

class SetTopicAttributesCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "SetTopicAttributes", {})
    .n("SNSClient", "SetTopicAttributesCommand")
    .sc(schemas_0.SetTopicAttributes$)
    .build() {
}

class SubscribeCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "Subscribe", {})
    .n("SNSClient", "SubscribeCommand")
    .sc(schemas_0.Subscribe$)
    .build() {
}

class TagResourceCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "TagResource", {})
    .n("SNSClient", "TagResourceCommand")
    .sc(schemas_0.TagResource$)
    .build() {
}

class UnsubscribeCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "Unsubscribe", {})
    .n("SNSClient", "UnsubscribeCommand")
    .sc(schemas_0.Unsubscribe$)
    .build() {
}

class UntagResourceCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "UntagResource", {})
    .n("SNSClient", "UntagResourceCommand")
    .sc(schemas_0.UntagResource$)
    .build() {
}

class VerifySMSSandboxPhoneNumberCommand extends smithyClient.Command
    .classBuilder()
    .ep(commonParams)
    .m(function (Command, cs, config, o) {
    return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
    .s("AmazonSimpleNotificationService", "VerifySMSSandboxPhoneNumber", {})
    .n("SNSClient", "VerifySMSSandboxPhoneNumberCommand")
    .sc(schemas_0.VerifySMSSandboxPhoneNumber$)
    .build() {
}

const paginateListEndpointsByPlatformApplication = core.createPaginator(SNSClient, ListEndpointsByPlatformApplicationCommand, "NextToken", "NextToken", "");

const paginateListOriginationNumbers = core.createPaginator(SNSClient, ListOriginationNumbersCommand, "NextToken", "NextToken", "MaxResults");

const paginateListPhoneNumbersOptedOut = core.createPaginator(SNSClient, ListPhoneNumbersOptedOutCommand, "nextToken", "nextToken", "");

const paginateListPlatformApplications = core.createPaginator(SNSClient, ListPlatformApplicationsCommand, "NextToken", "NextToken", "");

const paginateListSMSSandboxPhoneNumbers = core.createPaginator(SNSClient, ListSMSSandboxPhoneNumbersCommand, "NextToken", "NextToken", "MaxResults");

const paginateListSubscriptionsByTopic = core.createPaginator(SNSClient, ListSubscriptionsByTopicCommand, "NextToken", "NextToken", "");

const paginateListSubscriptions = core.createPaginator(SNSClient, ListSubscriptionsCommand, "NextToken", "NextToken", "");

const paginateListTopics = core.createPaginator(SNSClient, ListTopicsCommand, "NextToken", "NextToken", "");

const commands = {
    AddPermissionCommand,
    CheckIfPhoneNumberIsOptedOutCommand,
    ConfirmSubscriptionCommand,
    CreatePlatformApplicationCommand,
    CreatePlatformEndpointCommand,
    CreateSMSSandboxPhoneNumberCommand,
    CreateTopicCommand,
    DeleteEndpointCommand,
    DeletePlatformApplicationCommand,
    DeleteSMSSandboxPhoneNumberCommand,
    DeleteTopicCommand,
    GetDataProtectionPolicyCommand,
    GetEndpointAttributesCommand,
    GetPlatformApplicationAttributesCommand,
    GetSMSAttributesCommand,
    GetSMSSandboxAccountStatusCommand,
    GetSubscriptionAttributesCommand,
    GetTopicAttributesCommand,
    ListEndpointsByPlatformApplicationCommand,
    ListOriginationNumbersCommand,
    ListPhoneNumbersOptedOutCommand,
    ListPlatformApplicationsCommand,
    ListSMSSandboxPhoneNumbersCommand,
    ListSubscriptionsCommand,
    ListSubscriptionsByTopicCommand,
    ListTagsForResourceCommand,
    ListTopicsCommand,
    OptInPhoneNumberCommand,
    PublishCommand,
    PublishBatchCommand,
    PutDataProtectionPolicyCommand,
    RemovePermissionCommand,
    SetEndpointAttributesCommand,
    SetPlatformApplicationAttributesCommand,
    SetSMSAttributesCommand,
    SetSubscriptionAttributesCommand,
    SetTopicAttributesCommand,
    SubscribeCommand,
    TagResourceCommand,
    UnsubscribeCommand,
    UntagResourceCommand,
    VerifySMSSandboxPhoneNumberCommand,
};
const paginators = {
    paginateListEndpointsByPlatformApplication,
    paginateListOriginationNumbers,
    paginateListPhoneNumbersOptedOut,
    paginateListPlatformApplications,
    paginateListSMSSandboxPhoneNumbers,
    paginateListSubscriptions,
    paginateListSubscriptionsByTopic,
    paginateListTopics,
};
class SNS extends SNSClient {
}
smithyClient.createAggregatedClient(commands, SNS, { paginators });

const LanguageCodeString = {
    de_DE: "de-DE",
    en_GB: "en-GB",
    en_US: "en-US",
    es_419: "es-419",
    es_ES: "es-ES",
    fr_CA: "fr-CA",
    fr_FR: "fr-FR",
    it_IT: "it-IT",
    jp_JP: "ja-JP",
    kr_KR: "kr-KR",
    pt_BR: "pt-BR",
    zh_CN: "zh-CN",
    zh_TW: "zh-TW",
};
const NumberCapability = {
    MMS: "MMS",
    SMS: "SMS",
    VOICE: "VOICE",
};
const RouteType = {
    Premium: "Premium",
    Promotional: "Promotional",
    Transactional: "Transactional",
};
const SMSSandboxPhoneNumberVerificationStatus = {
    Pending: "Pending",
    Verified: "Verified",
};

Object.defineProperty(exports, "$Command", {
    enumerable: true,
    get: function () { return smithyClient.Command; }
});
Object.defineProperty(exports, "__Client", {
    enumerable: true,
    get: function () { return smithyClient.Client; }
});
Object.defineProperty(exports, "SNSServiceException", {
    enumerable: true,
    get: function () { return SNSServiceException.SNSServiceException; }
});
exports.AddPermissionCommand = AddPermissionCommand;
exports.CheckIfPhoneNumberIsOptedOutCommand = CheckIfPhoneNumberIsOptedOutCommand;
exports.ConfirmSubscriptionCommand = ConfirmSubscriptionCommand;
exports.CreatePlatformApplicationCommand = CreatePlatformApplicationCommand;
exports.CreatePlatformEndpointCommand = CreatePlatformEndpointCommand;
exports.CreateSMSSandboxPhoneNumberCommand = CreateSMSSandboxPhoneNumberCommand;
exports.CreateTopicCommand = CreateTopicCommand;
exports.DeleteEndpointCommand = DeleteEndpointCommand;
exports.DeletePlatformApplicationCommand = DeletePlatformApplicationCommand;
exports.DeleteSMSSandboxPhoneNumberCommand = DeleteSMSSandboxPhoneNumberCommand;
exports.DeleteTopicCommand = DeleteTopicCommand;
exports.GetDataProtectionPolicyCommand = GetDataProtectionPolicyCommand;
exports.GetEndpointAttributesCommand = GetEndpointAttributesCommand;
exports.GetPlatformApplicationAttributesCommand = GetPlatformApplicationAttributesCommand;
exports.GetSMSAttributesCommand = GetSMSAttributesCommand;
exports.GetSMSSandboxAccountStatusCommand = GetSMSSandboxAccountStatusCommand;
exports.GetSubscriptionAttributesCommand = GetSubscriptionAttributesCommand;
exports.GetTopicAttributesCommand = GetTopicAttributesCommand;
exports.LanguageCodeString = LanguageCodeString;
exports.ListEndpointsByPlatformApplicationCommand = ListEndpointsByPlatformApplicationCommand;
exports.ListOriginationNumbersCommand = ListOriginationNumbersCommand;
exports.ListPhoneNumbersOptedOutCommand = ListPhoneNumbersOptedOutCommand;
exports.ListPlatformApplicationsCommand = ListPlatformApplicationsCommand;
exports.ListSMSSandboxPhoneNumbersCommand = ListSMSSandboxPhoneNumbersCommand;
exports.ListSubscriptionsByTopicCommand = ListSubscriptionsByTopicCommand;
exports.ListSubscriptionsCommand = ListSubscriptionsCommand;
exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
exports.ListTopicsCommand = ListTopicsCommand;
exports.NumberCapability = NumberCapability;
exports.OptInPhoneNumberCommand = OptInPhoneNumberCommand;
exports.PublishBatchCommand = PublishBatchCommand;
exports.PublishCommand = PublishCommand;
exports.PutDataProtectionPolicyCommand = PutDataProtectionPolicyCommand;
exports.RemovePermissionCommand = RemovePermissionCommand;
exports.RouteType = RouteType;
exports.SMSSandboxPhoneNumberVerificationStatus = SMSSandboxPhoneNumberVerificationStatus;
exports.SNS = SNS;
exports.SNSClient = SNSClient;
exports.SetEndpointAttributesCommand = SetEndpointAttributesCommand;
exports.SetPlatformApplicationAttributesCommand = SetPlatformApplicationAttributesCommand;
exports.SetSMSAttributesCommand = SetSMSAttributesCommand;
exports.SetSubscriptionAttributesCommand = SetSubscriptionAttributesCommand;
exports.SetTopicAttributesCommand = SetTopicAttributesCommand;
exports.SubscribeCommand = SubscribeCommand;
exports.TagResourceCommand = TagResourceCommand;
exports.UnsubscribeCommand = UnsubscribeCommand;
exports.UntagResourceCommand = UntagResourceCommand;
exports.VerifySMSSandboxPhoneNumberCommand = VerifySMSSandboxPhoneNumberCommand;
exports.paginateListEndpointsByPlatformApplication = paginateListEndpointsByPlatformApplication;
exports.paginateListOriginationNumbers = paginateListOriginationNumbers;
exports.paginateListPhoneNumbersOptedOut = paginateListPhoneNumbersOptedOut;
exports.paginateListPlatformApplications = paginateListPlatformApplications;
exports.paginateListSMSSandboxPhoneNumbers = paginateListSMSSandboxPhoneNumbers;
exports.paginateListSubscriptions = paginateListSubscriptions;
exports.paginateListSubscriptionsByTopic = paginateListSubscriptionsByTopic;
exports.paginateListTopics = paginateListTopics;
Object.keys(schemas_0).forEach(function (k) {
    if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
        enumerable: true,
        get: function () { return schemas_0[k]; }
    });
});
Object.keys(errors).forEach(function (k) {
    if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
        enumerable: true,
        get: function () { return errors[k]; }
    });
});
