"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.DomainsSocialIdentityProvider = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Social Identity Provider resource in Oracle Cloud Infrastructure Identity Domains service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/identity-domains/latest/SocialIdentityProvider
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/identity_domains
 *
 * Create a Social Identity Provider
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testSocialIdentityProvider = new oci.identity.DomainsSocialIdentityProvider("test_social_identity_provider", {
 *     accountLinkingEnabled: socialIdentityProviderAccountLinkingEnabled === "true",
 *     consumerKey: socialIdentityProviderConsumerKey,
 *     consumerSecret: socialIdentityProviderConsumerSecret,
 *     enabled: socialIdentityProviderEnabled === "true",
 *     idcsEndpoint: testDomain.url,
 *     name: socialIdentityProviderName,
 *     registrationEnabled: socialIdentityProviderRegistrationEnabled === "true",
 *     schemas: ["urn:ietf:params:scim:schemas:oracle:idcs:SocialIdentityProvider"],
 *     serviceProviderName: socialIdentityProviderServiceProviderName,
 *     showOnLogin: socialIdentityProviderShowOnLogin === "true",
 *     accessTokenUrl: socialIdentityProviderAccessTokenUrl,
 *     adminScopes: socialIdentityProviderAdminScope,
 *     appleDevId: testAppleDev.id,
 *     appleKeyId: testKey.id,
 *     authorization: socialIdentityProviderAuthorization,
 *     authzUrl: socialIdentityProviderAuthzUrl,
 *     autoRedirectEnabled: socialIdentityProviderAutoRedirectEnabled === "true",
 *     clientCredentialInPayload: socialIdentityProviderClientCredentialInPayload === "true",
 *     clockSkewInSeconds: Number(socialIdentityProviderClockSkewInSeconds),
 *     description: socialIdentityProviderDescription,
 *     discoveryUrl: socialIdentityProviderDiscoveryUrl,
 *     iconUrl: socialIdentityProviderIconUrl,
 *     idAttribute: socialIdentityProviderIdAttribute,
 *     jitProvAssignedGroups: [{
 *         value: socialIdentityProviderJitProvAssignedGroupsValue,
 *     }],
 *     jitProvGroupStaticListEnabled: socialIdentityProviderJitProvGroupStaticListEnabled === "true",
 *     ocid: socialIdentityProviderOcid,
 *     profileUrl: socialIdentityProviderProfileUrl,
 *     redirectUrl: socialIdentityProviderRedirectUrl,
 *     refreshTokenUrl: socialIdentityProviderRefreshTokenUrl,
 *     relayIdpParamMappings: [{
 *         relayParamKey: socialIdentityProviderRelayIdpParamMappingsRelayParamKey,
 *         relayParamValue: socialIdentityProviderRelayIdpParamMappingsRelayParamValue,
 *     }],
 *     resourceTypeSchemaVersion: socialIdentityProviderResourceTypeSchemaVersion,
 *     scopes: socialIdentityProviderScope,
 *     socialJitProvisioningEnabled: socialIdentityProviderSocialJitProvisioningEnabled === "true",
 *     status: socialIdentityProviderStatus,
 *     tags: [{
 *         key: socialIdentityProviderTagsKey,
 *         value: socialIdentityProviderTagsValue,
 *     }],
 * });
 * ```
 *
 * ## Import
 *
 * SocialIdentityProviders can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:Identity/domainsSocialIdentityProvider:DomainsSocialIdentityProvider test_social_identity_provider "idcsEndpoint/{idcsEndpoint}/socialIdentityProviders/{socialIdentityProviderId}"
 * ```
 */
