/* * 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.logs.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 DescribeLogGroupsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
     * When includeLinkedAccounts is set to True, use this parameter to specify the list of
     * accounts to search. You can specify as many as 20 account IDs in the array.
     * 
* The prefix to match. *
*
     * logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one of these
     * parameters can be passed.
     * 
     * If you specify a string for this parameter, the operation returns only log groups that have names that match the
     * string based on a case-sensitive substring search. For example, if you specify Foo, log groups named
     * FooBar, aws/Foo, and GroupFoo would match, but foo,
     * F/o/o and Froo would not match.
     * 
     * If you specify logGroupNamePattern in your request, then only arn,
     * creationTime, and logGroupName are included in the response.
     * 
     * logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one of these
     * parameters can be passed.
     * 
* The token for the next set of items to return. (You received this token from a previous call.) *
*/ private String nextToken; /** ** The maximum number of items returned. If you don't specify a value, the default is up to 50 items. *
*/ private Integer limit; /** *
     * If you are using a monitoring account, set this to True to have the operation return log groups in
     * the accounts listed in accountIdentifiers.
     * 
     * If this parameter is set to true and accountIdentifiers contains a null value, the
     * operation returns all log groups in the monitoring account and all log groups in all source accounts that are
     * linked to the monitoring account.
     * 
     * When includeLinkedAccounts is set to True, use this parameter to specify the list of
     * accounts to search. You can specify as many as 20 account IDs in the array.
     * 
includeLinkedAccounts is set to True, use this parameter to specify the
     *         list of accounts to search. You can specify as many as 20 account IDs in the array.
     */
    public java.util.List
     * When includeLinkedAccounts is set to True, use this parameter to specify the list of
     * accounts to search. You can specify as many as 20 account IDs in the array.
     * 
includeLinkedAccounts is set to True, use this parameter to specify the
     *        list of accounts to search. You can specify as many as 20 account IDs in the array.
     */
    public void setAccountIdentifiers(java.util.Collection
     * When includeLinkedAccounts is set to True, use this parameter to specify the list of
     * accounts to search. You can specify as many as 20 account IDs in the array.
     * 
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAccountIdentifiers(java.util.Collection)} or {@link #withAccountIdentifiers(java.util.Collection)} if * you want to override the existing values. *
* * @param accountIdentifiers * WhenincludeLinkedAccounts is set to True, use this parameter to specify the
     *        list of accounts to search. You can specify as many as 20 account IDs in the array.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DescribeLogGroupsRequest withAccountIdentifiers(String... accountIdentifiers) {
        if (this.accountIdentifiers == null) {
            setAccountIdentifiers(new com.amazonaws.internal.SdkInternalList
     * When includeLinkedAccounts is set to True, use this parameter to specify the list of
     * accounts to search. You can specify as many as 20 account IDs in the array.
     * 
includeLinkedAccounts is set to True, use this parameter to specify the
     *        list of accounts to search. You can specify as many as 20 account IDs in the array.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DescribeLogGroupsRequest withAccountIdentifiers(java.util.Collection* The prefix to match. *
*
     * logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one of these
     * parameters can be passed.
     * 
     *        logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one of
     *        these parameters can be passed.
     *        
* The prefix to match. *
*
     * logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one of these
     * parameters can be passed.
     * 
     *         logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one of
     *         these parameters can be passed.
     *         
* The prefix to match. *
*
     * logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one of these
     * parameters can be passed.
     * 
     *        logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one of
     *        these parameters can be passed.
     *        
     * If you specify a string for this parameter, the operation returns only log groups that have names that match the
     * string based on a case-sensitive substring search. For example, if you specify Foo, log groups named
     * FooBar, aws/Foo, and GroupFoo would match, but foo,
     * F/o/o and Froo would not match.
     * 
     * If you specify logGroupNamePattern in your request, then only arn,
     * creationTime, and logGroupName are included in the response.
     * 
     * logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one of these
     * parameters can be passed.
     * 
Foo,
     *        log groups named FooBar, aws/Foo, and GroupFoo would match, but
     *        foo, F/o/o and Froo would not match.
     *        
     *        If you specify logGroupNamePattern in your request, then only arn,
     *        creationTime, and logGroupName are included in the response.
     *        
     *        logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one of
     *        these parameters can be passed.
     *        
     * If you specify a string for this parameter, the operation returns only log groups that have names that match the
     * string based on a case-sensitive substring search. For example, if you specify Foo, log groups named
     * FooBar, aws/Foo, and GroupFoo would match, but foo,
     * F/o/o and Froo would not match.
     * 
     * If you specify logGroupNamePattern in your request, then only arn,
     * creationTime, and logGroupName are included in the response.
     * 
     * logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one of these
     * parameters can be passed.
     * 
Foo
     *         , log groups named FooBar, aws/Foo, and GroupFoo would match, but
     *         foo, F/o/o and Froo would not match.
     *         
     *         If you specify logGroupNamePattern in your request, then only arn,
     *         creationTime, and logGroupName are included in the response.
     *         
     *         logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one of
     *         these parameters can be passed.
     *         
     * If you specify a string for this parameter, the operation returns only log groups that have names that match the
     * string based on a case-sensitive substring search. For example, if you specify Foo, log groups named
     * FooBar, aws/Foo, and GroupFoo would match, but foo,
     * F/o/o and Froo would not match.
     * 
     * If you specify logGroupNamePattern in your request, then only arn,
     * creationTime, and logGroupName are included in the response.
     * 
     * logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one of these
     * parameters can be passed.
     * 
Foo,
     *        log groups named FooBar, aws/Foo, and GroupFoo would match, but
     *        foo, F/o/o and Froo would not match.
     *        
     *        If you specify logGroupNamePattern in your request, then only arn,
     *        creationTime, and logGroupName are included in the response.
     *        
     *        logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one of
     *        these parameters can be passed.
     *        
* The token for the next set of items to return. (You received this token from a previous call.) *
* * @param nextToken * The token for the next set of items to return. (You received this token from a previous call.) */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** ** The token for the next set of items to return. (You received this token from a previous call.) *
* * @return The token for the next set of items to return. (You received this token from a previous call.) */ public String getNextToken() { return this.nextToken; } /** ** The token for the next set of items to return. (You received this token from a previous call.) *
* * @param nextToken * The token for the next set of items to return. (You received this token from a previous call.) * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeLogGroupsRequest withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** ** The maximum number of items returned. If you don't specify a value, the default is up to 50 items. *
* * @param limit * The maximum number of items returned. If you don't specify a value, the default is up to 50 items. */ public void setLimit(Integer limit) { this.limit = limit; } /** ** The maximum number of items returned. If you don't specify a value, the default is up to 50 items. *
* * @return The maximum number of items returned. If you don't specify a value, the default is up to 50 items. */ public Integer getLimit() { return this.limit; } /** ** The maximum number of items returned. If you don't specify a value, the default is up to 50 items. *
* * @param limit * The maximum number of items returned. If you don't specify a value, the default is up to 50 items. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeLogGroupsRequest withLimit(Integer limit) { setLimit(limit); return this; } /** *
     * If you are using a monitoring account, set this to True to have the operation return log groups in
     * the accounts listed in accountIdentifiers.
     * 
     * If this parameter is set to true and accountIdentifiers contains a null value, the
     * operation returns all log groups in the monitoring account and all log groups in all source accounts that are
     * linked to the monitoring account.
     * 
True to have the operation return log
     *        groups in the accounts listed in accountIdentifiers.
     *        
     *        If this parameter is set to true and accountIdentifiers contains a null value,
     *        the operation returns all log groups in the monitoring account and all log groups in all source accounts
     *        that are linked to the monitoring account.
     */
    public void setIncludeLinkedAccounts(Boolean includeLinkedAccounts) {
        this.includeLinkedAccounts = includeLinkedAccounts;
    }
    /**
     * 
     * If you are using a monitoring account, set this to True to have the operation return log groups in
     * the accounts listed in accountIdentifiers.
     * 
     * If this parameter is set to true and accountIdentifiers contains a null value, the
     * operation returns all log groups in the monitoring account and all log groups in all source accounts that are
     * linked to the monitoring account.
     * 
True to have the operation return log
     *         groups in the accounts listed in accountIdentifiers.
     *         
     *         If this parameter is set to true and accountIdentifiers contains a null value,
     *         the operation returns all log groups in the monitoring account and all log groups in all source accounts
     *         that are linked to the monitoring account.
     */
    public Boolean getIncludeLinkedAccounts() {
        return this.includeLinkedAccounts;
    }
    /**
     * 
     * If you are using a monitoring account, set this to True to have the operation return log groups in
     * the accounts listed in accountIdentifiers.
     * 
     * If this parameter is set to true and accountIdentifiers contains a null value, the
     * operation returns all log groups in the monitoring account and all log groups in all source accounts that are
     * linked to the monitoring account.
     * 
True to have the operation return log
     *        groups in the accounts listed in accountIdentifiers.
     *        
     *        If this parameter is set to true and accountIdentifiers contains a null value,
     *        the operation returns all log groups in the monitoring account and all log groups in all source accounts
     *        that are linked to the monitoring account.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DescribeLogGroupsRequest withIncludeLinkedAccounts(Boolean includeLinkedAccounts) {
        setIncludeLinkedAccounts(includeLinkedAccounts);
        return this;
    }
    /**
     * 
     * If you are using a monitoring account, set this to True to have the operation return log groups in
     * the accounts listed in accountIdentifiers.
     * 
     * If this parameter is set to true and accountIdentifiers contains a null value, the
     * operation returns all log groups in the monitoring account and all log groups in all source accounts that are
     * linked to the monitoring account.
     * 
True to have the operation return log
     *         groups in the accounts listed in accountIdentifiers.
     *         
     *         If this parameter is set to true and accountIdentifiers contains a null value,
     *         the operation returns all log groups in the monitoring account and all log groups in all source accounts
     *         that are linked to the monitoring account.
     */
    public Boolean isIncludeLinkedAccounts() {
        return this.includeLinkedAccounts;
    }
    /**
     * 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 (getAccountIdentifiers() != null)
            sb.append("AccountIdentifiers: ").append(getAccountIdentifiers()).append(",");
        if (getLogGroupNamePrefix() != null)
            sb.append("LogGroupNamePrefix: ").append(getLogGroupNamePrefix()).append(",");
        if (getLogGroupNamePattern() != null)
            sb.append("LogGroupNamePattern: ").append(getLogGroupNamePattern()).append(",");
        if (getNextToken() != null)
            sb.append("NextToken: ").append(getNextToken()).append(",");
        if (getLimit() != null)
            sb.append("Limit: ").append(getLimit()).append(",");
        if (getIncludeLinkedAccounts() != null)
            sb.append("IncludeLinkedAccounts: ").append(getIncludeLinkedAccounts());
        sb.append("}");
        return sb.toString();
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (obj instanceof DescribeLogGroupsRequest == false)
            return false;
        DescribeLogGroupsRequest other = (DescribeLogGroupsRequest) obj;
        if (other.getAccountIdentifiers() == null ^ this.getAccountIdentifiers() == null)
            return false;
        if (other.getAccountIdentifiers() != null && other.getAccountIdentifiers().equals(this.getAccountIdentifiers()) == false)
            return false;
        if (other.getLogGroupNamePrefix() == null ^ this.getLogGroupNamePrefix() == null)
            return false;
        if (other.getLogGroupNamePrefix() != null && other.getLogGroupNamePrefix().equals(this.getLogGroupNamePrefix()) == false)
            return false;
        if (other.getLogGroupNamePattern() == null ^ this.getLogGroupNamePattern() == null)
            return false;
        if (other.getLogGroupNamePattern() != null && other.getLogGroupNamePattern().equals(this.getLogGroupNamePattern()) == 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.getLimit() == null ^ this.getLimit() == null)
            return false;
        if (other.getLimit() != null && other.getLimit().equals(this.getLimit()) == false)
            return false;
        if (other.getIncludeLinkedAccounts() == null ^ this.getIncludeLinkedAccounts() == null)
            return false;
        if (other.getIncludeLinkedAccounts() != null && other.getIncludeLinkedAccounts().equals(this.getIncludeLinkedAccounts()) == false)
            return false;
        return true;
    }
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        hashCode = prime * hashCode + ((getAccountIdentifiers() == null) ? 0 : getAccountIdentifiers().hashCode());
        hashCode = prime * hashCode + ((getLogGroupNamePrefix() == null) ? 0 : getLogGroupNamePrefix().hashCode());
        hashCode = prime * hashCode + ((getLogGroupNamePattern() == null) ? 0 : getLogGroupNamePattern().hashCode());
        hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
        hashCode = prime * hashCode + ((getLimit() == null) ? 0 : getLimit().hashCode());
        hashCode = prime * hashCode + ((getIncludeLinkedAccounts() == null) ? 0 : getIncludeLinkedAccounts().hashCode());
        return hashCode;
    }
    @Override
    public DescribeLogGroupsRequest clone() {
        return (DescribeLogGroupsRequest) super.clone();
    }
}