All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.cloudtrail.model.LookupEventsRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS CloudTrail module holds the client classes that are used for communicating with AWS CloudTrail Service

There is a newer version: 1.11.7
Show newest version
/*
 * Copyright 2010-2016 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.cloudtrail.model;

import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;

/**
 * 

* Contains a request for LookupEvents. *

*/ public class LookupEventsRequest extends AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* Contains a list of lookup attributes. Currently the list can contain only * one item. *

*/ private com.amazonaws.internal.SdkInternalList lookupAttributes; /** *

* Specifies that only events that occur after or at the specified time are * returned. If the specified start time is after the specified end time, an * error is returned. *

*/ private java.util.Date startTime; /** *

* Specifies that only events that occur before or at the specified time are * returned. If the specified end time is before the specified start time, * an error is returned. *

*/ private java.util.Date endTime; /** *

* The number of events to return. Possible values are 1 through 50. The * default is 10. *

*/ private Integer maxResults; /** *

* The token to use to get the next page of results after a previous API * call. This token must be passed in with the same parameters that were * specified in the the original call. For example, if the original call * specified an AttributeKey of 'Username' with a value of 'root', the call * with NextToken should include those same parameters. *

*/ private String nextToken; /** *

* Contains a list of lookup attributes. Currently the list can contain only * one item. *

* * @return Contains a list of lookup attributes. Currently the list can * contain only one item. */ public java.util.List getLookupAttributes() { if (lookupAttributes == null) { lookupAttributes = new com.amazonaws.internal.SdkInternalList(); } return lookupAttributes; } /** *

* Contains a list of lookup attributes. Currently the list can contain only * one item. *

* * @param lookupAttributes * Contains a list of lookup attributes. Currently the list can * contain only one item. */ public void setLookupAttributes( java.util.Collection lookupAttributes) { if (lookupAttributes == null) { this.lookupAttributes = null; return; } this.lookupAttributes = new com.amazonaws.internal.SdkInternalList( lookupAttributes); } /** *

* Contains a list of lookup attributes. Currently the list can contain only * one item. *

*

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

* * @param lookupAttributes * Contains a list of lookup attributes. Currently the list can * contain only one item. * @return Returns a reference to this object so that method calls can be * chained together. */ public LookupEventsRequest withLookupAttributes( LookupAttribute... lookupAttributes) { if (this.lookupAttributes == null) { setLookupAttributes(new com.amazonaws.internal.SdkInternalList( lookupAttributes.length)); } for (LookupAttribute ele : lookupAttributes) { this.lookupAttributes.add(ele); } return this; } /** *

* Contains a list of lookup attributes. Currently the list can contain only * one item. *

* * @param lookupAttributes * Contains a list of lookup attributes. Currently the list can * contain only one item. * @return Returns a reference to this object so that method calls can be * chained together. */ public LookupEventsRequest withLookupAttributes( java.util.Collection lookupAttributes) { setLookupAttributes(lookupAttributes); return this; } /** *

* Specifies that only events that occur after or at the specified time are * returned. If the specified start time is after the specified end time, an * error is returned. *

* * @param startTime * Specifies that only events that occur after or at the specified * time are returned. If the specified start time is after the * specified end time, an error is returned. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** *

* Specifies that only events that occur after or at the specified time are * returned. If the specified start time is after the specified end time, an * error is returned. *

* * @return Specifies that only events that occur after or at the specified * time are returned. If the specified start time is after the * specified end time, an error is returned. */ public java.util.Date getStartTime() { return this.startTime; } /** *

* Specifies that only events that occur after or at the specified time are * returned. If the specified start time is after the specified end time, an * error is returned. *

* * @param startTime * Specifies that only events that occur after or at the specified * time are returned. If the specified start time is after the * specified end time, an error is returned. * @return Returns a reference to this object so that method calls can be * chained together. */ public LookupEventsRequest withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** *

* Specifies that only events that occur before or at the specified time are * returned. If the specified end time is before the specified start time, * an error is returned. *

* * @param endTime * Specifies that only events that occur before or at the specified * time are returned. If the specified end time is before the * specified start time, an error is returned. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** *

