Class ExternalRef.Builder
java.lang.Object
com.hubspot.slack.client.methods.params.chat.workobject.ExternalRef.Builder
- Enclosing class:
ExternalRef
@Generated(from="ExternalRefIF",
generator="Immutables")
@NotThreadSafe
public static final class ExternalRef.Builder
extends Object
Builds instances of type
ExternalRef.
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 TypeMethodDescriptionbuild()Builds a newExternalRef.final ExternalRef.Builderfrom(ExternalRefIF instance) Fill a builder with attribute values from the providedExternalRefIFinstance.final ExternalRef.BuilderInitializes the value for theidattribute.final ExternalRef.BuilderInitializes the optional valuetypeto type.final ExternalRef.BuilderInitializes the optional valuetypeto type.
-
Method Details
-
from
Fill a builder with attribute values from the providedExternalRefIFinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setId
Initializes the value for theidattribute.- Parameters:
id- The value for id- Returns:
thisbuilder for use in a chained invocation
-
setType
Initializes the optional valuetypeto type.- Parameters:
type- The value for type,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setType
Initializes the optional valuetypeto type.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newExternalRef.- Returns:
- An immutable instance of ExternalRef
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-