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

package com.azure.resourcemanager.eventgrid.generated;

import com.azure.resourcemanager.eventgrid.models.PermissionType;

/** Samples for PermissionBindings CreateOrUpdate. */
public final class PermissionBindingsCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/PermissionBindings_CreateOrUpdate.json
     */
    /**
     * Sample code: PermissionBindings_CreateOrUpdate.
     *
     * @param manager Entry point to EventGridManager.
     */
    public static void permissionBindingsCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) {
        manager
            .permissionBindings()
            .define("examplePermissionBindingName1")
            .withExistingNamespace("examplerg", "exampleNamespaceName1")
            .withTopicSpaceName("exampleTopicSpaceName1")
            .withPermission(PermissionType.PUBLISHER)
            .withClientGroupName("exampleClientGroupName1")
            .create();
    }
}
