// 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

/**
API for AWS Elemental MediaLive
*/
public struct MediaLive {

    public let client: AWSClient

    public init(accessKeyId: String? = nil, secretAccessKey: String? = nil, sessionToken: String? = nil, region: AWSSDKSwiftCore.Region? = nil, endpoint: String? = nil, middlewares: [AWSServiceMiddleware] = []) {
        self.client = AWSClient(
            accessKeyId: accessKeyId,
            secretAccessKey: secretAccessKey,
            sessionToken: sessionToken,
            region: region,
            service: "medialive",
            serviceProtocol: ServiceProtocol(type: .restjson, version: ServiceProtocol.Version(major: 1, minor: 1)),
            apiVersion: "2017-10-14",
            endpoint: endpoint,
            middlewares: middlewares,
            possibleErrorTypes: [MediaLiveErrorType.self]
        )
    }

    ///  Update a channel schedule
    public func batchUpdateSchedule(_ input: BatchUpdateScheduleRequest) -> Future<BatchUpdateScheduleResponse> {
        return client.send(operation: "BatchUpdateSchedule", path: "/prod/channels/{channelId}/schedule", httpMethod: "PUT", input: input)
    }

    ///  Creates a new channel
    public func createChannel(_ input: CreateChannelRequest) -> Future<CreateChannelResponse> {
        return client.send(operation: "CreateChannel", path: "/prod/channels", httpMethod: "POST", input: input)
    }

    ///  Create an input
    public func createInput(_ input: CreateInputRequest) -> Future<CreateInputResponse> {
        return client.send(operation: "CreateInput", path: "/prod/inputs", httpMethod: "POST", input: input)
    }

    ///  Creates a Input Security Group
    public func createInputSecurityGroup(_ input: CreateInputSecurityGroupRequest) -> Future<CreateInputSecurityGroupResponse> {
        return client.send(operation: "CreateInputSecurityGroup", path: "/prod/inputSecurityGroups", httpMethod: "POST", input: input)
    }

    ///  Create tags for a resource
    @discardableResult public func createTags(_ input: CreateTagsRequest) -> Future<Void> {
        return client.send(operation: "CreateTags", path: "/prod/tags/{resource-arn}", httpMethod: "POST", input: input)
    }

    ///  Starts deletion of channel. The associated outputs are also deleted.
    public func deleteChannel(_ input: DeleteChannelRequest) -> Future<DeleteChannelResponse> {
        return client.send(operation: "DeleteChannel", path: "/prod/channels/{channelId}", httpMethod: "DELETE", input: input)
    }

    ///  Deletes the input end point
    public func deleteInput(_ input: DeleteInputRequest) -> Future<DeleteInputResponse> {
        return client.send(operation: "DeleteInput", path: "/prod/inputs/{inputId}", httpMethod: "DELETE", input: input)
    }

    ///  Deletes an Input Security Group
    public func deleteInputSecurityGroup(_ input: DeleteInputSecurityGroupRequest) -> Future<DeleteInputSecurityGroupResponse> {
        return client.send(operation: "DeleteInputSecurityGroup", path: "/prod/inputSecurityGroups/{inputSecurityGroupId}", httpMethod: "DELETE", input: input)
    }

    ///  Delete an expired reservation.
    public func deleteReservation(_ input: DeleteReservationRequest) -> Future<DeleteReservationResponse> {
        return client.send(operation: "DeleteReservation", path: "/prod/reservations/{reservationId}", httpMethod: "DELETE", input: input)
    }

    ///  Delete all schedule actions on a channel.
    public func deleteSchedule(_ input: DeleteScheduleRequest) -> Future<DeleteScheduleResponse> {
        return client.send(operation: "DeleteSchedule", path: "/prod/channels/{channelId}/schedule", httpMethod: "DELETE", input: input)
    }

    ///  Removes tags for a resource
    @discardableResult public func deleteTags(_ input: DeleteTagsRequest) -> Future<Void> {
        return client.send(operation: "DeleteTags", path: "/prod/tags/{resource-arn}", httpMethod: "DELETE", input: input)
    }

    ///  Gets details about a channel
    public func describeChannel(_ input: DescribeChannelRequest) -> Future<DescribeChannelResponse> {
        return client.send(operation: "DescribeChannel", path: "/prod/channels/{channelId}", httpMethod: "GET", input: input)
    }

    ///  Produces details about an input
    public func describeInput(_ input: DescribeInputRequest) -> Future<DescribeInputResponse> {
        return client.send(operation: "DescribeInput", path: "/prod/inputs/{inputId}", httpMethod: "GET", input: input)
    }

    ///  Produces a summary of an Input Security Group
    public func describeInputSecurityGroup(_ input: DescribeInputSecurityGroupRequest) -> Future<DescribeInputSecurityGroupResponse> {
        return client.send(operation: "DescribeInputSecurityGroup", path: "/prod/inputSecurityGroups/{inputSecurityGroupId}", httpMethod: "GET", input: input)
    }

    ///  Get details for an offering.
    public func describeOffering(_ input: DescribeOfferingRequest) -> Future<DescribeOfferingResponse> {
        return client.send(operation: "DescribeOffering", path: "/prod/offerings/{offeringId}", httpMethod: "GET", input: input)
    }

    ///  Get details for a reservation.
    public func describeReservation(_ input: DescribeReservationRequest) -> Future<DescribeReservationResponse> {
        return client.send(operation: "DescribeReservation", path: "/prod/reservations/{reservationId}", httpMethod: "GET", input: input)
    }

    ///  Get a channel schedule
    public func describeSchedule(_ input: DescribeScheduleRequest) -> Future<DescribeScheduleResponse> {
        return client.send(operation: "DescribeSchedule", path: "/prod/channels/{channelId}/schedule", httpMethod: "GET", input: input)
    }

    ///  Produces list of channels that have been created
    public func listChannels(_ input: ListChannelsRequest) -> Future<ListChannelsResponse> {
        return client.send(operation: "ListChannels", path: "/prod/channels", httpMethod: "GET", input: input)
    }

    ///  Produces a list of Input Security Groups for an account
    public func listInputSecurityGroups(_ input: ListInputSecurityGroupsRequest) -> Future<ListInputSecurityGroupsResponse> {
        return client.send(operation: "ListInputSecurityGroups", path: "/prod/inputSecurityGroups", httpMethod: "GET", input: input)
    }

    ///  Produces list of inputs that have been created
    public func listInputs(_ input: ListInputsRequest) -> Future<ListInputsResponse> {
        return client.send(operation: "ListInputs", path: "/prod/inputs", httpMethod: "GET", input: input)
    }

    ///  List offerings available for purchase.
    public func listOfferings(_ input: ListOfferingsRequest) -> Future<ListOfferingsResponse> {
        return client.send(operation: "ListOfferings", path: "/prod/offerings", httpMethod: "GET", input: input)
    }

    ///  List purchased reservations.
    public func listReservations(_ input: ListReservationsRequest) -> Future<ListReservationsResponse> {
        return client.send(operation: "ListReservations", path: "/prod/reservations", httpMethod: "GET", input: input)
    }

    ///  Produces list of tags that have been created for a resource
    public func listTagsForResource(_ input: ListTagsForResourceRequest) -> Future<ListTagsForResourceResponse> {
        return client.send(operation: "ListTagsForResource", path: "/prod/tags/{resource-arn}", httpMethod: "GET", input: input)
    }

    ///  Purchase an offering and create a reservation.
    public func purchaseOffering(_ input: PurchaseOfferingRequest) -> Future<PurchaseOfferingResponse> {
        return client.send(operation: "PurchaseOffering", path: "/prod/offerings/{offeringId}/purchase", httpMethod: "POST", input: input)
    }

    ///  Starts an existing channel
    public func startChannel(_ input: StartChannelRequest) -> Future<StartChannelResponse> {
        return client.send(operation: "StartChannel", path: "/prod/channels/{channelId}/start", httpMethod: "POST", input: input)
    }

    ///  Stops a running channel
    public func stopChannel(_ input: StopChannelRequest) -> Future<StopChannelResponse> {
        return client.send(operation: "StopChannel", path: "/prod/channels/{channelId}/stop", httpMethod: "POST", input: input)
    }

    ///  Updates a channel.
    public func updateChannel(_ input: UpdateChannelRequest) -> Future<UpdateChannelResponse> {
        return client.send(operation: "UpdateChannel", path: "/prod/channels/{channelId}", httpMethod: "PUT", input: input)
    }

    ///  Changes the class of the channel.
    public func updateChannelClass(_ input: UpdateChannelClassRequest) -> Future<UpdateChannelClassResponse> {
        return client.send(operation: "UpdateChannelClass", path: "/prod/channels/{channelId}/channelClass", httpMethod: "PUT", input: input)
    }

    ///  Updates an input.
    public func updateInput(_ input: UpdateInputRequest) -> Future<UpdateInputResponse> {
        return client.send(operation: "UpdateInput", path: "/prod/inputs/{inputId}", httpMethod: "PUT", input: input)
    }

    ///  Update an Input Security Group's Whilelists.
    public func updateInputSecurityGroup(_ input: UpdateInputSecurityGroupRequest) -> Future<UpdateInputSecurityGroupResponse> {
        return client.send(operation: "UpdateInputSecurityGroup", path: "/prod/inputSecurityGroups/{inputSecurityGroupId}", httpMethod: "PUT", input: input)
    }

    ///  Update reservation.
    public func updateReservation(_ input: UpdateReservationRequest) -> Future<UpdateReservationResponse> {
        return client.send(operation: "UpdateReservation", path: "/prod/reservations/{reservationId}", httpMethod: "PUT", input: input)
    }
}
