/*
 * 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 com.google.gson.annotations.SerializedName;
import com.ibm.cloud.sdk.core.service.model.GenericModel;

/**
 * Object containing credential information.
 */
public class Credentials extends GenericModel {

  /**
   * The source that this credentials object connects to.
   * - `box` indicates the credentials are used to connect an instance of Enterprise Box.
   * - `salesforce` indicates the credentials are used to connect to Salesforce.
   * - `sharepoint` indicates the credentials are used to connect to Microsoft SharePoint Online.
   * - `web_crawl` indicates the credentials are used to perform a web crawl.
   * = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud Object Store.
   */
  public interface SourceType {
    /** box. */
    String BOX = "box";
    /** salesforce. */
    String SALESFORCE = "salesforce";
    /** sharepoint. */
    String SHAREPOINT = "sharepoint";
    /** web_crawl. */
    String WEB_CRAWL = "web_crawl";
    /** cloud_object_storage. */
    String CLOUD_OBJECT_STORAGE = "cloud_object_storage";
  }

  @SerializedName("credential_id")
  private String credentialId;
  @SerializedName("source_type")
  private String sourceType;
  @SerializedName("credential_details")
  private CredentialDetails credentialDetails;

  /**
   * Gets the credentialId.
   *
   * Unique identifier for this set of credentials.
   *
   * @return the credentialId
   */
  public String getCredentialId() {
    return credentialId;
  }

  /**
   * Gets the sourceType.
   *
   * The source that this credentials object connects to.
   * - `box` indicates the credentials are used to connect an instance of Enterprise Box.
   * - `salesforce` indicates the credentials are used to connect to Salesforce.
   * - `sharepoint` indicates the credentials are used to connect to Microsoft SharePoint Online.
   * - `web_crawl` indicates the credentials are used to perform a web crawl.
   * = `cloud_object_storage` indicates the credentials are used to connect to an IBM Cloud Object Store.
   *
   * @return the sourceType
   */
  public String getSourceType() {
    return sourceType;
  }

  /**
   * Gets the credentialDetails.
   *
   * Object containing details of the stored credentials.
   *
   * Obtain credentials for your source from the administrator of the source.
   *
   * @return the credentialDetails
   */
  public CredentialDetails getCredentialDetails() {
    return credentialDetails;
  }

  /**
   * Sets the sourceType.
   *
   * @param sourceType the new sourceType
   */
  public void setSourceType(final String sourceType) {
    this.sourceType = sourceType;
  }

  /**
   * Sets the credentialDetails.
   *
   * @param credentialDetails the new credentialDetails
   */
  public void setCredentialDetails(final CredentialDetails credentialDetails) {
    this.credentialDetails = credentialDetails;
  }
}

@@ -1721,16 +1721,494 @@
 %22;%0A  %7D%0A%0A
+  /**%0A   * The current status of this set of credentials. %60connected%60 indicates that the credentials are available to use with%0A   * the source configuration of a collection. %60invalid%60 refers to the credentials (for example, the password provided%0A   * has expired) and must be corrected before they can be used with a collection.%0A   */%0A  public interface Status %7B%0A    /** connected. */%0A    String CONNECTED = %22connected%22;%0A    /** invalid. */%0A    String INVALID = %22invalid%22;%0A  %7D%0A%0A
   @Seria
@@ -2234,16 +2234,16 @@
 al_id%22)%0A
-
   privat
@@ -2413,16 +2413,41 @@
 Details;
+%0A  private String status;
 %0A%0A  /**%0A
@@ -3601,24 +3601,469 @@
 tails;%0A  %7D%0A%0A
+  /**%0A   * Gets the status.%0A   *%0A   * The current status of this set of credentials. %60connected%60 indicates that the credentials are available to use with%0A   * the source configuration of a collection. %60invalid%60 refers to the credentials (for example, the password provided%0A   * has expired) and must be corrected before they can be used with a collection.%0A   *%0A   * @return the status%0A   */%0A  public String getStatus() %7B%0A    return status;%0A  %7D%0A%0A
   /**%0A   * S
@@ -4411,24 +4411,24 @@
 lDetails) %7B%0A
-
     this.cre
@@ -4466,11 +4466,162 @@
 ils;%0A  %7D
+%0A%0A  /**%0A   * Sets the status.%0A   *%0A   * @param status the new status%0A   */%0A  public void setStatus(final String status) %7B%0A    this.status = status;%0A  %7D
 %0A%7D%0A

Add status prop to Credentials