Class ImmutableTeamCreate

  • All Implemented Interfaces:
    TeamCreate

    @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableTeamCreate
    extends Object
    implements TeamCreate
    Immutable implementation of TeamCreate.

    Use the builder to create immutable instances: ImmutableTeamCreate.builder().

    • Method Detail

      • name

        @Nullable
        public String name()
        The name of the team.
        Specified by:
        name in interface TeamCreate
      • 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 interface TeamCreate
      • notification_setting

        public Optional<String> notification_setting()
        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:
        notification_setting in interface TeamCreate
      • repo_names

        public Optional<List<String>> repo_names()
        The full name (e.g., "organization-name/repository-name") of repositories to add the team to.
        Specified by:
        repo_names in interface TeamCreate
      • withName

        public final ImmutableTeamCreate withName​(@Nullable
                                                  String value)
        Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for name (can be null)
        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 optional description 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 the description attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for description
        Returns:
        A modified copy of this object
      • withPrivacy

        public final ImmutableTeamCreate withPrivacy​(String value)
        Copy the current immutable object by setting a present value for the optional privacy attribute.
        Parameters:
        value - The value for privacy
        Returns:
        A modified copy of this object
      • withPrivacy

        public final ImmutableTeamCreate withPrivacy​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the privacy attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for privacy
        Returns:
        A modified copy of this object
      • withNotification_setting

        public final ImmutableTeamCreate withNotification_setting​(String value)
        Copy the current immutable object by setting a present value for the optional notification_setting attribute.
        Parameters:
        value - The value for notification_setting
        Returns:
        A modified copy of this object
      • withNotification_setting

        public final ImmutableTeamCreate withNotification_setting​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the notification_setting attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for notification_setting
        Returns:
        A modified copy of this object
      • withMaintainers

        public final ImmutableTeamCreate withMaintainers​(List<String> value)
        Copy the current immutable object by setting a present value for the optional maintainers attribute.
        Parameters:
        value - The value for maintainers
        Returns:
        A modified copy of this object
      • withMaintainers

        public final ImmutableTeamCreate withMaintainers​(Optional<? extends List<String>> optional)
        Copy the current immutable object by setting an optional value for the maintainers attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for maintainers
        Returns:
        A modified copy of this object
      • withRepo_names

        public final ImmutableTeamCreate withRepo_names​(List<String> value)
        Copy the current immutable object by setting a present value for the optional repo_names attribute.
        Parameters:
        value - The value for repo_names
        Returns:
        A modified copy of this object
      • withRepo_names

        public final ImmutableTeamCreate withRepo_names​(Optional<? extends List<String>> optional)
        Copy the current immutable object by setting an optional value for the repo_names attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        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 optional parent_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 the parent_team_id attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        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 of ImmutableTeamCreate that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: name, description, privacy, notification_setting, maintainers, repo_names, parent_team_id.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value TeamCreate with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableTeamCreate copyOf​(TeamCreate instance)
        Creates an immutable copy of a TeamCreate 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