"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.DomainsSetting = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Setting resource in Oracle Cloud Infrastructure Identity Domains service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/identity-domains/latest/Setting
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/identity_domains
 *
 * Replace Settings
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testSetting = new oci.identity.DomainsSetting("test_setting", {
 *     csrAccess: settingCsrAccess,
 *     idcsEndpoint: testDomain.url,
 *     schemas: ["urn:ietf:params:scim:schemas:oracle:idcs:Settings"],
 *     settingId: "Settings",
 *     accountAlwaysTrustScope: settingAccountAlwaysTrustScope === "true",
 *     allowedDomains: ["test.com"],
 *     allowedForgotPasswordFlowReturnUrls: settingAllowedForgotPasswordFlowReturnUrls,
 *     allowedNotificationRedirectUrls: settingAllowedNotificationRedirectUrls,
 *     attributeSets: ["all"],
 *     attributes: "",
 *     auditEventRetentionPeriod: Number(settingAuditEventRetentionPeriod),
 *     authorization: settingAuthorization,
 *     certificateValidation: {
 *         crlCheckOnOcspFailureEnabled: settingCertificateValidationCrlCheckOnOcspFailureEnabled === "true",
 *         crlEnabled: settingCertificateValidationCrlEnabled === "true",
 *         crlLocation: settingCertificateValidationCrlLocation,
 *         crlRefreshInterval: Number(settingCertificateValidationCrlRefreshInterval),
 *         ocspEnabled: settingCertificateValidationOcspEnabled === "true",
 *         ocspResponderUrl: settingCertificateValidationOcspResponderUrl,
 *         ocspSettingsResponderUrlPreferred: settingCertificateValidationOcspSettingsResponderUrlPreferred === "true",
 *         ocspSigningCertificateAlias: settingCertificateValidationOcspSigningCertificateAlias,
 *         ocspTimeoutDuration: Number(settingCertificateValidationOcspTimeoutDuration),
 *         ocspUnknownResponseStatusAllowed: settingCertificateValidationOcspUnknownResponseStatusAllowed === "true",
 *     },
 *     cloudGateCorsSettings: {
 *         cloudGateCorsAllowNullOrigin: settingCloudGateCorsSettingsCloudGateCorsAllowNullOrigin === "true",
 *         cloudGateCorsAllowedOrigins: ["https://test.com"],
 *         cloudGateCorsEnabled: settingCloudGateCorsSettingsCloudGateCorsEnabled === "true",
 *         cloudGateCorsExposedHeaders: settingCloudGateCorsSettingsCloudGateCorsExposedHeaders,
 *         cloudGateCorsMaxAge: Number(settingCloudGateCorsSettingsCloudGateCorsMaxAge),
 *     },
 *     cloudMigrationCustomUrl: settingCloudMigrationCustomUrl,
 *     cloudMigrationUrlEnabled: settingCloudMigrationUrlEnabled === "true",
 *     companyNames: [{
 *         locale: settingCompanyNamesLocale,
 *         value: settingCompanyNamesValue,
 *     }],
 *     contactEmails: ["contactEmails@test.com"],
 *     customBranding: settingCustomBranding === "true",
 *     customCssLocation: settingCustomCssLocation,
 *     customHtmlLocation: settingCustomHtmlLocation,
 *     customTranslation: settingCustomTranslation,
 *     defaultTrustScope: settingDefaultTrustScope,
 *     diagnosticLevel: Number(settingDiagnosticLevel),
 *     diagnosticRecordForSearchIdentifiesReturnedResources: settingDiagnosticRecordForSearchIdentifiesReturnedResources === "true",
 *     enableTermsOfUse: settingEnableTermsOfUse === "true",
 *     externalId: "externalId",
 *     iamUpstSessionExpiry: Number(settingIamUpstSessionExpiry),
 *     identityDomainsSettingId: settingId,
 *     images: [{
 *         type: settingImagesType,
 *         value: settingImagesValue,
 *         display: settingImagesDisplay,
 *     }],
 *     isHostedPage: settingIsHostedPage === "true",
 *     issuer: settingIssuer,
 *     locale: settingLocale,
 *     loginTexts: [{
 *         locale: settingLoginTextsLocale,
 *         value: settingLoginTextsValue,
 *     }],
 *     maxNoOfAppCmvaToReturn: Number(settingMaxNoOfAppCmvaToReturn),
 *     maxNoOfAppRoleMembersToReturn: Number(settingMaxNoOfAppRoleMembersToReturn),
 *     ocid: settingOcid,
 *     preferredLanguage: settingPreferredLanguage,
 *     prevIssuer: settingPrevIssuer,
 *     privacyPolicyUrl: settingPrivacyPolicyUrl,
 *     purgeConfigs: [{
 *         resourceName: "resourceName",
 *         retentionPeriod: Number(settingPurgeConfigsRetentionPeriod),
 *     }],
 *     reAuthFactors: ["password"],
 *     reAuthWhenChangingMyAuthenticationFactors: settingReAuthWhenChangingMyAuthenticationFactors === "true",
 *     resourceTypeSchemaVersion: settingResourceTypeSchemaVersion,
 *     serviceAdminCannotListOtherUsers: settingServiceAdminCannotListOtherUsers === "true",
 *     signingCertPublicAccess: settingSigningCertPublicAccess === "true",
 *     subMappingAttr: settingSubMappingAttr,
 *     tags: [{
 *         key: settingTagsKey,
 *         value: settingTagsValue,
 *     }],
 *     tenantCustomClaims: [{
 *         allScopes: settingTenantCustomClaimsAllScopes === "true",
 *         expression: settingTenantCustomClaimsExpression === "true",
 *         mode: settingTenantCustomClaimsMode,
 *         name: settingTenantCustomClaimsName,
 *         tokenType: settingTenantCustomClaimsTokenType,
 *         value: settingTenantCustomClaimsValue,
 *         scopes: ["scopes"],
 *     }],
 *     termsOfUseUrl: settingTermsOfUseUrl,
 *     timezone: settingTimezone,
 * });
 * ```
 *
 * ## Import
 *
 * Settings can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:Identity/domainsSetting:DomainsSetting test_setting "idcsEndpoint/{idcsEndpoint}/settings/{settingId}"
 * ```
 */
