/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.personalize.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Provides a summary of the properties of a recommender update. For a complete listing, call the DescribeRecommender API. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RecommenderUpdateSummary implements Serializable, Cloneable, StructuredPojo { /** ** The configuration details of the recommender update. *
*/ private RecommenderConfig recommenderConfig; /** ** The date and time (in Unix format) that the recommender update was created. *
*/ private java.util.Date creationDateTime; /** ** The date and time (in Unix time) that the recommender update was last updated. *
*/ private java.util.Date lastUpdatedDateTime; /** ** The status of the recommender update. *
** A recommender can be in one of the following states: *
** CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED *
** STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE *
** DELETE PENDING > DELETE IN_PROGRESS *
** If a recommender update fails, the reason behind the failure. *
*/ private String failureReason; /** ** The configuration details of the recommender update. *
* * @param recommenderConfig * The configuration details of the recommender update. */ public void setRecommenderConfig(RecommenderConfig recommenderConfig) { this.recommenderConfig = recommenderConfig; } /** ** The configuration details of the recommender update. *
* * @return The configuration details of the recommender update. */ public RecommenderConfig getRecommenderConfig() { return this.recommenderConfig; } /** ** The configuration details of the recommender update. *
* * @param recommenderConfig * The configuration details of the recommender update. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommenderUpdateSummary withRecommenderConfig(RecommenderConfig recommenderConfig) { setRecommenderConfig(recommenderConfig); return this; } /** ** The date and time (in Unix format) that the recommender update was created. *
* * @param creationDateTime * The date and time (in Unix format) that the recommender update was created. */ public void setCreationDateTime(java.util.Date creationDateTime) { this.creationDateTime = creationDateTime; } /** ** The date and time (in Unix format) that the recommender update was created. *
* * @return The date and time (in Unix format) that the recommender update was created. */ public java.util.Date getCreationDateTime() { return this.creationDateTime; } /** ** The date and time (in Unix format) that the recommender update was created. *
* * @param creationDateTime * The date and time (in Unix format) that the recommender update was created. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommenderUpdateSummary withCreationDateTime(java.util.Date creationDateTime) { setCreationDateTime(creationDateTime); return this; } /** ** The date and time (in Unix time) that the recommender update was last updated. *
* * @param lastUpdatedDateTime * The date and time (in Unix time) that the recommender update was last updated. */ public void setLastUpdatedDateTime(java.util.Date lastUpdatedDateTime) { this.lastUpdatedDateTime = lastUpdatedDateTime; } /** ** The date and time (in Unix time) that the recommender update was last updated. *
* * @return The date and time (in Unix time) that the recommender update was last updated. */ public java.util.Date getLastUpdatedDateTime() { return this.lastUpdatedDateTime; } /** ** The date and time (in Unix time) that the recommender update was last updated. *
* * @param lastUpdatedDateTime * The date and time (in Unix time) that the recommender update was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommenderUpdateSummary withLastUpdatedDateTime(java.util.Date lastUpdatedDateTime) { setLastUpdatedDateTime(lastUpdatedDateTime); return this; } /** ** The status of the recommender update. *
** A recommender can be in one of the following states: *
** CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED *
** STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE *
** DELETE PENDING > DELETE IN_PROGRESS *
** A recommender can be in one of the following states: *
** CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED *
** STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE *
** DELETE PENDING > DELETE IN_PROGRESS *
** The status of the recommender update. *
** A recommender can be in one of the following states: *
** CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED *
** STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE *
** DELETE PENDING > DELETE IN_PROGRESS *
** A recommender can be in one of the following states: *
** CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED *
** STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE *
** DELETE PENDING > DELETE IN_PROGRESS *
** The status of the recommender update. *
** A recommender can be in one of the following states: *
** CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED *
** STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE *
** DELETE PENDING > DELETE IN_PROGRESS *
** A recommender can be in one of the following states: *
** CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED *
** STOP PENDING > STOP IN_PROGRESS > INACTIVE > START PENDING > START IN_PROGRESS > ACTIVE *
** DELETE PENDING > DELETE IN_PROGRESS *
** If a recommender update fails, the reason behind the failure. *
* * @param failureReason * If a recommender update fails, the reason behind the failure. */ public void setFailureReason(String failureReason) { this.failureReason = failureReason; } /** ** If a recommender update fails, the reason behind the failure. *
* * @return If a recommender update fails, the reason behind the failure. */ public String getFailureReason() { return this.failureReason; } /** ** If a recommender update fails, the reason behind the failure. *
* * @param failureReason * If a recommender update fails, the reason behind the failure. * @return Returns a reference to this object so that method calls can be chained together. */ public RecommenderUpdateSummary withFailureReason(String failureReason) { setFailureReason(failureReason); 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 (getRecommenderConfig() != null) sb.append("RecommenderConfig: ").append(getRecommenderConfig()).append(","); if (getCreationDateTime() != null) sb.append("CreationDateTime: ").append(getCreationDateTime()).append(","); if (getLastUpdatedDateTime() != null) sb.append("LastUpdatedDateTime: ").append(getLastUpdatedDateTime()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getFailureReason() != null) sb.append("FailureReason: ").append(getFailureReason()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RecommenderUpdateSummary == false) return false; RecommenderUpdateSummary other = (RecommenderUpdateSummary) obj; if (other.getRecommenderConfig() == null ^ this.getRecommenderConfig() == null) return false; if (other.getRecommenderConfig() != null && other.getRecommenderConfig().equals(this.getRecommenderConfig()) == false) return false; if (other.getCreationDateTime() == null ^ this.getCreationDateTime() == null) return false; if (other.getCreationDateTime() != null && other.getCreationDateTime().equals(this.getCreationDateTime()) == false) return false; if (other.getLastUpdatedDateTime() == null ^ this.getLastUpdatedDateTime() == null) return false; if (other.getLastUpdatedDateTime() != null && other.getLastUpdatedDateTime().equals(this.getLastUpdatedDateTime()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getFailureReason() == null ^ this.getFailureReason() == null) return false; if (other.getFailureReason() != null && other.getFailureReason().equals(this.getFailureReason()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRecommenderConfig() == null) ? 0 : getRecommenderConfig().hashCode()); hashCode = prime * hashCode + ((getCreationDateTime() == null) ? 0 : getCreationDateTime().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedDateTime() == null) ? 0 : getLastUpdatedDateTime().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getFailureReason() == null) ? 0 : getFailureReason().hashCode()); return hashCode; } @Override public RecommenderUpdateSummary clone() { try { return (RecommenderUpdateSummary) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.personalize.model.transform.RecommenderUpdateSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }