UNPKG

@maienm/pulumi-lidarr

Version:

A Pulumi package for creating and managing Lidarr resources. Based on terraform-provider-lidarr: version v1.11.0

100 lines 4.31 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.Kodi = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * <!-- subcategory:Metadata -->Metadata Kodi resource. * For more information refer to [Metadata](https://wiki.servarr.com/lidarr/settings#metadata) and [KODI](https://wiki.servarr.com/lidarr/supported#xbmcmetadata). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as lidarr from "@maienm/pulumi-lidarr"; * * const example = new lidarr.metadata.Kodi("example", { * albumImages: true, * albumMetadata: false, * artistImages: true, * artistMetadata: true, * enable: true, * }); * ``` * * ## Import * * import using the API/UI ID * * ```sh * $ pulumi import lidarr:Metadata/kodi:Kodi example 1 * ``` */ class Kodi extends pulumi.CustomResource { /** * Get an existing Kodi 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 Kodi(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Kodi. 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'] === Kodi.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["albumImages"] = state ? state.albumImages : undefined; resourceInputs["albumMetadata"] = state ? state.albumMetadata : undefined; resourceInputs["artistImages"] = state ? state.artistImages : undefined; resourceInputs["artistMetadata"] = state ? state.artistMetadata : undefined; resourceInputs["enable"] = state ? state.enable : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["tags"] = state ? state.tags : undefined; } else { const args = argsOrState; if ((!args || args.albumImages === undefined) && !opts.urn) { throw new Error("Missing required property 'albumImages'"); } if ((!args || args.albumMetadata === undefined) && !opts.urn) { throw new Error("Missing required property 'albumMetadata'"); } if ((!args || args.artistImages === undefined) && !opts.urn) { throw new Error("Missing required property 'artistImages'"); } if ((!args || args.artistMetadata === undefined) && !opts.urn) { throw new Error("Missing required property 'artistMetadata'"); } resourceInputs["albumImages"] = args ? args.albumImages : undefined; resourceInputs["albumMetadata"] = args ? args.albumMetadata : undefined; resourceInputs["artistImages"] = args ? args.artistImages : undefined; resourceInputs["artistMetadata"] = args ? args.artistMetadata : undefined; resourceInputs["enable"] = args ? args.enable : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["tags"] = args ? args.tags : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Kodi.__pulumiType, name, resourceInputs, opts); } } exports.Kodi = Kodi; /** @internal */ Kodi.__pulumiType = 'lidarr:Metadata/kodi:Kodi'; //# sourceMappingURL=kodi.js.map