Package com.netflix.genie.web.dtos
Class ResourceSelectionResult<R>
- java.lang.Object
-
- com.netflix.genie.web.dtos.ResourceSelectionResult<R>
-
- Type Parameters:
R
- The resource type this selection result is for
public class ResourceSelectionResult<R> extends java.lang.Object
A data class for returning the results of an attempted resource selection.- Since:
- 4.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ResourceSelectionResult.Builder<R>
A builder forResourceSelectionResult
instances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<R>
getSelectedResource()
Get the selected resource if there was one.java.util.Optional<java.lang.String>
getSelectionRationale()
Return any rationale as to why this resource was selected or why no resource was selected if that was the case.
-
-
-
Method Detail
-
getSelectedResource
public java.util.Optional<R> getSelectedResource()
Get the selected resource if there was one.- Returns:
- The selected resource wrapped in
Optional
elseOptional.empty()
-
getSelectionRationale
public java.util.Optional<java.lang.String> getSelectionRationale()
Return any rationale as to why this resource was selected or why no resource was selected if that was the case.- Returns:
- Any provided rationale or
Optional.empty()
-
-