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

Retrieves settings for the trail associated with the current region for your account.

 
 public class DescribeTrailsRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The trail returned.
 
The trail returned.

Returns:
The trail returned.
 
     public java.util.List<StringgetTrailNameList() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
The trail returned.

Parameters:
trailNameList The trail returned.
 
     public void setTrailNameList(java.util.Collection<StringtrailNameList) {
         if (trailNameList == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringtrailNameListCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(trailNameList.size());
         trailNameListCopy.addAll(trailNameList);
         this. = trailNameListCopy;
     }
    
    
The trail returned.

NOTE: This method appends the values to the existing list (if any). Use setTrailNameList(java.util.Collection) or withTrailNameList(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:
trailNameList The trail returned.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public DescribeTrailsRequest withTrailNameList(String... trailNameList) {
         if (getTrailNameList() == nullsetTrailNameList(new java.util.ArrayList<String>(trailNameList.length));
         for (String value : trailNameList) {
             getTrailNameList().add(value);
         }
         return this;
     }
    
    
The trail returned.

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

Parameters:
trailNameList The trail returned.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public DescribeTrailsRequest withTrailNameList(java.util.Collection<StringtrailNameList) {
         if (trailNameList == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringtrailNameListCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(trailNameList.size());
            trailNameListCopy.addAll(trailNameList);
            this. = trailNameListCopy;
        }
        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 (getTrailNameList() != nullsb.append("TrailNameList: " + getTrailNameList() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getTrailNameList() == null) ? 0 : getTrailNameList().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DescribeTrailsRequest == falsereturn false;
        DescribeTrailsRequest other = (DescribeTrailsRequest)obj;
        
        if (other.getTrailNameList() == null ^ this.getTrailNameList() == nullreturn false;
        if (other.getTrailNameList() != null && other.getTrailNameList().equals(this.getTrailNameList()) == falsereturn false
        return true;
    }
    
    @Override
    public DescribeTrailsRequest clone() {
        
            return (DescribeTrailsRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X