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

package com.azure.resourcemanager.compute.generated;

import com.azure.resourcemanager.compute.fluent.models.RestorePointInner;
import com.azure.resourcemanager.compute.models.ApiEntityReference;
import java.util.Arrays;

/** Samples for RestorePoints Create. */
public final class RestorePointsCreateSamples {
    /*
     * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2023-03-01/examples/restorePointExamples/RestorePoint_Copy_BetweenRegions.json
     */
    /**
     * Sample code: Copy a restore point to a different region.
     *
     * @param azure The entry point for accessing resource management APIs in Azure.
     */
    public static void copyARestorePointToADifferentRegion(com.azure.resourcemanager.AzureResourceManager azure) {
        azure
            .virtualMachines()
            .manager()
            .serviceClient()
            .getRestorePoints()
            .create(
                "myResourceGroup",
                "rpcName",
                "rpName",
                new RestorePointInner()
                    .withSourceRestorePoint(
                        new ApiEntityReference()
                            .withId(
                                "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/sourceRpcName/restorePoints/sourceRpName")),
                com.azure.core.util.Context.NONE);
    }

    /*
     * x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2023-03-01/examples/restorePointExamples/RestorePoint_Create.json
     */
    /**
     * Sample code: Create a restore point.
     *
     * @param azure The entry point for accessing resource management APIs in Azure.
     */
    public static void createARestorePoint(com.azure.resourcemanager.AzureResourceManager azure) {
        azure
            .virtualMachines()
            .manager()
            .serviceClient()
            .getRestorePoints()
            .create(
                "myResourceGroup",
                "rpcName",
                "rpName",
                new RestorePointInner()
                    .withExcludeDisks(
                        Arrays
                            .asList(
                                new ApiEntityReference()
                                    .withId(
                                        "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123"))),
                com.azure.core.util.Context.NONE);
    }
}
