Class ImmutableTeamUpdate.Builder
- java.lang.Object
-
- com.spotify.github.v3.orgs.requests.ImmutableTeamUpdate.Builder
-
- Enclosing class:
- ImmutableTeamUpdate
@NotThreadSafe public static final class ImmutableTeamUpdate.Builder extends Object
Builds instances of typeImmutableTeamUpdate
. Initialize attributes and then invoke thebuild()
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableTeamUpdate
build()
Builds a newImmutableTeamUpdate
.ImmutableTeamUpdate.Builder
description(String description)
Initializes the optional valuedescription
to description.ImmutableTeamUpdate.Builder
description(Optional<String> description)
Initializes the optional valuedescription
to description.ImmutableTeamUpdate.Builder
from(TeamUpdate instance)
Fill a builder with attribute values from the providedTeamUpdate
instance.ImmutableTeamUpdate.Builder
name(String name)
Initializes the value for thename
attribute.ImmutableTeamUpdate.Builder
notification_setting(String notification_setting)
Initializes the optional valuenotification_setting
to notification_setting.ImmutableTeamUpdate.Builder
notification_setting(Optional<String> notification_setting)
Initializes the optional valuenotification_setting
to notification_setting.ImmutableTeamUpdate.Builder
parent_team_id(String parent_team_id)
Initializes the optional valueparent_team_id
to parent_team_id.ImmutableTeamUpdate.Builder
parent_team_id(Optional<String> parent_team_id)
Initializes the optional valueparent_team_id
to parent_team_id.ImmutableTeamUpdate.Builder
privacy(String privacy)
Initializes the optional valueprivacy
to privacy.ImmutableTeamUpdate.Builder
privacy(Optional<String> privacy)
Initializes the optional valueprivacy
to privacy.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableTeamUpdate.Builder from(TeamUpdate instance)
Fill a builder with attribute values from the providedTeamUpdate
instance. 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:
this
builder for use in a chained invocation
-
name
@CanIgnoreReturnValue public final ImmutableTeamUpdate.Builder name(@Nullable String name)
Initializes the value for thename
attribute.- Parameters:
name
- The value for name (can benull
)- Returns:
this
builder for use in a chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableTeamUpdate.Builder description(String description)
Initializes the optional valuedescription
to description.- Parameters:
description
- The value for description- Returns:
this
builder for chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableTeamUpdate.Builder description(Optional<String> description)
Initializes the optional valuedescription
to description.- Parameters:
description
- The value for description- Returns:
this
builder for use in a chained invocation
-
privacy
@CanIgnoreReturnValue public final ImmutableTeamUpdate.Builder privacy(String privacy)
Initializes the optional valueprivacy
to privacy.- Parameters:
privacy
- The value for privacy- Returns:
this
builder for chained invocation
-
privacy
@CanIgnoreReturnValue public final ImmutableTeamUpdate.Builder privacy(Optional<String> privacy)
Initializes the optional valueprivacy
to privacy.- Parameters:
privacy
- The value for privacy- Returns:
this
builder for use in a chained invocation
-
notification_setting
@CanIgnoreReturnValue public final ImmutableTeamUpdate.Builder notification_setting(String notification_setting)
Initializes the optional valuenotification_setting
to notification_setting.- Parameters:
notification_setting
- The value for notification_setting- Returns:
this
builder for chained invocation
-
notification_setting
@CanIgnoreReturnValue public final ImmutableTeamUpdate.Builder notification_setting(Optional<String> notification_setting)
Initializes the optional valuenotification_setting
to notification_setting.- Parameters:
notification_setting
- The value for notification_setting- Returns:
this
builder for use in a chained invocation
-
parent_team_id
@CanIgnoreReturnValue public final ImmutableTeamUpdate.Builder parent_team_id(String parent_team_id)
Initializes the optional valueparent_team_id
to parent_team_id.- Parameters:
parent_team_id
- The value for parent_team_id- Returns:
this
builder for chained invocation
-
parent_team_id
@CanIgnoreReturnValue public final ImmutableTeamUpdate.Builder parent_team_id(Optional<String> parent_team_id)
Initializes the optional valueparent_team_id
to parent_team_id.- Parameters:
parent_team_id
- The value for parent_team_id- Returns:
this
builder for use in a chained invocation
-
build
public ImmutableTeamUpdate build()
Builds a newImmutableTeamUpdate
.- Returns:
- An immutable instance of TeamUpdate
- Throws:
IllegalStateException
- if any required attributes are missing
-
-