@pulumi/digitalocean
Version:
A Pulumi package for creating and managing DigitalOcean cloud resources.
83 lines • 4.07 kB
JavaScript
;
// *** 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.GenaiKnowledgeBase = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
class GenaiKnowledgeBase extends pulumi.CustomResource {
/**
* Get an existing GenaiKnowledgeBase 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 state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new GenaiKnowledgeBase(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of GenaiKnowledgeBase. 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'] === GenaiKnowledgeBase.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["addedToAgentAt"] = state?.addedToAgentAt;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["databaseId"] = state?.databaseId;
resourceInputs["datasources"] = state?.datasources;
resourceInputs["embeddingModelUuid"] = state?.embeddingModelUuid;
resourceInputs["isPublic"] = state?.isPublic;
resourceInputs["lastIndexingJobs"] = state?.lastIndexingJobs;
resourceInputs["name"] = state?.name;
resourceInputs["projectId"] = state?.projectId;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["vpcUuid"] = state?.vpcUuid;
}
else {
const args = argsOrState;
if (args?.datasources === undefined && !opts.urn) {
throw new Error("Missing required property 'datasources'");
}
if (args?.embeddingModelUuid === undefined && !opts.urn) {
throw new Error("Missing required property 'embeddingModelUuid'");
}
if (args?.projectId === undefined && !opts.urn) {
throw new Error("Missing required property 'projectId'");
}
if (args?.region === undefined && !opts.urn) {
throw new Error("Missing required property 'region'");
}
resourceInputs["addedToAgentAt"] = args?.addedToAgentAt;
resourceInputs["databaseId"] = args?.databaseId;
resourceInputs["datasources"] = args?.datasources;
resourceInputs["embeddingModelUuid"] = args?.embeddingModelUuid;
resourceInputs["isPublic"] = args?.isPublic;
resourceInputs["lastIndexingJobs"] = args?.lastIndexingJobs;
resourceInputs["name"] = args?.name;
resourceInputs["projectId"] = args?.projectId;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["vpcUuid"] = args?.vpcUuid;
resourceInputs["createdAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(GenaiKnowledgeBase.__pulumiType, name, resourceInputs, opts);
}
}
exports.GenaiKnowledgeBase = GenaiKnowledgeBase;
/** @internal */
GenaiKnowledgeBase.__pulumiType = 'digitalocean:index/genaiKnowledgeBase:GenaiKnowledgeBase';
//# sourceMappingURL=genaiKnowledgeBase.js.map