"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.Service = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages an API Management Service.
 *
 * ## Disclaimers
 *
 * > **Note:** When creating a new API Management resource in version 3.0 of the AzureRM Provider and later, please be aware that the AzureRM Provider will now clean up any sample APIs and Products created by the Azure API during the creation of the API Management resource.
 *
 * > **Note:** Version 2.77 and later of the Azure Provider include a Feature Toggle which will purge an API Management resource on destroy, rather than the default soft-delete. See the Features block documentation for more information on Feature Toggles within Terraform.
 *
 * > **Note:** It's possible to define Custom Domains both within the `azure.apimanagement.Service` resource via the `hostnameConfigurations` block and by using the `azure.apimanagement.CustomDomain` resource. However it's not possible to use both methods to manage Custom Domains within an API Management Service, since there'll be conflicts.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleService = new azure.apimanagement.Service("example", {
 *     name: "example-apim",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     publisherName: "My Company",
 *     publisherEmail: "company@exmaple.com",
 *     skuName: "Developer_1",
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.ApiManagement` - 2024-05-01, 2022-08-01
 *
 * ## Import
 *
 * API Management Services can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:apimanagement/service:Service example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1
 * ```
 */
class Service extends pulumi.CustomResource {
    /**
     * Get an existing Service 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 Service(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:apimanagement/service:Service';
    /**
     * Returns true if the given object is an instance of Service.  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'] === Service.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["additionalLocations"] = state?.additionalLocations;
            resourceInputs["certificates"] = state?.certificates;
            resourceInputs["clientCertificateEnabled"] = state?.clientCertificateEnabled;
            resourceInputs["delegation"] = state?.delegation;
            resourceInputs["developerPortalUrl"] = state?.developerPortalUrl;
            resourceInputs["gatewayDisabled"] = state?.gatewayDisabled;
            resourceInputs["gatewayRegionalUrl"] = state?.gatewayRegionalUrl;
            resourceInputs["gatewayUrl"] = state?.gatewayUrl;
            resourceInputs["hostnameConfiguration"] = state?.hostnameConfiguration;
            resourceInputs["identity"] = state?.identity;
            resourceInputs["location"] = state?.location;
            resourceInputs["managementApiUrl"] = state?.managementApiUrl;
            resourceInputs["minApiVersion"] = state?.minApiVersion;
            resourceInputs["name"] = state?.name;
            resourceInputs["notificationSenderEmail"] = state?.notificationSenderEmail;
            resourceInputs["portalUrl"] = state?.portalUrl;
            resourceInputs["privateIpAddresses"] = state?.privateIpAddresses;
            resourceInputs["protocols"] = state?.protocols;
            resourceInputs["publicIpAddressId"] = state?.publicIpAddressId;
            resourceInputs["publicIpAddresses"] = state?.publicIpAddresses;
            resourceInputs["publicNetworkAccessEnabled"] = state?.publicNetworkAccessEnabled;
            resourceInputs["publisherEmail"] = state?.publisherEmail;
            resourceInputs["publisherName"] = state?.publisherName;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["scmUrl"] = state?.scmUrl;
            resourceInputs["security"] = state?.security;
            resourceInputs["signIn"] = state?.signIn;
            resourceInputs["signUp"] = state?.signUp;
            resourceInputs["skuName"] = state?.skuName;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["tenantAccess"] = state?.tenantAccess;
            resourceInputs["virtualNetworkConfiguration"] = state?.virtualNetworkConfiguration;
            resourceInputs["virtualNetworkType"] = state?.virtualNetworkType;
            resourceInputs["zones"] = state?.zones;
        }
        else {
            const args = argsOrState;
            if (args?.publisherEmail === undefined && !opts.urn) {
                throw new Error("Missing required property 'publisherEmail'");
            }
            if (args?.publisherName === undefined && !opts.urn) {
                throw new Error("Missing required property 'publisherName'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.skuName === undefined && !opts.urn) {
                throw new Error("Missing required property 'skuName'");
            }
            resourceInputs["additionalLocations"] = args?.additionalLocations;
            resourceInputs["certificates"] = args?.certificates;
            resourceInputs["clientCertificateEnabled"] = args?.clientCertificateEnabled;
            resourceInputs["delegation"] = args?.delegation;
            resourceInputs["gatewayDisabled"] = args?.gatewayDisabled;
            resourceInputs["hostnameConfiguration"] = args?.hostnameConfiguration;
            resourceInputs["identity"] = args?.identity;
            resourceInputs["location"] = args?.location;
            resourceInputs["minApiVersion"] = args?.minApiVersion;
            resourceInputs["name"] = args?.name;
            resourceInputs["notificationSenderEmail"] = args?.notificationSenderEmail;
            resourceInputs["protocols"] = args?.protocols;
            resourceInputs["publicIpAddressId"] = args?.publicIpAddressId;
            resourceInputs["publicNetworkAccessEnabled"] = args?.publicNetworkAccessEnabled;
            resourceInputs["publisherEmail"] = args?.publisherEmail;
            resourceInputs["publisherName"] = args?.publisherName;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["security"] = args?.security;
            resourceInputs["signIn"] = args?.signIn;
            resourceInputs["signUp"] = args?.signUp;
            resourceInputs["skuName"] = args?.skuName;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["tenantAccess"] = args?.tenantAccess;
            resourceInputs["virtualNetworkConfiguration"] = args?.virtualNetworkConfiguration;
            resourceInputs["virtualNetworkType"] = args?.virtualNetworkType;
            resourceInputs["zones"] = args?.zones;
            resourceInputs["developerPortalUrl"] = undefined /*out*/;
            resourceInputs["gatewayRegionalUrl"] = undefined /*out*/;
            resourceInputs["gatewayUrl"] = undefined /*out*/;
            resourceInputs["managementApiUrl"] = undefined /*out*/;
            resourceInputs["portalUrl"] = undefined /*out*/;
            resourceInputs["privateIpAddresses"] = undefined /*out*/;
            resourceInputs["publicIpAddresses"] = undefined /*out*/;
            resourceInputs["scmUrl"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Service.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Service = Service;
//# sourceMappingURL=service.js.map