// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/swift-aws/aws-sdk-swift/blob/master/CodeGenerator/Sources/CodeGenerator/main.swift. DO NOT EDIT.

import Foundation
import AWSSDKSwiftCore
import NIO

/**
Amazon API Gateway V2
*/
public struct ApiGatewayV2 {

    public let client: AWSClient

    public init(accessKeyId: String? = nil, secretAccessKey: String? = nil, sessionToken: String? = nil, region: AWSSDKSwiftCore.Region? = nil, endpoint: String? = nil, middlewares: [AWSServiceMiddleware] = [], eventLoopGroupProvider: AWSClient.EventLoopGroupProvider = .useAWSClientShared) {
        self.client = AWSClient(
            accessKeyId: accessKeyId,
            secretAccessKey: secretAccessKey,
            sessionToken: sessionToken,
            region: region,
            service: "apigateway",
            serviceProtocol: ServiceProtocol(type: .restjson, version: ServiceProtocol.Version(major: 1, minor: 1)),
            apiVersion: "2018-11-29",
            endpoint: endpoint,
            middlewares: middlewares,
            possibleErrorTypes: [ApiGatewayV2ErrorType.self],
            eventLoopGroupProvider: eventLoopGroupProvider
        )
    }

    ///  Creates an Api resource.
    public func createApi(_ input: CreateApiRequest) -> Future<CreateApiResponse> {
        return client.send(operation: "CreateApi", path: "/v2/apis", httpMethod: "POST", input: input)
    }

    ///  Creates an API mapping.
    public func createApiMapping(_ input: CreateApiMappingRequest) -> Future<CreateApiMappingResponse> {
        return client.send(operation: "CreateApiMapping", path: "/v2/domainnames/{domainName}/apimappings", httpMethod: "POST", input: input)
    }

    ///  Creates an Authorizer for an API.
    public func createAuthorizer(_ input: CreateAuthorizerRequest) -> Future<CreateAuthorizerResponse> {
        return client.send(operation: "CreateAuthorizer", path: "/v2/apis/{apiId}/authorizers", httpMethod: "POST", input: input)
    }

    ///  Creates a Deployment for an API.
    public func createDeployment(_ input: CreateDeploymentRequest) -> Future<CreateDeploymentResponse> {
        return client.send(operation: "CreateDeployment", path: "/v2/apis/{apiId}/deployments", httpMethod: "POST", input: input)
    }

    ///  Creates a domain name.
    public func createDomainName(_ input: CreateDomainNameRequest) -> Future<CreateDomainNameResponse> {
        return client.send(operation: "CreateDomainName", path: "/v2/domainnames", httpMethod: "POST", input: input)
    }

    ///  Creates an Integration.
    public func createIntegration(_ input: CreateIntegrationRequest) -> Future<CreateIntegrationResult> {
        return client.send(operation: "CreateIntegration", path: "/v2/apis/{apiId}/integrations", httpMethod: "POST", input: input)
    }

    ///  Creates an IntegrationResponses.
    public func createIntegrationResponse(_ input: CreateIntegrationResponseRequest) -> Future<CreateIntegrationResponseResponse> {
        return client.send(operation: "CreateIntegrationResponse", path: "/v2/apis/{apiId}/integrations/{integrationId}/integrationresponses", httpMethod: "POST", input: input)
    }

    ///  Creates a Model for an API.
    public func createModel(_ input: CreateModelRequest) -> Future<CreateModelResponse> {
        return client.send(operation: "CreateModel", path: "/v2/apis/{apiId}/models", httpMethod: "POST", input: input)
    }

    ///  Creates a Route for an API.
    public func createRoute(_ input: CreateRouteRequest) -> Future<CreateRouteResult> {
        return client.send(operation: "CreateRoute", path: "/v2/apis/{apiId}/routes", httpMethod: "POST", input: input)
    }

    ///  Creates a RouteResponse for a Route.
    public func createRouteResponse(_ input: CreateRouteResponseRequest) -> Future<CreateRouteResponseResponse> {
        return client.send(operation: "CreateRouteResponse", path: "/v2/apis/{apiId}/routes/{routeId}/routeresponses", httpMethod: "POST", input: input)
    }

    ///  Creates a Stage for an API.
    public func createStage(_ input: CreateStageRequest) -> Future<CreateStageResponse> {
        return client.send(operation: "CreateStage", path: "/v2/apis/{apiId}/stages", httpMethod: "POST", input: input)
    }

    ///  Deletes an Api resource.
    @discardableResult public func deleteApi(_ input: DeleteApiRequest) -> Future<Void> {
        return client.send(operation: "DeleteApi", path: "/v2/apis/{apiId}", httpMethod: "DELETE", input: input)
    }

