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

package com.azure.resourcemanager.logic.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.logic.fluent.models.WorkflowTriggerInner;
import org.junit.jupiter.api.Assertions;

public final class WorkflowTriggerInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        WorkflowTriggerInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"provisioningState\":\"Succeeded\",\"createdTime\":\"2020-12-26T16:44:41Z\",\"changedTime\":\"2020-12-23T18:20:15Z\",\"state\":\"Enabled\",\"status\":\"Skipped\",\"lastExecutionTime\":\"2021-03-02T08:14:37Z\",\"nextExecutionTime\":\"2021-05-26T03:55:02Z\",\"recurrence\":{\"frequency\":\"Year\",\"interval\":950290701,\"startTime\":\"iqylihkaetck\",\"endTime\":\"fcivfsnkym\",\"timeZone\":\"tqhjfbebrjcx\"},\"workflow\":{\"id\":\"wutttxfvjrbi\",\"name\":\"hxepcyvahfnlj\",\"type\":\"qxj\"}},\"name\":\"ujqgidok\",\"type\":\"ljyoxgvcltb\",\"id\":\"ncghkje\"}")
                .toObject(WorkflowTriggerInner.class);
        Assertions.assertEquals("ncghkje", model.id());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        WorkflowTriggerInner model = new WorkflowTriggerInner().withId("ncghkje");
        model = BinaryData.fromObject(model).toObject(WorkflowTriggerInner.class);
        Assertions.assertEquals("ncghkje", model.id());
    }
}
