// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.recoveryservicessiterecovery.generated;

import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateNetworkMappingInputProperties;
import com.azure.resourcemanager.recoveryservicessiterecovery.models.VmmToAzureCreateNetworkMappingInput;

/** Samples for ReplicationNetworkMappings Create. */
public final class ReplicationNetworkMappingsCreateSamples {
    /*
     * x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationNetworkMappings_Create.json
     */
    /**
     * Sample code: Creates network mapping.
     *
     * @param manager Entry point to SiteRecoveryManager.
     */
    public static void createsNetworkMapping(
        com.azure.resourcemanager.recoveryservicessiterecovery.SiteRecoveryManager manager) {
        manager
            .replicationNetworkMappings()
            .define("corpe2amap")
            .withExistingReplicationNetwork(
                "srce2avaultbvtaC27",
                "srcBvte2a14C27",
                "b0cef6e9a4437b81803d0b55ada4f700ab66caae59c35d62723a1589c0cd13ac",
                "e2267b5c-2650-49bd-ab3f-d66aae694c06")
            .withProperties(
                new CreateNetworkMappingInputProperties()
                    .withRecoveryFabricName("Microsoft Azure")
                    .withRecoveryNetworkId(
                        "/subscriptions/c183865e-6077-46f2-a3b1-deb0f4f4650a/resourceGroups/siterecoveryProd1/providers/Microsoft.Network/virtualNetworks/vnetavrai")
                    .withFabricSpecificDetails(new VmmToAzureCreateNetworkMappingInput()))
            .create();
    }
}
