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;
 
 
Container for the parameters to the DescribeLogStreams operation.

Returns all the log streams that are associated with the specified log group. The list returned in the response is ASCII-sorted by log stream name.

By default, this operation returns up to 50 log streams. If there are more log streams to list, the response would contain a nextToken value in the response body. You can also limit the number of log streams returned in the response by specifying the limit parameter in the request. This operation has a limit of five transactions per second, after which transactions are throttled.

 
 public class DescribeLogStreamsRequest extends AmazonWebServiceRequest implements SerializableCloneable {
 
     private String logGroupName;

    
Will only return log streams that match the provided logStreamNamePrefix. If you don't specify a value, no prefix filter is applied.

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

 
     private String logStreamNamePrefix;

    
Specifies what to order the returned log streams by. Valid arguments are 'LogStreamName' or 'LastEventTime'. If you don't specify a value, results are ordered by LogStreamName. If 'LastEventTime' is chosen, the request cannot also contain a logStreamNamePrefix.

Constraints:
Allowed Values: LogStreamName, LastEventTime

 
     private String orderBy;

    
If set to true, results are returned in descending order. If you don't specify a value or set it to false, results are returned in ascending order.
 
     private Boolean descending;

    
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 DescribeLogStreams request.

Constraints:
Length: 1 -

 
     private String nextToken;

    
The maximum number of items returned in the response. If you don't specify a value, the request would return up to 50 items.

Constraints:
Range: 1 - 50

 
     private Integer limit;

    
Default constructor for a new DescribeLogStreamsRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public DescribeLogStreamsRequest() {}
    
    
Constructs a new DescribeLogStreamsRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
logGroupName
    public DescribeLogStreamsRequest(String logGroupName) {
        setLogGroupName(logGroupName);
    }

    
Returns the value of the LogGroupName property for this object.

Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+

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

Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+

Parameters:
logGroupName The new value for the LogGroupName property for this object.
    public void setLogGroupName(String logGroupName) {
        this. = logGroupName;
    }
    
    
Sets the value of the LogGroupName property for this object.

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

Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+

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

    
Will only return log streams that match the provided logStreamNamePrefix. If you don't specify a value, no prefix filter is applied.

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

Returns:
Will only return log streams that match the provided logStreamNamePrefix. If you don't specify a value, no prefix filter is applied.
    public String getLogStreamNamePrefix() {
        return ;
    }
    
    
Will only return log streams that match the provided logStreamNamePrefix. If you don't specify a value, no prefix filter is applied.

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

Parameters:
logStreamNamePrefix Will only return log streams that match the provided logStreamNamePrefix. If you don't specify a value, no prefix filter is applied.
    public void setLogStreamNamePrefix(String logStreamNamePrefix) {
        this. = logStreamNamePrefix;
    }
    
    
Will only return log streams that match the provided logStreamNamePrefix. If you don't specify a value, no prefix filter is applied.

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

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

Parameters:
logStreamNamePrefix Will only return log streams that match the provided logStreamNamePrefix. If you don't specify a value, no prefix filter is applied.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeLogStreamsRequest withLogStreamNamePrefix(String logStreamNamePrefix) {
        this. = logStreamNamePrefix;
        return this;
    }

    
Specifies what to order the returned log streams by. Valid arguments are 'LogStreamName' or 'LastEventTime'. If you don't specify a value, results are ordered by LogStreamName. If 'LastEventTime' is chosen, the request cannot also contain a logStreamNamePrefix.

Constraints:
Allowed Values: LogStreamName, LastEventTime

Returns:
Specifies what to order the returned log streams by. Valid arguments are 'LogStreamName' or 'LastEventTime'. If you don't specify a value, results are ordered by LogStreamName. If 'LastEventTime' is chosen, the request cannot also contain a logStreamNamePrefix.
See also:
OrderBy
    public String getOrderBy() {
        return ;
    }
    
    
Specifies what to order the returned log streams by. Valid arguments are 'LogStreamName' or 'LastEventTime'. If you don't specify a value, results are ordered by LogStreamName. If 'LastEventTime' is chosen, the request cannot also contain a logStreamNamePrefix.

Constraints:
Allowed Values: LogStreamName, LastEventTime

Parameters:
orderBy Specifies what to order the returned log streams by. Valid arguments are 'LogStreamName' or 'LastEventTime'. If you don't specify a value, results are ordered by LogStreamName. If 'LastEventTime' is chosen, the request cannot also contain a logStreamNamePrefix.
See also:
OrderBy
    public void setOrderBy(String orderBy) {
        this. = orderBy;
    }
    
    
Specifies what to order the returned log streams by. Valid arguments are 'LogStreamName' or 'LastEventTime'. If you don't specify a value, results are ordered by LogStreamName. If 'LastEventTime' is chosen, the request cannot also contain a logStreamNamePrefix.

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

Constraints:
Allowed Values: LogStreamName, LastEventTime

Parameters:
orderBy Specifies what to order the returned log streams by. Valid arguments are 'LogStreamName' or 'LastEventTime'. If you don't specify a value, results are ordered by LogStreamName. If 'LastEventTime' is chosen, the request cannot also contain a logStreamNamePrefix.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
OrderBy
    public DescribeLogStreamsRequest withOrderBy(String orderBy) {
        this. = orderBy;
        return this;
    }

    
Specifies what to order the returned log streams by. Valid arguments are 'LogStreamName' or 'LastEventTime'. If you don't specify a value, results are ordered by LogStreamName. If 'LastEventTime' is chosen, the request cannot also contain a logStreamNamePrefix.

Constraints:
Allowed Values: LogStreamName, LastEventTime

Parameters:
orderBy Specifies what to order the returned log streams by. Valid arguments are 'LogStreamName' or 'LastEventTime'. If you don't specify a value, results are ordered by LogStreamName. If 'LastEventTime' is chosen, the request cannot also contain a logStreamNamePrefix.
See also:
OrderBy
    public void setOrderBy(OrderBy orderBy) {
        this. = orderBy.toString();
    }
    
    
Specifies what to order the returned log streams by. Valid arguments are 'LogStreamName' or 'LastEventTime'. If you don't specify a value, results are ordered by LogStreamName. If 'LastEventTime' is chosen, the request cannot also contain a logStreamNamePrefix.

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

Constraints:
Allowed Values: LogStreamName, LastEventTime

Parameters:
orderBy Specifies what to order the returned log streams by. Valid arguments are 'LogStreamName' or 'LastEventTime'. If you don't specify a value, results are ordered by LogStreamName. If 'LastEventTime' is chosen, the request cannot also contain a logStreamNamePrefix.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
OrderBy
    public DescribeLogStreamsRequest withOrderBy(OrderBy orderBy) {
        this. = orderBy.toString();
        return this;
    }

    
If set to true, results are returned in descending order. If you don't specify a value or set it to false, results are returned in ascending order.

Returns:
If set to true, results are returned in descending order. If you don't specify a value or set it to false, results are returned in ascending order.
    public Boolean isDescending() {
        return ;
    }
    
    
If set to true, results are returned in descending order. If you don't specify a value or set it to false, results are returned in ascending order.

Parameters:
descending If set to true, results are returned in descending order. If you don't specify a value or set it to false, results are returned in ascending order.
    public void setDescending(Boolean descending) {
        this. = descending;
    }
    
    
If set to true, results are returned in descending order. If you don't specify a value or set it to false, results are returned in ascending order.

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

Parameters:
descending If set to true, results are returned in descending order. If you don't specify a value or set it to false, results are returned in ascending order.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeLogStreamsRequest withDescending(Boolean descending) {
        this. = descending;
        return this;
    }

    
If set to true, results are returned in descending order. If you don't specify a value or set it to false, results are returned in ascending order.

