< Summary

Class:Azure.Search.Documents.Indexes.Models.IndexingSchedule
Assembly:Azure.Search.Documents
File(s):C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\IndexingSchedule.cs
C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\IndexingSchedule.Serialization.cs
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:85
Line coverage:0% (0 of 26)
Covered branches:0
Total branches:8
Branch coverage:0% (0 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
.ctor(...)-0%100%
get_Interval()-0%100%
get_StartTime()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeIndexingSchedule(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\IndexingSchedule.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9
 10namespace Azure.Search.Documents.Indexes.Models
 11{
 12    /// <summary> Represents a schedule for indexer execution. </summary>
 13    public partial class IndexingSchedule
 14    {
 15        /// <summary> Initializes a new instance of IndexingSchedule. </summary>
 16        /// <param name="interval"> The interval of time between indexer executions. </param>
 017        public IndexingSchedule(TimeSpan interval)
 18        {
 019            Interval = interval;
 020        }
 21
 22        /// <summary> Initializes a new instance of IndexingSchedule. </summary>
 23        /// <param name="interval"> The interval of time between indexer executions. </param>
 24        /// <param name="startTime"> The time when an indexer should start running. </param>
 025        internal IndexingSchedule(TimeSpan interval, DateTimeOffset? startTime)
 26        {
 027            Interval = interval;
 028            StartTime = startTime;
 029        }
 30
 31        /// <summary> The interval of time between indexer executions. </summary>
 032        public TimeSpan Interval { get; set; }
 33        /// <summary> The time when an indexer should start running. </summary>
 034        public DateTimeOffset? StartTime { get; set; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\IndexingSchedule.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.Search.Documents.Indexes.Models
 13{
 14    public partial class IndexingSchedule : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("interval");
 020            writer.WriteStringValue(Interval, "P");
 021            if (Optional.IsDefined(StartTime))
 22            {
 023                writer.WritePropertyName("startTime");
 024                writer.WriteStringValue(StartTime.Value, "O");
 25            }
 026            writer.WriteEndObject();
 027        }
 28
 29        internal static IndexingSchedule DeserializeIndexingSchedule(JsonElement element)
 30        {
 031            TimeSpan interval = default;
 032            Optional<DateTimeOffset> startTime = default;
 033            foreach (var property in element.EnumerateObject())
 34            {
 035                if (property.NameEquals("interval"))
 36                {
 037                    interval = property.Value.GetTimeSpan("P");
 038                    continue;
 39                }
 040                if (property.NameEquals("startTime"))
 41                {
 042                    startTime = property.Value.GetDateTimeOffset("O");
 43                    continue;
 44                }
 45            }
 046            return new IndexingSchedule(interval, Optional.ToNullable(startTime));
 47        }
 48    }
 49}