* Specifies that only events that occur before or at the specified time are * returned. If the specified end time is before the specified start time, * an error is returned. *

* * @return Specifies that only events that occur before or at the specified * time are returned. If the specified end time is before the * specified start time, an error is returned. */ public java.util.Date getEndTime() { return this.endTime; } /** *

* Specifies that only events that occur before or at the specified time are * returned. If the specified end time is before the specified start time, * an error is returned. *

* * @param endTime * Specifies that only events that occur before or at the specified * time are returned. If the specified end time is before the * specified start time, an error is returned. * @return Returns a reference to this object so that method calls can be * chained together. */ public LookupEventsRequest withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** *

* The number of events to return. Possible values are 1 through 50. The * default is 10. *

* * @param maxResults * The number of events to return. Possible values are 1 through 50. * The default is 10. */ public void setMaxResults(Integer maxResults) { this.maxResults = maxResults; } /** *

* The number of events to return. Possible values are 1 through 50. The * default is 10. *

* * @return The number of events to return. Possible values are 1 through 50. * The default is 10. */ public Integer getMaxResults() { return this.maxResults; } /** *

* The number of events to return. Possible values are 1 through 50. The * default is 10. *

* * @param maxResults * The number of events to return. Possible values are 1 through 50. * The default is 10. * @return Returns a reference to this object so that method calls can be * chained together. */ public LookupEventsRequest withMaxResults(Integer maxResults) { setMaxResults(maxResults); return this; } /** *

* The token to use to get the next page of results after a previous API * call. This token must be passed in with the same parameters that were * specified in the the original call. For example, if the original call * specified an AttributeKey of 'Username' with a value of 'root', the call * with NextToken should include those same parameters. *

* * @param nextToken * The token to use to get the next page of results after a previous * API call. This token must be passed in with the same parameters * that were specified in the the original call. For example, if the * original call specified an AttributeKey of 'Username' with a value * of 'root', the call with NextToken should include those same * parameters. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* The token to use to get the next page of results after a previous API * call. This token must be passed in with the same parameters that were * specified in the the original call. For example, if the original call * specified an AttributeKey of 'Username' with a value of 'root', the call * with NextToken should include those same parameters. *

* * @return The token to use to get the next page of results after a previous * API call. This token must be passed in with the same parameters * that were specified in the the original call. For example, if the * original call specified an AttributeKey of 'Username' with a * value of 'root', the call with NextToken should include those * same parameters. */ public String getNextToken() { return this.nextToken; } /** *

* The token to use to get the next page of results after a previous API * call. This token must be passed in with the same parameters that were * specified in the the original call. For example, if the original call * specified an AttributeKey of 'Username' with a value of 'root', the call * with NextToken should include those same parameters. *

* * @param nextToken * The token to use to get the next page of results after a previous * API call. This token must be passed in with the same parameters * that were specified in the the original call. For example, if the * original call specified an AttributeKey of 'Username' with a value * of 'root', the call with NextToken should include those same * parameters. * @return Returns a reference to this object so that method calls can be * chained together. */ public LookupEventsRequest withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getLookupAttributes() != null) sb.append("LookupAttributes: " + getLookupAttributes() + ","); if (getStartTime() != null) sb.append("StartTime: " + getStartTime() + ","); if (getEndTime() != null) sb.append("EndTime: " + getEndTime() + ","); if (getMaxResults() != null) sb.append("MaxResults: " + getMaxResults() + ","); if (getNextToken() != null) sb.append("NextToken: " + getNextToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LookupEventsRequest == false) return false; LookupEventsRequest other = (LookupEventsRequest) obj; if (other.getLookupAttributes() == null ^ this.getLookupAttributes() == null) return false; if (other.getLookupAttributes() != null && other.getLookupAttributes().equals( this.getLookupAttributes()) == false) return false; if (other.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; if (other.getEndTime() == null ^ this.getEndTime() == null) return false; if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == 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; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLookupAttributes() == null) ? 0 : getLookupAttributes() .hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); return hashCode; } @Override public LookupEventsRequest clone() { return (LookupEventsRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy