"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.Config = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Monitor resource in Oracle Cloud Infrastructure Apm Synthetics service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/apm-synthetic-monitoring/latest/Monitor
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/apm/apm_synthetics
 *
 * Creates a new monitor.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testMonitor = new oci.apmsynthetics.Config("test_monitor", {
 *     apmDomainId: testApmDomain.id,
 *     displayName: monitorDisplayName,
 *     monitorType: monitorMonitorType,
 *     repeatIntervalInSeconds: Number(monitorRepeatIntervalInSeconds),
 *     vantagePoints: [{
 *         name: monitorVantagePointsName,
 *         displayName: monitorVantagePointsParamDisplayName,
 *     }],
 *     availabilityConfiguration: {
 *         maxAllowedFailuresPerInterval: Number(monitorAvailabilityConfigurationMaxAllowedFailuresPerInterval),
 *         minAllowedRunsPerInterval: Number(monitorAvailabilityConfigurationMinAllowedRunsPerInterval),
 *     },
 *     batchIntervalInSeconds: Number(monitorBatchIntervalInSeconds),
 *     configuration: {
 *         clientCertificateDetails: {
 *             clientCertificate: {
 *                 content: monitorConfigurationClientCertificateDetailsClientCertificateContent,
 *                 fileName: monitorConfigurationClientCertificateDetailsClientCertificateFileName,
 *             },
 *             privateKey: {
 *                 content: monitorConfigurationClientCertificateDetailsPrivateKeyContent,
 *                 fileName: monitorConfigurationClientCertificateDetailsPrivateKeyFileName,
 *             },
 *         },
 *         configType: monitorConfigurationConfigType,
 *         connectionString: monitorConfigurationConnectionString,
 *         databaseAuthenticationDetails: {
 *             password: {
 *                 password: monitorConfigurationDatabaseAuthenticationDetailsPasswordPassword,
 *                 passwordType: monitorConfigurationDatabaseAuthenticationDetailsPasswordPasswordType,
 *                 vaultSecretId: testSecret.id,
 *             },
 *             username: monitorConfigurationDatabaseAuthenticationDetailsUsername,
 *         },
 *         databaseConnectionType: monitorConfigurationDatabaseConnectionType,
 *         databaseRole: monitorConfigurationDatabaseRole,
 *         databaseType: monitorConfigurationDatabaseType,
 *         databaseWalletDetails: {
 *             databaseWallet: monitorConfigurationDatabaseWalletDetailsDatabaseWallet,
 *             serviceName: testService.name,
 *         },
 *         dnsConfiguration: {
 *             isOverrideDns: monitorConfigurationDnsConfigurationIsOverrideDns === "true",
 *             overrideDnsIp: monitorConfigurationDnsConfigurationOverrideDnsIp,
 *         },
 *         downloadSizeLimitInBytes: Number(monitorConfigurationDownloadSizeLimitInBytes),
 *         ftpBasicAuthenticationDetails: {
 *             password: {
 *                 password: monitorConfigurationFtpBasicAuthenticationDetailsPasswordPassword,
 *                 passwordType: monitorConfigurationFtpBasicAuthenticationDetailsPasswordPasswordType,
 *                 vaultSecretId: testSecret.id,
 *             },
 *             username: monitorConfigurationFtpBasicAuthenticationDetailsUsername,
 *         },
 *         ftpProtocol: monitorConfigurationFtpProtocol,
 *         ftpRequestType: monitorConfigurationFtpRequestType,
 *         isActiveMode: monitorConfigurationIsActiveMode === "true",
 *         isCertificateValidationEnabled: monitorConfigurationIsCertificateValidationEnabled === "true",
 *         isDefaultSnapshotEnabled: monitorConfigurationIsDefaultSnapshotEnabled === "true",
 *         isFailureRetried: monitorConfigurationIsFailureRetried === "true",
 *         isQueryRecursive: monitorConfigurationIsQueryRecursive === "true",
 *         isRedirectionEnabled: monitorConfigurationIsRedirectionEnabled === "true",
 *         nameServer: monitorConfigurationNameServer,
 *         networkConfiguration: {
 *             numberOfHops: Number(monitorConfigurationNetworkConfigurationNumberOfHops),
 *             probeMode: monitorConfigurationNetworkConfigurationProbeMode,
 *             probePerHop: Number(monitorConfigurationNetworkConfigurationProbePerHop),
 *             protocol: monitorConfigurationNetworkConfigurationProtocol,
 *             transmissionRate: Number(monitorConfigurationNetworkConfigurationTransmissionRate),
 *         },
 *         protocol: monitorConfigurationProtocol,
 *         query: monitorConfigurationQuery,
 *         recordType: monitorConfigurationRecordType,
 *         reqAuthenticationDetails: {
 *             authHeaders: [{
 *                 headerName: monitorConfigurationReqAuthenticationDetailsAuthHeadersHeaderName,
 *                 headerValue: monitorConfigurationReqAuthenticationDetailsAuthHeadersHeaderValue,
 *             }],
 *             authRequestMethod: monitorConfigurationReqAuthenticationDetailsAuthRequestMethod,
 *             authRequestPostBody: monitorConfigurationReqAuthenticationDetailsAuthRequestPostBody,
 *             authToken: monitorConfigurationReqAuthenticationDetailsAuthToken,
 *             authUrl: monitorConfigurationReqAuthenticationDetailsAuthUrl,
 *             authUserName: testUser.name,
 *             authUserPassword: monitorConfigurationReqAuthenticationDetailsAuthUserPassword,
 *             oauthScheme: monitorConfigurationReqAuthenticationDetailsOauthScheme,
 *         },
 *         reqAuthenticationScheme: monitorConfigurationReqAuthenticationScheme,
 *         requestHeaders: [{
 *             headerName: monitorConfigurationRequestHeadersHeaderName,
 *             headerValue: monitorConfigurationRequestHeadersHeaderValue,
 *         }],
 *         requestMethod: monitorConfigurationRequestMethod,
 *         requestPostBody: monitorConfigurationRequestPostBody,
 *         requestQueryParams: [{
 *             paramName: monitorConfigurationRequestQueryParamsParamName,
 *             paramValue: monitorConfigurationRequestQueryParamsParamValue,
 *         }],
 *         uploadFileSizeInBytes: Number(monitorConfigurationUploadFileSizeInBytes),
 *         verifyResponseCodes: monitorConfigurationVerifyResponseCodes,
 *         verifyResponseContent: monitorConfigurationVerifyResponseContent,
 *         verifyTexts: [{
 *             text: monitorConfigurationVerifyTextsText,
 *         }],
 *     },
 *     definedTags: {
 *         "foo-namespace.bar-key": "value",
 *     },
 *     freeformTags: {
 *         "bar-key": "value",
 *     },
 *     isIpv6: monitorIsIpv6 === "true",
 *     isRunNow: monitorIsRunNow === "true",
 *     isRunOnce: monitorIsRunOnce === "true",
 *     maintenanceWindowSchedule: {
 *         timeEnded: monitorMaintenanceWindowScheduleTimeEnded,
 *         timeStarted: monitorMaintenanceWindowScheduleTimeStarted,
 *     },
 *     schedulingPolicy: monitorSchedulingPolicy,
 *     scriptId: testScript.id,
 *     scriptParameters: [{
 *         paramName: monitorScriptParametersParamName,
 *         paramValue: monitorScriptParametersParamValue,
 *     }],
 *     status: monitorStatus,
 *     target: monitorTarget,
 *     timeoutInSeconds: Number(monitorTimeoutInSeconds),
 * });
 * ```
 *
 * ## Import
 *
 * Monitors can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:ApmSynthetics/config:Config test_monitor "monitors/{monitorId}/apmDomainId/{apmDomainId}"
 * ```
 */
