Class ImmutableTeamUpdate
- java.lang.Object
-
- com.spotify.github.v3.orgs.requests.ImmutableTeamUpdate
-
- All Implemented Interfaces:
TeamUpdate
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableTeamUpdate extends Object implements TeamUpdate
Immutable implementation ofTeamUpdate
.Use the builder to create immutable instances:
ImmutableTeamUpdate.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableTeamUpdate.Builder
Builds instances of typeImmutableTeamUpdate
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableTeamUpdate.Builder
builder()
Creates a builder forImmutableTeamUpdate
.static ImmutableTeamUpdate
copyOf(TeamUpdate instance)
Creates an immutable copy of aTeamUpdate
value.Optional<String>
description()
The description of the team.boolean
equals(Object another)
This instance is equal to all instances ofImmutableTeamUpdate
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:name
,description
,privacy
,notificationSetting
,parentTeamId
.String
name()
The name of the team.Optional<String>
notificationSetting()
The notification setting the team has chosen.Optional<Integer>
parentTeamId()
The ID of a team to set as the parent team.Optional<String>
privacy()
The level of privacy this team should have.String
toString()
Prints the immutable valueTeamUpdate
with attribute values.ImmutableTeamUpdate
withDescription(String value)
Copy the current immutable object by setting a present value for the optionaldescription
attribute.ImmutableTeamUpdate
withDescription(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedescription
attribute.ImmutableTeamUpdate
withName(String value)
Copy the current immutable object by setting a value for thename
attribute.ImmutableTeamUpdate
withNotificationSetting(String value)
Copy the current immutable object by setting a present value for the optionalnotificationSetting
attribute.ImmutableTeamUpdate
withNotificationSetting(Optional<String> optional)
Copy the current immutable object by setting an optional value for thenotificationSetting
attribute.ImmutableTeamUpdate
withParentTeamId(int value)
Copy the current immutable object by setting a present value for the optionalparentTeamId
attribute.ImmutableTeamUpdate
withParentTeamId(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for theparentTeamId
attribute.ImmutableTeamUpdate
withPrivacy(String value)
Copy the current immutable object by setting a present value for the optionalprivacy
attribute.ImmutableTeamUpdate
withPrivacy(Optional<String> optional)
Copy the current immutable object by setting an optional value for theprivacy
attribute.
-
-
-
Method Detail
-
name
@Nullable public String name()
The name of the team.- Specified by:
name
in interfaceTeamUpdate
-
description
public Optional<String> description()
The description of the team.- Specified by:
description
in interfaceTeamUpdate
-
privacy
public Optional<String> privacy()
The level of privacy this team should have. For a non-nested team: secret - only visible to organization owners and members of this team. closed - visible to all members of this organization. Default: secret For a parent or child team: closed - visible to all members of this organization. Default for child team: closed Can be one of: secret, closed- Specified by:
privacy
in interfaceTeamUpdate
-
notificationSetting
public Optional<String> notificationSetting()
The notification setting the team has chosen. The options are: notifications_enabled - team members receive notifications when the team is @mentioned. notifications_disabled - no one receives notifications. Default: notifications_enabled Can be one of: notifications_enabled, notifications_disabled- Specified by:
notificationSetting
in interfaceTeamUpdate
-
parentTeamId
public Optional<Integer> parentTeamId()
The ID of a team to set as the parent team.- Specified by:
parentTeamId
in interfaceTeamUpdate
-
withName
public final ImmutableTeamUpdate withName(@Nullable String value)
Copy the current immutable object by setting a value for thename
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for name (can benull
)- Returns:
- A modified copy of the
this
object
-
withDescription
public final ImmutableTeamUpdate withDescription(String value)
Copy the current immutable object by setting a present value for the optionaldescription
attribute.- Parameters:
value
- The value for description- Returns:
- A modified copy of
this
object
-
withDescription
public final ImmutableTeamUpdate withDescription(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedescription
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for description- Returns:
- A modified copy of
this
object
-
withPrivacy
public final ImmutableTeamUpdate withPrivacy(String value)
Copy the current immutable object by setting a present value for the optionalprivacy
attribute.- Parameters:
value
- The value for privacy- Returns:
- A modified copy of
this
object
-
withPrivacy
public final ImmutableTeamUpdate withPrivacy(Optional<String> optional)
Copy the current immutable object by setting an optional value for theprivacy
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for privacy- Returns:
- A modified copy of
this
object
-
withNotificationSetting
public final ImmutableTeamUpdate withNotificationSetting(String value)
Copy the current immutable object by setting a present value for the optionalnotificationSetting
attribute.- Parameters:
value
- The value for notificationSetting- Returns:
- A modified copy of
this
object
-
withNotificationSetting
public final ImmutableTeamUpdate withNotificationSetting(Optional<String> optional)
Copy the current immutable object by setting an optional value for thenotificationSetting
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for notificationSetting- Returns:
- A modified copy of
this
object
-
withParentTeamId
public final ImmutableTeamUpdate withParentTeamId(int value)
Copy the current immutable object by setting a present value for the optionalparentTeamId
attribute.- Parameters:
value
- The value for parentTeamId- Returns:
- A modified copy of
this
object
-
withParentTeamId
public final ImmutableTeamUpdate withParentTeamId(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for theparentTeamId
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for parentTeamId- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableTeamUpdate
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:name
,description
,privacy
,notificationSetting
,parentTeamId
.
-
toString
public String toString()
Prints the immutable valueTeamUpdate
with attribute values.
-
copyOf
public static ImmutableTeamUpdate copyOf(TeamUpdate instance)
Creates an immutable copy of aTeamUpdate
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable TeamUpdate instance
-
builder
public static ImmutableTeamUpdate.Builder builder()
Creates a builder forImmutableTeamUpdate
.ImmutableTeamUpdate.builder() .name(String | null) // nullable
name
.description(String) // optionaldescription
.privacy(String) // optionalprivacy
.notificationSetting(String) // optionalnotificationSetting
.parentTeamId(Integer) // optionalparentTeamId
.build();- Returns:
- A new ImmutableTeamUpdate builder
-
-