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 Details

    • 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 a ServiceInstanceBindingExistsException 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

      Set the service instance binding metadata

      This 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

      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

      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 subsequent GetLastServiceBindingOperationRequest 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 a CreateServiceInstanceBindingResponse from the provided values.
      Returns:
      the newly constructed CreateServiceInstanceBindingResponse