// 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.models.ApiOperationAnnotation;
import com.azure.resourcemanager.logic.models.ApiOperationPropertiesDefinition;
import com.azure.resourcemanager.logic.models.ApiReference;
import com.azure.resourcemanager.logic.models.ApiTier;
import com.azure.resourcemanager.logic.models.ResourceReference;
import com.azure.resourcemanager.logic.models.StatusAnnotation;
import com.azure.resourcemanager.logic.models.SwaggerCustomDynamicList;
import com.azure.resourcemanager.logic.models.SwaggerCustomDynamicProperties;
import com.azure.resourcemanager.logic.models.SwaggerCustomDynamicSchema;
import com.azure.resourcemanager.logic.models.SwaggerCustomDynamicTree;
import com.azure.resourcemanager.logic.models.SwaggerExternalDocumentation;
import com.azure.resourcemanager.logic.models.SwaggerSchema;
import com.azure.resourcemanager.logic.models.SwaggerSchemaType;
import com.azure.resourcemanager.logic.models.SwaggerXml;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import org.junit.jupiter.api.Assertions;

public final class ApiOperationPropertiesDefinitionTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ApiOperationPropertiesDefinition model =
            BinaryData
                .fromString(
                    "{\"summary\":\"ugjknf\",\"description\":\"fcttuxuuyilfl\",\"visibility\":\"iquvrehm\",\"trigger\":\"jhvsujztczyt\",\"triggerHint\":\"t\",\"pageable\":true,\"annotation\":{\"status\":\"Production\",\"family\":\"prnjletlxsmr\",\"revision\":436134303},\"api\":{\"displayName\":\"ifamowazi\",\"description\":\"knlqwzdvpiwhxqsz\",\"iconUri\":\"maajquhuxylr\",\"swagger\":\"datam\",\"brandColor\":\"g\",\"category\":\"Standard\",\"integrationServiceEnvironment\":{\"id\":\"ospspshckf\",\"name\":\"jpmspbpssdfppy\",\"type\":\"tieyujtvczkcny\"},\"id\":\"x\",\"name\":\"njdxvglnkvxl\",\"type\":\"aglqivbgkcvkh\"},\"inputsDefinition\":{\"ref\":\"uqdflvoni\",\"type\":\"File\",\"title\":\"ubcpzgpxti\",\"items\":{\"ref\":\"knidib\",\"type\":\"File\",\"title\":\"gpnrhgov\",\"properties\":{},\"additionalProperties\":\"dataqmhhaowj\",\"required\":[\"vuporqzdfuydzv\",\"fvxcnqmxqpswo\",\"mvkhlggd\",\"bemzqkzszuwi\"],\"maxProperties\":1086614322,\"minProperties\":797560762,\"allOf\":[],\"discriminator\":\"jfpgpicrmn\",\"readOnly\":false,\"example\":\"datagjsxv\",\"notificationUrlExtension\":false},\"properties\":{\"attgplu\":{\"ref\":\"thsqqgvriiba\",\"type\":\"Array\",\"title\":\"c\",\"properties\":{},\"additionalProperties\":\"dataxousxauzl\",\"required\":[],\"maxProperties\":1040750997,\"minProperties\":491196265,\"allOf\":[],\"discriminator\":\"qf\",\"readOnly\":false,\"example\":\"datammkjsvthnwpztek\",\"notificationUrlExtension\":false}},\"additionalProperties\":\"dataotangcfhnykzc\",\"required\":[\"wvxwlmzqwmvt\",\"njmxmcuqudtcvcl\",\"ynpdkvgfab\"],\"maxProperties\":1082360596,\"minProperties\":1038771362,\"allOf\":[{\"ref\":\"phdu\",\"type\":\"Boolean\",\"title\":\"knpgoxgjiuq\",\"properties\":{},\"additionalProperties\":\"dataozipqwjedmurrxx\",\"required\":[],\"maxProperties\":783540465,\"minProperties\":2101350417,\"allOf\":[],\"discriminator\":\"ylkmqp\",\"readOnly\":false,\"example\":\"databcg\",\"notificationUrlExtension\":false},{\"ref\":\"bqinjipnwjfu\",\"type\":\"Boolean\",\"title\":\"fcbahhp\",\"properties\":{},\"additionalProperties\":\"datao\",\"required\":[],\"maxProperties\":86457454,\"minProperties\":577232767,\"allOf\":[],\"discriminator\":\"kmkkholvdnd\",\"readOnly\":false,\"example\":\"dataphuartv\",\"notificationUrlExtension\":true},{\"ref\":\"hnmnahmnx\",\"type\":\"File\",\"title\":\"qirwrweoox\",\"properties\":{},\"additionalProperties\":\"datahx\",\"required\":[],\"maxProperties\":109793124,\"minProperties\":225627049,\"allOf\":[],\"discriminator\":\"zqvbubqm\",\"readOnly\":true,\"example\":\"dataxhxzgazttaboidvm\",\"notificationUrlExtension\":true}],\"discriminator\":\"w\",\"readOnly\":true,\"xml\":{\"name\":\"g\",\"namespace\":\"tdherngbtcjuahok\",\"prefix\":\"obkauxofsh\",\"attribute\":true,\"wrapped\":true,\"extensions\":{\"wzejywhslw\":\"datalai\",\"fugsnnfhyetefy\":\"dataojpllndnpdwrpqaf\",\"ctfjgtixr\":\"dataoc\",\"wolba\":\"datavzuyturmlmu\"}},\"externalDocs\":{\"description\":\"opionszon\",\"uri\":\"ngajinnixjawrtmj\",\"extensions\":{\"vnekhenlusfnrdtj\":\"datayccxlzhcox\",\"ttgepuslvyjtcv\":\"datatxrdcqtjvi\"}},\"example\":\"datakasizie\",\"notificationUrlExtension\":true,\"dynamicSchemaOld\":{\"operationId\":\"htuqfecjxe\",\"valuePath\":\"tuhxuicb\",\"parameters\":{\"wnjlxu\":\"datamr\",\"jbaqehgpdoh\":\"datarhwpus\",\"nwfepbnwg\":\"datajqatucoigebxn\",\"jgcgbjbgdlfgtdys\":\"datam\"}},\"dynamicSchemaNew\":{\"operationId\":\"uflqbctq\",\"valuePath\":\"mzjr\",\"parameters\":{}},\"dynamicListNew\":{\"operationId\":\"eqyj\",\"builtInOperation\":\"zi\",\"itemsPath\":\"jxdfzantkwcegya\",\"itemValuePath\":\"bnseqacjjvpilg\",\"itemTitlePath\":\"oq\",\"parameters\":{}},\"dynamicTree\":{}},\"responsesDefinition\":{\"hkpigqfusuckzmkw\":{\"ref\":\"iookjbsah\",\"type\":\"String\",\"title\":\"pdelqa\",\"items\":{\"ref\":\"m\",\"type\":\"Number\",\"title\":\"bnfxofvc\",\"properties\":{},\"additionalProperties\":\"datairazftxejwabmd\",\"required\":[],\"maxProperties\":2062234995,\"minProperties\":989951031,\"allOf\":[],\"discriminator\":\"excmjurbuhhl\",\"readOnly\":false,\"example\":\"datasrogtu\",\"notificationUrlExtension\":true},\"properties\":{},\"additionalProperties\":\"datasidfv\",\"required\":[\"lxnfuijtkbusqogs\"],\"maxProperties\":958455072,\"minProperties\":495537328,\"allOf\":[],\"discriminator\":\"sharujtj\",\"readOnly\":false,\"xml\":{\"name\":\"yjqtt\",\"namespace\":\"kpqhjpenuygbq\",\"prefix\":\"qekewvnqvcd\",\"attribute\":false,\"wrapped\":false,\"extensions\":{}},\"externalDocs\":{\"description\":\"djwnlaxpunjqi\",\"uri\":\"zvvitacgxmfcs\",\"extensions\":{}},\"example\":\"datax\",\"notificationUrlExtension\":false,\"dynamicSchemaOld\":{\"operationId\":\"xhlw\",\"valuePath\":\"sjgqrsxyp\",\"parameters\":{}},\"dynamicSchemaNew\":{\"operationId\":\"y\",\"valuePath\":\"chrszi\",\"parameters\":{}},\"dynamicListNew\":{\"operationId\":\"elyetndnbf\",\"builtInOperation\":\"ggagfln\",\"itemsPath\":\"mtrwah\",\"itemValuePath\":\"mu\",\"itemTitlePath\":\"tb\",\"parameters\":{}},\"dynamicTree\":{}}},\"isWebhook\":true,\"isNotification\":false}")
                .toObject(ApiOperationPropertiesDefinition.class);
        Assertions.assertEquals("ugjknf", model.summary());
        Assertions.assertEquals("fcttuxuuyilfl", model.description());
        Assertions.assertEquals("iquvrehm", model.visibility());
        Assertions.assertEquals("jhvsujztczyt", model.trigger());
        Assertions.assertEquals("t", model.triggerHint());
        Assertions.assertEquals(true, model.pageable());
        Assertions.assertEquals(StatusAnnotation.PRODUCTION, model.annotation().status());
        Assertions.assertEquals("prnjletlxsmr", model.annotation().family());
        Assertions.assertEquals(436134303, model.annotation().revision());
        Assertions.assertEquals("x", model.api().id());
        Assertions.assertEquals("ifamowazi", model.api().displayName());
        Assertions.assertEquals("knlqwzdvpiwhxqsz", model.api().description());
        Assertions.assertEquals("maajquhuxylr", model.api().iconUri());
        Assertions.assertEquals("g", model.api().brandColor());
        Assertions.assertEquals(ApiTier.STANDARD, model.api().category());
        Assertions.assertEquals("ospspshckf", model.api().integrationServiceEnvironment().id());
        Assertions.assertEquals("uqdflvoni", model.inputsDefinition().ref());
        Assertions.assertEquals(SwaggerSchemaType.FILE, model.inputsDefinition().type());
        Assertions.assertEquals("ubcpzgpxti", model.inputsDefinition().title());
        Assertions.assertEquals("knidib", model.inputsDefinition().items().ref());
        Assertions.assertEquals(SwaggerSchemaType.FILE, model.inputsDefinition().items().type());
        Assertions.assertEquals("gpnrhgov", model.inputsDefinition().items().title());
        Assertions.assertEquals("vuporqzdfuydzv", model.inputsDefinition().items().required().get(0));
        Assertions.assertEquals(1086614322, model.inputsDefinition().items().maxProperties());
        Assertions.assertEquals(797560762, model.inputsDefinition().items().minProperties());
        Assertions.assertEquals("jfpgpicrmn", model.inputsDefinition().items().discriminator());
        Assertions.assertEquals(false, model.inputsDefinition().items().readOnly());
        Assertions.assertEquals(false, model.inputsDefinition().items().notificationUrlExtension());
        Assertions.assertEquals("thsqqgvriiba", model.inputsDefinition().properties().get("attgplu").ref());
        Assertions.assertEquals(SwaggerSchemaType.ARRAY, model.inputsDefinition().properties().get("attgplu").type());
        Assertions.assertEquals("c", model.inputsDefinition().properties().get("attgplu").title());
        Assertions.assertEquals(1040750997, model.inputsDefinition().properties().get("attgplu").maxProperties());
        Assertions.assertEquals(491196265, model.inputsDefinition().properties().get("attgplu").minProperties());
        Assertions.assertEquals("qf", model.inputsDefinition().properties().get("attgplu").discriminator());
        Assertions.assertEquals(false, model.inputsDefinition().properties().get("attgplu").readOnly());
        Assertions.assertEquals(false, model.inputsDefinition().properties().get("attgplu").notificationUrlExtension());
        Assertions.assertEquals("wvxwlmzqwmvt", model.inputsDefinition().required().get(0));
        Assertions.assertEquals(1082360596, model.inputsDefinition().maxProperties());
        Assertions.assertEquals(1038771362, model.inputsDefinition().minProperties());
        Assertions.assertEquals("phdu", model.inputsDefinition().allOf().get(0).ref());
        Assertions.assertEquals(SwaggerSchemaType.BOOLEAN, model.inputsDefinition().allOf().get(0).type());
        Assertions.assertEquals("knpgoxgjiuq", model.inputsDefinition().allOf().get(0).title());
        Assertions.assertEquals(783540465, model.inputsDefinition().allOf().get(0).maxProperties());
        Assertions.assertEquals(2101350417, model.inputsDefinition().allOf().get(0).minProperties());
        Assertions.assertEquals("ylkmqp", model.inputsDefinition().allOf().get(0).discriminator());
        Assertions.assertEquals(false, model.inputsDefinition().allOf().get(0).readOnly());
        Assertions.assertEquals(false, model.inputsDefinition().allOf().get(0).notificationUrlExtension());
        Assertions.assertEquals("w", model.inputsDefinition().discriminator());
        Assertions.assertEquals(true, model.inputsDefinition().readOnly());
        Assertions.assertEquals("g", model.inputsDefinition().xml().name());
        Assertions.assertEquals("tdherngbtcjuahok", model.inputsDefinition().xml().namespace());
        Assertions.assertEquals("obkauxofsh", model.inputsDefinition().xml().prefix());
        Assertions.assertEquals(true, model.inputsDefinition().xml().attribute());
        Assertions.assertEquals(true, model.inputsDefinition().xml().wrapped());
        Assertions.assertEquals("opionszon", model.inputsDefinition().externalDocs().description());
        Assertions.assertEquals("ngajinnixjawrtmj", model.inputsDefinition().externalDocs().uri());
        Assertions.assertEquals(true, model.inputsDefinition().notificationUrlExtension());
        Assertions.assertEquals("htuqfecjxe", model.inputsDefinition().dynamicSchemaOld().operationId());
        Assertions.assertEquals("tuhxuicb", model.inputsDefinition().dynamicSchemaOld().valuePath());
        Assertions.assertEquals("uflqbctq", model.inputsDefinition().dynamicSchemaNew().operationId());
        Assertions.assertEquals("mzjr", model.inputsDefinition().dynamicSchemaNew().valuePath());
        Assertions.assertEquals("eqyj", model.inputsDefinition().dynamicListNew().operationId());
        Assertions.assertEquals("zi", model.inputsDefinition().dynamicListNew().builtInOperation());
        Assertions.assertEquals("jxdfzantkwcegya", model.inputsDefinition().dynamicListNew().itemsPath());
        Assertions.assertEquals("bnseqacjjvpilg", model.inputsDefinition().dynamicListNew().itemValuePath());
        Assertions.assertEquals("oq", model.inputsDefinition().dynamicListNew().itemTitlePath());
        Assertions.assertEquals("iookjbsah", model.responsesDefinition().get("hkpigqfusuckzmkw").ref());
        Assertions.assertEquals(SwaggerSchemaType.STRING, model.responsesDefinition().get("hkpigqfusuckzmkw").type());
        Assertions.assertEquals("pdelqa", model.responsesDefinition().get("hkpigqfusuckzmkw").title());
        Assertions.assertEquals("m", model.responsesDefinition().get("hkpigqfusuckzmkw").items().ref());
        Assertions
            .assertEquals(SwaggerSchemaType.NUMBER, model.responsesDefinition().get("hkpigqfusuckzmkw").items().type());
        Assertions.assertEquals("bnfxofvc", model.responsesDefinition().get("hkpigqfusuckzmkw").items().title());
        Assertions
            .assertEquals(2062234995, model.responsesDefinition().get("hkpigqfusuckzmkw").items().maxProperties());
        Assertions.assertEquals(989951031, model.responsesDefinition().get("hkpigqfusuckzmkw").items().minProperties());
        Assertions
            .assertEquals("excmjurbuhhl", model.responsesDefinition().get("hkpigqfusuckzmkw").items().discriminator());
        Assertions.assertEquals(false, model.responsesDefinition().get("hkpigqfusuckzmkw").items().readOnly());
        Assertions
            .assertEquals(true, model.responsesDefinition().get("hkpigqfusuckzmkw").items().notificationUrlExtension());
        Assertions
            .assertEquals("lxnfuijtkbusqogs", model.responsesDefinition().get("hkpigqfusuckzmkw").required().get(0));
        Assertions.assertEquals(958455072, model.responsesDefinition().get("hkpigqfusuckzmkw").maxProperties());
        Assertions.assertEquals(495537328, model.responsesDefinition().get("hkpigqfusuckzmkw").minProperties());
        Assertions.assertEquals("sharujtj", model.responsesDefinition().get("hkpigqfusuckzmkw").discriminator());
        Assertions.assertEquals(false, model.responsesDefinition().get("hkpigqfusuckzmkw").readOnly());
        Assertions.assertEquals("yjqtt", model.responsesDefinition().get("hkpigqfusuckzmkw").xml().name());
        Assertions.assertEquals("kpqhjpenuygbq", model.responsesDefinition().get("hkpigqfusuckzmkw").xml().namespace());
        Assertions.assertEquals("qekewvnqvcd", model.responsesDefinition().get("hkpigqfusuckzmkw").xml().prefix());
        Assertions.assertEquals(false, model.responsesDefinition().get("hkpigqfusuckzmkw").xml().attribute());
        Assertions.assertEquals(false, model.responsesDefinition().get("hkpigqfusuckzmkw").xml().wrapped());
        Assertions
            .assertEquals(
                "djwnlaxpunjqi", model.responsesDefinition().get("hkpigqfusuckzmkw").externalDocs().description());
        Assertions
            .assertEquals("zvvitacgxmfcs", model.responsesDefinition().get("hkpigqfusuckzmkw").externalDocs().uri());
        Assertions.assertEquals(false, model.responsesDefinition().get("hkpigqfusuckzmkw").notificationUrlExtension());
        Assertions
            .assertEquals("xhlw", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicSchemaOld().operationId());
        Assertions
            .assertEquals(
                "sjgqrsxyp", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicSchemaOld().valuePath());
        Assertions
            .assertEquals("y", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicSchemaNew().operationId());
        Assertions
            .assertEquals("chrszi", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicSchemaNew().valuePath());
        Assertions
            .assertEquals(
                "elyetndnbf", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicListNew().operationId());
        Assertions
            .assertEquals(
                "ggagfln", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicListNew().builtInOperation());
        Assertions
            .assertEquals("mtrwah", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicListNew().itemsPath());
        Assertions
            .assertEquals("mu", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicListNew().itemValuePath());
        Assertions
            .assertEquals("tb", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicListNew().itemTitlePath());
        Assertions.assertEquals(true, model.isWebhook());
        Assertions.assertEquals(false, model.isNotification());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ApiOperationPropertiesDefinition model =
            new ApiOperationPropertiesDefinition()
                .withSummary("ugjknf")
                .withDescription("fcttuxuuyilfl")
                .withVisibility("iquvrehm")
                .withTrigger("jhvsujztczyt")
                .withTriggerHint("t")
                .withPageable(true)
                .withAnnotation(
                    new ApiOperationAnnotation()
                        .withStatus(StatusAnnotation.PRODUCTION)
                        .withFamily("prnjletlxsmr")
                        .withRevision(436134303))
                .withApi(
                    new ApiReference()
                        .withId("x")
                        .withDisplayName("ifamowazi")
                        .withDescription("knlqwzdvpiwhxqsz")
                        .withIconUri("maajquhuxylr")
                        .withSwagger("datam")
                        .withBrandColor("g")
                        .withCategory(ApiTier.STANDARD)
                        .withIntegrationServiceEnvironment(new ResourceReference().withId("ospspshckf")))
                .withInputsDefinition(
                    new SwaggerSchema()
                        .withRef("uqdflvoni")
                        .withType(SwaggerSchemaType.FILE)
                        .withTitle("ubcpzgpxti")
                        .withItems(
                            new SwaggerSchema()
                                .withRef("knidib")
                                .withType(SwaggerSchemaType.FILE)
                                .withTitle("gpnrhgov")
                                .withProperties(mapOf())
                                .withAdditionalProperties("dataqmhhaowj")
                                .withRequired(
                                    Arrays.asList("vuporqzdfuydzv", "fvxcnqmxqpswo", "mvkhlggd", "bemzqkzszuwi"))
                                .withMaxProperties(1086614322)
                                .withMinProperties(797560762)
                                .withAllOf(Arrays.asList())
                                .withDiscriminator("jfpgpicrmn")
                                .withReadOnly(false)
                                .withExample("datagjsxv")
                                .withNotificationUrlExtension(false))
                        .withProperties(
                            mapOf(
                                "attgplu",
                                new SwaggerSchema()
                                    .withRef("thsqqgvriiba")
                                    .withType(SwaggerSchemaType.ARRAY)
                                    .withTitle("c")
                                    .withProperties(mapOf())
                                    .withAdditionalProperties("dataxousxauzl")
                                    .withRequired(Arrays.asList())
                                    .withMaxProperties(1040750997)
                                    .withMinProperties(491196265)
                                    .withAllOf(Arrays.asList())
                                    .withDiscriminator("qf")
                                    .withReadOnly(false)
                                    .withExample("datammkjsvthnwpztek")
                                    .withNotificationUrlExtension(false)))
                        .withAdditionalProperties("dataotangcfhnykzc")
                        .withRequired(Arrays.asList("wvxwlmzqwmvt", "njmxmcuqudtcvcl", "ynpdkvgfab"))
                        .withMaxProperties(1082360596)
                        .withMinProperties(1038771362)
                        .withAllOf(
                            Arrays
                                .asList(
                                    new SwaggerSchema()
                                        .withRef("phdu")
                                        .withType(SwaggerSchemaType.BOOLEAN)
                                        .withTitle("knpgoxgjiuq")
                                        .withProperties(mapOf())
                                        .withAdditionalProperties("dataozipqwjedmurrxx")
                                        .withRequired(Arrays.asList())
                                        .withMaxProperties(783540465)
                                        .withMinProperties(2101350417)
                                        .withAllOf(Arrays.asList())
                                        .withDiscriminator("ylkmqp")
                                        .withReadOnly(false)
                                        .withExample("databcg")
                                        .withNotificationUrlExtension(false),
                                    new SwaggerSchema()
                                        .withRef("bqinjipnwjfu")
                                        .withType(SwaggerSchemaType.BOOLEAN)
                                        .withTitle("fcbahhp")
                                        .withProperties(mapOf())
                                        .withAdditionalProperties("datao")
                                        .withRequired(Arrays.asList())
                                        .withMaxProperties(86457454)
                                        .withMinProperties(577232767)
                                        .withAllOf(Arrays.asList())
                                        .withDiscriminator("kmkkholvdnd")
                                        .withReadOnly(false)
                                        .withExample("dataphuartv")
                                        .withNotificationUrlExtension(true),
                                    new SwaggerSchema()
                                        .withRef("hnmnahmnx")
                                        .withType(SwaggerSchemaType.FILE)
                                        .withTitle("qirwrweoox")
                                        .withProperties(mapOf())
                                        .withAdditionalProperties("datahx")
                                        .withRequired(Arrays.asList())
                                        .withMaxProperties(109793124)
                                        .withMinProperties(225627049)
                                        .withAllOf(Arrays.asList())
                                        .withDiscriminator("zqvbubqm")
                                        .withReadOnly(true)
                                        .withExample("dataxhxzgazttaboidvm")
                                        .withNotificationUrlExtension(true)))
                        .withDiscriminator("w")
                        .withReadOnly(true)
                        .withXml(
                            new SwaggerXml()
                                .withName("g")
                                .withNamespace("tdherngbtcjuahok")
                                .withPrefix("obkauxofsh")
                                .withAttribute(true)
                                .withWrapped(true)
                                .withExtensions(
                                    mapOf(
                                        "wzejywhslw",
                                        "datalai",
                                        "fugsnnfhyetefy",
                                        "dataojpllndnpdwrpqaf",
                                        "ctfjgtixr",
                                        "dataoc",
                                        "wolba",
                                        "datavzuyturmlmu")))
                        .withExternalDocs(
                            new SwaggerExternalDocumentation()
                                .withDescription("opionszon")
                                .withUri("ngajinnixjawrtmj")
                                .withExtensions(
                                    mapOf("vnekhenlusfnrdtj", "datayccxlzhcox", "ttgepuslvyjtcv", "datatxrdcqtjvi")))
                        .withExample("datakasizie")
                        .withNotificationUrlExtension(true)
                        .withDynamicSchemaOld(
                            new SwaggerCustomDynamicSchema()
                                .withOperationId("htuqfecjxe")
                                .withValuePath("tuhxuicb")
                                .withParameters(
                                    mapOf(
                                        "wnjlxu",
                                        "datamr",
                                        "jbaqehgpdoh",
                                        "datarhwpus",
                                        "nwfepbnwg",
                                        "datajqatucoigebxn",
                                        "jgcgbjbgdlfgtdys",
                                        "datam")))
                        .withDynamicSchemaNew(
                            new SwaggerCustomDynamicProperties()
                                .withOperationId("uflqbctq")
                                .withValuePath("mzjr")
                                .withParameters(mapOf()))
                        .withDynamicListNew(
                            new SwaggerCustomDynamicList()
                                .withOperationId("eqyj")
                                .withBuiltInOperation("zi")
                                .withItemsPath("jxdfzantkwcegya")
                                .withItemValuePath("bnseqacjjvpilg")
                                .withItemTitlePath("oq")
                                .withParameters(mapOf()))
                        .withDynamicTree(new SwaggerCustomDynamicTree()))
                .withResponsesDefinition(
                    mapOf(
                        "hkpigqfusuckzmkw",
                        new SwaggerSchema()
                            .withRef("iookjbsah")
                            .withType(SwaggerSchemaType.STRING)
                            .withTitle("pdelqa")
                            .withItems(
                                new SwaggerSchema()
                                    .withRef("m")
                                    .withType(SwaggerSchemaType.NUMBER)
                                    .withTitle("bnfxofvc")
                                    .withProperties(mapOf())
                                    .withAdditionalProperties("datairazftxejwabmd")
                                    .withRequired(Arrays.asList())
                                    .withMaxProperties(2062234995)
                                    .withMinProperties(989951031)
                                    .withAllOf(Arrays.asList())
                                    .withDiscriminator("excmjurbuhhl")
                                    .withReadOnly(false)
                                    .withExample("datasrogtu")
                                    .withNotificationUrlExtension(true))
                            .withProperties(mapOf())
                            .withAdditionalProperties("datasidfv")
                            .withRequired(Arrays.asList("lxnfuijtkbusqogs"))
                            .withMaxProperties(958455072)
                            .withMinProperties(495537328)
                            .withAllOf(Arrays.asList())
                            .withDiscriminator("sharujtj")
                            .withReadOnly(false)
                            .withXml(
                                new SwaggerXml()
                                    .withName("yjqtt")
                                    .withNamespace("kpqhjpenuygbq")
                                    .withPrefix("qekewvnqvcd")
                                    .withAttribute(false)
                                    .withWrapped(false)
                                    .withExtensions(mapOf()))
                            .withExternalDocs(
                                new SwaggerExternalDocumentation()
                                    .withDescription("djwnlaxpunjqi")
                                    .withUri("zvvitacgxmfcs")
                                    .withExtensions(mapOf()))
                            .withExample("datax")
                            .withNotificationUrlExtension(false)
                            .withDynamicSchemaOld(
                                new SwaggerCustomDynamicSchema()
                                    .withOperationId("xhlw")
                                    .withValuePath("sjgqrsxyp")
                                    .withParameters(mapOf()))
                            .withDynamicSchemaNew(
                                new SwaggerCustomDynamicProperties()
                                    .withOperationId("y")
                                    .withValuePath("chrszi")
                                    .withParameters(mapOf()))
                            .withDynamicListNew(
                                new SwaggerCustomDynamicList()
                                    .withOperationId("elyetndnbf")
                                    .withBuiltInOperation("ggagfln")
                                    .withItemsPath("mtrwah")
                                    .withItemValuePath("mu")
                                    .withItemTitlePath("tb")
                                    .withParameters(mapOf()))
                            .withDynamicTree(new SwaggerCustomDynamicTree())))
                .withIsWebhook(true)
                .withIsNotification(false);
        model = BinaryData.fromObject(model).toObject(ApiOperationPropertiesDefinition.class);
        Assertions.assertEquals("ugjknf", model.summary());
        Assertions.assertEquals("fcttuxuuyilfl", model.description());
        Assertions.assertEquals("iquvrehm", model.visibility());
        Assertions.assertEquals("jhvsujztczyt", model.trigger());
        Assertions.assertEquals("t", model.triggerHint());
        Assertions.assertEquals(true, model.pageable());
        Assertions.assertEquals(StatusAnnotation.PRODUCTION, model.annotation().status());
        Assertions.assertEquals("prnjletlxsmr", model.annotation().family());
        Assertions.assertEquals(436134303, model.annotation().revision());
        Assertions.assertEquals("x", model.api().id());
        Assertions.assertEquals("ifamowazi", model.api().displayName());
        Assertions.assertEquals("knlqwzdvpiwhxqsz", model.api().description());
        Assertions.assertEquals("maajquhuxylr", model.api().iconUri());
        Assertions.assertEquals("g", model.api().brandColor());
        Assertions.assertEquals(ApiTier.STANDARD, model.api().category());
        Assertions.assertEquals("ospspshckf", model.api().integrationServiceEnvironment().id());
        Assertions.assertEquals("uqdflvoni", model.inputsDefinition().ref());
        Assertions.assertEquals(SwaggerSchemaType.FILE, model.inputsDefinition().type());
        Assertions.assertEquals("ubcpzgpxti", model.inputsDefinition().title());
        Assertions.assertEquals("knidib", model.inputsDefinition().items().ref());
        Assertions.assertEquals(SwaggerSchemaType.FILE, model.inputsDefinition().items().type());
        Assertions.assertEquals("gpnrhgov", model.inputsDefinition().items().title());
        Assertions.assertEquals("vuporqzdfuydzv", model.inputsDefinition().items().required().get(0));
        Assertions.assertEquals(1086614322, model.inputsDefinition().items().maxProperties());
        Assertions.assertEquals(797560762, model.inputsDefinition().items().minProperties());
        Assertions.assertEquals("jfpgpicrmn", model.inputsDefinition().items().discriminator());
        Assertions.assertEquals(false, model.inputsDefinition().items().readOnly());
        Assertions.assertEquals(false, model.inputsDefinition().items().notificationUrlExtension());
        Assertions.assertEquals("thsqqgvriiba", model.inputsDefinition().properties().get("attgplu").ref());
        Assertions.assertEquals(SwaggerSchemaType.ARRAY, model.inputsDefinition().properties().get("attgplu").type());
        Assertions.assertEquals("c", model.inputsDefinition().properties().get("attgplu").title());
        Assertions.assertEquals(1040750997, model.inputsDefinition().properties().get("attgplu").maxProperties());
        Assertions.assertEquals(491196265, model.inputsDefinition().properties().get("attgplu").minProperties());
        Assertions.assertEquals("qf", model.inputsDefinition().properties().get("attgplu").discriminator());
        Assertions.assertEquals(false, model.inputsDefinition().properties().get("attgplu").readOnly());
        Assertions.assertEquals(false, model.inputsDefinition().properties().get("attgplu").notificationUrlExtension());
        Assertions.assertEquals("wvxwlmzqwmvt", model.inputsDefinition().required().get(0));
        Assertions.assertEquals(1082360596, model.inputsDefinition().maxProperties());
        Assertions.assertEquals(1038771362, model.inputsDefinition().minProperties());
        Assertions.assertEquals("phdu", model.inputsDefinition().allOf().get(0).ref());
        Assertions.assertEquals(SwaggerSchemaType.BOOLEAN, model.inputsDefinition().allOf().get(0).type());
        Assertions.assertEquals("knpgoxgjiuq", model.inputsDefinition().allOf().get(0).title());
        Assertions.assertEquals(783540465, model.inputsDefinition().allOf().get(0).maxProperties());
        Assertions.assertEquals(2101350417, model.inputsDefinition().allOf().get(0).minProperties());
        Assertions.assertEquals("ylkmqp", model.inputsDefinition().allOf().get(0).discriminator());
        Assertions.assertEquals(false, model.inputsDefinition().allOf().get(0).readOnly());
        Assertions.assertEquals(false, model.inputsDefinition().allOf().get(0).notificationUrlExtension());
        Assertions.assertEquals("w", model.inputsDefinition().discriminator());
        Assertions.assertEquals(true, model.inputsDefinition().readOnly());
        Assertions.assertEquals("g", model.inputsDefinition().xml().name());
        Assertions.assertEquals("tdherngbtcjuahok", model.inputsDefinition().xml().namespace());
        Assertions.assertEquals("obkauxofsh", model.inputsDefinition().xml().prefix());
        Assertions.assertEquals(true, model.inputsDefinition().xml().attribute());
        Assertions.assertEquals(true, model.inputsDefinition().xml().wrapped());
        Assertions.assertEquals("opionszon", model.inputsDefinition().externalDocs().description());
        Assertions.assertEquals("ngajinnixjawrtmj", model.inputsDefinition().externalDocs().uri());
        Assertions.assertEquals(true, model.inputsDefinition().notificationUrlExtension());
        Assertions.assertEquals("htuqfecjxe", model.inputsDefinition().dynamicSchemaOld().operationId());
        Assertions.assertEquals("tuhxuicb", model.inputsDefinition().dynamicSchemaOld().valuePath());
        Assertions.assertEquals("uflqbctq", model.inputsDefinition().dynamicSchemaNew().operationId());
        Assertions.assertEquals("mzjr", model.inputsDefinition().dynamicSchemaNew().valuePath());
        Assertions.assertEquals("eqyj", model.inputsDefinition().dynamicListNew().operationId());
        Assertions.assertEquals("zi", model.inputsDefinition().dynamicListNew().builtInOperation());
        Assertions.assertEquals("jxdfzantkwcegya", model.inputsDefinition().dynamicListNew().itemsPath());
        Assertions.assertEquals("bnseqacjjvpilg", model.inputsDefinition().dynamicListNew().itemValuePath());
        Assertions.assertEquals("oq", model.inputsDefinition().dynamicListNew().itemTitlePath());
        Assertions.assertEquals("iookjbsah", model.responsesDefinition().get("hkpigqfusuckzmkw").ref());
        Assertions.assertEquals(SwaggerSchemaType.STRING, model.responsesDefinition().get("hkpigqfusuckzmkw").type());
        Assertions.assertEquals("pdelqa", model.responsesDefinition().get("hkpigqfusuckzmkw").title());
        Assertions.assertEquals("m", model.responsesDefinition().get("hkpigqfusuckzmkw").items().ref());
        Assertions
            .assertEquals(SwaggerSchemaType.NUMBER, model.responsesDefinition().get("hkpigqfusuckzmkw").items().type());
        Assertions.assertEquals("bnfxofvc", model.responsesDefinition().get("hkpigqfusuckzmkw").items().title());
        Assertions
            .assertEquals(2062234995, model.responsesDefinition().get("hkpigqfusuckzmkw").items().maxProperties());
        Assertions.assertEquals(989951031, model.responsesDefinition().get("hkpigqfusuckzmkw").items().minProperties());
        Assertions
            .assertEquals("excmjurbuhhl", model.responsesDefinition().get("hkpigqfusuckzmkw").items().discriminator());
        Assertions.assertEquals(false, model.responsesDefinition().get("hkpigqfusuckzmkw").items().readOnly());
        Assertions
            .assertEquals(true, model.responsesDefinition().get("hkpigqfusuckzmkw").items().notificationUrlExtension());
        Assertions
            .assertEquals("lxnfuijtkbusqogs", model.responsesDefinition().get("hkpigqfusuckzmkw").required().get(0));
        Assertions.assertEquals(958455072, model.responsesDefinition().get("hkpigqfusuckzmkw").maxProperties());
        Assertions.assertEquals(495537328, model.responsesDefinition().get("hkpigqfusuckzmkw").minProperties());
        Assertions.assertEquals("sharujtj", model.responsesDefinition().get("hkpigqfusuckzmkw").discriminator());
        Assertions.assertEquals(false, model.responsesDefinition().get("hkpigqfusuckzmkw").readOnly());
        Assertions.assertEquals("yjqtt", model.responsesDefinition().get("hkpigqfusuckzmkw").xml().name());
        Assertions.assertEquals("kpqhjpenuygbq", model.responsesDefinition().get("hkpigqfusuckzmkw").xml().namespace());
        Assertions.assertEquals("qekewvnqvcd", model.responsesDefinition().get("hkpigqfusuckzmkw").xml().prefix());
        Assertions.assertEquals(false, model.responsesDefinition().get("hkpigqfusuckzmkw").xml().attribute());
        Assertions.assertEquals(false, model.responsesDefinition().get("hkpigqfusuckzmkw").xml().wrapped());
        Assertions
            .assertEquals(
                "djwnlaxpunjqi", model.responsesDefinition().get("hkpigqfusuckzmkw").externalDocs().description());
        Assertions
            .assertEquals("zvvitacgxmfcs", model.responsesDefinition().get("hkpigqfusuckzmkw").externalDocs().uri());
        Assertions.assertEquals(false, model.responsesDefinition().get("hkpigqfusuckzmkw").notificationUrlExtension());
        Assertions
            .assertEquals("xhlw", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicSchemaOld().operationId());
        Assertions
            .assertEquals(
                "sjgqrsxyp", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicSchemaOld().valuePath());
        Assertions
            .assertEquals("y", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicSchemaNew().operationId());
        Assertions
            .assertEquals("chrszi", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicSchemaNew().valuePath());
        Assertions
            .assertEquals(
                "elyetndnbf", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicListNew().operationId());
        Assertions
            .assertEquals(
                "ggagfln", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicListNew().builtInOperation());
        Assertions
            .assertEquals("mtrwah", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicListNew().itemsPath());
        Assertions
            .assertEquals("mu", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicListNew().itemValuePath());
        Assertions
            .assertEquals("tb", model.responsesDefinition().get("hkpigqfusuckzmkw").dynamicListNew().itemTitlePath());
        Assertions.assertEquals(true, model.isWebhook());
        Assertions.assertEquals(false, model.isNotification());
    }

    @SuppressWarnings("unchecked")
    private static <T> Map<String, T> mapOf(Object... inputs) {
        Map<String, T> map = new HashMap<>();
        for (int i = 0; i < inputs.length; i += 2) {
            String key = (String) inputs[i];
            T value = (T) inputs[i + 1];
            map.put(key, value);
        }
        return map;
    }
}
