Action to execute when ActionCondition is true.
When RETRY_TASK is specified, we will retry failed tasks
if we notice any exit code match and fail tasks if no match is found.
Likewise, when FAIL_TASK is specified, we will fail tasks
if we notice any exit code match and retry tasks if no match is found.
Action to execute when ActionCondition is true.
When RETRY_TASK is specified, we will retry failed tasks
if we notice any exit code match and fail tasks if no match is found.
Likewise, when FAIL_TASK is specified, we will fail tasks
if we notice any exit code match and retry tasks if no match is found.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Interface LifecyclePolicyOrBuilder (0.16.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.16.0 (latest)](/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.batch.v1.LifecyclePolicyOrBuilder)\n- [0.15.0](/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.batch.v1.LifecyclePolicyOrBuilder)\n- [0.14.1](/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.batch.v1.LifecyclePolicyOrBuilder) \n\n public interface LifecyclePolicyOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getAction()\n\n public abstract LifecyclePolicy.Action getAction()\n\nAction to execute when ActionCondition is true.\nWhen RETRY_TASK is specified, we will retry failed tasks\nif we notice any exit code match and fail tasks if no match is found.\nLikewise, when FAIL_TASK is specified, we will fail tasks\nif we notice any exit code match and retry tasks if no match is found.\n\n`.google.events.cloud.batch.v1.LifecyclePolicy.Action action = 1;`\n\n### getActionCondition()\n\n public abstract LifecyclePolicy.ActionCondition getActionCondition()\n\nConditions that decide why a task failure is dealt with a specific action.\n\n`.google.events.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2;\n`\n\n### getActionConditionOrBuilder()\n\n public abstract LifecyclePolicy.ActionConditionOrBuilder getActionConditionOrBuilder()\n\nConditions that decide why a task failure is dealt with a specific action.\n\n`.google.events.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2;\n`\n\n### getActionValue()\n\n public abstract int getActionValue()\n\nAction to execute when ActionCondition is true.\nWhen RETRY_TASK is specified, we will retry failed tasks\nif we notice any exit code match and fail tasks if no match is found.\nLikewise, when FAIL_TASK is specified, we will fail tasks\nif we notice any exit code match and retry tasks if no match is found.\n\n`.google.events.cloud.batch.v1.LifecyclePolicy.Action action = 1;`\n\n### hasActionCondition()\n\n public abstract boolean hasActionCondition()\n\nConditions that decide why a task failure is dealt with a specific action.\n\n`.google.events.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2;\n`"]]