Class ImmutableUser.Builder

  • Enclosing class:
    ImmutableUser

    @NotThreadSafe
    public static final class ImmutableUser.Builder
    extends Object
    Builds instances of type ImmutableUser. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder from​(User instance)
        Fill a builder with attribute values from the provided User instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • login

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder login​(@Nullable
                                                 String login)
        Initializes the value for the login attribute.
        Parameters:
        login - The value for login (can be null)
        Returns:
        this builder for use in a chained invocation
      • id

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder id​(@Nullable
                                              Integer id)
        Initializes the value for the id attribute.
        Parameters:
        id - The value for id (can be null)
        Returns:
        this builder for use in a chained invocation
      • avatarUrl

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder avatarUrl​(@Nullable
                                                     URI avatarUrl)
        Initializes the value for the avatarUrl attribute.
        Parameters:
        avatarUrl - The value for avatarUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • gravatarId

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder gravatarId​(String gravatarId)
        Initializes the optional value gravatarId to gravatarId.
        Parameters:
        gravatarId - The value for gravatarId
        Returns:
        this builder for chained invocation
      • gravatarId

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder gravatarId​(Optional<String> gravatarId)
        Initializes the optional value gravatarId to gravatarId.
        Parameters:
        gravatarId - The value for gravatarId
        Returns:
        this builder for use in a chained invocation
      • url

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder url​(@Nullable
                                               URI url)
        Initializes the value for the url attribute.
        Parameters:
        url - The value for url (can be null)
        Returns:
        this builder for use in a chained invocation
      • htmlUrl

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder htmlUrl​(@Nullable
                                                   URI htmlUrl)
        Initializes the value for the htmlUrl attribute.
        Parameters:
        htmlUrl - The value for htmlUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • followersUrl

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder followersUrl​(@Nullable
                                                        URI followersUrl)
        Initializes the value for the followersUrl attribute.
        Parameters:
        followersUrl - The value for followersUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • followingUrl

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder followingUrl​(@Nullable
                                                        String followingUrl)
        Initializes the value for the followingUrl attribute.
        Parameters:
        followingUrl - The value for followingUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • gistsUrl

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder gistsUrl​(@Nullable
                                                    String gistsUrl)
        Initializes the value for the gistsUrl attribute.
        Parameters:
        gistsUrl - The value for gistsUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • starredUrl

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder starredUrl​(@Nullable
                                                      String starredUrl)
        Initializes the value for the starredUrl attribute.
        Parameters:
        starredUrl - The value for starredUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • subscriptionsUrl

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder subscriptionsUrl​(@Nullable
                                                            URI subscriptionsUrl)
        Initializes the value for the subscriptionsUrl attribute.
        Parameters:
        subscriptionsUrl - The value for subscriptionsUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • organizationsUrl

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder organizationsUrl​(@Nullable
                                                            URI organizationsUrl)
        Initializes the value for the organizationsUrl attribute.
        Parameters:
        organizationsUrl - The value for organizationsUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • reposUrl

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder reposUrl​(@Nullable
                                                    URI reposUrl)
        Initializes the value for the reposUrl attribute.
        Parameters:
        reposUrl - The value for reposUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • eventsUrl

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder eventsUrl​(@Nullable
                                                     String eventsUrl)
        Initializes the value for the eventsUrl attribute.
        Parameters:
        eventsUrl - The value for eventsUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • receivedEventsUrl

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder receivedEventsUrl​(@Nullable
                                                             URI receivedEventsUrl)
        Initializes the value for the receivedEventsUrl attribute.
        Parameters:
        receivedEventsUrl - The value for receivedEventsUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • type

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder type​(@Nullable
                                                String type)
        Initializes the value for the type attribute.
        Parameters:
        type - The value for type (can be null)
        Returns:
        this builder for use in a chained invocation
      • siteAdmin

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder siteAdmin​(boolean siteAdmin)
        Initializes the optional value siteAdmin to siteAdmin.
        Parameters:
        siteAdmin - The value for siteAdmin
        Returns:
        this builder for chained invocation
      • siteAdmin

        @CanIgnoreReturnValue
        public final ImmutableUser.Builder siteAdmin​(Optional<Boolean> siteAdmin)
        Initializes the optional value siteAdmin to siteAdmin.
        Parameters:
        siteAdmin - The value for siteAdmin
        Returns:
        this builder for use in a chained invocation