class DomainsSocialIdentityProvider extends pulumi.CustomResource {
    /**
     * Get an existing DomainsSocialIdentityProvider 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 DomainsSocialIdentityProvider(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:Identity/domainsSocialIdentityProvider:DomainsSocialIdentityProvider';
    /**
     * Returns true if the given object is an instance of DomainsSocialIdentityProvider.  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'] === DomainsSocialIdentityProvider.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["accessTokenUrl"] = state?.accessTokenUrl;
            resourceInputs["accountLinkingEnabled"] = state?.accountLinkingEnabled;
            resourceInputs["adminScopes"] = state?.adminScopes;
            resourceInputs["appleDevId"] = state?.appleDevId;
            resourceInputs["appleKeyId"] = state?.appleKeyId;
            resourceInputs["authorization"] = state?.authorization;
            resourceInputs["authzUrl"] = state?.authzUrl;
            resourceInputs["autoRedirectEnabled"] = state?.autoRedirectEnabled;
            resourceInputs["clientCredentialInPayload"] = state?.clientCredentialInPayload;
            resourceInputs["clockSkewInSeconds"] = state?.clockSkewInSeconds;
            resourceInputs["compartmentOcid"] = state?.compartmentOcid;
            resourceInputs["consumerKey"] = state?.consumerKey;
            resourceInputs["consumerSecret"] = state?.consumerSecret;
            resourceInputs["deleteInProgress"] = state?.deleteInProgress;
            resourceInputs["description"] = state?.description;
            resourceInputs["discoveryUrl"] = state?.discoveryUrl;
            resourceInputs["domainOcid"] = state?.domainOcid;
            resourceInputs["enabled"] = state?.enabled;
            resourceInputs["iconUrl"] = state?.iconUrl;
            resourceInputs["idAttribute"] = state?.idAttribute;
            resourceInputs["idcsCreatedBies"] = state?.idcsCreatedBies;
            resourceInputs["idcsEndpoint"] = state?.idcsEndpoint;
            resourceInputs["idcsLastModifiedBies"] = state?.idcsLastModifiedBies;
            resourceInputs["idcsLastUpgradedInRelease"] = state?.idcsLastUpgradedInRelease;
            resourceInputs["idcsPreventedOperations"] = state?.idcsPreventedOperations;
            resourceInputs["jitProvAssignedGroups"] = state?.jitProvAssignedGroups;
            resourceInputs["jitProvGroupStaticListEnabled"] = state?.jitProvGroupStaticListEnabled;
            resourceInputs["metas"] = state?.metas;
            resourceInputs["name"] = state?.name;
            resourceInputs["ocid"] = state?.ocid;
            resourceInputs["profileUrl"] = state?.profileUrl;
            resourceInputs["redirectUrl"] = state?.redirectUrl;
            resourceInputs["refreshTokenUrl"] = state?.refreshTokenUrl;
            resourceInputs["registrationEnabled"] = state?.registrationEnabled;
            resourceInputs["relayIdpParamMappings"] = state?.relayIdpParamMappings;
            resourceInputs["resourceTypeSchemaVersion"] = state?.resourceTypeSchemaVersion;
            resourceInputs["schemas"] = state?.schemas;
            resourceInputs["scopes"] = state?.scopes;
            resourceInputs["serviceProviderName"] = state?.serviceProviderName;
            resourceInputs["showOnLogin"] = state?.showOnLogin;
            resourceInputs["socialJitProvisioningEnabled"] = state?.socialJitProvisioningEnabled;
            resourceInputs["status"] = state?.status;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["tenancyOcid"] = state?.tenancyOcid;
        }
        else {
            const args = argsOrState;
            if (args?.accountLinkingEnabled === undefined && !opts.urn) {
                throw new Error("Missing required property 'accountLinkingEnabled'");
            }
            if (args?.consumerKey === undefined && !opts.urn) {
                throw new Error("Missing required property 'consumerKey'");
            }
            if (args?.consumerSecret === undefined && !opts.urn) {
                throw new Error("Missing required property 'consumerSecret'");
            }
            if (args?.enabled === undefined && !opts.urn) {
                throw new Error("Missing required property 'enabled'");
            }
            if (args?.idcsEndpoint === undefined && !opts.urn) {
                throw new Error("Missing required property 'idcsEndpoint'");
            }
            if (args?.registrationEnabled === undefined && !opts.urn) {
                throw new Error("Missing required property 'registrationEnabled'");
            }
            if (args?.schemas === undefined && !opts.urn) {
                throw new Error("Missing required property 'schemas'");
            }
            if (args?.serviceProviderName === undefined && !opts.urn) {
                throw new Error("Missing required property 'serviceProviderName'");
            }
            if (args?.showOnLogin === undefined && !opts.urn) {
                throw new Error("Missing required property 'showOnLogin'");
            }
            resourceInputs["accessTokenUrl"] = args?.accessTokenUrl;
            resourceInputs["accountLinkingEnabled"] = args?.accountLinkingEnabled;
            resourceInputs["adminScopes"] = args?.adminScopes;
            resourceInputs["appleDevId"] = args?.appleDevId;
            resourceInputs["appleKeyId"] = args?.appleKeyId;
            resourceInputs["authorization"] = args?.authorization;
            resourceInputs["authzUrl"] = args?.authzUrl;
            resourceInputs["autoRedirectEnabled"] = args?.autoRedirectEnabled;
            resourceInputs["clientCredentialInPayload"] = args?.clientCredentialInPayload;
            resourceInputs["clockSkewInSeconds"] = args?.clockSkewInSeconds;
            resourceInputs["consumerKey"] = args?.consumerKey;
            resourceInputs["consumerSecret"] = args?.consumerSecret;
            resourceInputs["description"] = args?.description;
            resourceInputs["discoveryUrl"] = args?.discoveryUrl;
            resourceInputs["enabled"] = args?.enabled;
            resourceInputs["iconUrl"] = args?.iconUrl;
            resourceInputs["idAttribute"] = args?.idAttribute;
            resourceInputs["idcsEndpoint"] = args?.idcsEndpoint;
            resourceInputs["jitProvAssignedGroups"] = args?.jitProvAssignedGroups;
            resourceInputs["jitProvGroupStaticListEnabled"] = args?.jitProvGroupStaticListEnabled;
            resourceInputs["name"] = args?.name;
            resourceInputs["ocid"] = args?.ocid;
            resourceInputs["profileUrl"] = args?.profileUrl;
            resourceInputs["redirectUrl"] = args?.redirectUrl;
            resourceInputs["refreshTokenUrl"] = args?.refreshTokenUrl;
            resourceInputs["registrationEnabled"] = args?.registrationEnabled;
            resourceInputs["relayIdpParamMappings"] = args?.relayIdpParamMappings;
            resourceInputs["resourceTypeSchemaVersion"] = args?.resourceTypeSchemaVersion;
            resourceInputs["schemas"] = args?.schemas;
            resourceInputs["scopes"] = args?.scopes;
            resourceInputs["serviceProviderName"] = args?.serviceProviderName;
            resourceInputs["showOnLogin"] = args?.showOnLogin;
            resourceInputs["socialJitProvisioningEnabled"] = args?.socialJitProvisioningEnabled;
            resourceInputs["status"] = args?.status;
            resourceInputs["tags"] = args?.tags;
            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(DomainsSocialIdentityProvider.__pulumiType, name, resourceInputs, opts);
    }
}
exports.DomainsSocialIdentityProvider = DomainsSocialIdentityProvider;
//# sourceMappingURL=domainsSocialIdentityProvider.js.map