Class CreateServiceInstanceBindingResponse.CreateServiceInstanceBindingResponseBuilder
java.lang.Object
org.springframework.cloud.servicebroker.model.binding.CreateServiceInstanceBindingResponse.CreateServiceInstanceBindingResponseBuilder
- Enclosing class:
- CreateServiceInstanceBindingResponse
public static final class CreateServiceInstanceBindingResponse.CreateServiceInstanceBindingResponseBuilder
extends Object
Provides a fluent API for constructing a
CreateServiceInstanceResponse
.-
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 instance binding already exists with the same parameters as the requested service instance binding.build()
Construct aCreateServiceInstanceBindingResponse
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.
-
Method Details
-
bindingExisted
public CreateServiceInstanceBindingResponse.CreateServiceInstanceBindingResponseBuilder bindingExisted(boolean bindingExisted) Set a boolean value indicating whether the service instance binding already exists with the same parameters as the requested service instance binding. A true value indicates a service instance binding exists and no new resources were created by the service broker,false
indicates that new resources were created. If the request is for the same binding id, but with different parameters, the implementor should throw aServiceInstanceBindingExistsException
instead.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
async(boolean)
.- Parameters:
bindingExisted
- true to indicate that the binding exists, false otherwise- Returns:
- the builder
-
metadata
public CreateServiceInstanceBindingResponse.CreateServiceInstanceBindingResponseBuilder 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 CreateServiceInstanceBindingResponse.CreateServiceInstanceBindingResponseBuilder 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. If the service broker indicates that it performed the operation synchronously, a true value will result in a response code 200 OK, and a false value will result in a response code 201 CREATED.
- Parameters:
async
- true to indicate that the operation is being performed asynchronously, false to indicate that the operation was completed- Returns:
- the builder
-
operation
public CreateServiceInstanceBindingResponse.CreateServiceInstanceBindingResponseBuilder 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
- description of the operation being performed- Returns:
- the builder
-
build
Construct aCreateServiceInstanceBindingResponse
from the provided values.- Returns:
- the newly constructed CreateServiceInstanceBindingResponse
-