< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_HighWaterMarkColumnName()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%100%
DeserializeHighWaterMarkChangeDetectionPolicy(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\HighWaterMarkChangeDetectionPolicy.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> Defines a data change detection policy that captures changes based on the value of a high water mark c
 13    public partial class HighWaterMarkChangeDetectionPolicy : DataChangeDetectionPolicy
 14    {
 15        /// <summary> Initializes a new instance of HighWaterMarkChangeDetectionPolicy. </summary>
 16        /// <param name="highWaterMarkColumnName"> The name of the high water mark column. </param>
 17        /// <exception cref="ArgumentNullException"> <paramref name="highWaterMarkColumnName"/> is null. </exception>
 018        public HighWaterMarkChangeDetectionPolicy(string highWaterMarkColumnName)
 19        {
 020            if (highWaterMarkColumnName == null)
 21            {
 022                throw new ArgumentNullException(nameof(highWaterMarkColumnName));
 23            }
 24
 025            HighWaterMarkColumnName = highWaterMarkColumnName;
 026            ODataType = "#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy";
 027        }
 28
 29        /// <summary> Initializes a new instance of HighWaterMarkChangeDetectionPolicy. </summary>
 30        /// <param name="oDataType"> Identifies the concrete type of the data change detection policy. </param>
 31        /// <param name="highWaterMarkColumnName"> The name of the high water mark column. </param>
 032        internal HighWaterMarkChangeDetectionPolicy(string oDataType, string highWaterMarkColumnName) : base(oDataType)
 33        {
 034            HighWaterMarkColumnName = highWaterMarkColumnName;
 035            ODataType = oDataType ?? "#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy";
 036        }
 37
 38        /// <summary> The name of the high water mark column. </summary>
 039        public string HighWaterMarkColumnName { get; set; }
 40    }
 41}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\HighWaterMarkChangeDetectionPolicy.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.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.Search.Documents.Indexes.Models
 12{
 13    public partial class HighWaterMarkChangeDetectionPolicy : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("highWaterMarkColumnName");
 019            writer.WriteStringValue(HighWaterMarkColumnName);
 020            writer.WritePropertyName("@odata.type");
 021            writer.WriteStringValue(ODataType);
 022            writer.WriteEndObject();
 023        }
 24
 25        internal static HighWaterMarkChangeDetectionPolicy DeserializeHighWaterMarkChangeDetectionPolicy(JsonElement ele
 26        {
 027            string highWaterMarkColumnName = default;
 028            string odataType = default;
 029            foreach (var property in element.EnumerateObject())
 30            {
 031                if (property.NameEquals("highWaterMarkColumnName"))
 32                {
 033                    highWaterMarkColumnName = property.Value.GetString();
 034                    continue;
 35                }
 036                if (property.NameEquals("@odata.type"))
 37                {
 038                    odataType = property.Value.GetString();
 39                    continue;
 40                }
 41            }
 042            return new HighWaterMarkChangeDetectionPolicy(odataType, highWaterMarkColumnName);
 43        }
 44    }
 45}