Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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;
 
Get Log Events Result
 
 public class GetLogEventsResult implements SerializableCloneable {
 
A string token used for pagination that points to the next page of results. It must be a value obtained from the response of the previous request. The token expires after 24 hours.

Constraints:
Length: 1 -

 
     private String nextForwardToken;

    
A string token used for pagination that points to the next page of results. It must be a value obtained from the response of the previous request. The token expires after 24 hours.

Constraints:
Length: 1 -

 
     private String nextBackwardToken;

    
Returns the value of the Events property for this object.

Returns:
The value of the Events property for this object.
 
     public java.util.List<OutputLogEventgetEvents() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<OutputLogEvent>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
Sets the value of the Events property for this object.

Parameters:
events The new value for the Events property for this object.
 
     public void setEvents(java.util.Collection<OutputLogEventevents) {
         if (events == null) {
             this. = null;
             return;
         }
         eventsCopy.addAll(events);
         this. = eventsCopy;
     }
    
    
Sets the value of the Events property for this object.

NOTE: This method appends the values to the existing list (if any). Use setEvents(java.util.Collection) or withEvents(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
events The new value for the Events property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public GetLogEventsResult withEvents(OutputLogEvent... events) {
         if (getEvents() == nullsetEvents(new java.util.ArrayList<OutputLogEvent>(events.length));
         for (OutputLogEvent value : events) {
             getEvents().add(value);
         }
         return this;
     }
    
    
Sets the value of the Events property for this object.

Returns a reference to this object so that method calls can be chained together.

Parameters:
events The new value for the Events property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (events == null) {
            this. = null;
        } else {
            eventsCopy.addAll(events);
            this. = eventsCopy;
        }
        return this;
    }

    
A string token used for pagination that points to the next page of results. It must be a value obtained from the response of the previous request. The token expires after 24 hours.

Constraints:
Length: 1 -

Returns:
A string token used for pagination that points to the next page of results. It must be a value obtained from the response of the previous request. The token expires after 24 hours.
    public String getNextForwardToken() {
        return ;
    }
    
    
A string token used for pagination that points to the next page of results. It must be a value obtained from the response of the previous request. The token expires after 24 hours.

Constraints:
Length: 1 -

Parameters:
nextForwardToken A string token used for pagination that points to the next page of results. It must be a value obtained from the response of the previous request. The token expires after 24 hours.
    public void setNextForwardToken(String nextForwardToken) {
        this. = nextForwardToken;
    }
    
    
A string token used for pagination that points to the next page of results. It must be a value obtained from the response of the previous request. The token expires after 24 hours.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 -

Parameters:
nextForwardToken A string token used for pagination that points to the next page of results. It must be a value obtained from the response of the previous request. The token expires after 24 hours.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetLogEventsResult withNextForwardToken(String nextForwardToken) {
        this. = nextForwardToken;
        return this;
    }

    
A string token used for pagination that points to the next page of results. It must be a value obtained from the response of the previous request. The token expires after 24 hours.

Constraints:
Length: 1 -

Returns:
A string token used for pagination that points to the next page of results. It must be a value obtained from the response of the previous request. The token expires after 24 hours.
    public String getNextBackwardToken() {
        return ;
    }
    
    
A string token used for pagination that points to the next page of results. It must be a value obtained from the response of the previous request. The token expires after 24 hours.

Constraints:
Length: 1 -

Parameters:
nextBackwardToken A string token used for pagination that points to the next page of results. It must be a value obtained from the response of the previous request. The token expires after 24 hours.
    public void setNextBackwardToken(String nextBackwardToken) {
        this. = nextBackwardToken;
    }
    
    
A string token used for pagination that points to the next page of results. It must be a value obtained from the response of the previous request. The token expires after 24 hours.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 -

Parameters:
nextBackwardToken A string token used for pagination that points to the next page of results. It must be a value obtained from the response of the previous request. The token expires after 24 hours.
Returns:
A reference to this updated object so that method calls can be chained together.
    public GetLogEventsResult withNextBackwardToken(String nextBackwardToken) {
        this. = nextBackwardToken;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getEvents() != nullsb.append("Events: " + getEvents() + ",");
        if (getNextForwardToken() != nullsb.append("NextForwardToken: " + getNextForwardToken() + ",");
        if (getNextBackwardToken() != nullsb.append("NextBackwardToken: " + getNextBackwardToken() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getEvents() == null) ? 0 : getEvents().hashCode()); 
        hashCode = prime * hashCode + ((getNextForwardToken() == null) ? 0 : getNextForwardToken().hashCode()); 
        hashCode = prime * hashCode + ((getNextBackwardToken() == null) ? 0 : getNextBackwardToken().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof GetLogEventsResult == falsereturn false;
        GetLogEventsResult other = (GetLogEventsResult)obj;
        
        if (other.getEvents() == null ^ this.getEvents() == nullreturn false;
        if (other.getEvents() != null && other.getEvents().equals(this.getEvents()) == falsereturn false
        if (other.getNextForwardToken() == null ^ this.getNextForwardToken() == nullreturn false;
        if (other.getNextForwardToken() != null && other.getNextForwardToken().equals(this.getNextForwardToken()) == falsereturn false
        if (other.getNextBackwardToken() == null ^ this.getNextBackwardToken() == nullreturn false;
        if (other.getNextBackwardToken() != null && other.getNextBackwardToken().equals(this.getNextBackwardToken()) == falsereturn false
        return true;
    }
    
    @Override
    public GetLogEventsResult clone() {
        try {
            return (GetLogEventsResultsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X