//
// Bitrise app generated by SwagGen
// https://github.com/yonaskolb/SwagGen
//

import ArgumentParser
import API

// Re-deliver the delivery item of a specified webhook of a Bitrise application
struct WebhookDeliveryItemRedeliverCommand: AuthenticatedCommand {
    static var configuration = CommandConfiguration(
        commandName: "WebhookDeliveryItemRedeliver",
        abstract: "Re-deliver the webhook delivery items of an app"
    )

    @OptionGroup var auth: AuthOptions
    @Argument var appSlug: String
    @Argument var appWebhookSlug: String
    @Argument var webhookDeliveryItemSlug: String

    func run() throws {
        let request = Bitrise.WebhookDeliveryItem.WebhookDeliveryItemRedeliver.Request(appSlug: appSlug, appWebhookSlug: appWebhookSlug, webhookDeliveryItemSlug: webhookDeliveryItemSlug)

        client
            .call(request)
            .waitUntilDone()
    }
}

