/*
 * Copyright 2018 IBM Corp. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations under the License.
 */
package com.ibm.watson.discovery.v1.model;

import java.util.Date;

import com.google.gson.annotations.SerializedName;
import com.ibm.cloud.sdk.core.service.model.GenericModel;

/**
 * Object containing source crawl status information.
 */
public class SourceStatus extends GenericModel {

  /**
   * The current status of the source crawl for this collection. This field returns `not_configured` if the default
   * configuration for this source does not have a **source** object defined.
   *
   * - `running` indicates that a crawl to fetch more documents is in progress.
   * - `complete` indicates that the crawl has completed with no errors.
   * - `queued` indicates that the crawl has been paused by the system and will automatically restart when possible.
   */
  public interface Status {
    /** running. */
    String RUNNING = "running";
    /** complete. */
    String COMPLETE = "complete";
    /** not_configured. */
    String NOT_CONFIGURED = "not_configured";
    /** queued. */
    String QUEUED = "queued";
  }

  private String status;
  @SerializedName("last_updated")
  private Date lastUpdated;

  /**
   * Gets the status.
   *
   * The current status of the source crawl for this collection. This field returns `not_configured` if the default
   * configuration for this source does not have a **source** object defined.
   *
   * - `running` indicates that a crawl to fetch more documents is in progress.
   * - `complete` indicates that the crawl has completed with no errors.
   * - `queued` indicates that the crawl has been paused by the system and will automatically restart when possible.
   *
   * @return the status
   */
  public String getStatus() {
    return status;
  }

  /**
   * Gets the lastUpdated.
   *
   * Date in UTC format indicating when the last crawl was attempted. If `null`, no crawl was completed.
   *
   * @return the lastUpdated
   */
  public Date getLastUpdated() {
    return lastUpdated;
  }
}

@@ -1355,24 +1355,106 @@
 n possible.%0A
+   * - %60unknown%60 indicates that an unidentified error has occured in the service.%0A
    */%0A  publ
@@ -1704,16 +1704,68 @@
 ueued%22;%0A
+    /** unknown. */%0A    String UNKNOWN = %22unknown%22;%0A
   %7D%0A%0A  p
@@ -1809,20 +1809,18 @@
 me(%22
-last_updated
+next_crawl
 %22)%0A 
@@ -1833,27 +1833,25 @@
 te Date 
-lastUpdated
+nextCrawl
 ;%0A%0A  /**
@@ -2343,24 +2343,106 @@
 n possible.%0A
+   * - %60unknown%60 indicates that an unidentified error has occured in the service.%0A
    *%0A   * @r
@@ -2538,27 +2538,25 @@
 ets the 
-lastUpdated
+nextCrawl
 .%0A   *%0A 
@@ -2571,11 +2571,18 @@
  in 
-UTC
+%60RFC 3339%60
  for
@@ -2600,76 +2600,42 @@
 ing 
-when the last crawl was attempted. If %60null%60, no crawl was completed
+the time of the next crawl attempt
 .%0A  
@@ -2654,27 +2654,25 @@
 urn the 
-lastUpdated
+nextCrawl
 %0A   */%0A 
@@ -2691,19 +2691,17 @@
  get
-LastUpdated
+NextCrawl
 () %7B
@@ -2716,19 +2716,17 @@
 urn 
-lastUpdated
+nextCrawl
 ;%0A  

Add new constant and nextCrawl prop to SourceStatus