    ///  Deletes an API mapping.
    @discardableResult public func deleteApiMapping(_ input: DeleteApiMappingRequest) -> Future<Void> {
        return client.send(operation: "DeleteApiMapping", path: "/v2/domainnames/{domainName}/apimappings/{apiMappingId}", httpMethod: "DELETE", input: input)
    }

    ///  Deletes an Authorizer.
    @discardableResult public func deleteAuthorizer(_ input: DeleteAuthorizerRequest) -> Future<Void> {
        return client.send(operation: "DeleteAuthorizer", path: "/v2/apis/{apiId}/authorizers/{authorizerId}", httpMethod: "DELETE", input: input)
    }

    ///  Deletes a Deployment.
    @discardableResult public func deleteDeployment(_ input: DeleteDeploymentRequest) -> Future<Void> {
        return client.send(operation: "DeleteDeployment", path: "/v2/apis/{apiId}/deployments/{deploymentId}", httpMethod: "DELETE", input: input)
    }

    ///  Deletes a domain name.
    @discardableResult public func deleteDomainName(_ input: DeleteDomainNameRequest) -> Future<Void> {
        return client.send(operation: "DeleteDomainName", path: "/v2/domainnames/{domainName}", httpMethod: "DELETE", input: input)
    }

    ///  Deletes an Integration.
    @discardableResult public func deleteIntegration(_ input: DeleteIntegrationRequest) -> Future<Void> {
        return client.send(operation: "DeleteIntegration", path: "/v2/apis/{apiId}/integrations/{integrationId}", httpMethod: "DELETE", input: input)
    }

    ///  Deletes an IntegrationResponses.
    @discardableResult public func deleteIntegrationResponse(_ input: DeleteIntegrationResponseRequest) -> Future<Void> {
        return client.send(operation: "DeleteIntegrationResponse", path: "/v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}", httpMethod: "DELETE", input: input)
    }

    ///  Deletes a Model.
    @discardableResult public func deleteModel(_ input: DeleteModelRequest) -> Future<Void> {
        return client.send(operation: "DeleteModel", path: "/v2/apis/{apiId}/models/{modelId}", httpMethod: "DELETE", input: input)
    }

    ///  Deletes a Route.
    @discardableResult public func deleteRoute(_ input: DeleteRouteRequest) -> Future<Void> {
        return client.send(operation: "DeleteRoute", path: "/v2/apis/{apiId}/routes/{routeId}", httpMethod: "DELETE", input: input)
    }

    ///  Deletes a RouteResponse.
    @discardableResult public func deleteRouteResponse(_ input: DeleteRouteResponseRequest) -> Future<Void> {
        return client.send(operation: "DeleteRouteResponse", path: "/v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}", httpMethod: "DELETE", input: input)
    }

    ///  Deletes a Stage.
    @discardableResult public func deleteStage(_ input: DeleteStageRequest) -> Future<Void> {
        return client.send(operation: "DeleteStage", path: "/v2/apis/{apiId}/stages/{stageName}", httpMethod: "DELETE", input: input)
    }

    ///  Gets an Api resource.
    public func getApi(_ input: GetApiRequest) -> Future<GetApiResponse> {
        return client.send(operation: "GetApi", path: "/v2/apis/{apiId}", httpMethod: "GET", input: input)
    }

    ///  The API mapping.
    public func getApiMapping(_ input: GetApiMappingRequest) -> Future<GetApiMappingResponse> {
        return client.send(operation: "GetApiMapping", path: "/v2/domainnames/{domainName}/apimappings/{apiMappingId}", httpMethod: "GET", input: input)
    }

    ///  The API mappings.
    public func getApiMappings(_ input: GetApiMappingsRequest) -> Future<GetApiMappingsResponse> {
        return client.send(operation: "GetApiMappings", path: "/v2/domainnames/{domainName}/apimappings", httpMethod: "GET", input: input)
    }

    ///  Gets a collection of Api resources.
    public func getApis(_ input: GetApisRequest) -> Future<GetApisResponse> {
        return client.send(operation: "GetApis", path: "/v2/apis", httpMethod: "GET", input: input)
    }

    ///  Gets an Authorizer.
    public func getAuthorizer(_ input: GetAuthorizerRequest) -> Future<GetAuthorizerResponse> {
        return client.send(operation: "GetAuthorizer", path: "/v2/apis/{apiId}/authorizers/{authorizerId}", httpMethod: "GET", input: input)
    }

