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

package com.azure.resourcemanager.newrelicobservability.generated;

import com.azure.resourcemanager.newrelicobservability.models.BillingCycle;
import com.azure.resourcemanager.newrelicobservability.models.PlanData;
import com.azure.resourcemanager.newrelicobservability.models.SwitchBillingRequest;
import com.azure.resourcemanager.newrelicobservability.models.UsageType;
import java.time.OffsetDateTime;

/** Samples for Monitors SwitchBilling. */
public final class MonitorsSwitchBillingSamples {
    /*
     * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_SwitchBilling_MinimumSet_Gen.json
     */
    /**
     * Sample code: Monitors_SwitchBilling_MinimumSet_Gen.
     *
     * @param manager Entry point to NewRelicObservabilityManager.
     */
    public static void monitorsSwitchBillingMinimumSetGen(
        com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
        manager
            .monitors()
            .switchBillingWithResponse(
                "rgNewRelic",
                "fhcjxnxumkdlgpwanewtkdnyuz",
                new SwitchBillingRequest().withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"),
                com.azure.core.util.Context.NONE);
    }

    /*
     * x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_SwitchBilling_MaximumSet_Gen.json
     */
    /**
     * Sample code: Monitors_SwitchBilling_MaximumSet_Gen.
     *
     * @param manager Entry point to NewRelicObservabilityManager.
     */
    public static void monitorsSwitchBillingMaximumSetGen(
        com.azure.resourcemanager.newrelicobservability.NewRelicObservabilityManager manager) {
        manager
            .monitors()
            .switchBillingWithResponse(
                "rgNewRelic",
                "fhcjxnxumkdlgpwanewtkdnyuz",
                new SwitchBillingRequest()
                    .withAzureResourceId("enfghpfw")
                    .withOrganizationId("k")
                    .withPlanData(
                        new PlanData()
                            .withUsageType(UsageType.PAYG)
                            .withBillingCycle(BillingCycle.YEARLY)
                            .withPlanDetails("tbbiaga")
                            .withEffectiveDate(OffsetDateTime.parse("2022-12-05T14:11:37.786Z")))
                    .withUserEmail("ruxvg@xqkmdhrnoo.hlmbpm"),
                com.azure.core.util.Context.NONE);
    }
}
