// 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 java.util.Arrays;

/** Samples for TopicSpaces CreateOrUpdate. */
public final class TopicSpacesCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2023-06-01-preview/examples/TopicSpaces_CreateOrUpdate.json
     */
    /**
     * Sample code: TopicSpaces_CreateOrUpdate.
     *
     * @param manager Entry point to EventGridManager.
     */
    public static void topicSpacesCreateOrUpdate(com.azure.resourcemanager.eventgrid.EventGridManager manager) {
        manager
            .topicSpaces()
            .define("exampleTopicSpaceName1")
            .withExistingNamespace("examplerg", "exampleNamespaceName1")
            .withTopicTemplates(Arrays.asList("filter1", "filter2"))
            .create();
    }
}
