-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
SearchIndexerStatus.cs
55 lines (48 loc) · 2.71 KB
/
SearchIndexerStatus.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
using Azure.Core;
namespace Azure.Search.Documents.Indexes.Models
{
/// <summary> Represents the current status and execution history of an indexer. </summary>
public partial class SearchIndexerStatus
{
/// <summary> Initializes a new instance of <see cref="SearchIndexerStatus"/>. </summary>
/// <param name="status"> Overall indexer status. </param>
/// <param name="executionHistory"> History of the recent indexer executions, sorted in reverse chronological order. </param>
/// <param name="limits"> The execution limits for the indexer. </param>
/// <exception cref="ArgumentNullException"> <paramref name="executionHistory"/> or <paramref name="limits"/> is null. </exception>
internal SearchIndexerStatus(IndexerStatus status, IEnumerable<IndexerExecutionResult> executionHistory, SearchIndexerLimits limits)
{
Argument.AssertNotNull(executionHistory, nameof(executionHistory));
Argument.AssertNotNull(limits, nameof(limits));
Status = status;
ExecutionHistory = executionHistory.ToList();
Limits = limits;
}
/// <summary> Initializes a new instance of <see cref="SearchIndexerStatus"/>. </summary>
/// <param name="status"> Overall indexer status. </param>
/// <param name="lastResult"> The result of the most recent or an in-progress indexer execution. </param>
/// <param name="executionHistory"> History of the recent indexer executions, sorted in reverse chronological order. </param>
/// <param name="limits"> The execution limits for the indexer. </param>
internal SearchIndexerStatus(IndexerStatus status, IndexerExecutionResult lastResult, IReadOnlyList<IndexerExecutionResult> executionHistory, SearchIndexerLimits limits)
{
Status = status;
LastResult = lastResult;
ExecutionHistory = executionHistory;
Limits = limits;
}
/// <summary> Overall indexer status. </summary>
public IndexerStatus Status { get; }
/// <summary> The result of the most recent or an in-progress indexer execution. </summary>
public IndexerExecutionResult LastResult { get; }
/// <summary> History of the recent indexer executions, sorted in reverse chronological order. </summary>
public IReadOnlyList<IndexerExecutionResult> ExecutionHistory { get; }
/// <summary> The execution limits for the indexer. </summary>
public SearchIndexerLimits Limits { get; }
}
}