public Diagnostics withErrorCode(String errorCode) {
        setErrorCode(errorCode);
        return this;
    }
<p>
The associated error code:
</p>
<ul>
<li>
<p>
Success: The specified script ran.
</p>
</li>
<li>
<p>
ScriptMissing: The specified script was not found in the specified location.
</p>
</li>
<li>
<p>
ScriptNotExecutable: The specified script is not a recognized executable file type.
</p>
</li>
<li>
<p>
ScriptTimedOut: The specified script did not finish running in the specified time period.
</p>
</li>
<li>
<p>
ScriptFailed: The specified script failed to run as expected.
</p>
</li>
<li>
<p>
UnknownError: The specified script did not run for an unknown reason.
</p>
</li>
</ul>

@param errorCode
       The associated error code:</p>
       <ul>
       <li>
       <p>
       Success: The specified script ran.
       </p>
       </li>
       <li>
       <p>
       ScriptMissing: The specified script was not found in the specified location.
       </p>
       </li>
       <li>
       <p>
       ScriptNotExecutable: The specified script is not a recognized executable file type.
       </p>
       </li>
       <li>
       <p>
       ScriptTimedOut: The specified script did not finish running in the specified time period.
       </p>
       </li>
       <li>
       <p>
       ScriptFailed: The specified script failed to run as expected.
       </p>
       </li>
       <li>
       <p>
       UnknownError: The specified script did not run for an unknown reason.
       </p>
       </li>
@return Returns a reference to this object so that method calls can be chained together.
@see LifecycleErrorCode
aws-java-sdk-codedeploy/src/main/java/com/amazonaws/services/codedeploy/model/Diagnostics.java