/* * 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.devopsguru.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 SearchOrganizationInsightsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The ID of the Amazon Web Services account. *

*/ private java.util.List accountIds; private StartTimeRange startTimeRange; /** *

* A SearchOrganizationInsightsFilters object that is used to set the severity and status filters on * your insight search. *

*/ private SearchOrganizationInsightsFilters filters; /** *

* The maximum number of results to return with a single call. To retrieve the remaining results, make another call * with the returned nextToken value. *

*/ private Integer maxResults; /** *

* The pagination token to use to retrieve the next page of results for this operation. If this value is null, it * retrieves the first page. *

*/ private String nextToken; /** *

* The type of insights you are searching for (REACTIVE or PROACTIVE). *

*/ private String type; /** *

* The ID of the Amazon Web Services account. *

* * @return The ID of the Amazon Web Services account. */ public java.util.List getAccountIds() { return accountIds; } /** *

* The ID of the Amazon Web Services account. *

* * @param accountIds * The ID of the Amazon Web Services account. */ public void setAccountIds(java.util.Collection accountIds) { if (accountIds == null) { this.accountIds = null; return; } this.accountIds = new java.util.ArrayList(accountIds); } /** *

* The ID of the Amazon Web Services account. *

*

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

* * @param accountIds * The ID of the Amazon Web Services account. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchOrganizationInsightsRequest withAccountIds(String... accountIds) { if (this.accountIds == null) { setAccountIds(new java.util.ArrayList(accountIds.length)); } for (String ele : accountIds) { this.accountIds.add(ele); } return this; } /** *

* The ID of the Amazon Web Services account. *

* * @param accountIds * The ID of the Amazon Web Services account. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchOrganizationInsightsRequest withAccountIds(java.util.Collection accountIds) { setAccountIds(accountIds); return this; } /** * @param startTimeRange */ public void setStartTimeRange(StartTimeRange startTimeRange) { this.startTimeRange = startTimeRange; } /** * @return */ public StartTimeRange getStartTimeRange() { return this.startTimeRange; } /** * @param startTimeRange * @return Returns a reference to this object so that method calls can be chained together. */ public SearchOrganizationInsightsRequest withStartTimeRange(StartTimeRange startTimeRange) { setStartTimeRange(startTimeRange); return this; } /** *

* A SearchOrganizationInsightsFilters object that is used to set the severity and status filters on * your insight search. *

* * @param filters * A SearchOrganizationInsightsFilters object that is used to set the severity and status * filters on your insight search. */ public void setFilters(SearchOrganizationInsightsFilters filters) { this.filters = filters; } /** *

* A SearchOrganizationInsightsFilters object that is used to set the severity and status filters on * your insight search. *

* * @return A SearchOrganizationInsightsFilters object that is used to set the severity and status * filters on your insight search. */ public SearchOrganizationInsightsFilters getFilters() { return this.filters; } /** *

* A SearchOrganizationInsightsFilters object that is used to set the severity and status filters on * your insight search. *

* * @param filters * A SearchOrganizationInsightsFilters object that is used to set the severity and status * filters on your insight search. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchOrganizationInsightsRequest withFilters(SearchOrganizationInsightsFilters filters) { setFilters(filters); return this; } /** *

* The maximum number of results to return with a single call. To retrieve the remaining results, make another call * with the returned nextToken value. *

* * @param maxResults * The maximum number of results to return with a single call. To retrieve the remaining results, make * another call with the returned nextToken value. */ public void setMaxResults(Integer maxResults) { this.maxResults = maxResults; } /** *

* The maximum number of results to return with a single call. To retrieve the remaining results, make another call * with the returned nextToken value. *

* * @return The maximum number of results to return with a single call. To retrieve the remaining results, make * another call with the returned nextToken value. */ public Integer getMaxResults() { return this.maxResults; } /** *

* The maximum number of results to return with a single call. To retrieve the remaining results, make another call * with the returned nextToken value. *

* * @param maxResults * The maximum number of results to return with a single call. To retrieve the remaining results, make * another call with the returned nextToken value. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchOrganizationInsightsRequest withMaxResults(Integer maxResults) { setMaxResults(maxResults); return this; } /** *

* The pagination token to use to retrieve the next page of results for this operation. If this value is null, it * retrieves the first page. *

* * @param nextToken * The pagination token to use to retrieve the next page of results for this operation. If this value is * null, it retrieves the first page. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* The pagination token to use to retrieve the next page of results for this operation. If this value is null, it * retrieves the first page. *

* * @return The pagination token to use to retrieve the next page of results for this operation. If this value is * null, it retrieves the first page. */ public String getNextToken() { return this.nextToken; } /** *

* The pagination token to use to retrieve the next page of results for this operation. If this value is null, it * retrieves the first page. *

* * @param nextToken * The pagination token to use to retrieve the next page of results for this operation. If this value is * null, it retrieves the first page. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchOrganizationInsightsRequest withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** *

* The type of insights you are searching for (REACTIVE or PROACTIVE). *

* * @param type * The type of insights you are searching for (REACTIVE or PROACTIVE). * @see InsightType */ public void setType(String type) { this.type = type; } /** *

* The type of insights you are searching for (REACTIVE or PROACTIVE). *

* * @return The type of insights you are searching for (REACTIVE or PROACTIVE). * @see InsightType */ public String getType() { return this.type; } /** *

* The type of insights you are searching for (REACTIVE or PROACTIVE). *

* * @param type * The type of insights you are searching for (REACTIVE or PROACTIVE). * @return Returns a reference to this object so that method calls can be chained together. * @see InsightType */ public SearchOrganizationInsightsRequest withType(String type) { setType(type); return this; } /** *

* The type of insights you are searching for (REACTIVE or PROACTIVE). *

* * @param type * The type of insights you are searching for (REACTIVE or PROACTIVE). * @return Returns a reference to this object so that method calls can be chained together. * @see InsightType */ public SearchOrganizationInsightsRequest withType(InsightType type) { this.type = type.toString(); 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 (getAccountIds() != null) sb.append("AccountIds: ").append(getAccountIds()).append(","); if (getStartTimeRange() != null) sb.append("StartTimeRange: ").append(getStartTimeRange()).append(","); if (getFilters() != null) sb.append("Filters: ").append(getFilters()).append(","); if (getMaxResults() != null) sb.append("MaxResults: ").append(getMaxResults()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()).append(","); if (getType() != null) sb.append("Type: ").append(getType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SearchOrganizationInsightsRequest == false) return false; SearchOrganizationInsightsRequest other = (SearchOrganizationInsightsRequest) obj; if (other.getAccountIds() == null ^ this.getAccountIds() == null) return false; if (other.getAccountIds() != null && other.getAccountIds().equals(this.getAccountIds()) == false) return false; if (other.getStartTimeRange() == null ^ this.getStartTimeRange() == null) return false; if (other.getStartTimeRange() != null && other.getStartTimeRange().equals(this.getStartTimeRange()) == 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.getMaxResults() == null ^ this.getMaxResults() == null) return false; if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAccountIds() == null) ? 0 : getAccountIds().hashCode()); hashCode = prime * hashCode + ((getStartTimeRange() == null) ? 0 : getStartTimeRange().hashCode()); hashCode = prime * hashCode + ((getFilters() == null) ? 0 : getFilters().hashCode()); hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); return hashCode; } @Override public SearchOrganizationInsightsRequest clone() { return (SearchOrganizationInsightsRequest) super.clone(); } }