/* * 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.lexmodelsv2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* An object containing the results for the utterance metrics you requested and the bin and/or group(s) they refer to, * if applicable. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AnalyticsUtteranceResult implements Serializable, Cloneable, StructuredPojo { /** *

* A list of objects containing the criteria you requested for binning results and the values of the bins. *

*/ private java.util.List binKeys; /** *

* A list of objects containing the criteria you requested for grouping results and the values of the bins. *

*/ private java.util.List groupByKeys; /** *

* A list of objects, each of which contains a metric you want to list, the statistic for the metric you want to * return, and the method by which to organize the results. *

*/ private java.util.List metricsResults; /** *

* A list of objects containing information about the last used intent at the time of an utterance. *

*/ private java.util.List attributeResults; /** *

* A list of objects containing the criteria you requested for binning results and the values of the bins. *

* * @return A list of objects containing the criteria you requested for binning results and the values of the bins. */ public java.util.List getBinKeys() { return binKeys; } /** *

* A list of objects containing the criteria you requested for binning results and the values of the bins. *

* * @param binKeys * A list of objects containing the criteria you requested for binning results and the values of the bins. */ public void setBinKeys(java.util.Collection binKeys) { if (binKeys == null) { this.binKeys = null; return; } this.binKeys = new java.util.ArrayList(binKeys); } /** *

* A list of objects containing the criteria you requested for binning results and the values of the bins. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setBinKeys(java.util.Collection)} or {@link #withBinKeys(java.util.Collection)} if you want to override * the existing values. *

* * @param binKeys * A list of objects containing the criteria you requested for binning results and the values of the bins. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalyticsUtteranceResult withBinKeys(AnalyticsBinKey... binKeys) { if (this.binKeys == null) { setBinKeys(new java.util.ArrayList(binKeys.length)); } for (AnalyticsBinKey ele : binKeys) { this.binKeys.add(ele); } return this; } /** *

* A list of objects containing the criteria you requested for binning results and the values of the bins. *

* * @param binKeys * A list of objects containing the criteria you requested for binning results and the values of the bins. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalyticsUtteranceResult withBinKeys(java.util.Collection binKeys) { setBinKeys(binKeys); return this; } /** *

* A list of objects containing the criteria you requested for grouping results and the values of the bins. *

* * @return A list of objects containing the criteria you requested for grouping results and the values of the bins. */ public java.util.List getGroupByKeys() { return groupByKeys; } /** *

* A list of objects containing the criteria you requested for grouping results and the values of the bins. *

* * @param groupByKeys * A list of objects containing the criteria you requested for grouping results and the values of the bins. */ public void setGroupByKeys(java.util.Collection groupByKeys) { if (groupByKeys == null) { this.groupByKeys = null; return; } this.groupByKeys = new java.util.ArrayList(groupByKeys); } /** *

* A list of objects containing the criteria you requested for grouping results and the values of the bins. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setGroupByKeys(java.util.Collection)} or {@link #withGroupByKeys(java.util.Collection)} if you want to * override the existing values. *

* * @param groupByKeys * A list of objects containing the criteria you requested for grouping results and the values of the bins. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalyticsUtteranceResult withGroupByKeys(AnalyticsUtteranceGroupByKey... groupByKeys) { if (this.groupByKeys == null) { setGroupByKeys(new java.util.ArrayList(groupByKeys.length)); } for (AnalyticsUtteranceGroupByKey ele : groupByKeys) { this.groupByKeys.add(ele); } return this; } /** *

* A list of objects containing the criteria you requested for grouping results and the values of the bins. *

* * @param groupByKeys * A list of objects containing the criteria you requested for grouping results and the values of the bins. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalyticsUtteranceResult withGroupByKeys(java.util.Collection groupByKeys) { setGroupByKeys(groupByKeys); return this; } /** *

* A list of objects, each of which contains a metric you want to list, the statistic for the metric you want to * return, and the method by which to organize the results. *

* * @return A list of objects, each of which contains a metric you want to list, the statistic for the metric you * want to return, and the method by which to organize the results. */ public java.util.List getMetricsResults() { return metricsResults; } /** *

* A list of objects, each of which contains a metric you want to list, the statistic for the metric you want to * return, and the method by which to organize the results. *

* * @param metricsResults * A list of objects, each of which contains a metric you want to list, the statistic for the metric you want * to return, and the method by which to organize the results. */ public void setMetricsResults(java.util.Collection metricsResults) { if (metricsResults == null) { this.metricsResults = null; return; } this.metricsResults = new java.util.ArrayList(metricsResults); } /** *

* A list of objects, each of which contains a metric you want to list, the statistic for the metric you want to * return, and the method by which to organize the results. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setMetricsResults(java.util.Collection)} or {@link #withMetricsResults(java.util.Collection)} if you want * to override the existing values. *

* * @param metricsResults * A list of objects, each of which contains a metric you want to list, the statistic for the metric you want * to return, and the method by which to organize the results. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalyticsUtteranceResult withMetricsResults(AnalyticsUtteranceMetricResult... metricsResults) { if (this.metricsResults == null) { setMetricsResults(new java.util.ArrayList(metricsResults.length)); } for (AnalyticsUtteranceMetricResult ele : metricsResults) { this.metricsResults.add(ele); } return this; } /** *

* A list of objects, each of which contains a metric you want to list, the statistic for the metric you want to * return, and the method by which to organize the results. *

* * @param metricsResults * A list of objects, each of which contains a metric you want to list, the statistic for the metric you want * to return, and the method by which to organize the results. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalyticsUtteranceResult withMetricsResults(java.util.Collection metricsResults) { setMetricsResults(metricsResults); return this; } /** *

* A list of objects containing information about the last used intent at the time of an utterance. *

* * @return A list of objects containing information about the last used intent at the time of an utterance. */ public java.util.List getAttributeResults() { return attributeResults; } /** *

* A list of objects containing information about the last used intent at the time of an utterance. *

* * @param attributeResults * A list of objects containing information about the last used intent at the time of an utterance. */ public void setAttributeResults(java.util.Collection attributeResults) { if (attributeResults == null) { this.attributeResults = null; return; } this.attributeResults = new java.util.ArrayList(attributeResults); } /** *

* A list of objects containing information about the last used intent at the time of an utterance. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAttributeResults(java.util.Collection)} or {@link #withAttributeResults(java.util.Collection)} if you * want to override the existing values. *

* * @param attributeResults * A list of objects containing information about the last used intent at the time of an utterance. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalyticsUtteranceResult withAttributeResults(AnalyticsUtteranceAttributeResult... attributeResults) { if (this.attributeResults == null) { setAttributeResults(new java.util.ArrayList(attributeResults.length)); } for (AnalyticsUtteranceAttributeResult ele : attributeResults) { this.attributeResults.add(ele); } return this; } /** *

* A list of objects containing information about the last used intent at the time of an utterance. *

* * @param attributeResults * A list of objects containing information about the last used intent at the time of an utterance. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalyticsUtteranceResult withAttributeResults(java.util.Collection attributeResults) { setAttributeResults(attributeResults); 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 (getBinKeys() != null) sb.append("BinKeys: ").append(getBinKeys()).append(","); if (getGroupByKeys() != null) sb.append("GroupByKeys: ").append(getGroupByKeys()).append(","); if (getMetricsResults() != null) sb.append("MetricsResults: ").append(getMetricsResults()).append(","); if (getAttributeResults() != null) sb.append("AttributeResults: ").append(getAttributeResults()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AnalyticsUtteranceResult == false) return false; AnalyticsUtteranceResult other = (AnalyticsUtteranceResult) obj; if (other.getBinKeys() == null ^ this.getBinKeys() == null) return false; if (other.getBinKeys() != null && other.getBinKeys().equals(this.getBinKeys()) == false) return false; if (other.getGroupByKeys() == null ^ this.getGroupByKeys() == null) return false; if (other.getGroupByKeys() != null && other.getGroupByKeys().equals(this.getGroupByKeys()) == false) return false; if (other.getMetricsResults() == null ^ this.getMetricsResults() == null) return false; if (other.getMetricsResults() != null && other.getMetricsResults().equals(this.getMetricsResults()) == false) return false; if (other.getAttributeResults() == null ^ this.getAttributeResults() == null) return false; if (other.getAttributeResults() != null && other.getAttributeResults().equals(this.getAttributeResults()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBinKeys() == null) ? 0 : getBinKeys().hashCode()); hashCode = prime * hashCode + ((getGroupByKeys() == null) ? 0 : getGroupByKeys().hashCode()); hashCode = prime * hashCode + ((getMetricsResults() == null) ? 0 : getMetricsResults().hashCode()); hashCode = prime * hashCode + ((getAttributeResults() == null) ? 0 : getAttributeResults().hashCode()); return hashCode; } @Override public AnalyticsUtteranceResult clone() { try { return (AnalyticsUtteranceResult) 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.lexmodelsv2.model.transform.AnalyticsUtteranceResultMarshaller.getInstance().marshall(this, protocolMarshaller); } }