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

package com.azure.resourcemanager.paloaltonetworks.ngfw.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models.SupportInfoInner;
import com.azure.resourcemanager.paloaltonetworks.ngfw.models.BooleanEnum;
import org.junit.jupiter.api.Assertions;

public final class SupportInfoInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SupportInfoInner model =
            BinaryData
                .fromString(
                    "{\"productSku\":\"tmczuomejwcwwqi\",\"productSerial\":\"nssxmojmsvpk\",\"accountRegistered\":\"TRUE\",\"accountId\":\"kwcf\",\"userDomainSupported\":\"FALSE\",\"userRegistered\":\"TRUE\",\"freeTrial\":\"FALSE\",\"freeTrialDaysLeft\":1494813827,\"freeTrialCreditLeft\":981677943,\"helpURL\":\"ydbsd\",\"supportURL\":\"m\",\"registerURL\":\"maehvbbxurip\"}")
                .toObject(SupportInfoInner.class);
        Assertions.assertEquals("tmczuomejwcwwqi", model.productSku());
        Assertions.assertEquals("nssxmojmsvpk", model.productSerial());
        Assertions.assertEquals(BooleanEnum.TRUE, model.accountRegistered());
        Assertions.assertEquals("kwcf", model.accountId());
        Assertions.assertEquals(BooleanEnum.FALSE, model.userDomainSupported());
        Assertions.assertEquals(BooleanEnum.TRUE, model.userRegistered());
        Assertions.assertEquals(BooleanEnum.FALSE, model.freeTrial());
        Assertions.assertEquals(1494813827, model.freeTrialDaysLeft());
        Assertions.assertEquals(981677943, model.freeTrialCreditLeft());
        Assertions.assertEquals("ydbsd", model.helpUrl());
        Assertions.assertEquals("m", model.supportUrl());
        Assertions.assertEquals("maehvbbxurip", model.registerUrl());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SupportInfoInner model =
            new SupportInfoInner()
                .withProductSku("tmczuomejwcwwqi")
                .withProductSerial("nssxmojmsvpk")
                .withAccountRegistered(BooleanEnum.TRUE)
                .withAccountId("kwcf")
                .withUserDomainSupported(BooleanEnum.FALSE)
                .withUserRegistered(BooleanEnum.TRUE)
                .withFreeTrial(BooleanEnum.FALSE)
                .withFreeTrialDaysLeft(1494813827)
                .withFreeTrialCreditLeft(981677943)
                .withHelpUrl("ydbsd")
                .withSupportUrl("m")
                .withRegisterUrl("maehvbbxurip");
        model = BinaryData.fromObject(model).toObject(SupportInfoInner.class);
        Assertions.assertEquals("tmczuomejwcwwqi", model.productSku());
        Assertions.assertEquals("nssxmojmsvpk", model.productSerial());
        Assertions.assertEquals(BooleanEnum.TRUE, model.accountRegistered());
        Assertions.assertEquals("kwcf", model.accountId());
        Assertions.assertEquals(BooleanEnum.FALSE, model.userDomainSupported());
        Assertions.assertEquals(BooleanEnum.TRUE, model.userRegistered());
        Assertions.assertEquals(BooleanEnum.FALSE, model.freeTrial());
        Assertions.assertEquals(1494813827, model.freeTrialDaysLeft());
        Assertions.assertEquals(981677943, model.freeTrialCreditLeft());
        Assertions.assertEquals("ydbsd", model.helpUrl());
        Assertions.assertEquals("m", model.supportUrl());
        Assertions.assertEquals("maehvbbxurip", model.registerUrl());
    }
}
