IndexingSchedule.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.Fluent;
  9. import com.fasterxml.jackson.annotation.JsonCreator;
  10. import com.fasterxml.jackson.annotation.JsonProperty;
  11. import java.time.Duration;
  12. import java.time.OffsetDateTime;

  13. /** Represents a schedule for indexer execution. */
  14. @Fluent
  15. public final class IndexingSchedule {
  16.     /*
  17.      * The interval of time between indexer executions.
  18.      */
  19.     @JsonProperty(value = "interval", required = true)
  20.     private Duration interval;

  21.     /*
  22.      * The time when an indexer should start running.
  23.      */
  24.     @JsonProperty(value = "startTime")
  25.     private OffsetDateTime startTime;

  26.     /**
  27.      * Creates an instance of IndexingSchedule class.
  28.      *
  29.      * @param interval the interval value to set.
  30.      */
  31.     @JsonCreator
  32.     public IndexingSchedule(@JsonProperty(value = "interval", required = true) Duration interval) {
  33.         this.interval = interval;
  34.     }

  35.     /**
  36.      * Get the interval property: The interval of time between indexer executions.
  37.      *
  38.      * @return the interval value.
  39.      */
  40.     public Duration getInterval() {
  41.         return this.interval;
  42.     }

  43.     /**
  44.      * Get the startTime property: The time when an indexer should start running.
  45.      *
  46.      * @return the startTime value.
  47.      */
  48.     public OffsetDateTime getStartTime() {
  49.         return this.startTime;
  50.     }

  51.     /**
  52.      * Set the startTime property: The time when an indexer should start running.
  53.      *
  54.      * @param startTime the startTime value to set.
  55.      * @return the IndexingSchedule object itself.
  56.      */
  57.     public IndexingSchedule setStartTime(OffsetDateTime startTime) {
  58.         this.startTime = startTime;
  59.         return this;
  60.     }
  61. }