com.amazonaws.services.servicecatalog.model.LaunchPathSummary 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;
/**
*
* Summary information about a product path for a user.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class LaunchPathSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The identifier of the product path.
*
*/
private String id;
/**
*
* The constraints on the portfolio-product relationship.
*
*/
private java.util.List constraintSummaries;
/**
*
* The tags associated with this product path.
*
*/
private java.util.List tags;
/**
*
* The name of the portfolio that contains the product.
*
*/
private String name;
/**
*
* The identifier of the product path.
*
*
* @param id
* The identifier of the product path.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The identifier of the product path.
*
*
* @return The identifier of the product path.
*/
public String getId() {
return this.id;
}
/**
*
* The identifier of the product path.
*
*
* @param id
* The identifier of the product path.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LaunchPathSummary withId(String id) {
setId(id);
return this;
}
/**
*
* The constraints on the portfolio-product relationship.
*
*
* @return The constraints on the portfolio-product relationship.
*/
public java.util.List getConstraintSummaries() {
return constraintSummaries;
}
/**
*
* The constraints on the portfolio-product relationship.
*
*
* @param constraintSummaries
* The constraints on the portfolio-product relationship.
*/
public void setConstraintSummaries(java.util.Collection constraintSummaries) {
if (constraintSummaries == null) {
this.constraintSummaries = null;
return;
}
this.constraintSummaries = new java.util.ArrayList(constraintSummaries);
}
/**
*
* The constraints on the portfolio-product relationship.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setConstraintSummaries(java.util.Collection)} or {@link #withConstraintSummaries(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param constraintSummaries
* The constraints on the portfolio-product relationship.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LaunchPathSummary withConstraintSummaries(ConstraintSummary... constraintSummaries) {
if (this.constraintSummaries == null) {
setConstraintSummaries(new java.util.ArrayList(constraintSummaries.length));
}
for (ConstraintSummary ele : constraintSummaries) {
this.constraintSummaries.add(ele);
}
return this;
}
/**
*
* The constraints on the portfolio-product relationship.
*
*
* @param constraintSummaries
* The constraints on the portfolio-product relationship.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LaunchPathSummary withConstraintSummaries(java.util.Collection constraintSummaries) {
setConstraintSummaries(constraintSummaries);
return this;
}
/**
*
* The tags associated with this product path.
*
*
* @return The tags associated with this product path.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* The tags associated with this product path.
*
*
* @param tags
* The tags associated with this product path.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* The tags associated with this product path.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* The tags associated with this product path.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LaunchPathSummary withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* The tags associated with this product path.
*
*
* @param tags
* The tags associated with this product path.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LaunchPathSummary withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
*
* The name of the portfolio that contains the product.
*
*
* @param name
* The name of the portfolio that contains the product.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the portfolio that contains the product.
*
*
* @return The name of the portfolio that contains the product.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the portfolio that contains the product.
*
*
* @param name
* The name of the portfolio that contains the product.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LaunchPathSummary withName(String name) {
setName(name);
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 (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getConstraintSummaries() != null)
sb.append("ConstraintSummaries: ").append(getConstraintSummaries()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof LaunchPathSummary == false)
return false;
LaunchPathSummary other = (LaunchPathSummary) obj;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == false)
return false;
if (other.getConstraintSummaries() == null ^ this.getConstraintSummaries() == null)
return false;
if (other.getConstraintSummaries() != null && other.getConstraintSummaries().equals(this.getConstraintSummaries()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getConstraintSummaries() == null) ? 0 : getConstraintSummaries().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
return hashCode;
}
@Override
public LaunchPathSummary clone() {
try {
return (LaunchPathSummary) 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.LaunchPathSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}