
com.amazonaws.services.servicecatalog.model.LaunchPathSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-servicecatalog Show documentation
/*
* Copyright 2010-2016 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;
/**
*
* Summary information about a path for a user to have access to a specified
* product.
*
*/
public class LaunchPathSummary implements Serializable, Cloneable {
/**
*
* The unique identifier of the product path.
*
*/
private String id;
/**
*
* List of constraints on the portfolio-product relationship.
*
*/
private java.util.List constraintSummaries;
/**
*
* List of tags used by this launch path.
*
*/
private java.util.List tags;
/**
*
* Corresponds to the name of the portfolio to which the user was assigned.
*
*/
private String name;
/**
*
* The unique identifier of the product path.
*
*
* @param id
* The unique identifier of the product path.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The unique identifier of the product path.
*
*
* @return The unique identifier of the product path.
*/
public String getId() {
return this.id;
}
/**
*
* The unique identifier of the product path.
*
*
* @param id
* The unique 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;
}
/**
*
* List of constraints on the portfolio-product relationship.
*
*
* @return List of constraints on the portfolio-product relationship.
*/
public java.util.List getConstraintSummaries() {
return constraintSummaries;
}
/**
*
* List of constraints on the portfolio-product relationship.
*
*
* @param constraintSummaries
* List of 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);
}
/**
*
* List of 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
* List of 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;
}
/**
*
* List of constraints on the portfolio-product relationship.
*
*
* @param constraintSummaries
* List of 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;
}
/**
*
* List of tags used by this launch path.
*
*
* @return List of tags used by this launch path.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* List of tags used by this launch path.
*
*
* @param tags
* List of tags used by this launch path.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* List of tags used by this launch 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
* List of tags used by this launch 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;
}
/**
*
* List of tags used by this launch path.
*
*
* @param tags
* List of tags used by this launch 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;
}
/**
*
* Corresponds to the name of the portfolio to which the user was assigned.
*
*
* @param name
* Corresponds to the name of the portfolio to which the user was
* assigned.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* Corresponds to the name of the portfolio to which the user was assigned.
*
*
* @return Corresponds to the name of the portfolio to which the user was
* assigned.
*/
public String getName() {
return this.name;
}
/**
*
* Corresponds to the name of the portfolio to which the user was assigned.
*
*
* @param name
* Corresponds to the name of the portfolio to which the user was
* assigned.
* @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; useful for testing and
* debugging.
*
* @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: " + getId() + ",");
if (getConstraintSummaries() != null)
sb.append("ConstraintSummaries: " + getConstraintSummaries() + ",");
if (getTags() != null)
sb.append("Tags: " + getTags() + ",");
if (getName() != null)
sb.append("Name: " + 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);
}
}
}