com.amazonaws.services.servicecatalog.model.LastSync Maven / Gradle / Ivy
Show all versions of aws-java-sdk-servicecatalog Show documentation
/*
* Copyright 2019-2024 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.servicecatalog.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides details about the product's connection sync and contains the following sub-fields.
*
*
* -
*
* LastSyncTime
*
*
* -
*
* LastSyncStatus
*
*
* -
*
* LastSyncStatusMessage
*
*
* -
*
* LastSuccessfulSyncTime
*
*
* -
*
* LastSuccessfulSyncProvisioningArtifactID
*
*
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class LastSync implements Serializable, Cloneable, StructuredPojo {
/**
*
* The time of the last attempted sync from the repository to the Service Catalog product.
*
*/
private java.util.Date lastSyncTime;
/**
*
* The current status of the sync. Responses include SUCCEEDED
or FAILED
.
*
*/
private String lastSyncStatus;
/**
*
* The sync's status message.
*
*/
private String lastSyncStatusMessage;
/**
*
* The time of the latest successful sync from the source repo artifact to the Service Catalog product.
*
*/
private java.util.Date lastSuccessfulSyncTime;
/**
*
* The ProvisioningArtifactID of the ProvisioningArtifact created from the latest successful sync.
*
*/
private String lastSuccessfulSyncProvisioningArtifactId;
/**
*
* The time of the last attempted sync from the repository to the Service Catalog product.
*
*
* @param lastSyncTime
* The time of the last attempted sync from the repository to the Service Catalog product.
*/
public void setLastSyncTime(java.util.Date lastSyncTime) {
this.lastSyncTime = lastSyncTime;
}
/**
*
* The time of the last attempted sync from the repository to the Service Catalog product.
*
*
* @return The time of the last attempted sync from the repository to the Service Catalog product.
*/
public java.util.Date getLastSyncTime() {
return this.lastSyncTime;
}
/**
*
* The time of the last attempted sync from the repository to the Service Catalog product.
*
*
* @param lastSyncTime
* The time of the last attempted sync from the repository to the Service Catalog product.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LastSync withLastSyncTime(java.util.Date lastSyncTime) {
setLastSyncTime(lastSyncTime);
return this;
}
/**
*
* The current status of the sync. Responses include SUCCEEDED
or FAILED
.
*
*
* @param lastSyncStatus
* The current status of the sync. Responses include SUCCEEDED
or FAILED
.
* @see LastSyncStatus
*/
public void setLastSyncStatus(String lastSyncStatus) {
this.lastSyncStatus = lastSyncStatus;
}
/**
*
* The current status of the sync. Responses include SUCCEEDED
or FAILED
.
*
*
* @return The current status of the sync. Responses include SUCCEEDED
or FAILED
.
* @see LastSyncStatus
*/
public String getLastSyncStatus() {
return this.lastSyncStatus;
}
/**
*
* The current status of the sync. Responses include SUCCEEDED
or FAILED
.
*
*
* @param lastSyncStatus
* The current status of the sync. Responses include SUCCEEDED
or FAILED
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LastSyncStatus
*/
public LastSync withLastSyncStatus(String lastSyncStatus) {
setLastSyncStatus(lastSyncStatus);
return this;
}
/**
*
* The current status of the sync. Responses include SUCCEEDED
or FAILED
.
*
*
* @param lastSyncStatus
* The current status of the sync. Responses include SUCCEEDED
or FAILED
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see LastSyncStatus
*/
public LastSync withLastSyncStatus(LastSyncStatus lastSyncStatus) {
this.lastSyncStatus = lastSyncStatus.toString();
return this;
}
/**
*
* The sync's status message.
*
*
* @param lastSyncStatusMessage
* The sync's status message.
*/
public void setLastSyncStatusMessage(String lastSyncStatusMessage) {
this.lastSyncStatusMessage = lastSyncStatusMessage;
}
/**
*
* The sync's status message.
*
*
* @return The sync's status message.
*/
public String getLastSyncStatusMessage() {
return this.lastSyncStatusMessage;
}
/**
*
* The sync's status message.
*
*
* @param lastSyncStatusMessage
* The sync's status message.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LastSync withLastSyncStatusMessage(String lastSyncStatusMessage) {
setLastSyncStatusMessage(lastSyncStatusMessage);
return this;
}
/**
*
* The time of the latest successful sync from the source repo artifact to the Service Catalog product.
*
*
* @param lastSuccessfulSyncTime
* The time of the latest successful sync from the source repo artifact to the Service Catalog product.
*/
public void setLastSuccessfulSyncTime(java.util.Date lastSuccessfulSyncTime) {
this.lastSuccessfulSyncTime = lastSuccessfulSyncTime;
}
/**
*
* The time of the latest successful sync from the source repo artifact to the Service Catalog product.
*
*
* @return The time of the latest successful sync from the source repo artifact to the Service Catalog product.
*/
public java.util.Date getLastSuccessfulSyncTime() {
return this.lastSuccessfulSyncTime;
}
/**
*
* The time of the latest successful sync from the source repo artifact to the Service Catalog product.
*
*
* @param lastSuccessfulSyncTime
* The time of the latest successful sync from the source repo artifact to the Service Catalog product.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LastSync withLastSuccessfulSyncTime(java.util.Date lastSuccessfulSyncTime) {
setLastSuccessfulSyncTime(lastSuccessfulSyncTime);
return this;
}
/**
*
* The ProvisioningArtifactID of the ProvisioningArtifact created from the latest successful sync.
*
*
* @param lastSuccessfulSyncProvisioningArtifactId
* The ProvisioningArtifactID of the ProvisioningArtifact created from the latest successful sync.
*/
public void setLastSuccessfulSyncProvisioningArtifactId(String lastSuccessfulSyncProvisioningArtifactId) {
this.lastSuccessfulSyncProvisioningArtifactId = lastSuccessfulSyncProvisioningArtifactId;
}
/**
*
* The ProvisioningArtifactID of the ProvisioningArtifact created from the latest successful sync.
*
*
* @return The ProvisioningArtifactID of the ProvisioningArtifact created from the latest successful sync.
*/
public String getLastSuccessfulSyncProvisioningArtifactId() {
return this.lastSuccessfulSyncProvisioningArtifactId;
}
/**
*
* The ProvisioningArtifactID of the ProvisioningArtifact created from the latest successful sync.
*
*
* @param lastSuccessfulSyncProvisioningArtifactId
* The ProvisioningArtifactID of the ProvisioningArtifact created from the latest successful sync.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LastSync withLastSuccessfulSyncProvisioningArtifactId(String lastSuccessfulSyncProvisioningArtifactId) {
setLastSuccessfulSyncProvisioningArtifactId(lastSuccessfulSyncProvisioningArtifactId);
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 (getLastSyncTime() != null)
sb.append("LastSyncTime: ").append(getLastSyncTime()).append(",");
if (getLastSyncStatus() != null)
sb.append("LastSyncStatus: ").append(getLastSyncStatus()).append(",");
if (getLastSyncStatusMessage() != null)
sb.append("LastSyncStatusMessage: ").append(getLastSyncStatusMessage()).append(",");
if (getLastSuccessfulSyncTime() != null)
sb.append("LastSuccessfulSyncTime: ").append(getLastSuccessfulSyncTime()).append(",");
if (getLastSuccessfulSyncProvisioningArtifactId() != null)
sb.append("LastSuccessfulSyncProvisioningArtifactId: ").append(getLastSuccessfulSyncProvisioningArtifactId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof LastSync == false)
return false;
LastSync other = (LastSync) obj;
if (other.getLastSyncTime() == null ^ this.getLastSyncTime() == null)
return false;
if (other.getLastSyncTime() != null && other.getLastSyncTime().equals(this.getLastSyncTime()) == false)
return false;
if (other.getLastSyncStatus() == null ^ this.getLastSyncStatus() == null)
return false;
if (other.getLastSyncStatus() != null && other.getLastSyncStatus().equals(this.getLastSyncStatus()) == false)
return false;
if (other.getLastSyncStatusMessage() == null ^ this.getLastSyncStatusMessage() == null)
return false;
if (other.getLastSyncStatusMessage() != null && other.getLastSyncStatusMessage().equals(this.getLastSyncStatusMessage()) == false)
return false;
if (other.getLastSuccessfulSyncTime() == null ^ this.getLastSuccessfulSyncTime() == null)
return false;
if (other.getLastSuccessfulSyncTime() != null && other.getLastSuccessfulSyncTime().equals(this.getLastSuccessfulSyncTime()) == false)
return false;
if (other.getLastSuccessfulSyncProvisioningArtifactId() == null ^ this.getLastSuccessfulSyncProvisioningArtifactId() == null)
return false;
if (other.getLastSuccessfulSyncProvisioningArtifactId() != null
&& other.getLastSuccessfulSyncProvisioningArtifactId().equals(this.getLastSuccessfulSyncProvisioningArtifactId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getLastSyncTime() == null) ? 0 : getLastSyncTime().hashCode());
hashCode = prime * hashCode + ((getLastSyncStatus() == null) ? 0 : getLastSyncStatus().hashCode());
hashCode = prime * hashCode + ((getLastSyncStatusMessage() == null) ? 0 : getLastSyncStatusMessage().hashCode());
hashCode = prime * hashCode + ((getLastSuccessfulSyncTime() == null) ? 0 : getLastSuccessfulSyncTime().hashCode());
hashCode = prime * hashCode + ((getLastSuccessfulSyncProvisioningArtifactId() == null) ? 0 : getLastSuccessfulSyncProvisioningArtifactId().hashCode());
return hashCode;
}
@Override
public LastSync clone() {
try {
return (LastSync) 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.servicecatalog.model.transform.LastSyncMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}