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