Returns:
If set to true, results are returned in descending order. If you don't specify a value or set it to false, results are returned in ascending order.
    public Boolean getDescending() {
        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 DescribeLogStreams request.

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 DescribeLogStreams request.
    public String getNextToken() {
        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 DescribeLogStreams request.

Constraints:
Length: 1 -

Parameters:
nextToken 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 DescribeLogStreams request.
    public void setNextToken(String nextToken) {
        this. = nextToken;
    }
    
    
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 DescribeLogStreams request.

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

Constraints:
Length: 1 -

Parameters:
nextToken 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 DescribeLogStreams request.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeLogStreamsRequest withNextToken(String nextToken) {
        this. = nextToken;
        return this;
    }

    
The maximum number of items returned in the response. If you don't specify a value, the request would return up to 50 items.

Constraints:
Range: 1 - 50

Returns:
The maximum number of items returned in the response. If you don't specify a value, the request would return up to 50 items.
    public Integer getLimit() {
        return ;
    }
    
    
The maximum number of items returned in the response. If you don't specify a value, the request would return up to 50 items.

Constraints:
Range: 1 - 50

Parameters:
limit The maximum number of items returned in the response. If you don't specify a value, the request would return up to 50 items.
    public void setLimit(Integer limit) {
        this. = limit;
    }
    
    
The maximum number of items returned in the response. If you don't specify a value, the request would return up to 50 items.

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

Constraints:
Range: 1 - 50

Parameters:
limit The maximum number of items returned in the response. If you don't specify a value, the request would return up to 50 items.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeLogStreamsRequest withLimit(Integer limit) {
        this. = limit;
        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 (getLogGroupName() != nullsb.append("LogGroupName: " + getLogGroupName() + ",");
        if (getLogStreamNamePrefix() != nullsb.append("LogStreamNamePrefix: " + getLogStreamNamePrefix() + ",");
        if (getOrderBy() != nullsb.append("OrderBy: " + getOrderBy() + ",");
        if (isDescending() != nullsb.append("Descending: " + isDescending() + ",");
        if (getNextToken() != nullsb.append("NextToken: " + getNextToken() + ",");
        if (getLimit() != nullsb.append("Limit: " + getLimit() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getLogGroupName() == null) ? 0 : getLogGroupName().hashCode()); 
        hashCode = prime * hashCode + ((getLogStreamNamePrefix() == null) ? 0 : getLogStreamNamePrefix().hashCode()); 
        hashCode = prime * hashCode + ((getOrderBy() == null) ? 0 : getOrderBy().hashCode()); 
        hashCode = prime * hashCode + ((isDescending() == null) ? 0 : isDescending().hashCode()); 
        hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); 
        hashCode = prime * hashCode + ((getLimit() == null) ? 0 : getLimit().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DescribeLogStreamsRequest == falsereturn false;
        
        if (other.getLogGroupName() == null ^ this.getLogGroupName() == nullreturn false;
        if (other.getLogGroupName() != null && other.getLogGroupName().equals(this.getLogGroupName()) == falsereturn false
        if (other.getLogStreamNamePrefix() == null ^ this.getLogStreamNamePrefix() == nullreturn false;
        if (other.getLogStreamNamePrefix() != null && other.getLogStreamNamePrefix().equals(this.getLogStreamNamePrefix()) == falsereturn false
        if (other.getOrderBy() == null ^ this.getOrderBy() == nullreturn false;
        if (other.getOrderBy() != null && other.getOrderBy().equals(this.getOrderBy()) == falsereturn false
        if (other.isDescending() == null ^ this.isDescending() == nullreturn false;
        if (other.isDescending() != null && other.isDescending().equals(this.isDescending()) == falsereturn false
        if (other.getNextToken() == null ^ this.getNextToken() == nullreturn false;
        if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == falsereturn false
        if (other.getLimit() == null ^ this.getLimit() == nullreturn false;
        if (other.getLimit() != null && other.getLimit().equals(this.getLimit()) == falsereturn false
        return true;
    }
    
    @Override
    public DescribeLogStreamsRequest clone() {
        
            return (DescribeLogStreamsRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X