Class DefaultDestination.Builder

java.lang.Object
com.sap.cloud.sdk.cloudplatform.connectivity.DefaultDestination.Builder
Enclosing class:
DefaultDestination

public static class DefaultDestination.Builder extends Object
Builder class to allow for easy creation of an immutable DefaultDestination instance.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • property

      @Nonnull public DefaultDestination.Builder property(@Nonnull String key, @Nonnull Object value)
      Adds the given key-value pair to the destination to be created. This will overwrite any property already assigned to the key.
      Parameters:
      key - The key to assign a property for.
      value - The property value to be assigned.
      Returns:
      This builder.
    • name

      @Nonnull public DefaultDestination.Builder name(@Nonnull String name)
      Sets the name of the DefaultDestination.
      Parameters:
      name - The destination name
      Returns:
      This builder.
      Since:
      5.0.0
    • uri

      @Nonnull public DefaultDestination.Builder uri(@Nonnull String uri)
      Sets the URI of the to-be-built DefaultDestination.
      Parameters:
      uri - The URI to set.
      Returns:
      This builder.
      Since:
      5.0.0
    • uri

      @Nonnull public DefaultDestination.Builder uri(@Nonnull URI uri)
      Sets the URI of the to-be-built DefaultDestination.
      Parameters:
      uri - The URI to set.
      Returns:
      This builder.
      Since:
      5.0.0
    • build

      @Nonnull public DefaultDestination build()
      Finally creates the DefaultDestination with the properties retrieved via the property(String, Object) method.
      Returns:
      A fully instantiated DefaultDestination.
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object