"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.FunctionConfiguration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * An example resource schema demonstrating some basic constructs and validation rules.
 *
 * ## Example Usage
 * ### Example
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws_native from "@pulumi/aws-native";
 *
 * const config = new pulumi.Config();
 * const graphQlApiId = config.require("graphQlApiId");
 * const name = config.require("name");
 * const description = config.require("description");
 * const dataSourceName = config.require("dataSourceName");
 * const functionVersion = config.require("functionVersion");
 * const requestMappingTemplateS3LocationInput = config.require("requestMappingTemplateS3LocationInput");
 * const responseMappingTemplateS3LocationInput = config.require("responseMappingTemplateS3LocationInput");
 * const functionConfiguration = new aws_native.appsync.FunctionConfiguration("functionConfiguration", {
 *     apiId: graphQlApiId,
 *     name: name,
 *     description: description,
 *     functionVersion: functionVersion,
 *     dataSourceName: dataSourceName,
 *     requestMappingTemplateS3Location: requestMappingTemplateS3LocationInput,
 *     responseMappingTemplateS3Location: responseMappingTemplateS3LocationInput,
 * });
 *
 * ```
 */
class FunctionConfiguration extends pulumi.CustomResource {
    /**
     * Get an existing FunctionConfiguration 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 FunctionConfiguration(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of FunctionConfiguration.  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'] === FunctionConfiguration.__pulumiType;
    }
    /**
     * Create a FunctionConfiguration 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?.apiId === undefined && !opts.urn) {
                throw new Error("Missing required property 'apiId'");
            }
            if (args?.dataSourceName === undefined && !opts.urn) {
                throw new Error("Missing required property 'dataSourceName'");
            }
            resourceInputs["apiId"] = args?.apiId;
            resourceInputs["code"] = args?.code;
            resourceInputs["codeS3Location"] = args?.codeS3Location;
            resourceInputs["dataSourceName"] = args?.dataSourceName;
            resourceInputs["description"] = args?.description;
            resourceInputs["functionVersion"] = args?.functionVersion;
            resourceInputs["maxBatchSize"] = args?.maxBatchSize;
            resourceInputs["name"] = args?.name;
            resourceInputs["requestMappingTemplate"] = args?.requestMappingTemplate;
            resourceInputs["requestMappingTemplateS3Location"] = args?.requestMappingTemplateS3Location;
            resourceInputs["responseMappingTemplate"] = args?.responseMappingTemplate;
            resourceInputs["responseMappingTemplateS3Location"] = args?.responseMappingTemplateS3Location;
            resourceInputs["runtime"] = args?.runtime;
            resourceInputs["syncConfig"] = args?.syncConfig;
            resourceInputs["functionArn"] = undefined /*out*/;
            resourceInputs["functionId"] = undefined /*out*/;
        }
        else {
            resourceInputs["apiId"] = undefined /*out*/;
            resourceInputs["code"] = undefined /*out*/;
            resourceInputs["codeS3Location"] = undefined /*out*/;
            resourceInputs["dataSourceName"] = undefined /*out*/;
            resourceInputs["description"] = undefined /*out*/;
            resourceInputs["functionArn"] = undefined /*out*/;
            resourceInputs["functionId"] = undefined /*out*/;
            resourceInputs["functionVersion"] = undefined /*out*/;
            resourceInputs["maxBatchSize"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["requestMappingTemplate"] = undefined /*out*/;
            resourceInputs["requestMappingTemplateS3Location"] = undefined /*out*/;
            resourceInputs["responseMappingTemplate"] = undefined /*out*/;
            resourceInputs["responseMappingTemplateS3Location"] = undefined /*out*/;
            resourceInputs["runtime"] = undefined /*out*/;
            resourceInputs["syncConfig"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["apiId"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(FunctionConfiguration.__pulumiType, name, resourceInputs, opts);
    }
}
exports.FunctionConfiguration = FunctionConfiguration;
/** @internal */
FunctionConfiguration.__pulumiType = 'aws-native:appsync:FunctionConfiguration';
//# sourceMappingURL=functionConfiguration.js.map