/* * 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 information about the dimensions for a set of metrics. *
*/ public class Dimensions implements Serializable { /** ** Information about the queue for which metrics are returned. *
*/ private QueueReference queue; /** ** The channel used for grouping and filters. *
*
* Constraints:
* Allowed Values: VOICE, CHAT, TASK
*/
private String channel;
/**
*
* Information about the routing profile assigned to the user. *
*/ private RoutingProfileReference routingProfile; /** ** Information about the queue for which metrics are returned. *
* * @return* Information about the queue for which metrics are returned. *
*/ public QueueReference getQueue() { return queue; } /** ** Information about the queue for which metrics are returned. *
* * @param queue* Information about the queue for which metrics are returned. *
*/ public void setQueue(QueueReference queue) { this.queue = queue; } /** ** Information about the queue for which metrics are returned. *
** Returns a reference to this object so that method calls can be chained * together. * * @param queue
* Information about the queue for which metrics are returned. *
* @return A reference to this updated object so that method calls can be * chained together. */ public Dimensions withQueue(QueueReference queue) { this.queue = queue; return this; } /** ** The channel used for grouping and filters. *
*
* Constraints:
* Allowed Values: VOICE, CHAT, TASK
*
* @return
* The channel used for grouping and filters. *
* @see Channel */ public String getChannel() { return channel; } /** ** The channel used for grouping and filters. *
*
* Constraints:
* Allowed Values: VOICE, CHAT, TASK
*
* @param channel
* The channel used for grouping and filters. *
* @see Channel */ public void setChannel(String channel) { this.channel = channel; } /** ** The channel used for grouping and filters. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: VOICE, CHAT, TASK
*
* @param channel
* The channel used for grouping and filters. *
* @return A reference to this updated object so that method calls can be * chained together. * @see Channel */ public Dimensions withChannel(String channel) { this.channel = channel; return this; } /** ** The channel used for grouping and filters. *
*
* Constraints:
* Allowed Values: VOICE, CHAT, TASK
*
* @param channel
* The channel used for grouping and filters. *
* @see Channel */ public void setChannel(Channel channel) { this.channel = channel.toString(); } /** ** The channel used for grouping and filters. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: VOICE, CHAT, TASK
*
* @param channel
* The channel used for grouping and filters. *
* @return A reference to this updated object so that method calls can be * chained together. * @see Channel */ public Dimensions withChannel(Channel channel) { this.channel = channel.toString(); return this; } /** ** Information about the routing profile assigned to the user. *
* * @return* Information about the routing profile assigned to the user. *
*/ public RoutingProfileReference getRoutingProfile() { return routingProfile; } /** ** Information about the routing profile assigned to the user. *
* * @param routingProfile* Information about the routing profile assigned to the user. *
*/ public void setRoutingProfile(RoutingProfileReference routingProfile) { this.routingProfile = routingProfile; } /** ** Information about the routing profile assigned to the user. *
** Returns a reference to this object so that method calls can be chained * together. * * @param routingProfile
* Information about the routing profile assigned to the user. *
* @return A reference to this updated object so that method calls can be * chained together. */ public Dimensions withRoutingProfile(RoutingProfileReference routingProfile) { this.routingProfile = routingProfile; 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 (getQueue() != null) sb.append("Queue: " + getQueue() + ","); if (getChannel() != null) sb.append("Channel: " + getChannel() + ","); if (getRoutingProfile() != null) sb.append("RoutingProfile: " + getRoutingProfile()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getQueue() == null) ? 0 : getQueue().hashCode()); hashCode = prime * hashCode + ((getChannel() == null) ? 0 : getChannel().hashCode()); hashCode = prime * hashCode + ((getRoutingProfile() == null) ? 0 : getRoutingProfile().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Dimensions == false) return false; Dimensions other = (Dimensions) obj; if (other.getQueue() == null ^ this.getQueue() == null) return false; if (other.getQueue() != null && other.getQueue().equals(this.getQueue()) == false) return false; if (other.getChannel() == null ^ this.getChannel() == null) return false; if (other.getChannel() != null && other.getChannel().equals(this.getChannel()) == false) return false; if (other.getRoutingProfile() == null ^ this.getRoutingProfile() == null) return false; if (other.getRoutingProfile() != null && other.getRoutingProfile().equals(this.getRoutingProfile()) == false) return false; return true; } }