com.amazonaws.services.iottwinmaker.model.SyncResourceSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-iottwinmaker 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.iottwinmaker.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The sync resource summary.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SyncResourceSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The resource type.
*
*/
private String resourceType;
/**
*
* The external ID.
*
*/
private String externalId;
/**
*
* The resource ID.
*
*/
private String resourceId;
/**
*
* The sync resource summary status.
*
*/
private SyncResourceStatus status;
/**
*
* The update date and time.
*
*/
private java.util.Date updateDateTime;
/**
*
* The resource type.
*
*
* @param resourceType
* The resource type.
* @see SyncResourceType
*/
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
/**
*
* The resource type.
*
*
* @return The resource type.
* @see SyncResourceType
*/
public String getResourceType() {
return this.resourceType;
}
/**
*
* The resource type.
*
*
* @param resourceType
* The resource type.
* @return Returns a reference to this object so that method calls can be chained together.
* @see SyncResourceType
*/
public SyncResourceSummary withResourceType(String resourceType) {
setResourceType(resourceType);
return this;
}
/**
*
* The resource type.
*
*
* @param resourceType
* The resource type.
* @return Returns a reference to this object so that method calls can be chained together.
* @see SyncResourceType
*/
public SyncResourceSummary withResourceType(SyncResourceType resourceType) {
this.resourceType = resourceType.toString();
return this;
}
/**
*
* The external ID.
*
*
* @param externalId
* The external ID.
*/
public void setExternalId(String externalId) {
this.externalId = externalId;
}
/**
*
* The external ID.
*
*
* @return The external ID.
*/
public String getExternalId() {
return this.externalId;
}
/**
*
* The external ID.
*
*
* @param externalId
* The external ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SyncResourceSummary withExternalId(String externalId) {
setExternalId(externalId);
return this;
}
/**
*
* The resource ID.
*
*
* @param resourceId
* The resource ID.
*/
public void setResourceId(String resourceId) {
this.resourceId = resourceId;
}
/**
*
* The resource ID.
*
*
* @return The resource ID.
*/
public String getResourceId() {
return this.resourceId;
}
/**
*
* The resource ID.
*
*
* @param resourceId
* The resource ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SyncResourceSummary withResourceId(String resourceId) {
setResourceId(resourceId);
return this;
}
/**
*
* The sync resource summary status.
*
*
* @param status
* The sync resource summary status.
*/
public void setStatus(SyncResourceStatus status) {
this.status = status;
}
/**
*
* The sync resource summary status.
*
*
* @return The sync resource summary status.
*/
public SyncResourceStatus getStatus() {
return this.status;
}
/**
*
* The sync resource summary status.
*
*
* @param status
* The sync resource summary status.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SyncResourceSummary withStatus(SyncResourceStatus status) {
setStatus(status);
return this;
}
/**
*
* The update date and time.
*
*
* @param updateDateTime
* The update date and time.
*/
public void setUpdateDateTime(java.util.Date updateDateTime) {
this.updateDateTime = updateDateTime;
}
/**
*
* The update date and time.
*
*
* @return The update date and time.
*/
public java.util.Date getUpdateDateTime() {
return this.updateDateTime;
}
/**
*
* The update date and time.
*
*
* @param updateDateTime
* The update date and time.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SyncResourceSummary withUpdateDateTime(java.util.Date updateDateTime) {
setUpdateDateTime(updateDateTime);
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 (getResourceType() != null)
sb.append("ResourceType: ").append(getResourceType()).append(",");
if (getExternalId() != null)
sb.append("ExternalId: ").append(getExternalId()).append(",");
if (getResourceId() != null)
sb.append("ResourceId: ").append(getResourceId()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getUpdateDateTime() != null)
sb.append("UpdateDateTime: ").append(getUpdateDateTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SyncResourceSummary == false)
return false;
SyncResourceSummary other = (SyncResourceSummary) obj;
if (other.getResourceType() == null ^ this.getResourceType() == null)
return false;
if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false)
return false;
if (other.getExternalId() == null ^ this.getExternalId() == null)
return false;
if (other.getExternalId() != null && other.getExternalId().equals(this.getExternalId()) == false)
return false;
if (other.getResourceId() == null ^ this.getResourceId() == null)
return false;
if (other.getResourceId() != null && other.getResourceId().equals(this.getResourceId()) == 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.getUpdateDateTime() == null ^ this.getUpdateDateTime() == null)
return false;
if (other.getUpdateDateTime() != null && other.getUpdateDateTime().equals(this.getUpdateDateTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode());
hashCode = prime * hashCode + ((getExternalId() == null) ? 0 : getExternalId().hashCode());
hashCode = prime * hashCode + ((getResourceId() == null) ? 0 : getResourceId().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getUpdateDateTime() == null) ? 0 : getUpdateDateTime().hashCode());
return hashCode;
}
@Override
public SyncResourceSummary clone() {
try {
return (SyncResourceSummary) 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.iottwinmaker.model.transform.SyncResourceSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}