Package com.netflix.genie.web.scripts
Class ResourceSelectorScriptResult.Builder<R>
java.lang.Object
com.netflix.genie.web.scripts.ResourceSelectorScriptResult.Builder<R>
- Type Parameters:
R- The type of resource that was selected
- Enclosing class:
- ResourceSelectorScriptResult<R>
A builder for these the results to prevent scripts from having to redo everything based on constructors if
we change parameters.
- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a new instance of aResourceSelectorScriptResultbased on the contents of this builder.withRationale(String rationale) Set the rationale for the selection or lack thereof.withResource(R resource) Set the resource that was selected if any.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withResource
Set the resource that was selected if any.- Parameters:
resource- The resource that was selected or null- Returns:
- The builder instance
-
withRationale
Set the rationale for the selection or lack thereof.- Parameters:
rationale- The rationale or null if there was none- Returns:
- The builder instance
-
build
Build a new instance of aResourceSelectorScriptResultbased on the contents of this builder.- Returns:
- A new instance of
ResourceSelectorScriptResult
-