Class CreateServiceInstanceResponse.CreateServiceInstanceResponseBuilder

java.lang.Object
org.springframework.cloud.servicebroker.model.instance.CreateServiceInstanceResponse.CreateServiceInstanceResponseBuilder
Enclosing class:
CreateServiceInstanceResponse

public static final class CreateServiceInstanceResponse.CreateServiceInstanceResponseBuilder extends Object
Provides a fluent API for constructing a CreateServiceInstanceResponse.
  • Method Details

    • dashboardUrl

      Set the URL of a web-based management user interface provided by the service broker for the service instance. Can be null to indicate that a management dashboard is not provided.

      This value will set the dashboard_url field in the body of the response to the platform.

      Parameters:
      dashboardUrl - the dashboard URL
      Returns:
      the builder
    • instanceExisted

      public CreateServiceInstanceResponse.CreateServiceInstanceResponseBuilder instanceExisted(boolean instanceExisted)
      Set a boolean value indicating whether the service instance already exists with the same parameters as the requested service instance. A true value indicates a service instance 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. 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:
      instanceExisted - true to indicate that the instance exists, false otherwise
      Returns:
      the builder
      See Also:
    • metadata

      Object containing metadata for the service instance Can be null to indicate that metadata was not provided for the service instance.

      This value will set the metadata field in the body of the response to the platform.

      Parameters:
      metadata - the service instance metadata
      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. A true value will result in a response code 202 ACCEPTED; otherwise the response code will be determined by the value of instanceExisted(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

      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 GetLastServiceOperationRequest 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 a CreateServiceInstanceResponse from the provided values.
      Returns:
      the newly constructed CreateServiceInstanceResponse