/* * 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.securityhub.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateInsightRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The ARN of the insight that you want to update. *
*/ private String insightArn; /** ** The updated name for the insight. *
*/ private String name; /** ** The updated filters that define this insight. *
*/ private AwsSecurityFindingFilters filters; /** *
* The updated GroupBy
attribute that defines this insight.
*
* The ARN of the insight that you want to update. *
* * @param insightArn * The ARN of the insight that you want to update. */ public void setInsightArn(String insightArn) { this.insightArn = insightArn; } /** ** The ARN of the insight that you want to update. *
* * @return The ARN of the insight that you want to update. */ public String getInsightArn() { return this.insightArn; } /** ** The ARN of the insight that you want to update. *
* * @param insightArn * The ARN of the insight that you want to update. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateInsightRequest withInsightArn(String insightArn) { setInsightArn(insightArn); return this; } /** ** The updated name for the insight. *
* * @param name * The updated name for the insight. */ public void setName(String name) { this.name = name; } /** ** The updated name for the insight. *
* * @return The updated name for the insight. */ public String getName() { return this.name; } /** ** The updated name for the insight. *
* * @param name * The updated name for the insight. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateInsightRequest withName(String name) { setName(name); return this; } /** ** The updated filters that define this insight. *
* * @param filters * The updated filters that define this insight. */ public void setFilters(AwsSecurityFindingFilters filters) { this.filters = filters; } /** ** The updated filters that define this insight. *
* * @return The updated filters that define this insight. */ public AwsSecurityFindingFilters getFilters() { return this.filters; } /** ** The updated filters that define this insight. *
* * @param filters * The updated filters that define this insight. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateInsightRequest withFilters(AwsSecurityFindingFilters filters) { setFilters(filters); return this; } /** *
* The updated GroupBy
attribute that defines this insight.
*
GroupBy
attribute that defines this insight.
*/
public void setGroupByAttribute(String groupByAttribute) {
this.groupByAttribute = groupByAttribute;
}
/**
*
* The updated GroupBy
attribute that defines this insight.
*
GroupBy
attribute that defines this insight.
*/
public String getGroupByAttribute() {
return this.groupByAttribute;
}
/**
*
* The updated GroupBy
attribute that defines this insight.
*
GroupBy
attribute that defines this insight.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateInsightRequest withGroupByAttribute(String groupByAttribute) {
setGroupByAttribute(groupByAttribute);
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 (getInsightArn() != null)
sb.append("InsightArn: ").append(getInsightArn()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getFilters() != null)
sb.append("Filters: ").append(getFilters()).append(",");
if (getGroupByAttribute() != null)
sb.append("GroupByAttribute: ").append(getGroupByAttribute());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateInsightRequest == false)
return false;
UpdateInsightRequest other = (UpdateInsightRequest) obj;
if (other.getInsightArn() == null ^ this.getInsightArn() == null)
return false;
if (other.getInsightArn() != null && other.getInsightArn().equals(this.getInsightArn()) == 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.getFilters() == null ^ this.getFilters() == null)
return false;
if (other.getFilters() != null && other.getFilters().equals(this.getFilters()) == false)
return false;
if (other.getGroupByAttribute() == null ^ this.getGroupByAttribute() == null)
return false;
if (other.getGroupByAttribute() != null && other.getGroupByAttribute().equals(this.getGroupByAttribute()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getInsightArn() == null) ? 0 : getInsightArn().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getFilters() == null) ? 0 : getFilters().hashCode());
hashCode = prime * hashCode + ((getGroupByAttribute() == null) ? 0 : getGroupByAttribute().hashCode());
return hashCode;
}
@Override
public UpdateInsightRequest clone() {
return (UpdateInsightRequest) super.clone();
}
}