* A unique identifier for the import. *
*/ private String importId; /** ** The parameters used when importing the resource. *
*/ private ImportResourceSpecification resourceSpecification; /** *
* The strategy used when there was a name conflict between the imported resource and an existing resource. When the
* merge strategy is FailOnConflict
existing resources are not overwritten and the import fails.
*
* The current status of the import. When the status is Complete
the bot, bot alias, or custom
* vocabulary is ready to use.
*
* The date and time that the import request was created. *
*/ private java.util.Date creationDateTime; /** ** A unique identifier for the import. *
* * @param importId * A unique identifier for the import. */ public void setImportId(String importId) { this.importId = importId; } /** ** A unique identifier for the import. *
* * @return A unique identifier for the import. */ public String getImportId() { return this.importId; } /** ** A unique identifier for the import. *
* * @param importId * A unique identifier for the import. * @return Returns a reference to this object so that method calls can be chained together. */ public StartImportResult withImportId(String importId) { setImportId(importId); return this; } /** ** The parameters used when importing the resource. *
* * @param resourceSpecification * The parameters used when importing the resource. */ public void setResourceSpecification(ImportResourceSpecification resourceSpecification) { this.resourceSpecification = resourceSpecification; } /** ** The parameters used when importing the resource. *
* * @return The parameters used when importing the resource. */ public ImportResourceSpecification getResourceSpecification() { return this.resourceSpecification; } /** ** The parameters used when importing the resource. *
* * @param resourceSpecification * The parameters used when importing the resource. * @return Returns a reference to this object so that method calls can be chained together. */ public StartImportResult withResourceSpecification(ImportResourceSpecification resourceSpecification) { setResourceSpecification(resourceSpecification); return this; } /** *
* The strategy used when there was a name conflict between the imported resource and an existing resource. When the
* merge strategy is FailOnConflict
existing resources are not overwritten and the import fails.
*
FailOnConflict
existing resources are not overwritten and the
* import fails.
* @see MergeStrategy
*/
public void setMergeStrategy(String mergeStrategy) {
this.mergeStrategy = mergeStrategy;
}
/**
*
* The strategy used when there was a name conflict between the imported resource and an existing resource. When the
* merge strategy is FailOnConflict
existing resources are not overwritten and the import fails.
*
FailOnConflict
existing resources are not overwritten and the
* import fails.
* @see MergeStrategy
*/
public String getMergeStrategy() {
return this.mergeStrategy;
}
/**
*
* The strategy used when there was a name conflict between the imported resource and an existing resource. When the
* merge strategy is FailOnConflict
existing resources are not overwritten and the import fails.
*
FailOnConflict
existing resources are not overwritten and the
* import fails.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MergeStrategy
*/
public StartImportResult withMergeStrategy(String mergeStrategy) {
setMergeStrategy(mergeStrategy);
return this;
}
/**
*
* The strategy used when there was a name conflict between the imported resource and an existing resource. When the
* merge strategy is FailOnConflict
existing resources are not overwritten and the import fails.
*
FailOnConflict
existing resources are not overwritten and the
* import fails.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MergeStrategy
*/
public StartImportResult withMergeStrategy(MergeStrategy mergeStrategy) {
this.mergeStrategy = mergeStrategy.toString();
return this;
}
/**
*
* The current status of the import. When the status is Complete
the bot, bot alias, or custom
* vocabulary is ready to use.
*
Complete
the bot, bot alias, or custom
* vocabulary is ready to use.
* @see ImportStatus
*/
public void setImportStatus(String importStatus) {
this.importStatus = importStatus;
}
/**
*
* The current status of the import. When the status is Complete
the bot, bot alias, or custom
* vocabulary is ready to use.
*
Complete
the bot, bot alias, or custom
* vocabulary is ready to use.
* @see ImportStatus
*/
public String getImportStatus() {
return this.importStatus;
}
/**
*
* The current status of the import. When the status is Complete
the bot, bot alias, or custom
* vocabulary is ready to use.
*
Complete
the bot, bot alias, or custom
* vocabulary is ready to use.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ImportStatus
*/
public StartImportResult withImportStatus(String importStatus) {
setImportStatus(importStatus);
return this;
}
/**
*
* The current status of the import. When the status is Complete
the bot, bot alias, or custom
* vocabulary is ready to use.
*
Complete
the bot, bot alias, or custom
* vocabulary is ready to use.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ImportStatus
*/
public StartImportResult withImportStatus(ImportStatus importStatus) {
this.importStatus = importStatus.toString();
return this;
}
/**
* * The date and time that the import request was created. *
* * @param creationDateTime * The date and time that the import request was created. */ public void setCreationDateTime(java.util.Date creationDateTime) { this.creationDateTime = creationDateTime; } /** ** The date and time that the import request was created. *
* * @return The date and time that the import request was created. */ public java.util.Date getCreationDateTime() { return this.creationDateTime; } /** ** The date and time that the import request was created. *
* * @param creationDateTime * The date and time that the import request was created. * @return Returns a reference to this object so that method calls can be chained together. */ public StartImportResult withCreationDateTime(java.util.Date creationDateTime) { setCreationDateTime(creationDateTime); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getImportId() != null) sb.append("ImportId: ").append(getImportId()).append(","); if (getResourceSpecification() != null) sb.append("ResourceSpecification: ").append(getResourceSpecification()).append(","); if (getMergeStrategy() != null) sb.append("MergeStrategy: ").append(getMergeStrategy()).append(","); if (getImportStatus() != null) sb.append("ImportStatus: ").append(getImportStatus()).append(","); if (getCreationDateTime() != null) sb.append("CreationDateTime: ").append(getCreationDateTime()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartImportResult == false) return false; StartImportResult other = (StartImportResult) obj; if (other.getImportId() == null ^ this.getImportId() == null) return false; if (other.getImportId() != null && other.getImportId().equals(this.getImportId()) == false) return false; if (other.getResourceSpecification() == null ^ this.getResourceSpecification() == null) return false; if (other.getResourceSpecification() != null && other.getResourceSpecification().equals(this.getResourceSpecification()) == false) return false; if (other.getMergeStrategy() == null ^ this.getMergeStrategy() == null) return false; if (other.getMergeStrategy() != null && other.getMergeStrategy().equals(this.getMergeStrategy()) == false) return false; if (other.getImportStatus() == null ^ this.getImportStatus() == null) return false; if (other.getImportStatus() != null && other.getImportStatus().equals(this.getImportStatus()) == false) return false; if (other.getCreationDateTime() == null ^ this.getCreationDateTime() == null) return false; if (other.getCreationDateTime() != null && other.getCreationDateTime().equals(this.getCreationDateTime()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getImportId() == null) ? 0 : getImportId().hashCode()); hashCode = prime * hashCode + ((getResourceSpecification() == null) ? 0 : getResourceSpecification().hashCode()); hashCode = prime * hashCode + ((getMergeStrategy() == null) ? 0 : getMergeStrategy().hashCode()); hashCode = prime * hashCode + ((getImportStatus() == null) ? 0 : getImportStatus().hashCode()); hashCode = prime * hashCode + ((getCreationDateTime() == null) ? 0 : getCreationDateTime().hashCode()); return hashCode; } @Override public StartImportResult clone() { try { return (StartImportResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }