JitRequestDefinition IOperationSource <JitRequestDefinition> .CreateResult(Response response, CancellationToken cancellationToken)
        {
            using var document = JsonDocument.Parse(response.ContentStream);
            var data = JitRequestDefinitionData.DeserializeJitRequestDefinitionData(document.RootElement);

            return(new JitRequestDefinition(_armClient, data));
        }
        internal static JitRequestDefinitionListResult DeserializeJitRequestDefinitionListResult(JsonElement element)
        {
            Optional <IReadOnlyList <JitRequestDefinitionData> > value = default;
            Optional <string> nextLink = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List <JitRequestDefinitionData> array = new List <JitRequestDefinitionData>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(JitRequestDefinitionData.DeserializeJitRequestDefinitionData(item));
                    }
                    value = array;
                    continue;
                }
                if (property.NameEquals("nextLink"))
                {
                    nextLink = property.Value.GetString();
                    continue;
                }
            }
            return(new JitRequestDefinitionListResult(Optional.ToList(value), nextLink.Value));
        }