    ///  Gets the Authorizers for an API.
    public func getAuthorizers(_ input: GetAuthorizersRequest) -> Future<GetAuthorizersResponse> {
        return client.send(operation: "GetAuthorizers", path: "/v2/apis/{apiId}/authorizers", httpMethod: "GET", input: input)
    }

    ///  Gets a Deployment.
    public func getDeployment(_ input: GetDeploymentRequest) -> Future<GetDeploymentResponse> {
        return client.send(operation: "GetDeployment", path: "/v2/apis/{apiId}/deployments/{deploymentId}", httpMethod: "GET", input: input)
    }

    ///  Gets the Deployments for an API.
    public func getDeployments(_ input: GetDeploymentsRequest) -> Future<GetDeploymentsResponse> {
        return client.send(operation: "GetDeployments", path: "/v2/apis/{apiId}/deployments", httpMethod: "GET", input: input)
    }

    ///  Gets a domain name.
    public func getDomainName(_ input: GetDomainNameRequest) -> Future<GetDomainNameResponse> {
        return client.send(operation: "GetDomainName", path: "/v2/domainnames/{domainName}", httpMethod: "GET", input: input)
    }

    ///  Gets the domain names for an AWS account.
    public func getDomainNames(_ input: GetDomainNamesRequest) -> Future<GetDomainNamesResponse> {
        return client.send(operation: "GetDomainNames", path: "/v2/domainnames", httpMethod: "GET", input: input)
    }

    ///  Gets an Integration.
    public func getIntegration(_ input: GetIntegrationRequest) -> Future<GetIntegrationResult> {
        return client.send(operation: "GetIntegration", path: "/v2/apis/{apiId}/integrations/{integrationId}", httpMethod: "GET", input: input)
    }

    ///  Gets an IntegrationResponses.
    public func getIntegrationResponse(_ input: GetIntegrationResponseRequest) -> Future<GetIntegrationResponseResponse> {
        return client.send(operation: "GetIntegrationResponse", path: "/v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}", httpMethod: "GET", input: input)
    }

    ///  Gets the IntegrationResponses for an Integration.
    public func getIntegrationResponses(_ input: GetIntegrationResponsesRequest) -> Future<GetIntegrationResponsesResponse> {
        return client.send(operation: "GetIntegrationResponses", path: "/v2/apis/{apiId}/integrations/{integrationId}/integrationresponses", httpMethod: "GET", input: input)
    }

    ///  Gets the Integrations for an API.
    public func getIntegrations(_ input: GetIntegrationsRequest) -> Future<GetIntegrationsResponse> {
        return client.send(operation: "GetIntegrations", path: "/v2/apis/{apiId}/integrations", httpMethod: "GET", input: input)
    }

    ///  Gets a Model.
    public func getModel(_ input: GetModelRequest) -> Future<GetModelResponse> {
        return client.send(operation: "GetModel", path: "/v2/apis/{apiId}/models/{modelId}", httpMethod: "GET", input: input)
    }

    ///  Gets a model template.
    public func getModelTemplate(_ input: GetModelTemplateRequest) -> Future<GetModelTemplateResponse> {
        return client.send(operation: "GetModelTemplate", path: "/v2/apis/{apiId}/models/{modelId}/template", httpMethod: "GET", input: input)
    }

    ///  Gets the Models for an API.
    public func getModels(_ input: GetModelsRequest) -> Future<GetModelsResponse> {
        return client.send(operation: "GetModels", path: "/v2/apis/{apiId}/models", httpMethod: "GET", input: input)
    }

    ///  Gets a Route.
    public func getRoute(_ input: GetRouteRequest) -> Future<GetRouteResult> {
        return client.send(operation: "GetRoute", path: "/v2/apis/{apiId}/routes/{routeId}", httpMethod: "GET", input: input)
    }

    ///  Gets a RouteResponse.
    public func getRouteResponse(_ input: GetRouteResponseRequest) -> Future<GetRouteResponseResponse> {
        return client.send(operation: "GetRouteResponse", path: "/v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}", httpMethod: "GET", input: input)
    }

    ///  Gets the RouteResponses for a Route.
    public func getRouteResponses(_ input: GetRouteResponsesRequest) -> Future<GetRouteResponsesResponse> {
        return client.send(operation: "GetRouteResponses", path: "/v2/apis/{apiId}/routes/{routeId}/routeresponses", httpMethod: "GET", input: input)
    }

    ///  Gets the Routes for an API.
    public func getRoutes(_ input: GetRoutesRequest) -> Future<GetRoutesResponse> {
        return client.send(operation: "GetRoutes", path: "/v2/apis/{apiId}/routes", httpMethod: "GET", input: input)
    }

