"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Subscription = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Subscription resource in Oracle Cloud Infrastructure Osp Gateway service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/osp_gateway
 *
 * Update plan of the subscription.
 *
 * ## Import
 *
 * Subscriptions can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:OspGateway/subscription:Subscription test_subscription "subscriptions/{subscriptionId}/compartmentId/{compartmentId}/ospHomeRegion/{ospHomeRegion}"
 * ```
 */
class Subscription extends pulumi.CustomResource {
    /**
     * Get an existing Subscription 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 Subscription(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:OspGateway/subscription:Subscription';
    /**
     * Returns true if the given object is an instance of Subscription.  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'] === Subscription.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["accountType"] = state?.accountType;
            resourceInputs["billToCustAccountId"] = state?.billToCustAccountId;
            resourceInputs["billingAddresses"] = state?.billingAddresses;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["currencyCode"] = state?.currencyCode;
            resourceInputs["email"] = state?.email;
            resourceInputs["gsiOrgCode"] = state?.gsiOrgCode;
            resourceInputs["isCorporateConversionAllowed"] = state?.isCorporateConversionAllowed;
            resourceInputs["isIntentToPay"] = state?.isIntentToPay;
            resourceInputs["languageCode"] = state?.languageCode;
            resourceInputs["organizationId"] = state?.organizationId;
            resourceInputs["ospHomeRegion"] = state?.ospHomeRegion;
            resourceInputs["paymentGateways"] = state?.paymentGateways;
            resourceInputs["paymentOptions"] = state?.paymentOptions;
            resourceInputs["planType"] = state?.planType;
            resourceInputs["shipToCustAcctRoleId"] = state?.shipToCustAcctRoleId;
            resourceInputs["shipToCustAcctSiteId"] = state?.shipToCustAcctSiteId;
            resourceInputs["subscription"] = state?.subscription;
            resourceInputs["subscriptionId"] = state?.subscriptionId;
            resourceInputs["subscriptionPlanNumber"] = state?.subscriptionPlanNumber;
            resourceInputs["taxInfos"] = state?.taxInfos;
            resourceInputs["timePersonalToCorporateConv"] = state?.timePersonalToCorporateConv;
            resourceInputs["timePlanUpgrade"] = state?.timePlanUpgrade;
            resourceInputs["timeStart"] = state?.timeStart;
            resourceInputs["upgradeState"] = state?.upgradeState;
            resourceInputs["upgradeStateDetails"] = state?.upgradeStateDetails;
        }
        else {
            const args = argsOrState;
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.email === undefined && !opts.urn) {
                throw new Error("Missing required property 'email'");
            }
            if (args?.ospHomeRegion === undefined && !opts.urn) {
                throw new Error("Missing required property 'ospHomeRegion'");
            }
            if (args?.subscription === undefined && !opts.urn) {
                throw new Error("Missing required property 'subscription'");
            }
            if (args?.subscriptionId === undefined && !opts.urn) {
                throw new Error("Missing required property 'subscriptionId'");
            }
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["email"] = args?.email;
            resourceInputs["ospHomeRegion"] = args?.ospHomeRegion;
            resourceInputs["subscription"] = args?.subscription;
            resourceInputs["subscriptionId"] = args?.subscriptionId;
            resourceInputs["accountType"] = undefined /*out*/;
            resourceInputs["billToCustAccountId"] = undefined /*out*/;
            resourceInputs["billingAddresses"] = undefined /*out*/;
            resourceInputs["currencyCode"] = undefined /*out*/;
            resourceInputs["gsiOrgCode"] = undefined /*out*/;
            resourceInputs["isCorporateConversionAllowed"] = undefined /*out*/;
            resourceInputs["isIntentToPay"] = undefined /*out*/;
            resourceInputs["languageCode"] = undefined /*out*/;
            resourceInputs["organizationId"] = undefined /*out*/;
            resourceInputs["paymentGateways"] = undefined /*out*/;
            resourceInputs["paymentOptions"] = undefined /*out*/;
            resourceInputs["planType"] = undefined /*out*/;
            resourceInputs["shipToCustAcctRoleId"] = undefined /*out*/;
            resourceInputs["shipToCustAcctSiteId"] = undefined /*out*/;
            resourceInputs["subscriptionPlanNumber"] = undefined /*out*/;
            resourceInputs["taxInfos"] = undefined /*out*/;
            resourceInputs["timePersonalToCorporateConv"] = undefined /*out*/;
            resourceInputs["timePlanUpgrade"] = undefined /*out*/;
            resourceInputs["timeStart"] = undefined /*out*/;
            resourceInputs["upgradeState"] = undefined /*out*/;
            resourceInputs["upgradeStateDetails"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Subscription.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Subscription = Subscription;
//# sourceMappingURL=subscription.js.map