Class ImmutableRepositoryInvitation

  • All Implemented Interfaces:
    RepositoryInvitation

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

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

    • Method Detail

      • withId

        public final ImmutableRepositoryInvitation withId​(Integer value)
        Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for id
        Returns:
        A modified copy of the this object
      • withNodeId

        public final ImmutableRepositoryInvitation withNodeId​(String value)
        Copy the current immutable object by setting a value for the nodeId attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for nodeId
        Returns:
        A modified copy of the this object
      • withRepository

        public final ImmutableRepositoryInvitation withRepository​(Repository value)
        Copy the current immutable object by setting a value for the repository attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for repository
        Returns:
        A modified copy of the this object
      • withInvitee

        public final ImmutableRepositoryInvitation withInvitee​(@Nullable
                                                               User value)
        Copy the current immutable object by setting a value for the invitee attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for invitee (can be null)
        Returns:
        A modified copy of the this object
      • withInviter

        public final ImmutableRepositoryInvitation withInviter​(@Nullable
                                                               User value)
        Copy the current immutable object by setting a value for the inviter attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for inviter (can be null)
        Returns:
        A modified copy of the this object
      • withPermissions

        public final ImmutableRepositoryInvitation withPermissions​(String value)
        Copy the current immutable object by setting a value for the permissions attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for permissions
        Returns:
        A modified copy of the this object
      • withCreatedAt

        public final ImmutableRepositoryInvitation withCreatedAt​(ZonedDateTime value)
        Copy the current immutable object by setting a value for the createdAt attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for createdAt
        Returns:
        A modified copy of the this object
      • withExpired

        public final ImmutableRepositoryInvitation withExpired​(boolean value)
        Copy the current immutable object by setting a present value for the optional expired attribute.
        Parameters:
        value - The value for expired
        Returns:
        A modified copy of this object
      • withExpired

        public final ImmutableRepositoryInvitation withExpired​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the expired 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 expired
        Returns:
        A modified copy of this object
      • withUrl

        public final ImmutableRepositoryInvitation withUrl​(URI value)
        Copy the current immutable object by setting a value for the url attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for url
        Returns:
        A modified copy of the this object
      • withHtmlUrl

        public final ImmutableRepositoryInvitation withHtmlUrl​(URI value)
        Copy the current immutable object by setting a value for the htmlUrl attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for htmlUrl
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableRepositoryInvitation 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: id, nodeId, repository, invitee, inviter, permissions, createdAt, expired, url, htmlUrl.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableRepositoryInvitation copyOf​(RepositoryInvitation instance)
        Creates an immutable copy of a RepositoryInvitation 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 RepositoryInvitation instance
      • builder

        public static ImmutableRepositoryInvitation.Builder builder()
        Creates a builder for ImmutableRepositoryInvitation.
         ImmutableRepositoryInvitation.builder()
            .id(Integer) // required id
            .nodeId(String) // required nodeId
            .repository(com.spotify.github.v3.repos.Repository) // required repository
            .invitee(com.spotify.github.v3.User | null) // nullable invitee
            .inviter(com.spotify.github.v3.User | null) // nullable inviter
            .permissions(String) // required permissions
            .createdAt(java.time.ZonedDateTime) // required createdAt
            .expired(Boolean) // optional expired
            .url(java.net.URI) // required url
            .htmlUrl(java.net.URI) // required htmlUrl
            .build();
         
        Returns:
        A new ImmutableRepositoryInvitation builder