UNPKG

@maienm/pulumi-lidarr

Version:

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

99 lines 4.66 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.Naming = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * <!-- subcategory:Media Management -->Naming resource. * For more information refer to [Naming](https://wiki.servarr.com/lidarr/settings#community-naming-suggestions) documentation. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as lidarr from "@maienm/pulumi-lidarr"; * * const example = new lidarr.mediamanagement.Naming("example", { * artistFolderFormat: "{Artist Name}", * multiDiscTrackFormat: "{Album Title} ({Release Year})/{Medium Format} {medium:00}/{Artist Name} - {Album Title} - {track:00} - {Track Title}", * renameTracks: true, * replaceIllegalCharacters: true, * standardTrackFormat: "{Album Title} ({Release Year})/{Artist Name} - {Album Title} - {track:00} - {Track Title}", * }); * ``` * * ## Import * * import * * ```sh * $ pulumi import lidarr:MediaManagement/naming:Naming example * ``` */ class Naming extends pulumi.CustomResource { /** * Get an existing Naming 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 Naming(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Naming. 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'] === Naming.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["artistFolderFormat"] = state ? state.artistFolderFormat : undefined; resourceInputs["multiDiscTrackFormat"] = state ? state.multiDiscTrackFormat : undefined; resourceInputs["renameTracks"] = state ? state.renameTracks : undefined; resourceInputs["replaceIllegalCharacters"] = state ? state.replaceIllegalCharacters : undefined; resourceInputs["standardTrackFormat"] = state ? state.standardTrackFormat : undefined; } else { const args = argsOrState; if ((!args || args.artistFolderFormat === undefined) && !opts.urn) { throw new Error("Missing required property 'artistFolderFormat'"); } if ((!args || args.multiDiscTrackFormat === undefined) && !opts.urn) { throw new Error("Missing required property 'multiDiscTrackFormat'"); } if ((!args || args.renameTracks === undefined) && !opts.urn) { throw new Error("Missing required property 'renameTracks'"); } if ((!args || args.replaceIllegalCharacters === undefined) && !opts.urn) { throw new Error("Missing required property 'replaceIllegalCharacters'"); } if ((!args || args.standardTrackFormat === undefined) && !opts.urn) { throw new Error("Missing required property 'standardTrackFormat'"); } resourceInputs["artistFolderFormat"] = args ? args.artistFolderFormat : undefined; resourceInputs["multiDiscTrackFormat"] = args ? args.multiDiscTrackFormat : undefined; resourceInputs["renameTracks"] = args ? args.renameTracks : undefined; resourceInputs["replaceIllegalCharacters"] = args ? args.replaceIllegalCharacters : undefined; resourceInputs["standardTrackFormat"] = args ? args.standardTrackFormat : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Naming.__pulumiType, name, resourceInputs, opts); } } exports.Naming = Naming; /** @internal */ Naming.__pulumiType = 'lidarr:MediaManagement/naming:Naming'; //# sourceMappingURL=naming.js.map