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;
 

A log stream is sequence of log events that share the same emitter.

 
 public class LogStream implements SerializableCloneable {
 
     private String logStreamName;

    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

Constraints:
Range: 0 -

 
     private Long creationTime;

    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

Constraints:
Range: 0 -

 
     private Long firstEventTimestamp;

    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

Constraints:
Range: 0 -

 
     private Long lastEventTimestamp;

    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

Constraints:
Range: 0 -

 
     private Long lastIngestionTime;

    
A string token used for making PutLogEvents requests. A sequenceToken can only be used once, and PutLogEvents requests must include the sequenceToken obtained from the response of the previous request.

Constraints:
Length: 1 -

 
     private String uploadSequenceToken;
 
     private String arn;
 
     private Long storedBytes;

    
Returns the value of the LogStreamName property for this object.

Constraints:
Length: 1 - 512
Pattern: [^:*]*

Returns:
The value of the LogStreamName property for this object.
 
     public String getLogStreamName() {
         return ;
     }
    
    
Sets the value of the LogStreamName property for this object.

Constraints:
Length: 1 - 512
Pattern: [^:*]*

Parameters:
logStreamName The new value for the LogStreamName property for this object.
    public void setLogStreamName(String logStreamName) {
        this. = logStreamName;
    }
    
    
Sets the value of the LogStreamName property for this object.

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

Constraints:
Length: 1 - 512
Pattern: [^:*]*

Parameters:
logStreamName The new value for the LogStreamName property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LogStream withLogStreamName(String logStreamName) {
        this. = logStreamName;
        return this;
    }

    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

Constraints:
Range: 0 -

Returns:
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.
    public Long getCreationTime() {
        return ;
    }
    
    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

Constraints:
Range: 0 -

Parameters:
creationTime A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.
    public void setCreationTime(Long creationTime) {
        this. = creationTime;
    }
    
    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

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

Constraints:
Range: 0 -

Parameters:
creationTime A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LogStream withCreationTime(Long creationTime) {
        this. = creationTime;
        return this;
    }

    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

Constraints:
Range: 0 -

Returns:
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.
    public Long getFirstEventTimestamp() {
        return ;
    }
    
    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

Constraints:
Range: 0 -

Parameters:
firstEventTimestamp A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.
    public void setFirstEventTimestamp(Long firstEventTimestamp) {
        this. = firstEventTimestamp;
    }
    
    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

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

Constraints:
Range: 0 -

Parameters:
firstEventTimestamp A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LogStream withFirstEventTimestamp(Long firstEventTimestamp) {
        this. = firstEventTimestamp;
        return this;
    }

    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

Constraints:
Range: 0 -

Returns:
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.
    public Long getLastEventTimestamp() {
        return ;
    }
    
    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

Constraints:
Range: 0 -

Parameters:
lastEventTimestamp A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.
    public void setLastEventTimestamp(Long lastEventTimestamp) {
        this. = lastEventTimestamp;
    }
    
    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

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

Constraints:
Range: 0 -

Parameters:
lastEventTimestamp A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LogStream withLastEventTimestamp(Long lastEventTimestamp) {
        this. = lastEventTimestamp;
        return this;
    }

    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

Constraints:
Range: 0 -

Returns:
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.
    public Long getLastIngestionTime() {
        return ;
    }
    
    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

Constraints:
Range: 0 -

Parameters:
lastIngestionTime A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.
    public void setLastIngestionTime(Long lastIngestionTime) {
        this. = lastIngestionTime;
    }
    
    
A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.

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

Constraints:
Range: 0 -

Parameters:
lastIngestionTime A point in time expressed as the number milliseconds since Jan 1, 1970 00:00:00 UTC.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LogStream withLastIngestionTime(Long lastIngestionTime) {
        this. = lastIngestionTime;
        return this;
    }

    
A string token used for making PutLogEvents requests. A sequenceToken can only be used once, and PutLogEvents requests must include the sequenceToken obtained from the response of the previous request.

Constraints:
Length: 1 -

Returns:
A string token used for making PutLogEvents requests. A sequenceToken can only be used once, and PutLogEvents requests must include the sequenceToken obtained from the response of the previous request.
    public String getUploadSequenceToken() {
        return ;
    }
    
    
A string token used for making PutLogEvents requests. A sequenceToken can only be used once, and PutLogEvents requests must include the sequenceToken obtained from the response of the previous request.

Constraints:
Length: 1 -

Parameters:
uploadSequenceToken A string token used for making PutLogEvents requests. A sequenceToken can only be used once, and PutLogEvents requests must include the sequenceToken obtained from the response of the previous request.
    public void setUploadSequenceToken(String uploadSequenceToken) {
        this. = uploadSequenceToken;
    }
    
    
A string token used for making PutLogEvents requests. A sequenceToken can only be used once, and PutLogEvents requests must include the sequenceToken obtained from the response of the previous request.

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

Constraints:
Length: 1 -

Parameters:
uploadSequenceToken A string token used for making PutLogEvents requests. A sequenceToken can only be used once, and PutLogEvents requests must include the sequenceToken obtained from the response of the previous request.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LogStream withUploadSequenceToken(String uploadSequenceToken) {
        this. = uploadSequenceToken;
        return this;
    }

    
Returns the value of the Arn property for this object.

Returns:
The value of the Arn property for this object.
    public String getArn() {
        return ;
    }
    
    
Sets the value of the Arn property for this object.

Parameters:
arn The new value for the Arn property for this object.
    public void setArn(String arn) {
        this. = arn;
    }
    
    
Sets the value of the Arn property for this object.

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

Parameters:
arn The new value for the Arn property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LogStream withArn(String arn) {
        this. = arn;
        return this;
    }

    
Returns the value of the StoredBytes property for this object.

Constraints:
Range: 0 -

Returns:
The value of the StoredBytes property for this object.
    public Long getStoredBytes() {
        return ;
    }
    
    
Sets the value of the StoredBytes property for this object.

Constraints:
Range: 0 -

Parameters:
storedBytes The new value for the StoredBytes property for this object.
    public void setStoredBytes(Long storedBytes) {
        this. = storedBytes;
    }
    
    
Sets the value of the StoredBytes property for this object.

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

Constraints:
Range: 0 -

Parameters:
storedBytes The new value for the StoredBytes property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public LogStream withStoredBytes(Long storedBytes) {
        this. = storedBytes;
        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 (getLogStreamName() != nullsb.append("LogStreamName: " + getLogStreamName() + ",");
        if (getCreationTime() != nullsb.append("CreationTime: " + getCreationTime() + ",");
        if (getFirstEventTimestamp() != nullsb.append("FirstEventTimestamp: " + getFirstEventTimestamp() + ",");
        if (getLastEventTimestamp() != nullsb.append("LastEventTimestamp: " + getLastEventTimestamp() + ",");
        if (getLastIngestionTime() != nullsb.append("LastIngestionTime: " + getLastIngestionTime() + ",");
        if (getUploadSequenceToken() != nullsb.append("UploadSequenceToken: " + getUploadSequenceToken() + ",");
        if (getArn() != nullsb.append("Arn: " + getArn() + ",");
        if (getStoredBytes() != nullsb.append("StoredBytes: " + getStoredBytes() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getLogStreamName() == null) ? 0 : getLogStreamName().hashCode()); 
        hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); 
        hashCode = prime * hashCode + ((getFirstEventTimestamp() == null) ? 0 : getFirstEventTimestamp().hashCode()); 
        hashCode = prime * hashCode + ((getLastEventTimestamp() == null) ? 0 : getLastEventTimestamp().hashCode()); 
        hashCode = prime * hashCode + ((getLastIngestionTime() == null) ? 0 : getLastIngestionTime().hashCode()); 
        hashCode = prime * hashCode + ((getUploadSequenceToken() == null) ? 0 : getUploadSequenceToken().hashCode()); 
        hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); 
        hashCode = prime * hashCode + ((getStoredBytes() == null) ? 0 : getStoredBytes().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof LogStream == falsereturn false;
        LogStream other = (LogStream)obj;
        
        if (other.getLogStreamName() == null ^ this.getLogStreamName() == nullreturn false;
        if (other.getLogStreamName() != null && other.getLogStreamName().equals(this.getLogStreamName()) == falsereturn false
        if (other.getCreationTime() == null ^ this.getCreationTime() == nullreturn false;
        if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == falsereturn false
        if (other.getFirstEventTimestamp() == null ^ this.getFirstEventTimestamp() == nullreturn false;
        if (other.getFirstEventTimestamp() != null && other.getFirstEventTimestamp().equals(this.getFirstEventTimestamp()) == falsereturn false
        if (other.getLastEventTimestamp() == null ^ this.getLastEventTimestamp() == nullreturn false;
        if (other.getLastEventTimestamp() != null && other.getLastEventTimestamp().equals(this.getLastEventTimestamp()) == falsereturn false
        if (other.getLastIngestionTime() == null ^ this.getLastIngestionTime() == nullreturn false;
        if (other.getLastIngestionTime() != null && other.getLastIngestionTime().equals(this.getLastIngestionTime()) == falsereturn false
        if (other.getUploadSequenceToken() == null ^ this.getUploadSequenceToken() == nullreturn false;
        if (other.getUploadSequenceToken() != null && other.getUploadSequenceToken().equals(this.getUploadSequenceToken()) == falsereturn false
        if (other.getArn() == null ^ this.getArn() == nullreturn false;
        if (other.getArn() != null && other.getArn().equals(this.getArn()) == falsereturn false
        if (other.getStoredBytes() == null ^ this.getStoredBytes() == nullreturn false;
        if (other.getStoredBytes() != null && other.getStoredBytes().equals(this.getStoredBytes()) == falsereturn false
        return true;
    }
    
    @Override
    public LogStream clone() {
        try {
            return (LogStreamsuper.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