com.amazonaws.services.simplesystemsmanagement.model.OpsItemRelatedItemSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ssm 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.simplesystemsmanagement.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Summary information about related-item resources for an OpsItem.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class OpsItemRelatedItemSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The OpsItem ID.
*
*/
private String opsItemId;
/**
*
* The association ID.
*
*/
private String associationId;
/**
*
* The resource type.
*
*/
private String resourceType;
/**
*
* The association type.
*
*/
private String associationType;
/**
*
* The Amazon Resource Name (ARN) of the related-item resource.
*
*/
private String resourceUri;
private OpsItemIdentity createdBy;
/**
*
* The time the related-item association was created.
*
*/
private java.util.Date createdTime;
private OpsItemIdentity lastModifiedBy;
/**
*
* The time the related-item association was last updated.
*
*/
private java.util.Date lastModifiedTime;
/**
*
* The OpsItem ID.
*
*
* @param opsItemId
* The OpsItem ID.
*/
public void setOpsItemId(String opsItemId) {
this.opsItemId = opsItemId;
}
/**
*
* The OpsItem ID.
*
*
* @return The OpsItem ID.
*/
public String getOpsItemId() {
return this.opsItemId;
}
/**
*
* The OpsItem ID.
*
*
* @param opsItemId
* The OpsItem ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OpsItemRelatedItemSummary withOpsItemId(String opsItemId) {
setOpsItemId(opsItemId);
return this;
}
/**
*
* The association ID.
*
*
* @param associationId
* The association ID.
*/
public void setAssociationId(String associationId) {
this.associationId = associationId;
}
/**
*
* The association ID.
*
*
* @return The association ID.
*/
public String getAssociationId() {
return this.associationId;
}
/**
*
* The association ID.
*
*
* @param associationId
* The association ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OpsItemRelatedItemSummary withAssociationId(String associationId) {
setAssociationId(associationId);
return this;
}
/**
*
* The resource type.
*
*
* @param resourceType
* The resource type.
*/
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
/**
*
* The resource type.
*
*
* @return The resource type.
*/
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.
*/
public OpsItemRelatedItemSummary withResourceType(String resourceType) {
setResourceType(resourceType);
return this;
}
/**
*
* The association type.
*
*
* @param associationType
* The association type.
*/
public void setAssociationType(String associationType) {
this.associationType = associationType;
}
/**
*
* The association type.
*
*
* @return The association type.
*/
public String getAssociationType() {
return this.associationType;
}
/**
*
* The association type.
*
*
* @param associationType
* The association type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OpsItemRelatedItemSummary withAssociationType(String associationType) {
setAssociationType(associationType);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the related-item resource.
*
*
* @param resourceUri
* The Amazon Resource Name (ARN) of the related-item resource.
*/
public void setResourceUri(String resourceUri) {
this.resourceUri = resourceUri;
}
/**
*
* The Amazon Resource Name (ARN) of the related-item resource.
*
*
* @return The Amazon Resource Name (ARN) of the related-item resource.
*/
public String getResourceUri() {
return this.resourceUri;
}
/**
*
* The Amazon Resource Name (ARN) of the related-item resource.
*
*
* @param resourceUri
* The Amazon Resource Name (ARN) of the related-item resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OpsItemRelatedItemSummary withResourceUri(String resourceUri) {
setResourceUri(resourceUri);
return this;
}
/**
* @param createdBy
*/
public void setCreatedBy(OpsItemIdentity createdBy) {
this.createdBy = createdBy;
}
/**
* @return
*/
public OpsItemIdentity getCreatedBy() {
return this.createdBy;
}
/**
* @param createdBy
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OpsItemRelatedItemSummary withCreatedBy(OpsItemIdentity createdBy) {
setCreatedBy(createdBy);
return this;
}
/**
*
* The time the related-item association was created.
*
*
* @param createdTime
* The time the related-item association was created.
*/
public void setCreatedTime(java.util.Date createdTime) {
this.createdTime = createdTime;
}
/**
*
* The time the related-item association was created.
*
*
* @return The time the related-item association was created.
*/
public java.util.Date getCreatedTime() {
return this.createdTime;
}
/**
*
* The time the related-item association was created.
*
*
* @param createdTime
* The time the related-item association was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OpsItemRelatedItemSummary withCreatedTime(java.util.Date createdTime) {
setCreatedTime(createdTime);
return this;
}
/**
* @param lastModifiedBy
*/
public void setLastModifiedBy(OpsItemIdentity lastModifiedBy) {
this.lastModifiedBy = lastModifiedBy;
}
/**
* @return
*/
public OpsItemIdentity getLastModifiedBy() {
return this.lastModifiedBy;
}
/**
* @param lastModifiedBy
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OpsItemRelatedItemSummary withLastModifiedBy(OpsItemIdentity lastModifiedBy) {
setLastModifiedBy(lastModifiedBy);
return this;
}
/**
*
* The time the related-item association was last updated.
*
*
* @param lastModifiedTime
* The time the related-item association was last updated.
*/
public void setLastModifiedTime(java.util.Date lastModifiedTime) {
this.lastModifiedTime = lastModifiedTime;
}
/**
*
* The time the related-item association was last updated.
*
*
* @return The time the related-item association was last updated.
*/
public java.util.Date getLastModifiedTime() {
return this.lastModifiedTime;
}
/**
*
* The time the related-item association was last updated.
*
*
* @param lastModifiedTime
* The time the related-item association was last updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OpsItemRelatedItemSummary withLastModifiedTime(java.util.Date lastModifiedTime) {
setLastModifiedTime(lastModifiedTime);
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 (getOpsItemId() != null)
sb.append("OpsItemId: ").append(getOpsItemId()).append(",");
if (getAssociationId() != null)
sb.append("AssociationId: ").append(getAssociationId()).append(",");
if (getResourceType() != null)
sb.append("ResourceType: ").append(getResourceType()).append(",");
if (getAssociationType() != null)
sb.append("AssociationType: ").append(getAssociationType()).append(",");
if (getResourceUri() != null)
sb.append("ResourceUri: ").append(getResourceUri()).append(",");
if (getCreatedBy() != null)
sb.append("CreatedBy: ").append(getCreatedBy()).append(",");
if (getCreatedTime() != null)
sb.append("CreatedTime: ").append(getCreatedTime()).append(",");
if (getLastModifiedBy() != null)
sb.append("LastModifiedBy: ").append(getLastModifiedBy()).append(",");
if (getLastModifiedTime() != null)
sb.append("LastModifiedTime: ").append(getLastModifiedTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof OpsItemRelatedItemSummary == false)
return false;
OpsItemRelatedItemSummary other = (OpsItemRelatedItemSummary) obj;
if (other.getOpsItemId() == null ^ this.getOpsItemId() == null)
return false;
if (other.getOpsItemId() != null && other.getOpsItemId().equals(this.getOpsItemId()) == false)
return false;
if (other.getAssociationId() == null ^ this.getAssociationId() == null)
return false;
if (other.getAssociationId() != null && other.getAssociationId().equals(this.getAssociationId()) == false)
return false;
if (other.getResourceType() == null ^ this.getResourceType() == null)
return false;
if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false)
return false;
if (other.getAssociationType() == null ^ this.getAssociationType() == null)
return false;
if (other.getAssociationType() != null && other.getAssociationType().equals(this.getAssociationType()) == false)
return false;
if (other.getResourceUri() == null ^ this.getResourceUri() == null)
return false;
if (other.getResourceUri() != null && other.getResourceUri().equals(this.getResourceUri()) == false)
return false;
if (other.getCreatedBy() == null ^ this.getCreatedBy() == null)
return false;
if (other.getCreatedBy() != null && other.getCreatedBy().equals(this.getCreatedBy()) == false)
return false;
if (other.getCreatedTime() == null ^ this.getCreatedTime() == null)
return false;
if (other.getCreatedTime() != null && other.getCreatedTime().equals(this.getCreatedTime()) == false)
return false;
if (other.getLastModifiedBy() == null ^ this.getLastModifiedBy() == null)
return false;
if (other.getLastModifiedBy() != null && other.getLastModifiedBy().equals(this.getLastModifiedBy()) == false)
return false;
if (other.getLastModifiedTime() == null ^ this.getLastModifiedTime() == null)
return false;
if (other.getLastModifiedTime() != null && other.getLastModifiedTime().equals(this.getLastModifiedTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getOpsItemId() == null) ? 0 : getOpsItemId().hashCode());
hashCode = prime * hashCode + ((getAssociationId() == null) ? 0 : getAssociationId().hashCode());
hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode());
hashCode = prime * hashCode + ((getAssociationType() == null) ? 0 : getAssociationType().hashCode());
hashCode = prime * hashCode + ((getResourceUri() == null) ? 0 : getResourceUri().hashCode());
hashCode = prime * hashCode + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
hashCode = prime * hashCode + ((getLastModifiedBy() == null) ? 0 : getLastModifiedBy().hashCode());
hashCode = prime * hashCode + ((getLastModifiedTime() == null) ? 0 : getLastModifiedTime().hashCode());
return hashCode;
}
@Override
public OpsItemRelatedItemSummary clone() {
try {
return (OpsItemRelatedItemSummary) 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.simplesystemsmanagement.model.transform.OpsItemRelatedItemSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}