SearchIndexerStatus.java

  1. // Copyright (c) Microsoft Corporation. All rights reserved.
  2. // Licensed under the MIT License.
  3. //
  4. // Code generated by Microsoft (R) AutoRest Code Generator.
  5. // Changes may cause incorrect behavior and will be lost if the code is
  6. // regenerated.

  7. package com.azure.search.documents.indexes.models;

  8. import com.azure.core.annotation.Immutable;
  9. import com.fasterxml.jackson.annotation.JsonCreator;
  10. import com.fasterxml.jackson.annotation.JsonProperty;
  11. import java.util.List;

  12. /** Represents the current status and execution history of an indexer. */
  13. @Immutable
  14. public final class SearchIndexerStatus {
  15.     /*
  16.      * Overall indexer status.
  17.      */
  18.     @JsonProperty(value = "status", required = true, access = JsonProperty.Access.WRITE_ONLY)
  19.     private IndexerStatus status;

  20.     /*
  21.      * The result of the most recent or an in-progress indexer execution.
  22.      */
  23.     @JsonProperty(value = "lastResult", access = JsonProperty.Access.WRITE_ONLY)
  24.     private IndexerExecutionResult lastResult;

  25.     /*
  26.      * History of the recent indexer executions, sorted in reverse
  27.      * chronological order.
  28.      */
  29.     @JsonProperty(value = "executionHistory", required = true, access = JsonProperty.Access.WRITE_ONLY)
  30.     private List<IndexerExecutionResult> executionHistory;

  31.     /*
  32.      * The execution limits for the indexer.
  33.      */
  34.     @JsonProperty(value = "limits", required = true, access = JsonProperty.Access.WRITE_ONLY)
  35.     private SearchIndexerLimits limits;

  36.     /**
  37.      * Creates an instance of SearchIndexerStatus class.
  38.      *
  39.      * @param status the status value to set.
  40.      * @param executionHistory the executionHistory value to set.
  41.      * @param limits the limits value to set.
  42.      */
  43.     @JsonCreator
  44.     public SearchIndexerStatus(
  45.             @JsonProperty(value = "status", required = true, access = JsonProperty.Access.WRITE_ONLY)
  46.                     IndexerStatus status,
  47.             @JsonProperty(value = "executionHistory", required = true, access = JsonProperty.Access.WRITE_ONLY)
  48.                     List<IndexerExecutionResult> executionHistory,
  49.             @JsonProperty(value = "limits", required = true, access = JsonProperty.Access.WRITE_ONLY)
  50.                     SearchIndexerLimits limits) {
  51.         this.status = status;
  52.         this.executionHistory = executionHistory;
  53.         this.limits = limits;
  54.     }

  55.     /**
  56.      * Get the status property: Overall indexer status.
  57.      *
  58.      * @return the status value.
  59.      */
  60.     public IndexerStatus getStatus() {
  61.         return this.status;
  62.     }

  63.     /**
  64.      * Get the lastResult property: The result of the most recent or an in-progress indexer execution.
  65.      *
  66.      * @return the lastResult value.
  67.      */
  68.     public IndexerExecutionResult getLastResult() {
  69.         return this.lastResult;
  70.     }

  71.     /**
  72.      * Get the executionHistory property: History of the recent indexer executions, sorted in reverse chronological
  73.      * order.
  74.      *
  75.      * @return the executionHistory value.
  76.      */
  77.     public List<IndexerExecutionResult> getExecutionHistory() {
  78.         return this.executionHistory;
  79.     }

  80.     /**
  81.      * Get the limits property: The execution limits for the indexer.
  82.      *
  83.      * @return the limits value.
  84.      */
  85.     public SearchIndexerLimits getLimits() {
  86.         return this.limits;
  87.     }
  88. }