class DomainsSetting extends pulumi.CustomResource {
    /**
     * Get an existing DomainsSetting 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 DomainsSetting(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:Identity/domainsSetting:DomainsSetting';
    /**
     * Returns true if the given object is an instance of DomainsSetting.  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'] === DomainsSetting.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["accountAlwaysTrustScope"] = state?.accountAlwaysTrustScope;
            resourceInputs["allowedDomains"] = state?.allowedDomains;
            resourceInputs["allowedForgotPasswordFlowReturnUrls"] = state?.allowedForgotPasswordFlowReturnUrls;
            resourceInputs["allowedNotificationRedirectUrls"] = state?.allowedNotificationRedirectUrls;
            resourceInputs["attributeSets"] = state?.attributeSets;
            resourceInputs["attributes"] = state?.attributes;
            resourceInputs["auditEventRetentionPeriod"] = state?.auditEventRetentionPeriod;
            resourceInputs["authorization"] = state?.authorization;
            resourceInputs["certificateValidation"] = state?.certificateValidation;
            resourceInputs["cloudAccountName"] = state?.cloudAccountName;
            resourceInputs["cloudGateCorsSettings"] = state?.cloudGateCorsSettings;
            resourceInputs["cloudMigrationCustomUrl"] = state?.cloudMigrationCustomUrl;
            resourceInputs["cloudMigrationUrlEnabled"] = state?.cloudMigrationUrlEnabled;
            resourceInputs["companyNames"] = state?.companyNames;
            resourceInputs["compartmentOcid"] = state?.compartmentOcid;
            resourceInputs["contactEmails"] = state?.contactEmails;
            resourceInputs["csrAccess"] = state?.csrAccess;
            resourceInputs["customBranding"] = state?.customBranding;
            resourceInputs["customCssLocation"] = state?.customCssLocation;
            resourceInputs["customHtmlLocation"] = state?.customHtmlLocation;
            resourceInputs["customTranslation"] = state?.customTranslation;
            resourceInputs["defaultCompanyNames"] = state?.defaultCompanyNames;
            resourceInputs["defaultImages"] = state?.defaultImages;
            resourceInputs["defaultLoginTexts"] = state?.defaultLoginTexts;
            resourceInputs["defaultTrustScope"] = state?.defaultTrustScope;
            resourceInputs["deleteInProgress"] = state?.deleteInProgress;
            resourceInputs["diagnosticLevel"] = state?.diagnosticLevel;
            resourceInputs["diagnosticRecordForSearchIdentifiesReturnedResources"] = state?.diagnosticRecordForSearchIdentifiesReturnedResources;
            resourceInputs["diagnosticTracingUpto"] = state?.diagnosticTracingUpto;
            resourceInputs["domainOcid"] = state?.domainOcid;
            resourceInputs["enableTermsOfUse"] = state?.enableTermsOfUse;
            resourceInputs["externalId"] = state?.externalId;
            resourceInputs["iamUpstSessionExpiry"] = state?.iamUpstSessionExpiry;
            resourceInputs["idcsCreatedBies"] = state?.idcsCreatedBies;
            resourceInputs["idcsEndpoint"] = state?.idcsEndpoint;
            resourceInputs["idcsLastModifiedBies"] = state?.idcsLastModifiedBies;
            resourceInputs["idcsLastUpgradedInRelease"] = state?.idcsLastUpgradedInRelease;
            resourceInputs["idcsPreventedOperations"] = state?.idcsPreventedOperations;
            resourceInputs["identityDomainsSettingId"] = state?.identityDomainsSettingId;
            resourceInputs["images"] = state?.images;
            resourceInputs["isHostedPage"] = state?.isHostedPage;
            resourceInputs["issuer"] = state?.issuer;
            resourceInputs["locale"] = state?.locale;
            resourceInputs["loginTexts"] = state?.loginTexts;
            resourceInputs["maxNoOfAppCmvaToReturn"] = state?.maxNoOfAppCmvaToReturn;
            resourceInputs["maxNoOfAppRoleMembersToReturn"] = state?.maxNoOfAppRoleMembersToReturn;
            resourceInputs["metas"] = state?.metas;
            resourceInputs["migrationStatus"] = state?.migrationStatus;
            resourceInputs["ocid"] = state?.ocid;
            resourceInputs["onPremisesProvisioning"] = state?.onPremisesProvisioning;
            resourceInputs["preferredLanguage"] = state?.preferredLanguage;
            resourceInputs["prevIssuer"] = state?.prevIssuer;
            resourceInputs["privacyPolicyUrl"] = state?.privacyPolicyUrl;
            resourceInputs["purgeConfigs"] = state?.purgeConfigs;
            resourceInputs["reAuthFactors"] = state?.reAuthFactors;
            resourceInputs["reAuthWhenChangingMyAuthenticationFactors"] = state?.reAuthWhenChangingMyAuthenticationFactors;
            resourceInputs["resourceTypeSchemaVersion"] = state?.resourceTypeSchemaVersion;
            resourceInputs["schemas"] = state?.schemas;
            resourceInputs["serviceAdminCannotListOtherUsers"] = state?.serviceAdminCannotListOtherUsers;
            resourceInputs["settingId"] = state?.settingId;
            resourceInputs["signingCertPublicAccess"] = state?.signingCertPublicAccess;
            resourceInputs["subMappingAttr"] = state?.subMappingAttr;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["tenancyOcid"] = state?.tenancyOcid;
            resourceInputs["tenantCustomClaims"] = state?.tenantCustomClaims;
            resourceInputs["termsOfUseUrl"] = state?.termsOfUseUrl;
            resourceInputs["timezone"] = state?.timezone;
        }
        else {
            const args = argsOrState;
            if (args?.csrAccess === undefined && !opts.urn) {
                throw new Error("Missing required property 'csrAccess'");
            }
            if (args?.idcsEndpoint === undefined && !opts.urn) {
                throw new Error("Missing required property 'idcsEndpoint'");
            }
            if (args?.schemas === undefined && !opts.urn) {
                throw new Error("Missing required property 'schemas'");
            }
            if (args?.settingId === undefined && !opts.urn) {
                throw new Error("Missing required property 'settingId'");
            }
            resourceInputs["accountAlwaysTrustScope"] = args?.accountAlwaysTrustScope;
            resourceInputs["allowedDomains"] = args?.allowedDomains;
            resourceInputs["allowedForgotPasswordFlowReturnUrls"] = args?.allowedForgotPasswordFlowReturnUrls ? pulumi.secret(args.allowedForgotPasswordFlowReturnUrls) : undefined;
            resourceInputs["allowedNotificationRedirectUrls"] = args?.allowedNotificationRedirectUrls;
            resourceInputs["attributeSets"] = args?.attributeSets;
            resourceInputs["attributes"] = args?.attributes;
            resourceInputs["auditEventRetentionPeriod"] = args?.auditEventRetentionPeriod;
            resourceInputs["authorization"] = args?.authorization;
            resourceInputs["certificateValidation"] = args?.certificateValidation;
            resourceInputs["cloudGateCorsSettings"] = args?.cloudGateCorsSettings;
            resourceInputs["cloudMigrationCustomUrl"] = args?.cloudMigrationCustomUrl;
            resourceInputs["cloudMigrationUrlEnabled"] = args?.cloudMigrationUrlEnabled;
            resourceInputs["companyNames"] = args?.companyNames;
            resourceInputs["contactEmails"] = args?.contactEmails;
            resourceInputs["csrAccess"] = args?.csrAccess;
            resourceInputs["customBranding"] = args?.customBranding;
            resourceInputs["customCssLocation"] = args?.customCssLocation;
            resourceInputs["customHtmlLocation"] = args?.customHtmlLocation;
            resourceInputs["customTranslation"] = args?.customTranslation;
            resourceInputs["defaultTrustScope"] = args?.defaultTrustScope;
            resourceInputs["diagnosticLevel"] = args?.diagnosticLevel;
            resourceInputs["diagnosticRecordForSearchIdentifiesReturnedResources"] = args?.diagnosticRecordForSearchIdentifiesReturnedResources;
            resourceInputs["enableTermsOfUse"] = args?.enableTermsOfUse;
            resourceInputs["externalId"] = args?.externalId;
            resourceInputs["iamUpstSessionExpiry"] = args?.iamUpstSessionExpiry;
            resourceInputs["idcsEndpoint"] = args?.idcsEndpoint;
            resourceInputs["identityDomainsSettingId"] = args?.identityDomainsSettingId;
            resourceInputs["images"] = args?.images;
            resourceInputs["isHostedPage"] = args?.isHostedPage;
            resourceInputs["issuer"] = args?.issuer;
            resourceInputs["locale"] = args?.locale;
            resourceInputs["loginTexts"] = args?.loginTexts;
            resourceInputs["maxNoOfAppCmvaToReturn"] = args?.maxNoOfAppCmvaToReturn;
            resourceInputs["maxNoOfAppRoleMembersToReturn"] = args?.maxNoOfAppRoleMembersToReturn;
            resourceInputs["ocid"] = args?.ocid;
            resourceInputs["preferredLanguage"] = args?.preferredLanguage;
            resourceInputs["prevIssuer"] = args?.prevIssuer;
            resourceInputs["privacyPolicyUrl"] = args?.privacyPolicyUrl;
            resourceInputs["purgeConfigs"] = args?.purgeConfigs;
            resourceInputs["reAuthFactors"] = args?.reAuthFactors;
            resourceInputs["reAuthWhenChangingMyAuthenticationFactors"] = args?.reAuthWhenChangingMyAuthenticationFactors;
            resourceInputs["resourceTypeSchemaVersion"] = args?.resourceTypeSchemaVersion;
            resourceInputs["schemas"] = args?.schemas;
            resourceInputs["serviceAdminCannotListOtherUsers"] = args?.serviceAdminCannotListOtherUsers;
            resourceInputs["settingId"] = args?.settingId;
            resourceInputs["signingCertPublicAccess"] = args?.signingCertPublicAccess;
            resourceInputs["subMappingAttr"] = args?.subMappingAttr;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["tenantCustomClaims"] = args?.tenantCustomClaims;
            resourceInputs["termsOfUseUrl"] = args?.termsOfUseUrl;
            resourceInputs["timezone"] = args?.timezone;
            resourceInputs["cloudAccountName"] = undefined /*out*/;
            resourceInputs["compartmentOcid"] = undefined /*out*/;
            resourceInputs["defaultCompanyNames"] = undefined /*out*/;
            resourceInputs["defaultImages"] = undefined /*out*/;
            resourceInputs["defaultLoginTexts"] = undefined /*out*/;
            resourceInputs["deleteInProgress"] = undefined /*out*/;
            resourceInputs["diagnosticTracingUpto"] = 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["migrationStatus"] = undefined /*out*/;
            resourceInputs["onPremisesProvisioning"] = undefined /*out*/;
            resourceInputs["tenancyOcid"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["allowedForgotPasswordFlowReturnUrls"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(DomainsSetting.__pulumiType, name, resourceInputs, opts);
    }
}
exports.DomainsSetting = DomainsSetting;
//# sourceMappingURL=domainsSetting.js.map