/* * Copyright 2018-2023 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.connect.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Contains information about a hierarchy structure. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class HierarchyStructure implements Serializable, Cloneable, StructuredPojo { /** ** Information about level one. *
*/ private HierarchyLevel levelOne; /** ** Information about level two. *
*/ private HierarchyLevel levelTwo; /** ** Information about level three. *
*/ private HierarchyLevel levelThree; /** ** Information about level four. *
*/ private HierarchyLevel levelFour; /** ** Information about level five. *
*/ private HierarchyLevel levelFive; /** ** Information about level one. *
* * @param levelOne * Information about level one. */ public void setLevelOne(HierarchyLevel levelOne) { this.levelOne = levelOne; } /** ** Information about level one. *
* * @return Information about level one. */ public HierarchyLevel getLevelOne() { return this.levelOne; } /** ** Information about level one. *
* * @param levelOne * Information about level one. * @return Returns a reference to this object so that method calls can be chained together. */ public HierarchyStructure withLevelOne(HierarchyLevel levelOne) { setLevelOne(levelOne); return this; } /** ** Information about level two. *
* * @param levelTwo * Information about level two. */ public void setLevelTwo(HierarchyLevel levelTwo) { this.levelTwo = levelTwo; } /** ** Information about level two. *
* * @return Information about level two. */ public HierarchyLevel getLevelTwo() { return this.levelTwo; } /** ** Information about level two. *
* * @param levelTwo * Information about level two. * @return Returns a reference to this object so that method calls can be chained together. */ public HierarchyStructure withLevelTwo(HierarchyLevel levelTwo) { setLevelTwo(levelTwo); return this; } /** ** Information about level three. *
* * @param levelThree * Information about level three. */ public void setLevelThree(HierarchyLevel levelThree) { this.levelThree = levelThree; } /** ** Information about level three. *
* * @return Information about level three. */ public HierarchyLevel getLevelThree() { return this.levelThree; } /** ** Information about level three. *
* * @param levelThree * Information about level three. * @return Returns a reference to this object so that method calls can be chained together. */ public HierarchyStructure withLevelThree(HierarchyLevel levelThree) { setLevelThree(levelThree); return this; } /** ** Information about level four. *
* * @param levelFour * Information about level four. */ public void setLevelFour(HierarchyLevel levelFour) { this.levelFour = levelFour; } /** ** Information about level four. *
* * @return Information about level four. */ public HierarchyLevel getLevelFour() { return this.levelFour; } /** ** Information about level four. *
* * @param levelFour * Information about level four. * @return Returns a reference to this object so that method calls can be chained together. */ public HierarchyStructure withLevelFour(HierarchyLevel levelFour) { setLevelFour(levelFour); return this; } /** ** Information about level five. *
* * @param levelFive * Information about level five. */ public void setLevelFive(HierarchyLevel levelFive) { this.levelFive = levelFive; } /** ** Information about level five. *
* * @return Information about level five. */ public HierarchyLevel getLevelFive() { return this.levelFive; } /** ** Information about level five. *
* * @param levelFive * Information about level five. * @return Returns a reference to this object so that method calls can be chained together. */ public HierarchyStructure withLevelFive(HierarchyLevel levelFive) { setLevelFive(levelFive); 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 (getLevelOne() != null) sb.append("LevelOne: ").append(getLevelOne()).append(","); if (getLevelTwo() != null) sb.append("LevelTwo: ").append(getLevelTwo()).append(","); if (getLevelThree() != null) sb.append("LevelThree: ").append(getLevelThree()).append(","); if (getLevelFour() != null) sb.append("LevelFour: ").append(getLevelFour()).append(","); if (getLevelFive() != null) sb.append("LevelFive: ").append(getLevelFive()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof HierarchyStructure == false) return false; HierarchyStructure other = (HierarchyStructure) obj; if (other.getLevelOne() == null ^ this.getLevelOne() == null) return false; if (other.getLevelOne() != null && other.getLevelOne().equals(this.getLevelOne()) == false) return false; if (other.getLevelTwo() == null ^ this.getLevelTwo() == null) return false; if (other.getLevelTwo() != null && other.getLevelTwo().equals(this.getLevelTwo()) == false) return false; if (other.getLevelThree() == null ^ this.getLevelThree() == null) return false; if (other.getLevelThree() != null && other.getLevelThree().equals(this.getLevelThree()) == false) return false; if (other.getLevelFour() == null ^ this.getLevelFour() == null) return false; if (other.getLevelFour() != null && other.getLevelFour().equals(this.getLevelFour()) == false) return false; if (other.getLevelFive() == null ^ this.getLevelFive() == null) return false; if (other.getLevelFive() != null && other.getLevelFive().equals(this.getLevelFive()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLevelOne() == null) ? 0 : getLevelOne().hashCode()); hashCode = prime * hashCode + ((getLevelTwo() == null) ? 0 : getLevelTwo().hashCode()); hashCode = prime * hashCode + ((getLevelThree() == null) ? 0 : getLevelThree().hashCode()); hashCode = prime * hashCode + ((getLevelFour() == null) ? 0 : getLevelFour().hashCode()); hashCode = prime * hashCode + ((getLevelFive() == null) ? 0 : getLevelFive().hashCode()); return hashCode; } @Override public HierarchyStructure clone() { try { return (HierarchyStructure) 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.connect.model.transform.HierarchyStructureMarshaller.getInstance().marshall(this, protocolMarshaller); } }