Package com.commercetools.graphql.api
Class GraphQLDataResponseBuilder
java.lang.Object
com.commercetools.graphql.api.GraphQLDataResponseBuilder
- All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<GraphQLDataResponse>
public class GraphQLDataResponseBuilder
extends Object
implements io.vrap.rmf.base.client.Builder<GraphQLDataResponse>
GraphQLDataResponseBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
GraphQLDataResponse graphQLResponse = GraphQLDataResponseBuilder.builder()
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddErrors(Function<com.commercetools.api.models.graph_ql.GraphQLErrorBuilder, com.commercetools.api.models.graph_ql.GraphQLError> builder) add the value to the errors using the builder functionbuild()builds GraphQLResponse with checking for non-null required valuesbuilds GraphQLResponse without checking for non-null required valuesdata(GraphQLData data) set the value to the dataerrors(com.commercetools.api.models.graph_ql.GraphQLError... errors) set values to the errorsset value to the errorsgetData()value of data}List<com.commercetools.api.models.graph_ql.GraphQLError>value of errors}static GraphQLDataResponseBuilderof()factory method for an instance of GraphQLResponseBuilderstatic GraphQLDataResponseBuilderof(GraphQLDataResponse template) create builder for GraphQLResponse instanceplusErrors(com.commercetools.api.models.graph_ql.GraphQLError... errors) add values to the errorsplusErrors(Function<com.commercetools.api.models.graph_ql.GraphQLErrorBuilder, com.commercetools.api.models.graph_ql.GraphQLErrorBuilder> builder) add the value to the errors using the builder functionsetErrors(Function<com.commercetools.api.models.graph_ql.GraphQLErrorBuilder, com.commercetools.api.models.graph_ql.GraphQLError> builder) set the value to the errors using the builder functionwithErrors(Function<com.commercetools.api.models.graph_ql.GraphQLErrorBuilder, com.commercetools.api.models.graph_ql.GraphQLErrorBuilder> builder) set the value to the errors using the builder function
-
Constructor Details
-
GraphQLDataResponseBuilder
public GraphQLDataResponseBuilder()
-
-
Method Details
-
data
set the value to the data- Parameters:
data- value to be set- Returns:
- Builder
-
errors
public GraphQLDataResponseBuilder errors(@Nullable com.commercetools.api.models.graph_ql.GraphQLError... errors) set values to the errors- Parameters:
errors- value to be set- Returns:
- Builder
-
errors
public GraphQLDataResponseBuilder errors(@Nullable List<com.commercetools.api.models.graph_ql.GraphQLError> errors) set value to the errors- Parameters:
errors- value to be set- Returns:
- Builder
-
plusErrors
public GraphQLDataResponseBuilder plusErrors(@Nullable com.commercetools.api.models.graph_ql.GraphQLError... errors) add values to the errors- Parameters:
errors- value to be set- Returns:
- Builder
-
plusErrors
public GraphQLDataResponseBuilder plusErrors(Function<com.commercetools.api.models.graph_ql.GraphQLErrorBuilder, com.commercetools.api.models.graph_ql.GraphQLErrorBuilder> builder) add the value to the errors using the builder function- Parameters:
builder- function to build the errors value- Returns:
- Builder
-
withErrors
public GraphQLDataResponseBuilder withErrors(Function<com.commercetools.api.models.graph_ql.GraphQLErrorBuilder, com.commercetools.api.models.graph_ql.GraphQLErrorBuilder> builder) set the value to the errors using the builder function- Parameters:
builder- function to build the errors value- Returns:
- Builder
-
addErrors
public GraphQLDataResponseBuilder addErrors(Function<com.commercetools.api.models.graph_ql.GraphQLErrorBuilder, com.commercetools.api.models.graph_ql.GraphQLError> builder) add the value to the errors using the builder function- Parameters:
builder- function to build the errors value- Returns:
- Builder
-
setErrors
public GraphQLDataResponseBuilder setErrors(Function<com.commercetools.api.models.graph_ql.GraphQLErrorBuilder, com.commercetools.api.models.graph_ql.GraphQLError> builder) set the value to the errors using the builder function- Parameters:
builder- function to build the errors value- Returns:
- Builder
-
getData
value of data}- Returns:
- data
-
getErrors
value of errors}- Returns:
- errors
-
build
builds GraphQLResponse with checking for non-null required values- Specified by:
buildin interfaceio.vrap.rmf.base.client.Builder<GraphQLDataResponse>- Returns:
- GraphQLResponse
-
buildUnchecked
builds GraphQLResponse without checking for non-null required values- Returns:
- GraphQLResponse
-
of
factory method for an instance of GraphQLResponseBuilder- Returns:
- builder
-
of
create builder for GraphQLResponse instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-