// 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.fluent.models.PortalSignupSettingsInner;
import com.azure.resourcemanager.apimanagement.models.TermsOfServiceProperties;

/** Samples for SignUpSettings Update. */
public final class SignUpSettingsUpdateSamples {
    /*
     * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsUpdateSignUp.json
     */
    /**
     * Sample code: ApiManagementPortalSettingsUpdateSignUp.
     *
     * @param manager Entry point to ApiManagementManager.
     */
    public static void apiManagementPortalSettingsUpdateSignUp(
        com.azure.resourcemanager.apimanagement.ApiManagementManager manager) {
        manager
            .signUpSettings()
            .updateWithResponse(
                "rg1",
                "apimService1",
                "*",
                new PortalSignupSettingsInner()
                    .withEnabled(true)
                    .withTermsOfService(
                        new TermsOfServiceProperties()
                            .withText("Terms of service text.")
                            .withEnabled(true)
                            .withConsentRequired(true)),
                Context.NONE);
    }
}
