Class SlackErrorResponse.Builder
java.lang.Object
com.hubspot.slack.client.models.response.SlackErrorResponse.Builder
- Enclosing class:
SlackErrorResponse
@Generated(from="SlackErrorResponseIF",
generator="Immutables")
@NotThreadSafe
public static final class SlackErrorResponse.Builder
extends Object
Builds instances of type
SlackErrorResponse.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllErrors(Iterable<? extends SlackError> elements) Adds elements toerrorslist.addErrors(SlackError element) Adds one element toerrorslist.addErrors(SlackError... elements) Adds elements toerrorslist.build()Builds a newSlackErrorResponse.from(SlackErrorResponseIF instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.response.SlackErrorResponseIFinstance.from(SlackResponse instance) Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.response.SlackResponseinstance.setError(SlackError error) Initializes the optional valueerrorto error.setError(Optional<? extends SlackError> error) Initializes the optional valueerrorto error.setErrors(Iterable<? extends SlackError> elements) Sets or replaces all elements forerrorslist.setOk(boolean ok) Initializes the value for theokattribute.setResponseMetadata(ResponseMetadata responseMetadata) Initializes the optional valueresponseMetadatato responseMetadata.setResponseMetadata(Optional<? extends ResponseMetadata> responseMetadata) Initializes the optional valueresponseMetadatato responseMetadata.
-
Method Details
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.response.SlackErrorResponseIFinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.hubspot.slack.client.models.response.SlackResponseinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setOk
Initializes the value for theokattribute.- Parameters:
ok- The value for ok- Returns:
thisbuilder for use in a chained invocation
-
setResponseMetadata
public final SlackErrorResponse.Builder setResponseMetadata(@Nullable ResponseMetadata responseMetadata) Initializes the optional valueresponseMetadatato responseMetadata.- Parameters:
responseMetadata- The value for responseMetadata,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setResponseMetadata
public final SlackErrorResponse.Builder setResponseMetadata(Optional<? extends ResponseMetadata> responseMetadata) Initializes the optional valueresponseMetadatato responseMetadata.- Parameters:
responseMetadata- The value for responseMetadata- Returns:
thisbuilder for use in a chained invocation
-
setError
Initializes the optional valueerrorto error.- Parameters:
error- The value for error,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setError
Initializes the optional valueerrorto error.- Parameters:
error- The value for error- Returns:
thisbuilder for use in a chained invocation
-
addErrors
Adds one element toerrorslist.- Parameters:
element- A errors element- Returns:
thisbuilder for use in a chained invocation
-
addErrors
Adds elements toerrorslist.- Parameters:
elements- An array of errors elements- Returns:
thisbuilder for use in a chained invocation
-
setErrors
Sets or replaces all elements forerrorslist.- Parameters:
elements- An iterable of errors elements- Returns:
thisbuilder for use in a chained invocation
-
addAllErrors
Adds elements toerrorslist.- Parameters:
elements- An iterable of errors elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSlackErrorResponse.- Returns:
- An immutable instance of SlackErrorResponse
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-