com.amazonaws.services.connectwisdom.model.QuickResponseQueryField Maven / Gradle / Ivy
Show all versions of aws-java-sdk-connectwisdom Show documentation
/*
* Copyright 2019-2024 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.connectwisdom.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The quick response fields to query quick responses by.
*
*
* The following is the list of supported field names.
*
*
* -
*
* content
*
*
* -
*
* name
*
*
* -
*
* description
*
*
* -
*
* shortcutKey
*
*
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class QuickResponseQueryField implements Serializable, Cloneable, StructuredPojo {
/**
*
* Whether the query expects only exact matches on the attribute field values. The results of the query will only
* include exact matches if this parameter is set to false.
*
*/
private Boolean allowFuzziness;
/**
*
* The name of the attribute to query the quick responses by.
*
*/
private String name;
/**
*
* The operator to use for matching attribute field values in the query.
*
*/
private String operator;
/**
*
* The importance of the attribute field when calculating query result relevancy scores. The value set for this
* parameter affects the ordering of search results.
*
*/
private String priority;
/**
*
* The values of the attribute to query the quick responses by.
*
*/
private java.util.List values;
/**
*
* Whether the query expects only exact matches on the attribute field values. The results of the query will only
* include exact matches if this parameter is set to false.
*
*
* @param allowFuzziness
* Whether the query expects only exact matches on the attribute field values. The results of the query will
* only include exact matches if this parameter is set to false.
*/
public void setAllowFuzziness(Boolean allowFuzziness) {
this.allowFuzziness = allowFuzziness;
}
/**
*
* Whether the query expects only exact matches on the attribute field values. The results of the query will only
* include exact matches if this parameter is set to false.
*
*
* @return Whether the query expects only exact matches on the attribute field values. The results of the query will
* only include exact matches if this parameter is set to false.
*/
public Boolean getAllowFuzziness() {
return this.allowFuzziness;
}
/**
*
* Whether the query expects only exact matches on the attribute field values. The results of the query will only
* include exact matches if this parameter is set to false.
*
*
* @param allowFuzziness
* Whether the query expects only exact matches on the attribute field values. The results of the query will
* only include exact matches if this parameter is set to false.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QuickResponseQueryField withAllowFuzziness(Boolean allowFuzziness) {
setAllowFuzziness(allowFuzziness);
return this;
}
/**
*
* Whether the query expects only exact matches on the attribute field values. The results of the query will only
* include exact matches if this parameter is set to false.
*
*
* @return Whether the query expects only exact matches on the attribute field values. The results of the query will
* only include exact matches if this parameter is set to false.
*/
public Boolean isAllowFuzziness() {
return this.allowFuzziness;
}
/**
*
* The name of the attribute to query the quick responses by.
*
*
* @param name
* The name of the attribute to query the quick responses by.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the attribute to query the quick responses by.
*
*
* @return The name of the attribute to query the quick responses by.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the attribute to query the quick responses by.
*
*
* @param name
* The name of the attribute to query the quick responses by.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QuickResponseQueryField withName(String name) {
setName(name);
return this;
}
/**
*
* The operator to use for matching attribute field values in the query.
*
*
* @param operator
* The operator to use for matching attribute field values in the query.
* @see QuickResponseQueryOperator
*/
public void setOperator(String operator) {
this.operator = operator;
}
/**
*
* The operator to use for matching attribute field values in the query.
*
*
* @return The operator to use for matching attribute field values in the query.
* @see QuickResponseQueryOperator
*/
public String getOperator() {
return this.operator;
}
/**
*
* The operator to use for matching attribute field values in the query.
*
*
* @param operator
* The operator to use for matching attribute field values in the query.
* @return Returns a reference to this object so that method calls can be chained together.
* @see QuickResponseQueryOperator
*/
public QuickResponseQueryField withOperator(String operator) {
setOperator(operator);
return this;
}
/**
*
* The operator to use for matching attribute field values in the query.
*
*
* @param operator
* The operator to use for matching attribute field values in the query.
* @return Returns a reference to this object so that method calls can be chained together.
* @see QuickResponseQueryOperator
*/
public QuickResponseQueryField withOperator(QuickResponseQueryOperator operator) {
this.operator = operator.toString();
return this;
}
/**
*
* The importance of the attribute field when calculating query result relevancy scores. The value set for this
* parameter affects the ordering of search results.
*
*
* @param priority
* The importance of the attribute field when calculating query result relevancy scores. The value set for
* this parameter affects the ordering of search results.
* @see Priority
*/
public void setPriority(String priority) {
this.priority = priority;
}
/**
*
* The importance of the attribute field when calculating query result relevancy scores. The value set for this
* parameter affects the ordering of search results.
*
*
* @return The importance of the attribute field when calculating query result relevancy scores. The value set for
* this parameter affects the ordering of search results.
* @see Priority
*/
public String getPriority() {
return this.priority;
}
/**
*
* The importance of the attribute field when calculating query result relevancy scores. The value set for this
* parameter affects the ordering of search results.
*
*
* @param priority
* The importance of the attribute field when calculating query result relevancy scores. The value set for
* this parameter affects the ordering of search results.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Priority
*/
public QuickResponseQueryField withPriority(String priority) {
setPriority(priority);
return this;
}
/**
*
* The importance of the attribute field when calculating query result relevancy scores. The value set for this
* parameter affects the ordering of search results.
*
*
* @param priority
* The importance of the attribute field when calculating query result relevancy scores. The value set for
* this parameter affects the ordering of search results.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Priority
*/
public QuickResponseQueryField withPriority(Priority priority) {
this.priority = priority.toString();
return this;
}
/**
*
* The values of the attribute to query the quick responses by.
*
*
* @return The values of the attribute to query the quick responses by.
*/
public java.util.List getValues() {
return values;
}
/**
*
* The values of the attribute to query the quick responses by.
*
*
* @param values
* The values of the attribute to query the quick responses by.
*/
public void setValues(java.util.Collection values) {
if (values == null) {
this.values = null;
return;
}
this.values = new java.util.ArrayList(values);
}
/**
*
* The values of the attribute to query the quick responses by.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setValues(java.util.Collection)} or {@link #withValues(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param values
* The values of the attribute to query the quick responses by.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QuickResponseQueryField withValues(String... values) {
if (this.values == null) {
setValues(new java.util.ArrayList(values.length));
}
for (String ele : values) {
this.values.add(ele);
}
return this;
}
/**
*
* The values of the attribute to query the quick responses by.
*
*
* @param values
* The values of the attribute to query the quick responses by.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public QuickResponseQueryField withValues(java.util.Collection values) {
setValues(values);
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 (getAllowFuzziness() != null)
sb.append("AllowFuzziness: ").append(getAllowFuzziness()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getOperator() != null)
sb.append("Operator: ").append(getOperator()).append(",");
if (getPriority() != null)
sb.append("Priority: ").append(getPriority()).append(",");
if (getValues() != null)
sb.append("Values: ").append(getValues());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof QuickResponseQueryField == false)
return false;
QuickResponseQueryField other = (QuickResponseQueryField) obj;
if (other.getAllowFuzziness() == null ^ this.getAllowFuzziness() == null)
return false;
if (other.getAllowFuzziness() != null && other.getAllowFuzziness().equals(this.getAllowFuzziness()) == 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.getOperator() == null ^ this.getOperator() == null)
return false;
if (other.getOperator() != null && other.getOperator().equals(this.getOperator()) == false)
return false;
if (other.getPriority() == null ^ this.getPriority() == null)
return false;
if (other.getPriority() != null && other.getPriority().equals(this.getPriority()) == false)
return false;
if (other.getValues() == null ^ this.getValues() == null)
return false;
if (other.getValues() != null && other.getValues().equals(this.getValues()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAllowFuzziness() == null) ? 0 : getAllowFuzziness().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getOperator() == null) ? 0 : getOperator().hashCode());
hashCode = prime * hashCode + ((getPriority() == null) ? 0 : getPriority().hashCode());
hashCode = prime * hashCode + ((getValues() == null) ? 0 : getValues().hashCode());
return hashCode;
}
@Override
public QuickResponseQueryField clone() {
try {
return (QuickResponseQueryField) 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.connectwisdom.model.transform.QuickResponseQueryFieldMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}