    ///  Gets a Stage.
    public func getStage(_ input: GetStageRequest) -> Future<GetStageResponse> {
        return client.send(operation: "GetStage", path: "/v2/apis/{apiId}/stages/{stageName}", httpMethod: "GET", input: input)
    }

    ///  Gets the Stages for an API.
    public func getStages(_ input: GetStagesRequest) -> Future<GetStagesResponse> {
        return client.send(operation: "GetStages", path: "/v2/apis/{apiId}/stages", httpMethod: "GET", input: input)
    }

    ///  Gets the Tags for a resource.
    public func getTags(_ input: GetTagsRequest) -> Future<GetTagsResponse> {
        return client.send(operation: "GetTags", path: "/v2/tags/{resource-arn}", httpMethod: "GET", input: input)
    }

    public func tagResource(_ input: TagResourceRequest) -> Future<TagResourceResponse> {
        return client.send(operation: "TagResource", path: "/v2/tags/{resource-arn}", httpMethod: "POST", input: input)
    }

    @discardableResult public func untagResource(_ input: UntagResourceRequest) -> Future<Void> {
        return client.send(operation: "UntagResource", path: "/v2/tags/{resource-arn}", httpMethod: "DELETE", input: input)
    }

    ///  Updates an Api resource.
    public func updateApi(_ input: UpdateApiRequest) -> Future<UpdateApiResponse> {
        return client.send(operation: "UpdateApi", path: "/v2/apis/{apiId}", httpMethod: "PATCH", input: input)
    }

    ///  The API mapping.
    public func updateApiMapping(_ input: UpdateApiMappingRequest) -> Future<UpdateApiMappingResponse> {
        return client.send(operation: "UpdateApiMapping", path: "/v2/domainnames/{domainName}/apimappings/{apiMappingId}", httpMethod: "PATCH", input: input)
    }

    ///  Updates an Authorizer.
    public func updateAuthorizer(_ input: UpdateAuthorizerRequest) -> Future<UpdateAuthorizerResponse> {
        return client.send(operation: "UpdateAuthorizer", path: "/v2/apis/{apiId}/authorizers/{authorizerId}", httpMethod: "PATCH", input: input)
    }

    ///  Updates a Deployment.
    public func updateDeployment(_ input: UpdateDeploymentRequest) -> Future<UpdateDeploymentResponse> {
        return client.send(operation: "UpdateDeployment", path: "/v2/apis/{apiId}/deployments/{deploymentId}", httpMethod: "PATCH", input: input)
    }

    ///  Updates a domain name.
    public func updateDomainName(_ input: UpdateDomainNameRequest) -> Future<UpdateDomainNameResponse> {
        return client.send(operation: "UpdateDomainName", path: "/v2/domainnames/{domainName}", httpMethod: "PATCH", input: input)
    }

    ///  Updates an Integration.
    public func updateIntegration(_ input: UpdateIntegrationRequest) -> Future<UpdateIntegrationResult> {
        return client.send(operation: "UpdateIntegration", path: "/v2/apis/{apiId}/integrations/{integrationId}", httpMethod: "PATCH", input: input)
    }

    ///  Updates an IntegrationResponses.
    public func updateIntegrationResponse(_ input: UpdateIntegrationResponseRequest) -> Future<UpdateIntegrationResponseResponse> {
        return client.send(operation: "UpdateIntegrationResponse", path: "/v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}", httpMethod: "PATCH", input: input)
    }

    ///  Updates a Model.
    public func updateModel(_ input: UpdateModelRequest) -> Future<UpdateModelResponse> {
        return client.send(operation: "UpdateModel", path: "/v2/apis/{apiId}/models/{modelId}", httpMethod: "PATCH", input: input)
    }

    ///  Updates a Route.
    public func updateRoute(_ input: UpdateRouteRequest) -> Future<UpdateRouteResult> {
        return client.send(operation: "UpdateRoute", path: "/v2/apis/{apiId}/routes/{routeId}", httpMethod: "PATCH", input: input)
    }

    ///  Updates a RouteResponse.
    public func updateRouteResponse(_ input: UpdateRouteResponseRequest) -> Future<UpdateRouteResponseResponse> {
        return client.send(operation: "UpdateRouteResponse", path: "/v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}", httpMethod: "PATCH", input: input)
    }

    ///  Updates a Stage.
    public func updateStage(_ input: UpdateStageRequest) -> Future<UpdateStageResponse> {
        return client.send(operation: "UpdateStage", path: "/v2/apis/{apiId}/stages/{stageName}", httpMethod: "PATCH", input: input)
    }
}
