"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.Resolver = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * The ``AWS::AppSync::Resolver`` resource defines the logical GraphQL resolver that you attach to fields in a schema. Request and response templates for resolvers are written in Apache Velocity Template Language (VTL) format. For more information about resolvers, see [Resolver Mapping Template Reference](https://docs.aws.amazon.com/appsync/latest/devguide/resolver-mapping-template-reference.html).
 *   When you submit an update, CFNLong updates resources based on differences between what you submit and the stack's current template. To cause this resource to be updated you must change a property value for this resource in the CFNshort template. Changing the S3 file content without changing a property value will not result in an update operation.
 *  See [Update Behaviors of Stack Resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html) in the *User Guide*.
 *
 * ## 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 dataSourceName = config.require("dataSourceName");
 * const fieldName = config.require("fieldName");
 * const typeName = config.require("typeName");
 * const requestMappingTemplateS3LocationInput = config.require("requestMappingTemplateS3LocationInput");
 * const responseMappingTemplateS3LocationInput = config.require("responseMappingTemplateS3LocationInput");
 * const resolver = new aws_native.appsync.Resolver("resolver", {
 *     apiId: graphQlApiId,
 *     typeName: typeName,
 *     fieldName: fieldName,
 *     dataSourceName: dataSourceName,
 *     requestMappingTemplateS3Location: requestMappingTemplateS3LocationInput,
 *     responseMappingTemplateS3Location: responseMappingTemplateS3LocationInput,
 * });
 *
 * ```
 */
class Resolver extends pulumi.CustomResource {
    /**
     * Get an existing Resolver 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 Resolver(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Resolver.  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'] === Resolver.__pulumiType;
    }
    /**
     * Create a Resolver 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?.fieldName === undefined && !opts.urn) {
                throw new Error("Missing required property 'fieldName'");
            }
            if (args?.typeName === undefined && !opts.urn) {
                throw new Error("Missing required property 'typeName'");
            }
            resourceInputs["apiId"] = args?.apiId;
            resourceInputs["cachingConfig"] = args?.cachingConfig;
            resourceInputs["code"] = args?.code;
            resourceInputs["codeS3Location"] = args?.codeS3Location;
            resourceInputs["dataSourceName"] = args?.dataSourceName;
            resourceInputs["fieldName"] = args?.fieldName;
            resourceInputs["kind"] = args?.kind;
            resourceInputs["maxBatchSize"] = args?.maxBatchSize;
            resourceInputs["metricsConfig"] = args?.metricsConfig;
            resourceInputs["pipelineConfig"] = args?.pipelineConfig;
            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["typeName"] = args?.typeName;
            resourceInputs["resolverArn"] = undefined /*out*/;
        }
        else {
            resourceInputs["apiId"] = undefined /*out*/;
            resourceInputs["cachingConfig"] = undefined /*out*/;
            resourceInputs["code"] = undefined /*out*/;
            resourceInputs["codeS3Location"] = undefined /*out*/;
            resourceInputs["dataSourceName"] = undefined /*out*/;
            resourceInputs["fieldName"] = undefined /*out*/;
            resourceInputs["kind"] = undefined /*out*/;
            resourceInputs["maxBatchSize"] = undefined /*out*/;
            resourceInputs["metricsConfig"] = undefined /*out*/;
            resourceInputs["pipelineConfig"] = undefined /*out*/;
            resourceInputs["requestMappingTemplate"] = undefined /*out*/;
            resourceInputs["requestMappingTemplateS3Location"] = undefined /*out*/;
            resourceInputs["resolverArn"] = undefined /*out*/;
            resourceInputs["responseMappingTemplate"] = undefined /*out*/;
            resourceInputs["responseMappingTemplateS3Location"] = undefined /*out*/;
            resourceInputs["runtime"] = undefined /*out*/;
            resourceInputs["syncConfig"] = undefined /*out*/;
            resourceInputs["typeName"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["apiId", "fieldName", "typeName"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(Resolver.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Resolver = Resolver;
/** @internal */
Resolver.__pulumiType = 'aws-native:appsync:Resolver';
//# sourceMappingURL=resolver.js.map