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

com.amazonaws.services.workdocs.model.FolderMetadata 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;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Describes a folder. *

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

* The ID of the folder. *

*/ private String id; /** *

* The name of the folder. *

*/ private String name; /** *

* The ID of the creator. *

*/ private String creatorId; /** *

* The ID of the parent folder. *

*/ private String parentFolderId; /** *

* The time when the folder was created. *

*/ private java.util.Date createdTimestamp; /** *

* The time when the folder was updated. *

*/ private java.util.Date modifiedTimestamp; /** *

* The resource state of the folder. *

*/ private String resourceState; /** *

* The unique identifier created from the subfolders and documents of the folder. *

*/ private String signature; /** *

* List of labels on the folder. *

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

* The size of the folder metadata. *

*/ private Long size; /** *

* The size of the latest version of the folder metadata. *

*/ private Long latestVersionSize; /** *

* The ID of the folder. *

* * @param id * The ID of the folder. */ public void setId(String id) { this.id = id; } /** *

* The ID of the folder. *

* * @return The ID of the folder. */ public String getId() { return this.id; } /** *

* The ID of the folder. *

* * @param id * The ID of the folder. * @return Returns a reference to this object so that method calls can be chained together. */ public FolderMetadata withId(String id) { setId(id); return this; } /** *

* The name of the folder. *

* * @param name * The name of the folder. */ public void setName(String name) { this.name = name; } /** *

* The name of the folder. *

* * @return The name of the folder. */ public String getName() { return this.name; } /** *

* The name of the folder. *

* * @param name * The name of the folder. * @return Returns a reference to this object so that method calls can be chained together. */ public FolderMetadata withName(String name) { setName(name); return this; } /** *

* The ID of the creator. *

* * @param creatorId * The ID of the creator. */ public void setCreatorId(String creatorId) { this.creatorId = creatorId; } /** *

* The ID of the creator. *

* * @return The ID of the creator. */ public String getCreatorId() { return this.creatorId; } /** *

* The ID of the creator. *

* * @param creatorId * The ID of the creator. * @return Returns a reference to this object so that method calls can be chained together. */ public FolderMetadata withCreatorId(String creatorId) { setCreatorId(creatorId); return this; } /** *

* The ID of the parent folder. *

* * @param parentFolderId * The ID of the parent folder. */ public void setParentFolderId(String parentFolderId) { this.parentFolderId = parentFolderId; } /** *

* The ID of the parent folder. *

* * @return The ID of the parent folder. */ public String getParentFolderId() { return this.parentFolderId; } /** *

* The ID of the parent folder. *

* * @param parentFolderId * The ID of the parent folder. * @return Returns a reference to this object so that method calls can be chained together. */ public FolderMetadata withParentFolderId(String parentFolderId) { setParentFolderId(parentFolderId); return this; } /** *

* The time when the folder was created. *

* * @param createdTimestamp * The time when the folder was created. */ public void setCreatedTimestamp(java.util.Date createdTimestamp) { this.createdTimestamp = createdTimestamp; } /** *

* The time when the folder was created. *

* * @return The time when the folder was created. */ public java.util.Date getCreatedTimestamp() { return this.createdTimestamp; } /** *

* The time when the folder was created. *

* * @param createdTimestamp * The time when the folder was created. * @return Returns a reference to this object so that method calls can be chained together. */ public FolderMetadata withCreatedTimestamp(java.util.Date createdTimestamp) { setCreatedTimestamp(createdTimestamp); return this; } /** *

* The time when the folder was updated. *

* * @param modifiedTimestamp * The time when the folder was updated. */ public void setModifiedTimestamp(java.util.Date modifiedTimestamp) { this.modifiedTimestamp = modifiedTimestamp; } /** *

* The time when the folder was updated. *

* * @return The time when the folder was updated. */ public java.util.Date getModifiedTimestamp() { return this.modifiedTimestamp; } /** *

* The time when the folder was updated. *

* * @param modifiedTimestamp * The time when the folder was updated. * @return Returns a reference to this object so that method calls can be chained together. */ public FolderMetadata withModifiedTimestamp(java.util.Date modifiedTimestamp) { setModifiedTimestamp(modifiedTimestamp); return this; } /** *

* The resource state of the folder. *

* * @param resourceState * The resource state of the folder. * @see ResourceStateType */ public void setResourceState(String resourceState) { this.resourceState = resourceState; } /** *

* The resource state of the folder. *

* * @return The resource state of the folder. * @see ResourceStateType */ public String getResourceState() { return this.resourceState; } /** *

* The resource state of the folder. *

* * @param resourceState * The resource state of the folder. * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceStateType */ public FolderMetadata withResourceState(String resourceState) { setResourceState(resourceState); return this; } /** *

* The resource state of the folder. *

* * @param resourceState * The resource state of the folder. * @see ResourceStateType */ public void setResourceState(ResourceStateType resourceState) { this.resourceState = resourceState.toString(); } /** *

* The resource state of the folder. *

* * @param resourceState * The resource state of the folder. * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceStateType */ public FolderMetadata withResourceState(ResourceStateType resourceState) { setResourceState(resourceState); return this; } /** *

* The unique identifier created from the subfolders and documents of the folder. *

* * @param signature * The unique identifier created from the subfolders and documents of the folder. */ public void setSignature(String signature) { this.signature = signature; } /** *

* The unique identifier created from the subfolders and documents of the folder. *

* * @return The unique identifier created from the subfolders and documents of the folder. */ public String getSignature() { return this.signature; } /** *

* The unique identifier created from the subfolders and documents of the folder. *

* * @param signature * The unique identifier created from the subfolders and documents of the folder. * @return Returns a reference to this object so that method calls can be chained together. */ public FolderMetadata withSignature(String signature) { setSignature(signature); return this; } /** *

* List of labels on the folder. *

* * @return List of labels on the folder. */ public java.util.List getLabels() { return labels; } /** *

* List of labels on the folder. *

* * @param labels * List of labels on the folder. */ public void setLabels(java.util.Collection labels) { if (labels == null) { this.labels = null; return; } this.labels = new java.util.ArrayList(labels); } /** *

* List of labels on the folder. *

*

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

* * @param labels * List of labels on the folder. * @return Returns a reference to this object so that method calls can be chained together. */ public FolderMetadata withLabels(String... labels) { if (this.labels == null) { setLabels(new java.util.ArrayList(labels.length)); } for (String ele : labels) { this.labels.add(ele); } return this; } /** *

* List of labels on the folder. *

* * @param labels * List of labels on the folder. * @return Returns a reference to this object so that method calls can be chained together. */ public FolderMetadata withLabels(java.util.Collection labels) { setLabels(labels); return this; } /** *

* The size of the folder metadata. *

* * @param size * The size of the folder metadata. */ public void setSize(Long size) { this.size = size; } /** *

* The size of the folder metadata. *

* * @return The size of the folder metadata. */ public Long getSize() { return this.size; } /** *

* The size of the folder metadata. *

* * @param size * The size of the folder metadata. * @return Returns a reference to this object so that method calls can be chained together. */ public FolderMetadata withSize(Long size) { setSize(size); return this; } /** *

* The size of the latest version of the folder metadata. *

* * @param latestVersionSize * The size of the latest version of the folder metadata. */ public void setLatestVersionSize(Long latestVersionSize) { this.latestVersionSize = latestVersionSize; } /** *

* The size of the latest version of the folder metadata. *

* * @return The size of the latest version of the folder metadata. */ public Long getLatestVersionSize() { return this.latestVersionSize; } /** *

* The size of the latest version of the folder metadata. *

* * @param latestVersionSize * The size of the latest version of the folder metadata. * @return Returns a reference to this object so that method calls can be chained together. */ public FolderMetadata withLatestVersionSize(Long latestVersionSize) { setLatestVersionSize(latestVersionSize); 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 (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getCreatorId() != null) sb.append("CreatorId: ").append(getCreatorId()).append(","); if (getParentFolderId() != null) sb.append("ParentFolderId: ").append(getParentFolderId()).append(","); if (getCreatedTimestamp() != null) sb.append("CreatedTimestamp: ").append(getCreatedTimestamp()).append(","); if (getModifiedTimestamp() != null) sb.append("ModifiedTimestamp: ").append(getModifiedTimestamp()).append(","); if (getResourceState() != null) sb.append("ResourceState: ").append(getResourceState()).append(","); if (getSignature() != null) sb.append("Signature: ").append(getSignature()).append(","); if (getLabels() != null) sb.append("Labels: ").append(getLabels()).append(","); if (getSize() != null) sb.append("Size: ").append(getSize()).append(","); if (getLatestVersionSize() != null) sb.append("LatestVersionSize: ").append(getLatestVersionSize()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof FolderMetadata == false) return false; FolderMetadata other = (FolderMetadata) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getCreatorId() == null ^ this.getCreatorId() == null) return false; if (other.getCreatorId() != null && other.getCreatorId().equals(this.getCreatorId()) == false) return false; if (other.getParentFolderId() == null ^ this.getParentFolderId() == null) return false; if (other.getParentFolderId() != null && other.getParentFolderId().equals(this.getParentFolderId()) == false) return false; if (other.getCreatedTimestamp() == null ^ this.getCreatedTimestamp() == null) return false; if (other.getCreatedTimestamp() != null && other.getCreatedTimestamp().equals(this.getCreatedTimestamp()) == false) return false; if (other.getModifiedTimestamp() == null ^ this.getModifiedTimestamp() == null) return false; if (other.getModifiedTimestamp() != null && other.getModifiedTimestamp().equals(this.getModifiedTimestamp()) == false) return false; if (other.getResourceState() == null ^ this.getResourceState() == null) return false; if (other.getResourceState() != null && other.getResourceState().equals(this.getResourceState()) == false) return false; if (other.getSignature() == null ^ this.getSignature() == null) return false; if (other.getSignature() != null && other.getSignature().equals(this.getSignature()) == false) return false; if (other.getLabels() == null ^ this.getLabels() == null) return false; if (other.getLabels() != null && other.getLabels().equals(this.getLabels()) == false) return false; if (other.getSize() == null ^ this.getSize() == null) return false; if (other.getSize() != null && other.getSize().equals(this.getSize()) == false) return false; if (other.getLatestVersionSize() == null ^ this.getLatestVersionSize() == null) return false; if (other.getLatestVersionSize() != null && other.getLatestVersionSize().equals(this.getLatestVersionSize()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); hashCode = prime * hashCode + ((getParentFolderId() == null) ? 0 : getParentFolderId().hashCode()); hashCode = prime * hashCode + ((getCreatedTimestamp() == null) ? 0 : getCreatedTimestamp().hashCode()); hashCode = prime * hashCode + ((getModifiedTimestamp() == null) ? 0 : getModifiedTimestamp().hashCode()); hashCode = prime * hashCode + ((getResourceState() == null) ? 0 : getResourceState().hashCode()); hashCode = prime * hashCode + ((getSignature() == null) ? 0 : getSignature().hashCode()); hashCode = prime * hashCode + ((getLabels() == null) ? 0 : getLabels().hashCode()); hashCode = prime * hashCode + ((getSize() == null) ? 0 : getSize().hashCode()); hashCode = prime * hashCode + ((getLatestVersionSize() == null) ? 0 : getLatestVersionSize().hashCode()); return hashCode; } @Override public FolderMetadata clone() { try { return (FolderMetadata) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.workdocs.model.transform.FolderMetadataMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy