Class ImmutableWebhookConfig

  • All Implemented Interfaces:
    WebhookConfig

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

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

    • Method Detail

      • url

        @Nullable
        public URI url()
        A required string defining the URL to which the payloads will be delivered.
        Specified by:
        url in interface WebhookConfig
      • contentType

        @Nullable
        public String contentType()
        An optional string defining the media type used to serialize the payloads. Supported values include json and form. The default is form.
        Specified by:
        contentType in interface WebhookConfig
      • withUrl

        public final ImmutableWebhookConfig 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
      • withContentType

        public final ImmutableWebhookConfig withContentType​(@Nullable
                                                            String value)
        Copy the current immutable object by setting a value for the contentType attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for contentType (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 ImmutableWebhookConfig 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: url, contentType.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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