Class ImmutableOrganization

  • All Implemented Interfaces:
    Organization

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

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

    • Method Detail

      • login

        @Nullable
        public String login()
        The organization's username.
        Specified by:
        login in interface Organization
      • id

        @Nullable
        public Long id()
        Organization id.
        Specified by:
        id in interface Organization
      • reposUrl

        @Nullable
        public URI reposUrl()
        Repositories API URL.
        Specified by:
        reposUrl in interface Organization
      • withLogin

        public final ImmutableOrganization withLogin​(@Nullable
                                                     String value)
        Copy the current immutable object by setting a value for the login attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for login (can be null)
        Returns:
        A modified copy of the this object
      • withId

        public final ImmutableOrganization withId​(@Nullable
                                                  Long 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 (can be null)
        Returns:
        A modified copy of the this object
      • withUrl

        public final ImmutableOrganization withUrl​(@Nullable
                                                   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 (can be null)
        Returns:
        A modified copy of the this object
      • withReposUrl

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

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

        public final ImmutableOrganization withMembersUrl​(@Nullable
                                                          String value)
        Copy the current immutable object by setting a value for the membersUrl attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for membersUrl (can be null)
        Returns:
        A modified copy of the this object
      • withPublicMembersUrl

        public final ImmutableOrganization withPublicMembersUrl​(@Nullable
                                                                String value)
        Copy the current immutable object by setting a value for the publicMembersUrl attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for publicMembersUrl (can be null)
        Returns:
        A modified copy of the this object
      • withAvatarUrl

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

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableOrganization 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: login, id, url, reposUrl, eventsUrl, membersUrl, publicMembersUrl, avatarUrl.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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

        public static ImmutableOrganization.Builder builder()
        Creates a builder for ImmutableOrganization.
         ImmutableOrganization.builder()
            .login(String | null) // nullable login
            .id(Long | null) // nullable id
            .url(java.net.URI | null) // nullable url
            .reposUrl(java.net.URI | null) // nullable reposUrl
            .eventsUrl(java.net.URI | null) // nullable eventsUrl
            .membersUrl(String | null) // nullable membersUrl
            .publicMembersUrl(String | null) // nullable publicMembersUrl
            .avatarUrl(java.net.URI | null) // nullable avatarUrl
            .build();
         
        Returns:
        A new ImmutableOrganization builder