UNPKG

@maienm/pulumi-readarr

Version:

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

102 lines 4.23 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.QualityProfile = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * <!-- subcategory:Profiles -->Quality Profile resource. * For more information refer to [Quality Profile](https://wiki.servarr.com/readarr/settings#quality-profiles) documentation. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as readarr from "@maienm/pulumi-readarr"; * * const example = new readarr.profiles.QualityProfile("example", { * cutoff: 1100, * qualityGroups: [{ * id: 1100, * name: "native", * qualities: [ * { * id: 3, * name: "EPUB", * }, * { * id: 2, * name: "MOBI", * }, * ], * }], * upgradeAllowed: true, * }); * ``` * * ## Import * * import using the API/UI ID * * ```sh * $ pulumi import readarr:Profiles/qualityProfile:QualityProfile example 10 * ``` */ class QualityProfile extends pulumi.CustomResource { /** * Get an existing QualityProfile 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 QualityProfile(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of QualityProfile. 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'] === QualityProfile.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["cutoff"] = state ? state.cutoff : undefined; resourceInputs["cutoffFormatScore"] = state ? state.cutoffFormatScore : undefined; resourceInputs["formatItems"] = state ? state.formatItems : undefined; resourceInputs["minFormatScore"] = state ? state.minFormatScore : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["qualityGroups"] = state ? state.qualityGroups : undefined; resourceInputs["upgradeAllowed"] = state ? state.upgradeAllowed : undefined; } else { const args = argsOrState; if ((!args || args.qualityGroups === undefined) && !opts.urn) { throw new Error("Missing required property 'qualityGroups'"); } resourceInputs["cutoff"] = args ? args.cutoff : undefined; resourceInputs["cutoffFormatScore"] = args ? args.cutoffFormatScore : undefined; resourceInputs["formatItems"] = args ? args.formatItems : undefined; resourceInputs["minFormatScore"] = args ? args.minFormatScore : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["qualityGroups"] = args ? args.qualityGroups : undefined; resourceInputs["upgradeAllowed"] = args ? args.upgradeAllowed : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(QualityProfile.__pulumiType, name, resourceInputs, opts); } } exports.QualityProfile = QualityProfile; /** @internal */ QualityProfile.__pulumiType = 'readarr:Profiles/qualityProfile:QualityProfile'; //# sourceMappingURL=qualityProfile.js.map