Class HttpDestinationBuilder
java.lang.Object
com.commercetools.api.models.extension.HttpDestinationBuilder
- All Implemented Interfaces:
Builder<HttpDestination>
- Direct Known Subclasses:
ExtensionHttpDestinationBuilder
HttpDestinationBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
HttpDestination httpDestination = HttpDestination.builder()
.url("{url}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionauthentication
(HttpDestinationAuthentication authentication) Authentication methods (such asBasic
orBearer
).authentication
(Function<HttpDestinationAuthenticationBuilder, Builder<? extends HttpDestinationAuthentication>> builder) Authentication methods (such asBasic
orBearer
).build()
builds HttpDestination with checking for non-null required valuesbuilds HttpDestination without checking for non-null required valuesAuthentication methods (such asBasic
orBearer
).getUrl()
URL to the target destination.static HttpDestinationBuilder
of()
factory method for an instance of HttpDestinationBuilderstatic HttpDestinationBuilder
of
(HttpDestination template) create builder for HttpDestination instanceURL to the target destination.
-
Constructor Details
-
HttpDestinationBuilder
public HttpDestinationBuilder()
-
-
Method Details
-
url
URL to the target destination.
- Parameters:
url
- value to be set- Returns:
- Builder
-
authentication
public HttpDestinationBuilder authentication(@Nullable HttpDestinationAuthentication authentication) Authentication methods (such as
Basic
orBearer
).- Parameters:
authentication
- value to be set- Returns:
- Builder
-
authentication
public HttpDestinationBuilder authentication(Function<HttpDestinationAuthenticationBuilder, Builder<? extends HttpDestinationAuthentication>> builder) Authentication methods (such as
Basic
orBearer
).- Parameters:
builder
- function to build the authentication value- Returns:
- Builder
-
getUrl
URL to the target destination.
- Returns:
- url
-
getAuthentication
Authentication methods (such as
Basic
orBearer
).- Returns:
- authentication
-
build
builds HttpDestination with checking for non-null required values- Specified by:
build
in interfaceBuilder<HttpDestination>
- Returns:
- HttpDestination
-
buildUnchecked
builds HttpDestination without checking for non-null required values- Returns:
- HttpDestination
-
of
factory method for an instance of HttpDestinationBuilder- Returns:
- builder
-
of
create builder for HttpDestination instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-