internal static DaprSecretsCollection DeserializeDaprSecretsCollection(JsonElement element)
        {
            IReadOnlyList <AppSecret> value = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    List <AppSecret> array = new List <AppSecret>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(AppSecret.DeserializeAppSecret(item));
                    }
                    value = array;
                    continue;
                }
            }
            return(new DaprSecretsCollection(value));
        }
        internal static ContainerAppConfiguration DeserializeContainerAppConfiguration(JsonElement element)
        {
            Optional <IList <AppSecret> >           secrets             = default;
            Optional <ActiveRevisionsMode>          activeRevisionsMode = default;
            Optional <IngressProvider>              ingress             = default;
            Optional <IList <RegistryCredentials> > registries          = default;
            Optional <DaprProvider> dapr = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("secrets"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List <AppSecret> array = new List <AppSecret>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(AppSecret.DeserializeAppSecret(item));
                    }
                    secrets = array;
                    continue;
                }
                if (property.NameEquals("activeRevisionsMode"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    activeRevisionsMode = new ActiveRevisionsMode(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("ingress"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    ingress = IngressProvider.DeserializeIngressProvider(property.Value);
                    continue;
                }
                if (property.NameEquals("registries"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List <RegistryCredentials> array = new List <RegistryCredentials>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(RegistryCredentials.DeserializeRegistryCredentials(item));
                    }
                    registries = array;
                    continue;
                }
                if (property.NameEquals("dapr"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    dapr = DaprProvider.DeserializeDaprProvider(property.Value);
                    continue;
                }
            }
            return(new ContainerAppConfiguration(Optional.ToList(secrets), Optional.ToNullable(activeRevisionsMode), ingress.Value, Optional.ToList(registries), dapr.Value));
        }