"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Delivery = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * This structure contains information about one delivery in your account.
 *
 * A delivery is a connection between a logical delivery source and a logical delivery destination.
 *
 * For more information, see [CreateDelivery](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html).
 */
class Delivery extends pulumi.CustomResource {
    /**
     * Get an existing Delivery resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, opts) {
        return new Delivery(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Delivery.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === Delivery.__pulumiType;
    }
    /**
     * Create a Delivery resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name, args, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (!opts.id) {
            if (args?.deliveryDestinationArn === undefined && !opts.urn) {
                throw new Error("Missing required property 'deliveryDestinationArn'");
            }
            if (args?.deliverySourceName === undefined && !opts.urn) {
                throw new Error("Missing required property 'deliverySourceName'");
            }
            resourceInputs["deliveryDestinationArn"] = args?.deliveryDestinationArn;
            resourceInputs["deliverySourceName"] = args?.deliverySourceName;
            resourceInputs["fieldDelimiter"] = args?.fieldDelimiter;
            resourceInputs["recordFields"] = args?.recordFields;
            resourceInputs["s3EnableHiveCompatiblePath"] = args?.s3EnableHiveCompatiblePath;
            resourceInputs["s3SuffixPath"] = args?.s3SuffixPath;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["arn"] = undefined /*out*/;
            resourceInputs["deliveryDestinationType"] = undefined /*out*/;
            resourceInputs["deliveryId"] = undefined /*out*/;
        }
        else {
            resourceInputs["arn"] = undefined /*out*/;
            resourceInputs["deliveryDestinationArn"] = undefined /*out*/;
            resourceInputs["deliveryDestinationType"] = undefined /*out*/;
            resourceInputs["deliveryId"] = undefined /*out*/;
            resourceInputs["deliverySourceName"] = undefined /*out*/;
            resourceInputs["fieldDelimiter"] = undefined /*out*/;
            resourceInputs["recordFields"] = undefined /*out*/;
            resourceInputs["s3EnableHiveCompatiblePath"] = undefined /*out*/;
            resourceInputs["s3SuffixPath"] = undefined /*out*/;
            resourceInputs["tags"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["deliveryDestinationArn", "deliverySourceName"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(Delivery.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Delivery = Delivery;
/** @internal */
Delivery.__pulumiType = 'aws-native:logs:Delivery';
//# sourceMappingURL=delivery.js.map