UNPKG

@maienm/pulumi-readarr

Version:

A Pulumi package for creating and managing Readarr resources. Based on terraform-provider-readarr: version v2.1.0

92 lines 4.34 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Author = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * <!-- subcategory:Authors -->Author resource. * For more information refer to [Authors](https://wiki.servarr.com/readarr/library#authors) documentation. * * ## Import * * import using the API/UI ID * * ```sh * $ pulumi import readarr:Authors/author:Author example 10 * ``` */ class Author extends pulumi.CustomResource { /** * Get an existing Author 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 Author(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Author. 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'] === Author.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["authorName"] = state ? state.authorName : undefined; resourceInputs["foreignAuthorId"] = state ? state.foreignAuthorId : undefined; resourceInputs["genres"] = state ? state.genres : undefined; resourceInputs["monitored"] = state ? state.monitored : undefined; resourceInputs["overview"] = state ? state.overview : undefined; resourceInputs["path"] = state ? state.path : undefined; resourceInputs["qualityProfileId"] = state ? state.qualityProfileId : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["tags"] = state ? state.tags : undefined; } else { const args = argsOrState; if ((!args || args.authorName === undefined) && !opts.urn) { throw new Error("Missing required property 'authorName'"); } if ((!args || args.foreignAuthorId === undefined) && !opts.urn) { throw new Error("Missing required property 'foreignAuthorId'"); } if ((!args || args.monitored === undefined) && !opts.urn) { throw new Error("Missing required property 'monitored'"); } if ((!args || args.path === undefined) && !opts.urn) { throw new Error("Missing required property 'path'"); } if ((!args || args.qualityProfileId === undefined) && !opts.urn) { throw new Error("Missing required property 'qualityProfileId'"); } resourceInputs["authorName"] = args ? args.authorName : undefined; resourceInputs["foreignAuthorId"] = args ? args.foreignAuthorId : undefined; resourceInputs["monitored"] = args ? args.monitored : undefined; resourceInputs["path"] = args ? args.path : undefined; resourceInputs["qualityProfileId"] = args ? args.qualityProfileId : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["genres"] = undefined /*out*/; resourceInputs["overview"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Author.__pulumiType, name, resourceInputs, opts); } } exports.Author = Author; /** @internal */ Author.__pulumiType = 'readarr:Authors/author:Author'; //# sourceMappingURL=author.js.map