public void setOnSuccess(SuccessConditions onSuccess) {
        this.onSuccess = onSuccess;
    }
<p>
The method to use when a stage has succeeded. For example, configuring this field for conditions will allow the
stage to succeed when the conditions are met.
</p>

@param onSuccess
       The method to use when a stage has succeeded. For example, configuring this field for conditions will
       allow the stage to succeed when the conditions are met.
aws-java-sdk-codepipeline/src/main/java/com/amazonaws/services/codepipeline/model/StageDeclaration.java