com.amazonaws.services.datapipeline.model.PutPipelineDefinitionResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-osgi Show documentation
/*
 * Copyright 2010-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.datapipeline.model;
import java.io.Serializable;
/**
 * 
 * Contains the output of PutPipelineDefinition.
 * 
 */
public class PutPipelineDefinitionResult implements Serializable, Cloneable {
    /**
     * 
     * The validation errors that are associated with the objects defined in
     * pipelineObjects.
     * 
     */
    private com.amazonaws.internal.SdkInternalList validationErrors;
    /**
     * 
     * The validation warnings that are associated with the objects defined in
     * pipelineObjects.
     * 
     */
    private com.amazonaws.internal.SdkInternalList validationWarnings;
    /**
     * 
     * Indicates whether there were validation errors, and the pipeline
     * definition is stored but cannot be activated until you correct the
     * pipeline and call PutPipelineDefinition to commit the
     * corrected pipeline.
     * 
     */
    private Boolean errored;
    /**
     * 
     * The validation errors that are associated with the objects defined in
     * pipelineObjects.
     * 
     * 
     * @return The validation errors that are associated with the objects
     *         defined in pipelineObjects.
     */
    public java.util.List getValidationErrors() {
        if (validationErrors == null) {
            validationErrors = new com.amazonaws.internal.SdkInternalList();
        }
        return validationErrors;
    }
    /**
     * 
     * The validation errors that are associated with the objects defined in
     * pipelineObjects.
     * 
     * 
     * @param validationErrors
     *        The validation errors that are associated with the objects defined
     *        in pipelineObjects.
     */
    public void setValidationErrors(
            java.util.Collection validationErrors) {
        if (validationErrors == null) {
            this.validationErrors = null;
            return;
        }
        this.validationErrors = new com.amazonaws.internal.SdkInternalList(
                validationErrors);
    }
    /**
     * 
     * The validation errors that are associated with the objects defined in
     * pipelineObjects.
     * 
     * 
     * NOTE: This method appends the values to the existing list (if
     * any). Use {@link #setValidationErrors(java.util.Collection)} or
     * {@link #withValidationErrors(java.util.Collection)} if you want to
     * override the existing values.
     * 
     * 
     * @param validationErrors
     *        The validation errors that are associated with the objects defined
     *        in pipelineObjects.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public PutPipelineDefinitionResult withValidationErrors(
            ValidationError... validationErrors) {
        if (this.validationErrors == null) {
            setValidationErrors(new com.amazonaws.internal.SdkInternalList(
                    validationErrors.length));
        }
        for (ValidationError ele : validationErrors) {
            this.validationErrors.add(ele);
        }
        return this;
    }
    /**
     * 
     * The validation errors that are associated with the objects defined in
     * pipelineObjects.
     * 
     * 
     * @param validationErrors
     *        The validation errors that are associated with the objects defined
     *        in pipelineObjects.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public PutPipelineDefinitionResult withValidationErrors(
            java.util.Collection validationErrors) {
        setValidationErrors(validationErrors);
        return this;
    }
    /**
     * 
     * The validation warnings that are associated with the objects defined in
     * pipelineObjects.
     * 
     * 
     * @return The validation warnings that are associated with the objects
     *         defined in pipelineObjects.
     */
    public java.util.List getValidationWarnings() {
        if (validationWarnings == null) {
            validationWarnings = new com.amazonaws.internal.SdkInternalList();
        }
        return validationWarnings;
    }
    /**
     * 
     * The validation warnings that are associated with the objects defined in
     * pipelineObjects.
     * 
     * 
     * @param validationWarnings
     *        The validation warnings that are associated with the objects
     *        defined in pipelineObjects.
     */
    public void setValidationWarnings(
            java.util.Collection validationWarnings) {
        if (validationWarnings == null) {
            this.validationWarnings = null;
            return;
        }
        this.validationWarnings = new com.amazonaws.internal.SdkInternalList(
                validationWarnings);
    }
    /**
     * 
     * The validation warnings that are associated with the objects defined in
     * pipelineObjects.
     * 
     * 
     * NOTE: This method appends the values to the existing list (if
     * any). Use {@link #setValidationWarnings(java.util.Collection)} or
     * {@link #withValidationWarnings(java.util.Collection)} if you want to
     * override the existing values.
     * 
     * 
     * @param validationWarnings
     *        The validation warnings that are associated with the objects
     *        defined in pipelineObjects.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public PutPipelineDefinitionResult withValidationWarnings(
            ValidationWarning... validationWarnings) {
        if (this.validationWarnings == null) {
            setValidationWarnings(new com.amazonaws.internal.SdkInternalList(
                    validationWarnings.length));
        }
        for (ValidationWarning ele : validationWarnings) {
            this.validationWarnings.add(ele);
        }
        return this;
    }
    /**
     * 
     * The validation warnings that are associated with the objects defined in
     * pipelineObjects.
     * 
     * 
     * @param validationWarnings
     *        The validation warnings that are associated with the objects
     *        defined in pipelineObjects.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public PutPipelineDefinitionResult withValidationWarnings(
            java.util.Collection validationWarnings) {
        setValidationWarnings(validationWarnings);
        return this;
    }
    /**
     * 
     * Indicates whether there were validation errors, and the pipeline
     * definition is stored but cannot be activated until you correct the
     * pipeline and call PutPipelineDefinition to commit the
     * corrected pipeline.
     * 
     * 
     * @param errored
     *        Indicates whether there were validation errors, and the pipeline
     *        definition is stored but cannot be activated until you correct the
     *        pipeline and call PutPipelineDefinition to commit the
     *        corrected pipeline.
     */
    public void setErrored(Boolean errored) {
        this.errored = errored;
    }
    /**
     * 
     * Indicates whether there were validation errors, and the pipeline
     * definition is stored but cannot be activated until you correct the
     * pipeline and call PutPipelineDefinition to commit the
     * corrected pipeline.
     * 
     * 
     * @return Indicates whether there were validation errors, and the pipeline
     *         definition is stored but cannot be activated until you correct
     *         the pipeline and call PutPipelineDefinition to
     *         commit the corrected pipeline.
     */
    public Boolean getErrored() {
        return this.errored;
    }
    /**
     * 
     * Indicates whether there were validation errors, and the pipeline
     * definition is stored but cannot be activated until you correct the
     * pipeline and call PutPipelineDefinition to commit the
     * corrected pipeline.
     * 
     * 
     * @param errored
     *        Indicates whether there were validation errors, and the pipeline
     *        definition is stored but cannot be activated until you correct the
     *        pipeline and call PutPipelineDefinition to commit the
     *        corrected pipeline.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public PutPipelineDefinitionResult withErrored(Boolean errored) {
        setErrored(errored);
        return this;
    }
    /**
     * 
     * Indicates whether there were validation errors, and the pipeline
     * definition is stored but cannot be activated until you correct the
     * pipeline and call PutPipelineDefinition to commit the
     * corrected pipeline.
     * 
     * 
     * @return Indicates whether there were validation errors, and the pipeline
     *         definition is stored but cannot be activated until you correct
     *         the pipeline and call PutPipelineDefinition to
     *         commit the corrected pipeline.
     */
    public Boolean isErrored() {
        return this.errored;
    }
    /**
     * 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 (getValidationErrors() != null)
            sb.append("ValidationErrors: " + getValidationErrors() + ",");
        if (getValidationWarnings() != null)
            sb.append("ValidationWarnings: " + getValidationWarnings() + ",");
        if (getErrored() != null)
            sb.append("Errored: " + getErrored());
        sb.append("}");
        return sb.toString();
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (obj instanceof PutPipelineDefinitionResult == false)
            return false;
        PutPipelineDefinitionResult other = (PutPipelineDefinitionResult) obj;
        if (other.getValidationErrors() == null
                ^ this.getValidationErrors() == null)
            return false;
        if (other.getValidationErrors() != null
                && other.getValidationErrors().equals(
                        this.getValidationErrors()) == false)
            return false;
        if (other.getValidationWarnings() == null
                ^ this.getValidationWarnings() == null)
            return false;
        if (other.getValidationWarnings() != null
                && other.getValidationWarnings().equals(
                        this.getValidationWarnings()) == false)
            return false;
        if (other.getErrored() == null ^ this.getErrored() == null)
            return false;
        if (other.getErrored() != null
                && other.getErrored().equals(this.getErrored()) == false)
            return false;
        return true;
    }
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        hashCode = prime
                * hashCode
                + ((getValidationErrors() == null) ? 0 : getValidationErrors()
                        .hashCode());
        hashCode = prime
                * hashCode
                + ((getValidationWarnings() == null) ? 0
                        : getValidationWarnings().hashCode());
        hashCode = prime * hashCode
                + ((getErrored() == null) ? 0 : getErrored().hashCode());
        return hashCode;
    }
    @Override
    public PutPipelineDefinitionResult clone() {
        try {
            return (PutPipelineDefinitionResult) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                            + "even though we're Cloneable!", e);
        }
    }
}