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

package com.azure.resourcemanager.maintenance.generated;

import com.azure.resourcemanager.maintenance.models.MaintenanceScope;
import com.azure.resourcemanager.maintenance.models.Visibility;

/** Samples for MaintenanceConfigurations CreateOrUpdate. */
public final class MaintenanceConfigurationsCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/stable/2021-05-01/examples/MaintenanceConfigurations_CreateOrUpdateForResource.json
     */
    /**
     * Sample code: MaintenanceConfigurations_CreateOrUpdateForResource.
     *
     * @param manager Entry point to MaintenanceManager.
     */
    public static void maintenanceConfigurationsCreateOrUpdateForResource(
        com.azure.resourcemanager.maintenance.MaintenanceManager manager) {
        manager
            .maintenanceConfigurations()
            .define("configuration1")
            .withExistingResourceGroup("examplerg")
            .withRegion("westus2")
            .withNamespace("Microsoft.Maintenance")
            .withMaintenanceScope(MaintenanceScope.HOST)
            .withVisibility(Visibility.CUSTOM)
            .withStartDateTime("2020-04-30 08:00")
            .withExpirationDateTime("9999-12-31 00:00")
            .withDuration("05:00")
            .withTimeZone("Pacific Standard Time")
            .withRecurEvery("Day")
            .create();
    }
}
