Class CreateServiceInstanceRouteBindingResponse.CreateServiceInstanceRouteBindingResponseBuilder
java.lang.Object
org.springframework.cloud.servicebroker.model.binding.CreateServiceInstanceRouteBindingResponse.CreateServiceInstanceRouteBindingResponseBuilder
- Enclosing class:
- CreateServiceInstanceRouteBindingResponse
public static final class CreateServiceInstanceRouteBindingResponse.CreateServiceInstanceRouteBindingResponseBuilder
extends Object
Provides a fluent API for constructing a
CreateServiceInstanceAppBindingResponse
.-
Method Summary
Modifier and TypeMethodDescriptionasync
(boolean async) Set a boolean value indicating whether the requested operation is being performed synchronously or asynchronously.bindingExisted
(boolean bindingExisted) Set a boolean value indicating whether the service binding already exists with the same parameters as the requested service binding.build()
Construct aCreateServiceInstanceRouteBindingResponse
from the provided values.metadata
(BindingMetadata metadata) Set the service instance binding metadataSet a value to inform the user of the operation being performed in support of an asynchronous response.routeServiceUrl
(String routeServiceUrl) Set a URL to which the platform should proxy requests for the bound route.
-
Method Details
-
routeServiceUrl
public CreateServiceInstanceRouteBindingResponse.CreateServiceInstanceRouteBindingResponseBuilder routeServiceUrl(String routeServiceUrl) Set a URL to which the platform should proxy requests for the bound route. Can be null.This value will set the route_service_url field in the body of the response to the platform
- Parameters:
routeServiceUrl
- the route service URL- Returns:
- the builder
-
bindingExisted
public CreateServiceInstanceRouteBindingResponse.CreateServiceInstanceRouteBindingResponseBuilder bindingExisted(boolean bindingExisted) Set a boolean value indicating whether the service binding already exists with the same parameters as the requested service binding. A true value indicates a service binding exists and no new resources were created by the service broker,false
indicates that new resources were created.This value will be used to determine the HTTP response code to the platform. A true value will result in a response code 200 OK, and a false value will result in a response code 201 CREATED.
- Parameters:
bindingExisted
- true to indicate that the binding exists, false otherwise- Returns:
- the builder
-
metadata
public CreateServiceInstanceRouteBindingResponse.CreateServiceInstanceRouteBindingResponseBuilder metadata(BindingMetadata metadata) Set the service instance binding metadataThis value will set the metadata field in the body of the response to the platform.
- Parameters:
metadata
- metadata about this service binding- Returns:
- the builder
-
async
public CreateServiceInstanceRouteBindingResponse.CreateServiceInstanceRouteBindingResponseBuilder async(boolean async) Set a boolean value indicating whether the requested operation is being performed synchronously or asynchronously.This value will be used to determine the HTTP response code to the platform. A true value will result in a response code 202 ACCEPTED; otherwise the response code will be determined by the value of
bindingExisted(boolean)
.- Parameters:
async
- true to indicate that the operation is being performed asynchronously, false to indicate that the operation was completed- Returns:
- the builder
- See Also:
-
operation
public CreateServiceInstanceRouteBindingResponse.CreateServiceInstanceRouteBindingResponseBuilder operation(String operation) Set a value to inform the user of the operation being performed in support of an asynchronous response. This value will be passed back to the service broker in subsequentGetLastServiceBindingOperationRequest
requests.This value will set the operation field in the body of the response to the platform.
- Parameters:
operation
- the informational value- Returns:
- the builder
-
build
Construct aCreateServiceInstanceRouteBindingResponse
from the provided values.- Returns:
- the newly constructed CreateServiceInstanceRouteBindingResponse
-