< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%0%
get_SoftDeleteColumnName()-0%100%
get_SoftDeleteMarkerValue()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeSoftDeleteColumnDeletionDetectionPolicy(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SoftDeleteColumnDeletionDetectionPolicy.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
 8namespace Azure.Search.Documents.Indexes.Models
 9{
 10    /// <summary> Defines a data deletion detection policy that implements a soft-deletion strategy. It determines wheth
 11    public partial class SoftDeleteColumnDeletionDetectionPolicy : DataDeletionDetectionPolicy
 12    {
 13        /// <summary> Initializes a new instance of SoftDeleteColumnDeletionDetectionPolicy. </summary>
 014        public SoftDeleteColumnDeletionDetectionPolicy()
 15        {
 016            ODataType = "#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy";
 017        }
 18
 19        /// <summary> Initializes a new instance of SoftDeleteColumnDeletionDetectionPolicy. </summary>
 20        /// <param name="oDataType"> Identifies the concrete type of the data deletion detection policy. </param>
 21        /// <param name="softDeleteColumnName"> The name of the column to use for soft-deletion detection. </param>
 22        /// <param name="softDeleteMarkerValue"> The marker value that identifies an item as deleted. </param>
 023        internal SoftDeleteColumnDeletionDetectionPolicy(string oDataType, string softDeleteColumnName, string softDelet
 24        {
 025            SoftDeleteColumnName = softDeleteColumnName;
 026            SoftDeleteMarkerValue = softDeleteMarkerValue;
 027            ODataType = oDataType ?? "#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy";
 028        }
 29
 30        /// <summary> The name of the column to use for soft-deletion detection. </summary>
 031        public string SoftDeleteColumnName { get; set; }
 32        /// <summary> The marker value that identifies an item as deleted. </summary>
 033        public string SoftDeleteMarkerValue { get; set; }
 34    }
 35}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SoftDeleteColumnDeletionDetectionPolicy.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 SoftDeleteColumnDeletionDetectionPolicy : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Optional.IsDefined(SoftDeleteColumnName))
 19            {
 020                writer.WritePropertyName("softDeleteColumnName");
 021                writer.WriteStringValue(SoftDeleteColumnName);
 22            }
 023            if (Optional.IsDefined(SoftDeleteMarkerValue))
 24            {
 025                writer.WritePropertyName("softDeleteMarkerValue");
 026                writer.WriteStringValue(SoftDeleteMarkerValue);
 27            }
 028            writer.WritePropertyName("@odata.type");
 029            writer.WriteStringValue(ODataType);
 030            writer.WriteEndObject();
 031        }
 32
 33        internal static SoftDeleteColumnDeletionDetectionPolicy DeserializeSoftDeleteColumnDeletionDetectionPolicy(JsonE
 34        {
 035            Optional<string> softDeleteColumnName = default;
 036            Optional<string> softDeleteMarkerValue = default;
 037            string odataType = default;
 038            foreach (var property in element.EnumerateObject())
 39            {
 040                if (property.NameEquals("softDeleteColumnName"))
 41                {
 042                    softDeleteColumnName = property.Value.GetString();
 043                    continue;
 44                }
 045                if (property.NameEquals("softDeleteMarkerValue"))
 46                {
 047                    softDeleteMarkerValue = property.Value.GetString();
 048                    continue;
 49                }
 050                if (property.NameEquals("@odata.type"))
 51                {
 052                    odataType = property.Value.GetString();
 53                    continue;
 54                }
 55            }
 056            return new SoftDeleteColumnDeletionDetectionPolicy(odataType, softDeleteColumnName.Value, softDeleteMarkerVa
 57        }
 58    }
 59}