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 class
ImmutableTeamCreate.Builder
Builds instances of typeImmutableTeamCreate
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableTeamCreate.Builder
builder()
Creates a builder forImmutableTeamCreate
.static ImmutableTeamCreate
copyOf(TeamCreate instance)
Creates an immutable copy of aTeamCreate
value.Optional<String>
description()
The description of the team.boolean
equals(Object another)
This instance is equal to all instances ofImmutableTeamCreate
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:name
,description
,maintainers
,repo_names
,parent_team_id
.Optional<String>
maintainers()
List GitHub IDs for organization members who will become team maintainers.String
name()
The name of the team.Optional<String>
parent_team_id()
The ID of a team to set as the parent team.Optional<String>
repo_names()
The full name (e.g., "organization-name/repository-name") of repositories to add the team to.String
toString()
Prints the immutable valueTeamCreate
with attribute values.ImmutableTeamCreate
withDescription(String value)
Copy the current immutable object by setting a present value for the optionaldescription
attribute.ImmutableTeamCreate
withDescription(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedescription
attribute.ImmutableTeamCreate
withMaintainers(String value)
Copy the current immutable object by setting a present value for the optionalmaintainers
attribute.ImmutableTeamCreate
withMaintainers(Optional<String> optional)
Copy the current immutable object by setting an optional value for themaintainers
attribute.ImmutableTeamCreate
withName(String value)
Copy the current immutable object by setting a value for thename
attribute.ImmutableTeamCreate
withParent_team_id(String value)
Copy the current immutable object by setting a present value for the optionalparent_team_id
attribute.ImmutableTeamCreate
withParent_team_id(Optional<String> optional)
Copy the current immutable object by setting an optional value for theparent_team_id
attribute.ImmutableTeamCreate
withRepo_names(String value)
Copy the current immutable object by setting a present value for the optionalrepo_names
attribute.ImmutableTeamCreate
withRepo_names(Optional<String> optional)
Copy the current immutable object by setting an optional value for therepo_names
attribute.
-
-
-
Method Detail
-
name
@Nullable public String name()
The name of the team.- Specified by:
name
in interfaceTeamCreate
-
description
public Optional<String> description()
The description of the team.- Specified by:
description
in interfaceTeamCreate
-
maintainers
public Optional<String> maintainers()
List GitHub IDs for organization members who will become team maintainers.- Specified by:
maintainers
in interfaceTeamCreate
-
repo_names
public Optional<String> repo_names()
The full name (e.g., "organization-name/repository-name") of repositories to add the team to.- Specified by:
repo_names
in interfaceTeamCreate
-
parent_team_id
public Optional<String> parent_team_id()
The ID of a team to set as the parent team.- Specified by:
parent_team_id
in interfaceTeamCreate
-
withName
public final ImmutableTeamCreate 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 ImmutableTeamCreate 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 ImmutableTeamCreate 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
-
withMaintainers
public final ImmutableTeamCreate withMaintainers(String value)
Copy the current immutable object by setting a present value for the optionalmaintainers
attribute.- Parameters:
value
- The value for maintainers- Returns:
- A modified copy of
this
object
-
withMaintainers
public final ImmutableTeamCreate withMaintainers(Optional<String> optional)
Copy the current immutable object by setting an optional value for themaintainers
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for maintainers- Returns:
- A modified copy of
this
object
-
withRepo_names
public final ImmutableTeamCreate withRepo_names(String value)
Copy the current immutable object by setting a present value for the optionalrepo_names
attribute.- Parameters:
value
- The value for repo_names- Returns:
- A modified copy of
this
object
-
withRepo_names
public final ImmutableTeamCreate withRepo_names(Optional<String> optional)
Copy the current immutable object by setting an optional value for therepo_names
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for repo_names- Returns:
- A modified copy of
this
object
-
withParent_team_id
public final ImmutableTeamCreate withParent_team_id(String value)
Copy the current immutable object by setting a present value for the optionalparent_team_id
attribute.- Parameters:
value
- The value for parent_team_id- Returns:
- A modified copy of
this
object
-
withParent_team_id
public final ImmutableTeamCreate withParent_team_id(Optional<String> optional)
Copy the current immutable object by setting an optional value for theparent_team_id
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for parent_team_id- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableTeamCreate
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:name
,description
,maintainers
,repo_names
,parent_team_id
.
-
toString
public String toString()
Prints the immutable valueTeamCreate
with attribute values.
-
copyOf
public static ImmutableTeamCreate copyOf(TeamCreate instance)
Creates an immutable copy of aTeamCreate
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 TeamCreate instance
-
builder
public static ImmutableTeamCreate.Builder builder()
Creates a builder forImmutableTeamCreate
.ImmutableTeamCreate.builder() .name(String | null) // nullable
name
.description(String) // optionaldescription
.maintainers(String) // optionalmaintainers
.repo_names(String) // optionalrepo_names
.parent_team_id(String) // optionalparent_team_id
.build();- Returns:
- A new ImmutableTeamCreate builder
-
-