// 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.BinaryData;
import com.azure.resourcemanager.apimanagement.models.ParameterContract;
import com.azure.resourcemanager.apimanagement.models.ParameterExampleContract;
import com.azure.resourcemanager.apimanagement.models.RepresentationContract;
import com.azure.resourcemanager.apimanagement.models.RequestContract;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import org.junit.jupiter.api.Assertions;

public final class RequestContractTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        RequestContract model =
            BinaryData
                .fromString(
                    "{\"description\":\"drihpfhoqcaaewda\",\"queryParameters\":[{\"name\":\"jvlpjxxkzbr\",\"description\":\"geivsiykzkdncj\",\"type\":\"xonbzoggculapz\",\"defaultValue\":\"rpgogtqxep\",\"required\":false,\"values\":[\"uajlyj\",\"lvofqzhvfcibyfmo\"],\"schemaId\":\"xrkjpvdw\",\"typeName\":\"zwiivwzjbhyzs\",\"examples\":{\"jlxr\":{\"summary\":\"ambtrnegvm\",\"description\":\"uqeqv\",\"value\":\"dataspastjbkkdmf\",\"externalValue\":\"est\"},\"wmmrq\":{\"summary\":\"lozapeewchpxlk\",\"description\":\"kuziycsle\",\"value\":\"dataf\",\"externalValue\":\"tcktyhjtqedcgzu\"}}},{\"name\":\"zrrjvpgly\",\"description\":\"gkrvqeevto\",\"type\":\"pryu\",\"defaultValue\":\"wytpzdmovz\",\"required\":false,\"values\":[\"wzqa\",\"f\"],\"schemaId\":\"z\",\"typeName\":\"iglaecx\",\"examples\":{\"wf\":{\"summary\":\"cokpv\",\"description\":\"lqtmldgxob\",\"value\":\"datarclnpkc\",\"externalValue\":\"yzriykhy\"}}}],\"headers\":[{\"name\":\"b\",\"description\":\"qvkjlmxho\",\"type\":\"dynhdwdigum\",\"defaultValue\":\"raauzzpt\",\"required\":false,\"values\":[\"dz\",\"ezwwv\"],\"schemaId\":\"qyuvvfonkp\",\"typeName\":\"qyikvy\",\"examples\":{\"gbdhuzqgnjdg\":{\"summary\":\"avluwmncs\",\"description\":\"ijf\",\"value\":\"datavpo\",\"externalValue\":\"rsg\"}}},{\"name\":\"ynscl\",\"description\":\"hzvhxnkomtkubo\",\"type\":\"ppnvdxz\",\"defaultValue\":\"ihfrbbcevqa\",\"required\":false,\"values\":[\"hlfkqojpy\",\"vgtrdcnifmzzs\",\"ymbrnysuxmpraf\",\"g\"],\"schemaId\":\"hocxvdfffwafqrou\",\"typeName\":\"spave\",\"examples\":{\"aeoisrvh\":{\"summary\":\"kbunzoz\",\"description\":\"hcxgkmoyx\",\"value\":\"datayuibhm\",\"externalValue\":\"nbzydvfvfcj\"}}},{\"name\":\"gorf\",\"description\":\"kiscvwmzhwpl\",\"type\":\"faxvxil\",\"defaultValue\":\"tg\",\"required\":true,\"values\":[\"yqxtjjfzql\",\"hycav\",\"dggxdbeesmi\"],\"schemaId\":\"nlrariaawiuagy\",\"typeName\":\"qfby\",\"examples\":{\"u\":{\"summary\":\"giagtcojo\",\"description\":\"wogfnzjvu\",\"value\":\"datazldmozuxy\",\"externalValue\":\"sbtkadpysownbtgk\"}}}],\"representations\":[{\"contentType\":\"qctojcmisof\",\"schemaId\":\"ypefojyqdhcupl\",\"typeName\":\"lcwkhihihlhz\",\"formParameters\":[{\"name\":\"tzbsrgnowcjhf\",\"description\":\"vecactx\",\"type\":\"wotey\",\"defaultValue\":\"cluqovekqvgqo\",\"required\":true,\"values\":[\"mpjw\",\"ivqikfxcvhr\"],\"schemaId\":\"phuagrttikteusq\",\"typeName\":\"kvyklxubyjaffmm\",\"examples\":{\"cqc\":{},\"ubgq\":{},\"brta\":{},\"metttwgd\":{}}}],\"examples\":{\"vnh\":{\"summary\":\"ihhrmo\",\"description\":\"z\",\"value\":\"dataeypxiutcxapzhyr\",\"externalValue\":\"togebjoxsl\"},\"lftidgfcwqmpim\":{\"summary\":\"brqnkkzjcjb\",\"description\":\"gaehvvibrxjjst\",\"value\":\"databeitpkx\",\"externalValue\":\"moob\"},\"pfajnjwltlwtjj\":{\"summary\":\"xzhemjyh\",\"description\":\"uj\",\"value\":\"datat\",\"externalValue\":\"ozzwculkba\"}}},{\"contentType\":\"uktalhsnvkcdmxz\",\"schemaId\":\"oaimlnw\",\"typeName\":\"aomylwea\",\"formParameters\":[{\"name\":\"cse\",\"description\":\"wwnpj\",\"type\":\"l\",\"defaultValue\":\"swpchwahfbousn\",\"required\":true,\"values\":[\"ewetwlyxgncxykxh\",\"jhlimmbcxfhbcpo\",\"xvxcjzhq\",\"zxfpxtgqsc\"],\"schemaId\":\"vftjuhd\",\"typeName\":\"zkmtgguwpijrajci\",\"examples\":{\"ghfcfiwrxgkneuvy\":{},\"nzqodfvpg\":{},\"hoxgsgbpf\":{},\"zdjtxvzflbqv\":{}}},{\"name\":\"aqvlgafcqusr\",\"description\":\"etnwsdtutnw\",\"type\":\"duy\",\"defaultValue\":\"uzhyrmewipmvekdx\",\"required\":false,\"values\":[\"sjjxundxgketw\"],\"schemaId\":\"hzjhf\",\"typeName\":\"hvvmuvgpmun\",\"examples\":{\"xvmhf\":{}}},{\"name\":\"uzjyihsasbhudypo\",\"description\":\"uemsly\",\"type\":\"sqy\",\"defaultValue\":\"foobrlttyms\",\"required\":true,\"values\":[\"dnfwqzdzg\",\"ilaxhn\",\"hqlyvijo\"],\"schemaId\":\"iv\",\"typeName\":\"oyzunbixxr\",\"examples\":{\"vcpwpgclrc\":{},\"vtsoxf\":{},\"kenx\":{}}}],\"examples\":{\"yqdrf\":{\"summary\":\"efrp\",\"description\":\"dnqqskawaoqvmmb\",\"value\":\"dataqfr\",\"externalValue\":\"lkzmegnitgvkxl\"},\"xakjsqzhzb\":{\"summary\":\"cealzxwh\",\"description\":\"nsymoyqhlwigd\",\"value\":\"databkbxgomfa\",\"externalValue\":\"wasqvdaeyyg\"},\"eaahhvjhhn\":{\"summary\":\"kgimsidxasic\",\"description\":\"yvvjskgfmo\",\"value\":\"dataah\",\"externalValue\":\"gat\"},\"jlageu\":{\"summary\":\"zybbj\",\"description\":\"dj\",\"value\":\"datayxkyxvx\",\"externalValue\":\"blbjedn\"}}},{\"contentType\":\"ulxunsmjbnkpp\",\"schemaId\":\"nenlsvxeizzg\",\"typeName\":\"lnsrmffe\",\"formParameters\":[{\"name\":\"ckt\",\"description\":\"ymerteeammxq\",\"type\":\"ekkkzd\",\"defaultValue\":\"tkgdojbmxva\",\"required\":false,\"values\":[\"eesvecu\"],\"schemaId\":\"pxtxsuwp\",\"typeName\":\"ujwsawddjibabxvi\",\"examples\":{\"v\":{},\"zeexavoxtfgle\":{},\"dmdqb\":{},\"pypqtgsfj\":{}}},{\"name\":\"cbslhhx\",\"description\":\"bxv\",\"type\":\"d\",\"defaultValue\":\"nsiru\",\"required\":false,\"values\":[\"es\"],\"schemaId\":\"dlpagzrcxfail\",\"typeName\":\"xwmdboxd\",\"examples\":{\"ft\":{},\"fqob\":{},\"jln\":{},\"cgcckknhxkizvyt\":{}}},{\"name\":\"rzvul\",\"description\":\"aaeranokqgukk\",\"type\":\"qnvb\",\"defaultValue\":\"ylaxxulcdi\",\"required\":false,\"values\":[\"jbjsvgjrwh\"],\"schemaId\":\"vyc\",\"typeName\":\"dclxgc\",\"examples\":{\"fnwmbtmvpdvj\":{}}},{\"name\":\"httz\",\"description\":\"fedxihchrphkm\",\"type\":\"rjdqnsdfzp\",\"defaultValue\":\"tg\",\"required\":false,\"values\":[\"ghrjeuutl\"],\"schemaId\":\"ez\",\"typeName\":\"hokvbwnh\",\"examples\":{\"lgehg\":{},\"pipifh\":{}}}],\"examples\":{\"ptil\":{\"summary\":\"ajvgcxtxjcsheafi\",\"description\":\"tugsresmkssjh\",\"value\":\"dataftxfkf\",\"externalValue\":\"gpr\"}}},{\"contentType\":\"ucb\",\"schemaId\":\"tgdqohmcwsldriz\",\"typeName\":\"pwbralllibphbqz\",\"formParameters\":[{\"name\":\"aka\",\"description\":\"nkjpdnjzha\",\"type\":\"oylhjlmuoyxprimr\",\"defaultValue\":\"pteecjme\",\"required\":false,\"values\":[\"vasylwxdzau\",\"weoohguufuzboyj\"],\"schemaId\":\"hwtzolb\",\"typeName\":\"mwmdxmebwjscjpa\",\"examples\":{\"veabfqxnmwmqtib\":{},\"yijddtvqcttad\":{}}},{\"name\":\"jaeukmrsieekpn\",\"description\":\"aapm\",\"type\":\"dqmeqwigpibudq\",\"defaultValue\":\"xebeybpmz\",\"required\":true,\"values\":[\"fyaqitm\"],\"schemaId\":\"eioqaqhvse\",\"typeName\":\"uqyrxpdl\",\"examples\":{\"lsismjqfrd\":{},\"gamquhiosrsjui\":{},\"fcdis\":{},\"irnxz\":{}}},{\"name\":\"czexrxzbujrtrhqv\",\"description\":\"evkh\",\"type\":\"nlnzonzlrpi\",\"defaultValue\":\"wncvjtszcofiz\",\"required\":true,\"values\":[\"gbjkvreljeamur\",\"zmlovuanash\",\"xlpm\"],\"schemaId\":\"rbdkelvidiz\",\"typeName\":\"sdbccxjmonfdgnwn\",\"examples\":{\"uuwwltv\":{}}}],\"examples\":{\"lvizb\":{\"summary\":\"tzenk\",\"description\":\"fzzhmkdasv\",\"value\":\"datayhbxcudchxgs\",\"externalValue\":\"oldforobw\"},\"uurutlwexxwlalni\":{\"summary\":\"fovvacqpbtuodxes\",\"description\":\"bbelawumuaslzk\",\"value\":\"datarwoycqucwyh\",\"externalValue\":\"nomdrkywuhpsv\"},\"bn\":{\"summary\":\"zsrzpgepq\",\"description\":\"bb\",\"value\":\"datapgdakchzyvli\",\"externalValue\":\"nrkcxkj\"}}}]}")
                .toObject(RequestContract.class);
        Assertions.assertEquals("drihpfhoqcaaewda", model.description());
        Assertions.assertEquals("jvlpjxxkzbr", model.queryParameters().get(0).name());
        Assertions.assertEquals("geivsiykzkdncj", model.queryParameters().get(0).description());
        Assertions.assertEquals("xonbzoggculapz", model.queryParameters().get(0).type());
        Assertions.assertEquals("rpgogtqxep", model.queryParameters().get(0).defaultValue());
        Assertions.assertEquals(false, model.queryParameters().get(0).required());
        Assertions.assertEquals("uajlyj", model.queryParameters().get(0).values().get(0));
        Assertions.assertEquals("xrkjpvdw", model.queryParameters().get(0).schemaId());
        Assertions.assertEquals("zwiivwzjbhyzs", model.queryParameters().get(0).typeName());
        Assertions.assertEquals("ambtrnegvm", model.queryParameters().get(0).examples().get("jlxr").summary());
        Assertions.assertEquals("uqeqv", model.queryParameters().get(0).examples().get("jlxr").description());
        Assertions.assertEquals("est", model.queryParameters().get(0).examples().get("jlxr").externalValue());
        Assertions.assertEquals("b", model.headers().get(0).name());
        Assertions.assertEquals("qvkjlmxho", model.headers().get(0).description());
        Assertions.assertEquals("dynhdwdigum", model.headers().get(0).type());
        Assertions.assertEquals("raauzzpt", model.headers().get(0).defaultValue());
        Assertions.assertEquals(false, model.headers().get(0).required());
        Assertions.assertEquals("dz", model.headers().get(0).values().get(0));
        Assertions.assertEquals("qyuvvfonkp", model.headers().get(0).schemaId());
        Assertions.assertEquals("qyikvy", model.headers().get(0).typeName());
        Assertions.assertEquals("avluwmncs", model.headers().get(0).examples().get("gbdhuzqgnjdg").summary());
        Assertions.assertEquals("ijf", model.headers().get(0).examples().get("gbdhuzqgnjdg").description());
        Assertions.assertEquals("rsg", model.headers().get(0).examples().get("gbdhuzqgnjdg").externalValue());
        Assertions.assertEquals("qctojcmisof", model.representations().get(0).contentType());
        Assertions.assertEquals("ypefojyqdhcupl", model.representations().get(0).schemaId());
        Assertions.assertEquals("lcwkhihihlhz", model.representations().get(0).typeName());
        Assertions.assertEquals("tzbsrgnowcjhf", model.representations().get(0).formParameters().get(0).name());
        Assertions.assertEquals("vecactx", model.representations().get(0).formParameters().get(0).description());
        Assertions.assertEquals("wotey", model.representations().get(0).formParameters().get(0).type());
        Assertions.assertEquals("cluqovekqvgqo", model.representations().get(0).formParameters().get(0).defaultValue());
        Assertions.assertEquals(true, model.representations().get(0).formParameters().get(0).required());
        Assertions.assertEquals("mpjw", model.representations().get(0).formParameters().get(0).values().get(0));
        Assertions.assertEquals("phuagrttikteusq", model.representations().get(0).formParameters().get(0).schemaId());
        Assertions.assertEquals("kvyklxubyjaffmm", model.representations().get(0).formParameters().get(0).typeName());
        Assertions.assertEquals("ihhrmo", model.representations().get(0).examples().get("vnh").summary());
        Assertions.assertEquals("z", model.representations().get(0).examples().get("vnh").description());
        Assertions.assertEquals("togebjoxsl", model.representations().get(0).examples().get("vnh").externalValue());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        RequestContract model =
            new RequestContract()
                .withDescription("drihpfhoqcaaewda")
                .withQueryParameters(
                    Arrays
                        .asList(
                            new ParameterContract()
                                .withName("jvlpjxxkzbr")
                                .withDescription("geivsiykzkdncj")
                                .withType("xonbzoggculapz")
                                .withDefaultValue("rpgogtqxep")
                                .withRequired(false)
                                .withValues(Arrays.asList("uajlyj", "lvofqzhvfcibyfmo"))
                                .withSchemaId("xrkjpvdw")
                                .withTypeName("zwiivwzjbhyzs")
                                .withExamples(
                                    mapOf(
                                        "jlxr",
                                        new ParameterExampleContract()
                                            .withSummary("ambtrnegvm")
                                            .withDescription("uqeqv")
                                            .withValue("dataspastjbkkdmf")
                                            .withExternalValue("est"),
                                        "wmmrq",
                                        new ParameterExampleContract()
                                            .withSummary("lozapeewchpxlk")
                                            .withDescription("kuziycsle")
                                            .withValue("dataf")
                                            .withExternalValue("tcktyhjtqedcgzu"))),
                            new ParameterContract()
                                .withName("zrrjvpgly")
                                .withDescription("gkrvqeevto")
                                .withType("pryu")
                                .withDefaultValue("wytpzdmovz")
                                .withRequired(false)
                                .withValues(Arrays.asList("wzqa", "f"))
                                .withSchemaId("z")
                                .withTypeName("iglaecx")
                                .withExamples(
                                    mapOf(
                                        "wf",
                                        new ParameterExampleContract()
                                            .withSummary("cokpv")
                                            .withDescription("lqtmldgxob")
                                            .withValue("datarclnpkc")
                                            .withExternalValue("yzriykhy")))))
                .withHeaders(
                    Arrays
                        .asList(
                            new ParameterContract()
                                .withName("b")
                                .withDescription("qvkjlmxho")
                                .withType("dynhdwdigum")
                                .withDefaultValue("raauzzpt")
                                .withRequired(false)
                                .withValues(Arrays.asList("dz", "ezwwv"))
                                .withSchemaId("qyuvvfonkp")
                                .withTypeName("qyikvy")
                                .withExamples(
                                    mapOf(
                                        "gbdhuzqgnjdg",
                                        new ParameterExampleContract()
                                            .withSummary("avluwmncs")
                                            .withDescription("ijf")
                                            .withValue("datavpo")
                                            .withExternalValue("rsg"))),
                            new ParameterContract()
                                .withName("ynscl")
                                .withDescription("hzvhxnkomtkubo")
                                .withType("ppnvdxz")
                                .withDefaultValue("ihfrbbcevqa")
                                .withRequired(false)
                                .withValues(Arrays.asList("hlfkqojpy", "vgtrdcnifmzzs", "ymbrnysuxmpraf", "g"))
                                .withSchemaId("hocxvdfffwafqrou")
                                .withTypeName("spave")
                                .withExamples(
                                    mapOf(
                                        "aeoisrvh",
                                        new ParameterExampleContract()
                                            .withSummary("kbunzoz")
                                            .withDescription("hcxgkmoyx")
                                            .withValue("datayuibhm")
                                            .withExternalValue("nbzydvfvfcj"))),
                            new ParameterContract()
                                .withName("gorf")
                                .withDescription("kiscvwmzhwpl")
                                .withType("faxvxil")
                                .withDefaultValue("tg")
                                .withRequired(true)
                                .withValues(Arrays.asList("yqxtjjfzql", "hycav", "dggxdbeesmi"))
                                .withSchemaId("nlrariaawiuagy")
                                .withTypeName("qfby")
                                .withExamples(
                                    mapOf(
                                        "u",
                                        new ParameterExampleContract()
                                            .withSummary("giagtcojo")
                                            .withDescription("wogfnzjvu")
                                            .withValue("datazldmozuxy")
                                            .withExternalValue("sbtkadpysownbtgk")))))
                .withRepresentations(
                    Arrays
                        .asList(
                            new RepresentationContract()
                                .withContentType("qctojcmisof")
                                .withSchemaId("ypefojyqdhcupl")
                                .withTypeName("lcwkhihihlhz")
                                .withFormParameters(
                                    Arrays
                                        .asList(
                                            new ParameterContract()
                                                .withName("tzbsrgnowcjhf")
                                                .withDescription("vecactx")
                                                .withType("wotey")
                                                .withDefaultValue("cluqovekqvgqo")
                                                .withRequired(true)
                                                .withValues(Arrays.asList("mpjw", "ivqikfxcvhr"))
                                                .withSchemaId("phuagrttikteusq")
                                                .withTypeName("kvyklxubyjaffmm")
                                                .withExamples(
                                                    mapOf(
                                                        "cqc",
                                                        new ParameterExampleContract(),
                                                        "ubgq",
                                                        new ParameterExampleContract(),
                                                        "brta",
                                                        new ParameterExampleContract(),
                                                        "metttwgd",
                                                        new ParameterExampleContract()))))
                                .withExamples(
                                    mapOf(
                                        "vnh",
                                        new ParameterExampleContract()
                                            .withSummary("ihhrmo")
                                            .withDescription("z")
                                            .withValue("dataeypxiutcxapzhyr")
                                            .withExternalValue("togebjoxsl"),
                                        "lftidgfcwqmpim",
                                        new ParameterExampleContract()
                                            .withSummary("brqnkkzjcjb")
                                            .withDescription("gaehvvibrxjjst")
                                            .withValue("databeitpkx")
                                            .withExternalValue("moob"),
                                        "pfajnjwltlwtjj",
                                        new ParameterExampleContract()
                                            .withSummary("xzhemjyh")
                                            .withDescription("uj")
                                            .withValue("datat")
                                            .withExternalValue("ozzwculkba"))),
                            new RepresentationContract()
                                .withContentType("uktalhsnvkcdmxz")
                                .withSchemaId("oaimlnw")
                                .withTypeName("aomylwea")
                                .withFormParameters(
                                    Arrays
                                        .asList(
                                            new ParameterContract()
                                                .withName("cse")
                                                .withDescription("wwnpj")
                                                .withType("l")
                                                .withDefaultValue("swpchwahfbousn")
                                                .withRequired(true)
                                                .withValues(
                                                    Arrays
                                                        .asList(
                                                            "ewetwlyxgncxykxh",
                                                            "jhlimmbcxfhbcpo",
                                                            "xvxcjzhq",
                                                            "zxfpxtgqsc"))
                                                .withSchemaId("vftjuhd")
                                                .withTypeName("zkmtgguwpijrajci")
                                                .withExamples(
                                                    mapOf(
                                                        "ghfcfiwrxgkneuvy",
                                                        new ParameterExampleContract(),
                                                        "nzqodfvpg",
                                                        new ParameterExampleContract(),
                                                        "hoxgsgbpf",
                                                        new ParameterExampleContract(),
                                                        "zdjtxvzflbqv",
                                                        new ParameterExampleContract())),
                                            new ParameterContract()
                                                .withName("aqvlgafcqusr")
                                                .withDescription("etnwsdtutnw")
                                                .withType("duy")
                                                .withDefaultValue("uzhyrmewipmvekdx")
                                                .withRequired(false)
                                                .withValues(Arrays.asList("sjjxundxgketw"))
                                                .withSchemaId("hzjhf")
                                                .withTypeName("hvvmuvgpmun")
                                                .withExamples(mapOf("xvmhf", new ParameterExampleContract())),
                                            new ParameterContract()
                                                .withName("uzjyihsasbhudypo")
                                                .withDescription("uemsly")
                                                .withType("sqy")
                                                .withDefaultValue("foobrlttyms")
                                                .withRequired(true)
                                                .withValues(Arrays.asList("dnfwqzdzg", "ilaxhn", "hqlyvijo"))
                                                .withSchemaId("iv")
                                                .withTypeName("oyzunbixxr")
                                                .withExamples(
                                                    mapOf(
                                                        "vcpwpgclrc",
                                                        new ParameterExampleContract(),
                                                        "vtsoxf",
                                                        new ParameterExampleContract(),
                                                        "kenx",
                                                        new ParameterExampleContract()))))
                                .withExamples(
                                    mapOf(
                                        "yqdrf",
                                        new ParameterExampleContract()
                                            .withSummary("efrp")
                                            .withDescription("dnqqskawaoqvmmb")
                                            .withValue("dataqfr")
                                            .withExternalValue("lkzmegnitgvkxl"),
                                        "xakjsqzhzb",
                                        new ParameterExampleContract()
                                            .withSummary("cealzxwh")
                                            .withDescription("nsymoyqhlwigd")
                                            .withValue("databkbxgomfa")
                                            .withExternalValue("wasqvdaeyyg"),
                                        "eaahhvjhhn",
                                        new ParameterExampleContract()
                                            .withSummary("kgimsidxasic")
                                            .withDescription("yvvjskgfmo")
                                            .withValue("dataah")
                                            .withExternalValue("gat"),
                                        "jlageu",
                                        new ParameterExampleContract()
                                            .withSummary("zybbj")
                                            .withDescription("dj")
                                            .withValue("datayxkyxvx")
                                            .withExternalValue("blbjedn"))),
                            new RepresentationContract()
                                .withContentType("ulxunsmjbnkpp")
                                .withSchemaId("nenlsvxeizzg")
                                .withTypeName("lnsrmffe")
                                .withFormParameters(
                                    Arrays
                                        .asList(
                                            new ParameterContract()
                                                .withName("ckt")
                                                .withDescription("ymerteeammxq")
                                                .withType("ekkkzd")
                                                .withDefaultValue("tkgdojbmxva")
                                                .withRequired(false)
                                                .withValues(Arrays.asList("eesvecu"))
                                                .withSchemaId("pxtxsuwp")
                                                .withTypeName("ujwsawddjibabxvi")
                                                .withExamples(
                                                    mapOf(
                                                        "v",
                                                        new ParameterExampleContract(),
                                                        "zeexavoxtfgle",
                                                        new ParameterExampleContract(),
                                                        "dmdqb",
                                                        new ParameterExampleContract(),
                                                        "pypqtgsfj",
                                                        new ParameterExampleContract())),
                                            new ParameterContract()
                                                .withName("cbslhhx")
                                                .withDescription("bxv")
                                                .withType("d")
                                                .withDefaultValue("nsiru")
                                                .withRequired(false)
                                                .withValues(Arrays.asList("es"))
                                                .withSchemaId("dlpagzrcxfail")
                                                .withTypeName("xwmdboxd")
                                                .withExamples(
                                                    mapOf(
                                                        "ft",
                                                        new ParameterExampleContract(),
                                                        "fqob",
                                                        new ParameterExampleContract(),
                                                        "jln",
                                                        new ParameterExampleContract(),
                                                        "cgcckknhxkizvyt",
                                                        new ParameterExampleContract())),
                                            new ParameterContract()
                                                .withName("rzvul")
                                                .withDescription("aaeranokqgukk")
                                                .withType("qnvb")
                                                .withDefaultValue("ylaxxulcdi")
                                                .withRequired(false)
                                                .withValues(Arrays.asList("jbjsvgjrwh"))
                                                .withSchemaId("vyc")
                                                .withTypeName("dclxgc")
                                                .withExamples(mapOf("fnwmbtmvpdvj", new ParameterExampleContract())),
                                            new ParameterContract()
                                                .withName("httz")
                                                .withDescription("fedxihchrphkm")
                                                .withType("rjdqnsdfzp")
                                                .withDefaultValue("tg")
                                                .withRequired(false)
                                                .withValues(Arrays.asList("ghrjeuutl"))
                                                .withSchemaId("ez")
                                                .withTypeName("hokvbwnh")
                                                .withExamples(
                                                    mapOf(
                                                        "lgehg",
                                                        new ParameterExampleContract(),
                                                        "pipifh",
                                                        new ParameterExampleContract()))))
                                .withExamples(
                                    mapOf(
                                        "ptil",
                                        new ParameterExampleContract()
                                            .withSummary("ajvgcxtxjcsheafi")
                                            .withDescription("tugsresmkssjh")
                                            .withValue("dataftxfkf")
                                            .withExternalValue("gpr"))),
                            new RepresentationContract()
                                .withContentType("ucb")
                                .withSchemaId("tgdqohmcwsldriz")
                                .withTypeName("pwbralllibphbqz")
                                .withFormParameters(
                                    Arrays
                                        .asList(
                                            new ParameterContract()
                                                .withName("aka")
                                                .withDescription("nkjpdnjzha")
                                                .withType("oylhjlmuoyxprimr")
                                                .withDefaultValue("pteecjme")
                                                .withRequired(false)
                                                .withValues(Arrays.asList("vasylwxdzau", "weoohguufuzboyj"))
                                                .withSchemaId("hwtzolb")
                                                .withTypeName("mwmdxmebwjscjpa")
                                                .withExamples(
                                                    mapOf(
                                                        "veabfqxnmwmqtib",
                                                        new ParameterExampleContract(),
                                                        "yijddtvqcttad",
                                                        new ParameterExampleContract())),
                                            new ParameterContract()
                                                .withName("jaeukmrsieekpn")
                                                .withDescription("aapm")
                                                .withType("dqmeqwigpibudq")
                                                .withDefaultValue("xebeybpmz")
                                                .withRequired(true)
                                                .withValues(Arrays.asList("fyaqitm"))
                                                .withSchemaId("eioqaqhvse")
                                                .withTypeName("uqyrxpdl")
                                                .withExamples(
                                                    mapOf(
                                                        "lsismjqfrd",
                                                        new ParameterExampleContract(),
                                                        "gamquhiosrsjui",
                                                        new ParameterExampleContract(),
                                                        "fcdis",
                                                        new ParameterExampleContract(),
                                                        "irnxz",
                                                        new ParameterExampleContract())),
                                            new ParameterContract()
                                                .withName("czexrxzbujrtrhqv")
                                                .withDescription("evkh")
                                                .withType("nlnzonzlrpi")
                                                .withDefaultValue("wncvjtszcofiz")
                                                .withRequired(true)
                                                .withValues(Arrays.asList("gbjkvreljeamur", "zmlovuanash", "xlpm"))
                                                .withSchemaId("rbdkelvidiz")
                                                .withTypeName("sdbccxjmonfdgnwn")
                                                .withExamples(mapOf("uuwwltv", new ParameterExampleContract()))))
                                .withExamples(
                                    mapOf(
                                        "lvizb",
                                        new ParameterExampleContract()
                                            .withSummary("tzenk")
                                            .withDescription("fzzhmkdasv")
                                            .withValue("datayhbxcudchxgs")
                                            .withExternalValue("oldforobw"),
                                        "uurutlwexxwlalni",
                                        new ParameterExampleContract()
                                            .withSummary("fovvacqpbtuodxes")
                                            .withDescription("bbelawumuaslzk")
                                            .withValue("datarwoycqucwyh")
                                            .withExternalValue("nomdrkywuhpsv"),
                                        "bn",
                                        new ParameterExampleContract()
                                            .withSummary("zsrzpgepq")
                                            .withDescription("bb")
                                            .withValue("datapgdakchzyvli")
                                            .withExternalValue("nrkcxkj")))));
        model = BinaryData.fromObject(model).toObject(RequestContract.class);
        Assertions.assertEquals("drihpfhoqcaaewda", model.description());
        Assertions.assertEquals("jvlpjxxkzbr", model.queryParameters().get(0).name());
        Assertions.assertEquals("geivsiykzkdncj", model.queryParameters().get(0).description());
        Assertions.assertEquals("xonbzoggculapz", model.queryParameters().get(0).type());
        Assertions.assertEquals("rpgogtqxep", model.queryParameters().get(0).defaultValue());
        Assertions.assertEquals(false, model.queryParameters().get(0).required());
        Assertions.assertEquals("uajlyj", model.queryParameters().get(0).values().get(0));
        Assertions.assertEquals("xrkjpvdw", model.queryParameters().get(0).schemaId());
        Assertions.assertEquals("zwiivwzjbhyzs", model.queryParameters().get(0).typeName());
        Assertions.assertEquals("ambtrnegvm", model.queryParameters().get(0).examples().get("jlxr").summary());
        Assertions.assertEquals("uqeqv", model.queryParameters().get(0).examples().get("jlxr").description());
        Assertions.assertEquals("est", model.queryParameters().get(0).examples().get("jlxr").externalValue());
        Assertions.assertEquals("b", model.headers().get(0).name());
        Assertions.assertEquals("qvkjlmxho", model.headers().get(0).description());
        Assertions.assertEquals("dynhdwdigum", model.headers().get(0).type());
        Assertions.assertEquals("raauzzpt", model.headers().get(0).defaultValue());
        Assertions.assertEquals(false, model.headers().get(0).required());
        Assertions.assertEquals("dz", model.headers().get(0).values().get(0));
        Assertions.assertEquals("qyuvvfonkp", model.headers().get(0).schemaId());
        Assertions.assertEquals("qyikvy", model.headers().get(0).typeName());
        Assertions.assertEquals("avluwmncs", model.headers().get(0).examples().get("gbdhuzqgnjdg").summary());
        Assertions.assertEquals("ijf", model.headers().get(0).examples().get("gbdhuzqgnjdg").description());
        Assertions.assertEquals("rsg", model.headers().get(0).examples().get("gbdhuzqgnjdg").externalValue());
        Assertions.assertEquals("qctojcmisof", model.representations().get(0).contentType());
        Assertions.assertEquals("ypefojyqdhcupl", model.representations().get(0).schemaId());
        Assertions.assertEquals("lcwkhihihlhz", model.representations().get(0).typeName());
        Assertions.assertEquals("tzbsrgnowcjhf", model.representations().get(0).formParameters().get(0).name());
        Assertions.assertEquals("vecactx", model.representations().get(0).formParameters().get(0).description());
        Assertions.assertEquals("wotey", model.representations().get(0).formParameters().get(0).type());
        Assertions.assertEquals("cluqovekqvgqo", model.representations().get(0).formParameters().get(0).defaultValue());
        Assertions.assertEquals(true, model.representations().get(0).formParameters().get(0).required());
        Assertions.assertEquals("mpjw", model.representations().get(0).formParameters().get(0).values().get(0));
        Assertions.assertEquals("phuagrttikteusq", model.representations().get(0).formParameters().get(0).schemaId());
        Assertions.assertEquals("kvyklxubyjaffmm", model.representations().get(0).formParameters().get(0).typeName());
        Assertions.assertEquals("ihhrmo", model.representations().get(0).examples().get("vnh").summary());
        Assertions.assertEquals("z", model.representations().get(0).examples().get("vnh").description());
        Assertions.assertEquals("togebjoxsl", model.representations().get(0).examples().get("vnh").externalValue());
    }

    // Use "Map.of" if available
    @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;
    }
}
