"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.DomainsSelfRegistrationProfile = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Self Registration Profile resource in Oracle Cloud Infrastructure Identity Domains service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/identity-domains/latest/SelfRegistrationProfile
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/identity_domains
 *
 * Create a self-registration profile.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testSelfRegistrationProfile = new oci.identity.DomainsSelfRegistrationProfile("test_self_registration_profile", {
 *     activationEmailRequired: selfRegistrationProfileActivationEmailRequired === "true",
 *     consentTextPresent: selfRegistrationProfileConsentTextPresent === "true",
 *     displayNames: [{
 *         locale: selfRegistrationProfileDisplayNameLocale,
 *         value: selfRegistrationProfileDisplayNameValue,
 *         "default": selfRegistrationProfileDisplayNameDefault === "true",
 *     }],
 *     emailTemplate: {
 *         value: selfRegistrationProfileEmailTemplateValue,
 *     },
 *     idcsEndpoint: testDomain.url,
 *     name: selfRegistrationProfileName,
 *     numberOfDaysRedirectUrlIsValid: Number(selfRegistrationProfileNumberOfDaysRedirectUrlIsValid),
 *     redirectUrl: selfRegistrationProfileRedirectUrl,
 *     schemas: ["urn:ietf:params:scim:schemas:oracle:idcs:SelfRegistrationProfile"],
 *     showOnLoginPage: selfRegistrationProfileShowOnLoginPage === "true",
 *     active: selfRegistrationProfileActive === "true",
 *     afterSubmitTexts: [{
 *         locale: selfRegistrationProfileAfterSubmitTextLocale,
 *         value: selfRegistrationProfileAfterSubmitTextValue,
 *         "default": selfRegistrationProfileAfterSubmitTextDefault === "true",
 *     }],
 *     allowedEmailDomains: selfRegistrationProfileAllowedEmailDomains,
 *     attributeSets: ["all"],
 *     attributes: "",
 *     authorization: selfRegistrationProfileAuthorization,
 *     consentTexts: [{
 *         locale: selfRegistrationProfileConsentTextLocale,
 *         value: selfRegistrationProfileConsentTextValue,
 *         "default": selfRegistrationProfileConsentTextDefault === "true",
 *     }],
 *     defaultGroups: [{
 *         value: selfRegistrationProfileDefaultGroupsValue,
 *     }],
 *     disallowedEmailDomains: selfRegistrationProfileDisallowedEmailDomains,
 *     externalId: "externalId",
 *     footerLogo: selfRegistrationProfileFooterLogo,
 *     footerTexts: [{
 *         locale: selfRegistrationProfileFooterTextLocale,
 *         value: selfRegistrationProfileFooterTextValue,
 *         "default": selfRegistrationProfileFooterTextDefault === "true",
 *     }],
 *     headerLogo: selfRegistrationProfileHeaderLogo,
 *     headerTexts: [{
 *         locale: selfRegistrationProfileHeaderTextLocale,
 *         value: selfRegistrationProfileHeaderTextValue,
 *         "default": selfRegistrationProfileHeaderTextDefault === "true",
 *     }],
 *     id: selfRegistrationProfileId,
 *     ocid: selfRegistrationProfileOcid,
 *     resourceTypeSchemaVersion: selfRegistrationProfileResourceTypeSchemaVersion,
 *     tags: [{
 *         key: selfRegistrationProfileTagsKey,
 *         value: selfRegistrationProfileTagsValue,
 *     }],
 *     userAttributes: [{
 *         seqNumber: Number(selfRegistrationProfileUserAttributesSeqNumber),
 *         value: selfRegistrationProfileUserAttributesValue,
 *         fullyQualifiedAttributeName: selfRegistrationProfileUserAttributesFullyQualifiedAttributeName,
 *     }],
 * });
 * ```
 *
 * ## Import
 *
 * SelfRegistrationProfiles can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:Identity/domainsSelfRegistrationProfile:DomainsSelfRegistrationProfile test_self_registration_profile "idcsEndpoint/{idcsEndpoint}/selfRegistrationProfiles/{selfRegistrationProfileId}"
 * ```
 */
