Class ImmutableWebhookCreate

  • All Implemented Interfaces:
    WebhookCreate

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

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

    • Method Detail

      • withName

        public final ImmutableWebhookCreate 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
      • withActive

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

        public final ImmutableWebhookCreate withEvents​(@Nullable
                                                       String... elements)
        Copy the current immutable object with elements that replace the content of events.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withEvents

        public final ImmutableWebhookCreate withEvents​(@Nullable
                                                       Iterable<String> elements)
        Copy the current immutable object with elements that replace the content of events. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of events elements to set
        Returns:
        A modified copy of this object
      • withConfig

        public final ImmutableWebhookCreate withConfig​(@Nullable
                                                       WebhookConfig value)
        Copy the current immutable object by setting a value for the config attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for config (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 ImmutableWebhookCreate 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, active, events, config.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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

        public static ImmutableWebhookCreate.Builder builder()
        Creates a builder for ImmutableWebhookCreate.
         ImmutableWebhookCreate.builder()
            .name(String | null) // nullable name
            .active(Boolean | null) // nullable active
            .events(List&lt;String&gt; | null) // nullable events
            .config(com.spotify.github.v3.hooks.WebhookConfig | null) // nullable config
            .build();
         
        Returns:
        A new ImmutableWebhookCreate builder