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

package com.azure.resourcemanager.postgresqlflexibleserver.generated;

import com.azure.resourcemanager.postgresqlflexibleserver.models.BackupSettings;
import com.azure.resourcemanager.postgresqlflexibleserver.models.LtrPreBackupRequest;

/** Samples for FlexibleServer TriggerLtrPreBackup. */
public final class FlexibleServerTriggerLtrPreBackupSamples {
    /*
     * x-ms-original-file: specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2023-03-01-preview/examples/LongTermRetentionPreBackup.json
     */
    /**
     * Sample code: Sample_Prebackup.
     *
     * @param manager Entry point to PostgreSqlManager.
     */
    public static void samplePrebackup(com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager) {
        manager
            .flexibleServers()
            .triggerLtrPreBackupWithResponse(
                "rgLongTermRetention",
                "pgsqlltrtestserver",
                new LtrPreBackupRequest().withBackupSettings(new BackupSettings().withBackupName("backup1")),
                com.azure.core.util.Context.NONE);
    }
}
