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

com.amazonaws.services.workdocs.model.DescribeFolderContentsResult Maven / Gradle / Ivy

/*
 * Copyright 2012-2017 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.workdocs.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 
 * @see AWS
 *      API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeFolderContentsResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {

    /**
     * 

* The subfolders in the specified folder. *

*/ private java.util.List folders; /** *

* The documents in the specified folder. *

*/ private java.util.List documents; /** *

* The marker to use when requesting the next set of results. If there are no additional results, the string is * empty. *

*/ private String marker; /** *

* The subfolders in the specified folder. *

* * @return The subfolders in the specified folder. */ public java.util.List getFolders() { return folders; } /** *

* The subfolders in the specified folder. *

* * @param folders * The subfolders in the specified folder. */ public void setFolders(java.util.Collection folders) { if (folders == null) { this.folders = null; return; } this.folders = new java.util.ArrayList(folders); } /** *

* The subfolders in the specified folder. *

*

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

* * @param folders * The subfolders in the specified folder. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeFolderContentsResult withFolders(FolderMetadata... folders) { if (this.folders == null) { setFolders(new java.util.ArrayList(folders.length)); } for (FolderMetadata ele : folders) { this.folders.add(ele); } return this; } /** *

* The subfolders in the specified folder. *

* * @param folders * The subfolders in the specified folder. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeFolderContentsResult withFolders(java.util.Collection folders) { setFolders(folders); return this; } /** *

* The documents in the specified folder. *

* * @return The documents in the specified folder. */ public java.util.List getDocuments() { return documents; } /** *

* The documents in the specified folder. *

* * @param documents * The documents in the specified folder. */ public void setDocuments(java.util.Collection documents) { if (documents == null) { this.documents = null; return; } this.documents = new java.util.ArrayList(documents); } /** *

* The documents in the specified folder. *

*

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

* * @param documents * The documents in the specified folder. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeFolderContentsResult withDocuments(DocumentMetadata... documents) { if (this.documents == null) { setDocuments(new java.util.ArrayList(documents.length)); } for (DocumentMetadata ele : documents) { this.documents.add(ele); } return this; } /** *

* The documents in the specified folder. *

* * @param documents * The documents in the specified folder. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeFolderContentsResult withDocuments(java.util.Collection documents) { setDocuments(documents); return this; } /** *

* The marker to use when requesting the next set of results. If there are no additional results, the string is * empty. *

* * @param marker * The marker to use when requesting the next set of results. If there are no additional results, the string * is empty. */ public void setMarker(String marker) { this.marker = marker; } /** *

* The marker to use when requesting the next set of results. If there are no additional results, the string is * empty. *

* * @return The marker to use when requesting the next set of results. If there are no additional results, the string * is empty. */ public String getMarker() { return this.marker; } /** *

* The marker to use when requesting the next set of results. If there are no additional results, the string is * empty. *

* * @param marker * The marker to use when requesting the next set of results. If there are no additional results, the string * is empty. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeFolderContentsResult withMarker(String marker) { setMarker(marker); 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 (getFolders() != null) sb.append("Folders: ").append(getFolders()).append(","); if (getDocuments() != null) sb.append("Documents: ").append(getDocuments()).append(","); if (getMarker() != null) sb.append("Marker: ").append(getMarker()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeFolderContentsResult == false) return false; DescribeFolderContentsResult other = (DescribeFolderContentsResult) obj; if (other.getFolders() == null ^ this.getFolders() == null) return false; if (other.getFolders() != null && other.getFolders().equals(this.getFolders()) == false) return false; if (other.getDocuments() == null ^ this.getDocuments() == null) return false; if (other.getDocuments() != null && other.getDocuments().equals(this.getDocuments()) == false) return false; if (other.getMarker() == null ^ this.getMarker() == null) return false; if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFolders() == null) ? 0 : getFolders().hashCode()); hashCode = prime * hashCode + ((getDocuments() == null) ? 0 : getDocuments().hashCode()); hashCode = prime * hashCode + ((getMarker() == null) ? 0 : getMarker().hashCode()); return hashCode; } @Override public DescribeFolderContentsResult clone() { try { return (DescribeFolderContentsResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy