/* * Copyright 2010-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; /** *
* Contains summary information about a queue. *
*/ public class QueueSummary implements Serializable { /** ** The identifier of the queue. *
*/ private String id; /** ** The Amazon Resource Name (ARN) of the queue. *
*/ private String arn; /** ** The name of the queue. *
*
* Constraints:
* Length: 1 - 256
*/
private String name;
/**
*
* The type of queue. *
*
* Constraints:
* Allowed Values: STANDARD, AGENT
*/
private String queueType;
/**
*
* The identifier of the queue. *
* * @return* The identifier of the queue. *
*/ public String getId() { return id; } /** ** The identifier of the queue. *
* * @param id* The identifier of the queue. *
*/ public void setId(String id) { this.id = id; } /** ** The identifier of the queue. *
** Returns a reference to this object so that method calls can be chained * together. * * @param id
* The identifier of the queue. *
* @return A reference to this updated object so that method calls can be * chained together. */ public QueueSummary withId(String id) { this.id = id; return this; } /** ** The Amazon Resource Name (ARN) of the queue. *
* * @return* The Amazon Resource Name (ARN) of the queue. *
*/ public String getArn() { return arn; } /** ** The Amazon Resource Name (ARN) of the queue. *
* * @param arn* The Amazon Resource Name (ARN) of the queue. *
*/ public void setArn(String arn) { this.arn = arn; } /** ** The Amazon Resource Name (ARN) of the queue. *
** Returns a reference to this object so that method calls can be chained * together. * * @param arn
* The Amazon Resource Name (ARN) of the queue. *
* @return A reference to this updated object so that method calls can be * chained together. */ public QueueSummary withArn(String arn) { this.arn = arn; return this; } /** ** The name of the queue. *
*
* Constraints:
* Length: 1 - 256
*
* @return
* The name of the queue. *
*/ public String getName() { return name; } /** ** The name of the queue. *
*
* Constraints:
* Length: 1 - 256
*
* @param name
* The name of the queue. *
*/ public void setName(String name) { this.name = name; } /** ** The name of the queue. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 256
*
* @param name
* The name of the queue. *
* @return A reference to this updated object so that method calls can be * chained together. */ public QueueSummary withName(String name) { this.name = name; return this; } /** ** The type of queue. *
*
* Constraints:
* Allowed Values: STANDARD, AGENT
*
* @return
* The type of queue. *
* @see QueueType */ public String getQueueType() { return queueType; } /** ** The type of queue. *
*
* Constraints:
* Allowed Values: STANDARD, AGENT
*
* @param queueType
* The type of queue. *
* @see QueueType */ public void setQueueType(String queueType) { this.queueType = queueType; } /** ** The type of queue. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: STANDARD, AGENT
*
* @param queueType
* The type of queue. *
* @return A reference to this updated object so that method calls can be * chained together. * @see QueueType */ public QueueSummary withQueueType(String queueType) { this.queueType = queueType; return this; } /** ** The type of queue. *
*
* Constraints:
* Allowed Values: STANDARD, AGENT
*
* @param queueType
* The type of queue. *
* @see QueueType */ public void setQueueType(QueueType queueType) { this.queueType = queueType.toString(); } /** ** The type of queue. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: STANDARD, AGENT
*
* @param queueType
* The type of queue. *
* @return A reference to this updated object so that method calls can be * chained together. * @see QueueType */ public QueueSummary withQueueType(QueueType queueType) { this.queueType = queueType.toString(); 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 (getArn() != null) sb.append("Arn: " + getArn() + ","); if (getName() != null) sb.append("Name: " + getName() + ","); if (getQueueType() != null) sb.append("QueueType: " + getQueueType()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getQueueType() == null) ? 0 : getQueueType().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof QueueSummary == false) return false; QueueSummary other = (QueueSummary) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getQueueType() == null ^ this.getQueueType() == null) return false; if (other.getQueueType() != null && other.getQueueType().equals(this.getQueueType()) == false) return false; return true; } }