Class ImmutableTeamCreate
- java.lang.Object
-
- com.spotify.github.v3.orgs.requests.ImmutableTeamCreate
-
- All Implemented Interfaces:
TeamCreate
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableTeamCreate extends Object implements TeamCreate
Immutable implementation ofTeamCreate.Use the builder to create immutable instances:
ImmutableTeamCreate.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableTeamCreate.BuilderBuilds instances of typeImmutableTeamCreate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableTeamCreate.Builderbuilder()Creates a builder forImmutableTeamCreate.static ImmutableTeamCreatecopyOf(TeamCreate instance)Creates an immutable copy of aTeamCreatevalue.Optional<String>description()The description of the team.booleanequals(Object another)This instance is equal to all instances ofImmutableTeamCreatethat have equal attribute values.inthashCode()Computes a hash code from attributes:name,description,privacy,notificationSetting,maintainers,repoNames,parentTeamId.Optional<List<String>>maintainers()List GitHub IDs for organization members who will become team maintainers.Stringname()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.Optional<List<String>>repoNames()The full name (e.g., "organization-name/repository-name") of repositories to add the team to.StringtoString()Prints the immutable valueTeamCreatewith attribute values.ImmutableTeamCreatewithDescription(String value)Copy the current immutable object by setting a present value for the optionaldescriptionattribute.ImmutableTeamCreatewithDescription(Optional<String> optional)Copy the current immutable object by setting an optional value for thedescriptionattribute.ImmutableTeamCreatewithMaintainers(List<String> value)Copy the current immutable object by setting a present value for the optionalmaintainersattribute.ImmutableTeamCreatewithMaintainers(Optional<? extends List<String>> optional)Copy the current immutable object by setting an optional value for themaintainersattribute.ImmutableTeamCreatewithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableTeamCreatewithNotificationSetting(String value)Copy the current immutable object by setting a present value for the optionalnotificationSettingattribute.ImmutableTeamCreatewithNotificationSetting(Optional<String> optional)Copy the current immutable object by setting an optional value for thenotificationSettingattribute.ImmutableTeamCreatewithParentTeamId(int value)Copy the current immutable object by setting a present value for the optionalparentTeamIdattribute.ImmutableTeamCreatewithParentTeamId(Optional<Integer> optional)Copy the current immutable object by setting an optional value for theparentTeamIdattribute.ImmutableTeamCreatewithPrivacy(String value)Copy the current immutable object by setting a present value for the optionalprivacyattribute.ImmutableTeamCreatewithPrivacy(Optional<String> optional)Copy the current immutable object by setting an optional value for theprivacyattribute.ImmutableTeamCreatewithRepoNames(List<String> value)Copy the current immutable object by setting a present value for the optionalrepoNamesattribute.ImmutableTeamCreatewithRepoNames(Optional<? extends List<String>> optional)Copy the current immutable object by setting an optional value for therepoNamesattribute.
-
-
-
Method Detail
-
name
public String name()
The name of the team.- Specified by:
namein interfaceTeamCreate
-
description
public Optional<String> description()
The description of the team.- Specified by:
descriptionin interfaceTeamCreate
-
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:
privacyin interfaceTeamCreate
-
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:
notificationSettingin interfaceTeamCreate
-
maintainers
public Optional<List<String>> maintainers()
List GitHub IDs for organization members who will become team maintainers.- Specified by:
maintainersin interfaceTeamCreate
-
repoNames
public Optional<List<String>> repoNames()
The full name (e.g., "organization-name/repository-name") of repositories to add the team to.- Specified by:
repoNamesin interfaceTeamCreate
-
parentTeamId
public Optional<Integer> parentTeamId()
The ID of a team to set as the parent team.- Specified by:
parentTeamIdin interfaceTeamCreate
-
withName
public final ImmutableTeamCreate withName(String value)
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withDescription
public final ImmutableTeamCreate withDescription(String value)
Copy the current immutable object by setting a present value for the optionaldescriptionattribute.- Parameters:
value- The value for description- Returns:
- A modified copy of
thisobject
-
withDescription
public final ImmutableTeamCreate withDescription(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedescriptionattribute. 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
thisobject
-
withPrivacy
public final ImmutableTeamCreate withPrivacy(String value)
Copy the current immutable object by setting a present value for the optionalprivacyattribute.- Parameters:
value- The value for privacy- Returns:
- A modified copy of
thisobject
-
withPrivacy
public final ImmutableTeamCreate withPrivacy(Optional<String> optional)
Copy the current immutable object by setting an optional value for theprivacyattribute. 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
thisobject
-
withNotificationSetting
public final ImmutableTeamCreate withNotificationSetting(String value)
Copy the current immutable object by setting a present value for the optionalnotificationSettingattribute.- Parameters:
value- The value for notificationSetting- Returns:
- A modified copy of
thisobject
-
withNotificationSetting
public final ImmutableTeamCreate withNotificationSetting(Optional<String> optional)
Copy the current immutable object by setting an optional value for thenotificationSettingattribute. 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
thisobject
-
withMaintainers
public final ImmutableTeamCreate withMaintainers(List<String> value)
Copy the current immutable object by setting a present value for the optionalmaintainersattribute.- Parameters:
value- The value for maintainers- Returns:
- A modified copy of
thisobject
-
withMaintainers
public final ImmutableTeamCreate withMaintainers(Optional<? extends List<String>> optional)
Copy the current immutable object by setting an optional value for themaintainersattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for maintainers- Returns:
- A modified copy of
thisobject
-
withRepoNames
public final ImmutableTeamCreate withRepoNames(List<String> value)
Copy the current immutable object by setting a present value for the optionalrepoNamesattribute.- Parameters:
value- The value for repoNames- Returns:
- A modified copy of
thisobject
-
withRepoNames
public final ImmutableTeamCreate withRepoNames(Optional<? extends List<String>> optional)
Copy the current immutable object by setting an optional value for therepoNamesattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for repoNames- Returns:
- A modified copy of
thisobject
-
withParentTeamId
public final ImmutableTeamCreate withParentTeamId(int value)
Copy the current immutable object by setting a present value for the optionalparentTeamIdattribute.- Parameters:
value- The value for parentTeamId- Returns:
- A modified copy of
thisobject
-
withParentTeamId
public final ImmutableTeamCreate withParentTeamId(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for theparentTeamIdattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableTeamCreatethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:name,description,privacy,notificationSetting,maintainers,repoNames,parentTeamId.
-
toString
public String toString()
Prints the immutable valueTeamCreatewith attribute values.
-
copyOf
public static ImmutableTeamCreate copyOf(TeamCreate instance)
Creates an immutable copy of aTeamCreatevalue. 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 TeamCreate instance
-
builder
public static ImmutableTeamCreate.Builder builder()
Creates a builder forImmutableTeamCreate.ImmutableTeamCreate.builder() .name(String) // requiredname.description(String) // optionaldescription.privacy(String) // optionalprivacy.notificationSetting(String) // optionalnotificationSetting.maintainers(List<String>) // optionalmaintainers.repoNames(List<String>) // optionalrepoNames.parentTeamId(Integer) // optionalparentTeamId.build();- Returns:
- A new ImmutableTeamCreate builder
-
-