class DomainsSelfRegistrationProfile extends pulumi.CustomResource {
    /**
     * Get an existing DomainsSelfRegistrationProfile 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 DomainsSelfRegistrationProfile(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:Identity/domainsSelfRegistrationProfile:DomainsSelfRegistrationProfile';
    /**
     * Returns true if the given object is an instance of DomainsSelfRegistrationProfile.  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'] === DomainsSelfRegistrationProfile.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["activationEmailRequired"] = state?.activationEmailRequired;
            resourceInputs["active"] = state?.active;
            resourceInputs["afterSubmitTexts"] = state?.afterSubmitTexts;
            resourceInputs["allowedEmailDomains"] = state?.allowedEmailDomains;
            resourceInputs["attributeSets"] = state?.attributeSets;
            resourceInputs["attributes"] = state?.attributes;
            resourceInputs["authorization"] = state?.authorization;
            resourceInputs["compartmentOcid"] = state?.compartmentOcid;
            resourceInputs["consentTextPresent"] = state?.consentTextPresent;
            resourceInputs["consentTexts"] = state?.consentTexts;
            resourceInputs["defaultGroups"] = state?.defaultGroups;
            resourceInputs["deleteInProgress"] = state?.deleteInProgress;
            resourceInputs["disallowedEmailDomains"] = state?.disallowedEmailDomains;
            resourceInputs["displayNames"] = state?.displayNames;
            resourceInputs["domainOcid"] = state?.domainOcid;
            resourceInputs["emailTemplate"] = state?.emailTemplate;
            resourceInputs["externalId"] = state?.externalId;
            resourceInputs["footerLogo"] = state?.footerLogo;
            resourceInputs["footerTexts"] = state?.footerTexts;
            resourceInputs["headerLogo"] = state?.headerLogo;
            resourceInputs["headerTexts"] = state?.headerTexts;
            resourceInputs["idcsCreatedBies"] = state?.idcsCreatedBies;
            resourceInputs["idcsEndpoint"] = state?.idcsEndpoint;
            resourceInputs["idcsLastModifiedBies"] = state?.idcsLastModifiedBies;
            resourceInputs["idcsLastUpgradedInRelease"] = state?.idcsLastUpgradedInRelease;
            resourceInputs["idcsPreventedOperations"] = state?.idcsPreventedOperations;
            resourceInputs["metas"] = state?.metas;
            resourceInputs["name"] = state?.name;
            resourceInputs["numberOfDaysRedirectUrlIsValid"] = state?.numberOfDaysRedirectUrlIsValid;
            resourceInputs["ocid"] = state?.ocid;
            resourceInputs["redirectUrl"] = state?.redirectUrl;
            resourceInputs["resourceTypeSchemaVersion"] = state?.resourceTypeSchemaVersion;
            resourceInputs["schemas"] = state?.schemas;
            resourceInputs["showOnLoginPage"] = state?.showOnLoginPage;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["tenancyOcid"] = state?.tenancyOcid;
            resourceInputs["userAttributes"] = state?.userAttributes;
        }
        else {
            const args = argsOrState;
            if (args?.activationEmailRequired === undefined && !opts.urn) {
                throw new Error("Missing required property 'activationEmailRequired'");
            }
            if (args?.consentTextPresent === undefined && !opts.urn) {
                throw new Error("Missing required property 'consentTextPresent'");
            }
            if (args?.displayNames === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayNames'");
            }
            if (args?.emailTemplate === undefined && !opts.urn) {
                throw new Error("Missing required property 'emailTemplate'");
            }
            if (args?.idcsEndpoint === undefined && !opts.urn) {
                throw new Error("Missing required property 'idcsEndpoint'");
            }
            if (args?.numberOfDaysRedirectUrlIsValid === undefined && !opts.urn) {
                throw new Error("Missing required property 'numberOfDaysRedirectUrlIsValid'");
            }
            if (args?.redirectUrl === undefined && !opts.urn) {
                throw new Error("Missing required property 'redirectUrl'");
            }
            if (args?.schemas === undefined && !opts.urn) {
                throw new Error("Missing required property 'schemas'");
            }
            if (args?.showOnLoginPage === undefined && !opts.urn) {
                throw new Error("Missing required property 'showOnLoginPage'");
            }
            resourceInputs["activationEmailRequired"] = args?.activationEmailRequired;
            resourceInputs["active"] = args?.active;
            resourceInputs["afterSubmitTexts"] = args?.afterSubmitTexts;
            resourceInputs["allowedEmailDomains"] = args?.allowedEmailDomains;
            resourceInputs["attributeSets"] = args?.attributeSets;
            resourceInputs["attributes"] = args?.attributes;
            resourceInputs["authorization"] = args?.authorization;
            resourceInputs["consentTextPresent"] = args?.consentTextPresent;
            resourceInputs["consentTexts"] = args?.consentTexts;
            resourceInputs["defaultGroups"] = args?.defaultGroups;
            resourceInputs["disallowedEmailDomains"] = args?.disallowedEmailDomains;
            resourceInputs["displayNames"] = args?.displayNames;
            resourceInputs["emailTemplate"] = args?.emailTemplate;
            resourceInputs["externalId"] = args?.externalId;
            resourceInputs["footerLogo"] = args?.footerLogo;
            resourceInputs["footerTexts"] = args?.footerTexts;
            resourceInputs["headerLogo"] = args?.headerLogo;
            resourceInputs["headerTexts"] = args?.headerTexts;
            resourceInputs["idcsEndpoint"] = args?.idcsEndpoint;
            resourceInputs["name"] = args?.name;
            resourceInputs["numberOfDaysRedirectUrlIsValid"] = args?.numberOfDaysRedirectUrlIsValid;
            resourceInputs["ocid"] = args?.ocid;
            resourceInputs["redirectUrl"] = args?.redirectUrl;
            resourceInputs["resourceTypeSchemaVersion"] = args?.resourceTypeSchemaVersion;
            resourceInputs["schemas"] = args?.schemas;
            resourceInputs["showOnLoginPage"] = args?.showOnLoginPage;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["userAttributes"] = args?.userAttributes;
            resourceInputs["compartmentOcid"] = undefined /*out*/;
            resourceInputs["deleteInProgress"] = undefined /*out*/;
            resourceInputs["domainOcid"] = undefined /*out*/;
            resourceInputs["idcsCreatedBies"] = undefined /*out*/;
            resourceInputs["idcsLastModifiedBies"] = undefined /*out*/;
            resourceInputs["idcsLastUpgradedInRelease"] = undefined /*out*/;
            resourceInputs["idcsPreventedOperations"] = undefined /*out*/;
            resourceInputs["metas"] = undefined /*out*/;
            resourceInputs["tenancyOcid"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(DomainsSelfRegistrationProfile.__pulumiType, name, resourceInputs, opts);
    }
}
exports.DomainsSelfRegistrationProfile = DomainsSelfRegistrationProfile;
//# sourceMappingURL=domainsSelfRegistrationProfile.js.map