UNPKG

@maienm/pulumi-readarr

Version:

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

99 lines 4.26 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.Config = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * <!-- subcategory:Metadata -->Metadata Config resource. * For more information refer to [Metadata](https://wiki.servarr.com/readarr/settings#options) documentation. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as readarr from "@maienm/pulumi-readarr"; * * const example = new readarr.metadata.Config("example", { * embedMetadata: true, * scrubAudioTags: false, * updateCovers: true, * writeAudioTags: "no", * writeBookTags: "newFiles", * }); * ``` * * ## Import * * import does not need parameters * * ```sh * $ pulumi import readarr:Metadata/config:Config example "" * ``` */ class Config extends pulumi.CustomResource { /** * Get an existing Config 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 Config(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Config. 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'] === Config.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["embedMetadata"] = state ? state.embedMetadata : undefined; resourceInputs["scrubAudioTags"] = state ? state.scrubAudioTags : undefined; resourceInputs["updateCovers"] = state ? state.updateCovers : undefined; resourceInputs["writeAudioTags"] = state ? state.writeAudioTags : undefined; resourceInputs["writeBookTags"] = state ? state.writeBookTags : undefined; } else { const args = argsOrState; if ((!args || args.embedMetadata === undefined) && !opts.urn) { throw new Error("Missing required property 'embedMetadata'"); } if ((!args || args.scrubAudioTags === undefined) && !opts.urn) { throw new Error("Missing required property 'scrubAudioTags'"); } if ((!args || args.updateCovers === undefined) && !opts.urn) { throw new Error("Missing required property 'updateCovers'"); } if ((!args || args.writeAudioTags === undefined) && !opts.urn) { throw new Error("Missing required property 'writeAudioTags'"); } if ((!args || args.writeBookTags === undefined) && !opts.urn) { throw new Error("Missing required property 'writeBookTags'"); } resourceInputs["embedMetadata"] = args ? args.embedMetadata : undefined; resourceInputs["scrubAudioTags"] = args ? args.scrubAudioTags : undefined; resourceInputs["updateCovers"] = args ? args.updateCovers : undefined; resourceInputs["writeAudioTags"] = args ? args.writeAudioTags : undefined; resourceInputs["writeBookTags"] = args ? args.writeBookTags : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Config.__pulumiType, name, resourceInputs, opts); } } exports.Config = Config; /** @internal */ Config.__pulumiType = 'readarr:Metadata/config:Config'; //# sourceMappingURL=config.js.map