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

com.amazonaws.services.cloudsearchdomain.model.UploadDocumentsResult Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 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.cloudsearchdomain.model;

import java.io.Serializable;

/**
 * 

* Contains the response to an UploadDocuments request. *

*/ public class UploadDocumentsResult implements Serializable, Cloneable { /** *

* The status of an UploadDocumentsRequest. *

*/ private String status; /** *

* The number of documents that were added to the search domain. *

*/ private Long adds; /** *

* The number of documents that were deleted from the search domain. *

*/ private Long deletes; /** *

* Any warnings returned by the document service about the documents being * uploaded. *

*/ private com.amazonaws.internal.SdkInternalList warnings; /** *

* The status of an UploadDocumentsRequest. *

* * @param status * The status of an UploadDocumentsRequest. */ public void setStatus(String status) { this.status = status; } /** *

* The status of an UploadDocumentsRequest. *

* * @return The status of an UploadDocumentsRequest. */ public String getStatus() { return this.status; } /** *

* The status of an UploadDocumentsRequest. *

* * @param status * The status of an UploadDocumentsRequest. * @return Returns a reference to this object so that method calls can be * chained together. */ public UploadDocumentsResult withStatus(String status) { setStatus(status); return this; } /** *

* The number of documents that were added to the search domain. *

* * @param adds * The number of documents that were added to the search domain. */ public void setAdds(Long adds) { this.adds = adds; } /** *

* The number of documents that were added to the search domain. *

* * @return The number of documents that were added to the search domain. */ public Long getAdds() { return this.adds; } /** *

* The number of documents that were added to the search domain. *

* * @param adds * The number of documents that were added to the search domain. * @return Returns a reference to this object so that method calls can be * chained together. */ public UploadDocumentsResult withAdds(Long adds) { setAdds(adds); return this; } /** *

* The number of documents that were deleted from the search domain. *

* * @param deletes * The number of documents that were deleted from the search domain. */ public void setDeletes(Long deletes) { this.deletes = deletes; } /** *

* The number of documents that were deleted from the search domain. *

* * @return The number of documents that were deleted from the search domain. */ public Long getDeletes() { return this.deletes; } /** *

* The number of documents that were deleted from the search domain. *

* * @param deletes * The number of documents that were deleted from the search domain. * @return Returns a reference to this object so that method calls can be * chained together. */ public UploadDocumentsResult withDeletes(Long deletes) { setDeletes(deletes); return this; } /** *

* Any warnings returned by the document service about the documents being * uploaded. *

* * @return Any warnings returned by the document service about the documents * being uploaded. */ public java.util.List getWarnings() { if (warnings == null) { warnings = new com.amazonaws.internal.SdkInternalList(); } return warnings; } /** *

* Any warnings returned by the document service about the documents being * uploaded. *

* * @param warnings * Any warnings returned by the document service about the documents * being uploaded. */ public void setWarnings( java.util.Collection warnings) { if (warnings == null) { this.warnings = null; return; } this.warnings = new com.amazonaws.internal.SdkInternalList( warnings); } /** *

* Any warnings returned by the document service about the documents being * uploaded. *

*

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

* * @param warnings * Any warnings returned by the document service about the documents * being uploaded. * @return Returns a reference to this object so that method calls can be * chained together. */ public UploadDocumentsResult withWarnings( DocumentServiceWarning... warnings) { if (this.warnings == null) { setWarnings(new com.amazonaws.internal.SdkInternalList( warnings.length)); } for (DocumentServiceWarning ele : warnings) { this.warnings.add(ele); } return this; } /** *

* Any warnings returned by the document service about the documents being * uploaded. *

* * @param warnings * Any warnings returned by the document service about the documents * being uploaded. * @return Returns a reference to this object so that method calls can be * chained together. */ public UploadDocumentsResult withWarnings( java.util.Collection warnings) { setWarnings(warnings); 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 (getStatus() != null) sb.append("Status: " + getStatus() + ","); if (getAdds() != null) sb.append("Adds: " + getAdds() + ","); if (getDeletes() != null) sb.append("Deletes: " + getDeletes() + ","); if (getWarnings() != null) sb.append("Warnings: " + getWarnings()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UploadDocumentsResult == false) return false; UploadDocumentsResult other = (UploadDocumentsResult) obj; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getAdds() == null ^ this.getAdds() == null) return false; if (other.getAdds() != null && other.getAdds().equals(this.getAdds()) == false) return false; if (other.getDeletes() == null ^ this.getDeletes() == null) return false; if (other.getDeletes() != null && other.getDeletes().equals(this.getDeletes()) == false) return false; if (other.getWarnings() == null ^ this.getWarnings() == null) return false; if (other.getWarnings() != null && other.getWarnings().equals(this.getWarnings()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getAdds() == null) ? 0 : getAdds().hashCode()); hashCode = prime * hashCode + ((getDeletes() == null) ? 0 : getDeletes().hashCode()); hashCode = prime * hashCode + ((getWarnings() == null) ? 0 : getWarnings().hashCode()); return hashCode; } @Override public UploadDocumentsResult clone() { try { return (UploadDocumentsResult) 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