Package com.netflix.genie.web.scripts
Class ResourceSelectorScriptResult<R>
java.lang.Object
com.netflix.genie.web.scripts.ResourceSelectorScriptResult<R>
- Type Parameters:
R
- The type of resource that was selected
Class to represent a generic response from a script which selects a resource from a set of resources.
- Since:
- 4.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A builder for these the results to prevent scripts from having to redo everything based on constructors if we change parameters. -
Method Summary
Modifier and TypeMethodDescriptionGet the rationale for the selection decision.Get the selected resource if there was one.
-
Method Details
-
getResource
Get the selected resource if there was one.- Returns:
- The resource wrapped in an
Optional
orOptional.empty()
-
getRationale
Get the rationale for the selection decision.- Returns:
- The rationale wrapped in an
Optional
orOptional.empty()
-