class Config extends pulumi.CustomResource {
    /**
     * Get an existing Config 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 Config(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:ApmSynthetics/config:Config';
    /**
     * Returns true if the given object is an instance of Config.  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'] === Config.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["apmDomainId"] = state?.apmDomainId;
            resourceInputs["availabilityConfiguration"] = state?.availabilityConfiguration;
            resourceInputs["batchIntervalInSeconds"] = state?.batchIntervalInSeconds;
            resourceInputs["configuration"] = state?.configuration;
            resourceInputs["contentType"] = state?.contentType;
            resourceInputs["createdBy"] = state?.createdBy;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["isIpv6"] = state?.isIpv6;
            resourceInputs["isRunNow"] = state?.isRunNow;
            resourceInputs["isRunOnce"] = state?.isRunOnce;
            resourceInputs["lastUpdatedBy"] = state?.lastUpdatedBy;
            resourceInputs["maintenanceWindowSchedule"] = state?.maintenanceWindowSchedule;
            resourceInputs["monitorType"] = state?.monitorType;
            resourceInputs["repeatIntervalInSeconds"] = state?.repeatIntervalInSeconds;
            resourceInputs["schedulingPolicy"] = state?.schedulingPolicy;
            resourceInputs["scriptId"] = state?.scriptId;
            resourceInputs["scriptName"] = state?.scriptName;
            resourceInputs["scriptParameters"] = state?.scriptParameters;
            resourceInputs["status"] = state?.status;
            resourceInputs["target"] = state?.target;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeUpdated"] = state?.timeUpdated;
            resourceInputs["timeoutInSeconds"] = state?.timeoutInSeconds;
            resourceInputs["vantagePointCount"] = state?.vantagePointCount;
            resourceInputs["vantagePoints"] = state?.vantagePoints;
        }
        else {
            const args = argsOrState;
            if (args?.apmDomainId === undefined && !opts.urn) {
                throw new Error("Missing required property 'apmDomainId'");
            }
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.monitorType === undefined && !opts.urn) {
                throw new Error("Missing required property 'monitorType'");
            }
            if (args?.repeatIntervalInSeconds === undefined && !opts.urn) {
                throw new Error("Missing required property 'repeatIntervalInSeconds'");
            }
            if (args?.vantagePoints === undefined && !opts.urn) {
                throw new Error("Missing required property 'vantagePoints'");
            }
            resourceInputs["apmDomainId"] = args?.apmDomainId;
            resourceInputs["availabilityConfiguration"] = args?.availabilityConfiguration;
            resourceInputs["batchIntervalInSeconds"] = args?.batchIntervalInSeconds;
            resourceInputs["configuration"] = args?.configuration;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["isIpv6"] = args?.isIpv6;
            resourceInputs["isRunNow"] = args?.isRunNow;
            resourceInputs["isRunOnce"] = args?.isRunOnce;
            resourceInputs["maintenanceWindowSchedule"] = args?.maintenanceWindowSchedule;
            resourceInputs["monitorType"] = args?.monitorType;
            resourceInputs["repeatIntervalInSeconds"] = args?.repeatIntervalInSeconds;
            resourceInputs["schedulingPolicy"] = args?.schedulingPolicy;
            resourceInputs["scriptId"] = args?.scriptId;
            resourceInputs["scriptName"] = args?.scriptName;
            resourceInputs["scriptParameters"] = args?.scriptParameters;
            resourceInputs["status"] = args?.status;
            resourceInputs["target"] = args?.target;
            resourceInputs["timeoutInSeconds"] = args?.timeoutInSeconds;
            resourceInputs["vantagePoints"] = args?.vantagePoints;
            resourceInputs["contentType"] = undefined /*out*/;
            resourceInputs["createdBy"] = undefined /*out*/;
            resourceInputs["lastUpdatedBy"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeUpdated"] = undefined /*out*/;
            resourceInputs["vantagePointCount"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Config.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Config = Config;
//# sourceMappingURL=config.js.map