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

package com.azure.resourcemanager.apimanagement.generated;

import com.azure.core.util.Context;
import com.azure.resourcemanager.apimanagement.models.LoggerContract;
import com.azure.resourcemanager.apimanagement.models.LoggerType;

/** Samples for Logger Update. */
public final class LoggerUpdateSamples {
    /*
     * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateLogger.json
     */
    /**
     * Sample code: ApiManagementUpdateLogger.
     *
     * @param manager Entry point to ApiManagementManager.
     */
    public static void apiManagementUpdateLogger(com.azure.resourcemanager.apimanagement.ApiManagementManager manager) {
        LoggerContract resource =
            manager.loggers().getWithResponse("rg1", "apimService1", "eh1", Context.NONE).getValue();
        resource
            .update()
            .withLoggerType(LoggerType.AZURE_EVENT_HUB)
            .withDescription("updating description")
            .withIfMatch("*")
            .apply();
    }
}
