< Summary

Class:Microsoft.Azure.Search.Models.HighWaterMarkChangeDetectionPolicy
Assembly:Microsoft.Azure.Search.Service
File(s):C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Generated\Models\HighWaterMarkChangeDetectionPolicy.cs
Covered lines:6
Uncovered lines:3
Coverable lines:9
Total lines:70
Line coverage:66.6% (6 of 9)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-100%100%
get_HighWaterMarkColumnName()-100%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Generated\Models\HighWaterMarkChangeDetectionPolicy.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.Search.Models
 12{
 13    using Microsoft.Rest;
 14    using Newtonsoft.Json;
 15    using System.Linq;
 16
 17    /// <summary>
 18    /// Defines a data change detection policy that captures changes based on
 19    /// the value of a high water mark column.
 20    /// </summary>
 21    [Newtonsoft.Json.JsonObject("#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy")]
 22    public partial class HighWaterMarkChangeDetectionPolicy : DataChangeDetectionPolicy
 23    {
 24        /// <summary>
 25        /// Initializes a new instance of the
 26        /// HighWaterMarkChangeDetectionPolicy class.
 27        /// </summary>
 2628        public HighWaterMarkChangeDetectionPolicy()
 29        {
 30            CustomInit();
 2631        }
 32
 33        /// <summary>
 34        /// Initializes a new instance of the
 35        /// HighWaterMarkChangeDetectionPolicy class.
 36        /// </summary>
 37        /// <param name="highWaterMarkColumnName">The name of the high water
 38        /// mark column.</param>
 1439        public HighWaterMarkChangeDetectionPolicy(string highWaterMarkColumnName)
 40        {
 1441            HighWaterMarkColumnName = highWaterMarkColumnName;
 42            CustomInit();
 1443        }
 44
 45        /// <summary>
 46        /// An initialization method that performs custom operations like setting defaults
 47        /// </summary>
 48        partial void CustomInit();
 49
 50        /// <summary>
 51        /// Gets or sets the name of the high water mark column.
 52        /// </summary>
 53        [JsonProperty(PropertyName = "highWaterMarkColumnName")]
 9454        public string HighWaterMarkColumnName { get; set; }
 55
 56        /// <summary>
 57        /// Validate the object.
 58        /// </summary>
 59        /// <exception cref="ValidationException">
 60        /// Thrown if validation fails
 61        /// </exception>
 62        public virtual void Validate()
 63        {
 064            if (HighWaterMarkColumnName == null)
 65            {
 066                throw new ValidationException(ValidationRules.CannotBeNull, "HighWaterMarkColumnName");
 67            }
 068        }
 69    }
 70}