
com.amazonaws.services.codeconnections.model.SyncBlockerSummary Maven / Gradle / Ivy
/*
* 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.codeconnections.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* A summary for sync blockers.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SyncBlockerSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The resource name for sync blocker summary.
*
*/
private String resourceName;
/**
*
* The parent resource name for a sync blocker summary.
*
*/
private String parentResourceName;
/**
*
* The latest events for a sync blocker summary.
*
*/
private java.util.List latestBlockers;
/**
*
* The resource name for sync blocker summary.
*
*
* @param resourceName
* The resource name for sync blocker summary.
*/
public void setResourceName(String resourceName) {
this.resourceName = resourceName;
}
/**
*
* The resource name for sync blocker summary.
*
*
* @return The resource name for sync blocker summary.
*/
public String getResourceName() {
return this.resourceName;
}
/**
*
* The resource name for sync blocker summary.
*
*
* @param resourceName
* The resource name for sync blocker summary.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SyncBlockerSummary withResourceName(String resourceName) {
setResourceName(resourceName);
return this;
}
/**
*
* The parent resource name for a sync blocker summary.
*
*
* @param parentResourceName
* The parent resource name for a sync blocker summary.
*/
public void setParentResourceName(String parentResourceName) {
this.parentResourceName = parentResourceName;
}
/**
*
* The parent resource name for a sync blocker summary.
*
*
* @return The parent resource name for a sync blocker summary.
*/
public String getParentResourceName() {
return this.parentResourceName;
}
/**
*
* The parent resource name for a sync blocker summary.
*
*
* @param parentResourceName
* The parent resource name for a sync blocker summary.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SyncBlockerSummary withParentResourceName(String parentResourceName) {
setParentResourceName(parentResourceName);
return this;
}
/**
*
* The latest events for a sync blocker summary.
*
*
* @return The latest events for a sync blocker summary.
*/
public java.util.List getLatestBlockers() {
return latestBlockers;
}
/**
*
* The latest events for a sync blocker summary.
*
*
* @param latestBlockers
* The latest events for a sync blocker summary.
*/
public void setLatestBlockers(java.util.Collection latestBlockers) {
if (latestBlockers == null) {
this.latestBlockers = null;
return;
}
this.latestBlockers = new java.util.ArrayList(latestBlockers);
}
/**
*
* The latest events for a sync blocker summary.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setLatestBlockers(java.util.Collection)} or {@link #withLatestBlockers(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param latestBlockers
* The latest events for a sync blocker summary.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SyncBlockerSummary withLatestBlockers(SyncBlocker... latestBlockers) {
if (this.latestBlockers == null) {
setLatestBlockers(new java.util.ArrayList(latestBlockers.length));
}
for (SyncBlocker ele : latestBlockers) {
this.latestBlockers.add(ele);
}
return this;
}
/**
*
* The latest events for a sync blocker summary.
*
*
* @param latestBlockers
* The latest events for a sync blocker summary.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SyncBlockerSummary withLatestBlockers(java.util.Collection latestBlockers) {
setLatestBlockers(latestBlockers);
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 (getResourceName() != null)
sb.append("ResourceName: ").append(getResourceName()).append(",");
if (getParentResourceName() != null)
sb.append("ParentResourceName: ").append(getParentResourceName()).append(",");
if (getLatestBlockers() != null)
sb.append("LatestBlockers: ").append(getLatestBlockers());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SyncBlockerSummary == false)
return false;
SyncBlockerSummary other = (SyncBlockerSummary) obj;
if (other.getResourceName() == null ^ this.getResourceName() == null)
return false;
if (other.getResourceName() != null && other.getResourceName().equals(this.getResourceName()) == false)
return false;
if (other.getParentResourceName() == null ^ this.getParentResourceName() == null)
return false;
if (other.getParentResourceName() != null && other.getParentResourceName().equals(this.getParentResourceName()) == false)
return false;
if (other.getLatestBlockers() == null ^ this.getLatestBlockers() == null)
return false;
if (other.getLatestBlockers() != null && other.getLatestBlockers().equals(this.getLatestBlockers()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getResourceName() == null) ? 0 : getResourceName().hashCode());
hashCode = prime * hashCode + ((getParentResourceName() == null) ? 0 : getParentResourceName().hashCode());
hashCode = prime * hashCode + ((getLatestBlockers() == null) ? 0 : getLatestBlockers().hashCode());
return hashCode;
}
@Override
public SyncBlockerSummary clone() {
try {
return (SyncBlockerSummary) 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.codeconnections.model.transform.SyncBlockerSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}