Class ImmutableWebHookOutput.Builder

  • Enclosing class:
    ImmutableWebHookOutput

    @NotThreadSafe
    public static final class ImmutableWebHookOutput.Builder
    extends Object
    Builds instances of type ImmutableWebHookOutput. 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.

    • Constructor Detail

      • Builder

        public Builder()
        Creates a builder for ImmutableWebHookOutput instances.
         new ImmutableWebHookOutput.Builder()
            .id(String | null) // nullable id
            .collectionID(String | null) // nullable collectionID
            .enabled(Boolean | null) // nullable enabled
            .tags(Map<String, String> | null) // nullable tags
            .url(String) // required url
            .basicAuthUser(String | null) // nullable basicAuthUser
            .basicAuthPass(String | null) // nullable basicAuthPass
            .customHeaderName(String | null) // nullable customHeaderName
            .customHeaderValue(String | null) // nullable customHeaderValue
            .build();
         
    • Method Detail

      • from

        public final ImmutableWebHookOutput.Builder from​(WebHookOutput instance)
        Fill a builder with attribute values from the provided com.telenordigital.nbiot.WebHookOutput instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final ImmutableWebHookOutput.Builder from​(Output instance)
        Fill a builder with attribute values from the provided com.telenordigital.nbiot.Output instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • putTags

        public final ImmutableWebHookOutput.Builder putTags​(String key,
                                                            String value)
        Put one entry to the tags map.
        Parameters:
        key - The key in the tags map
        value - The associated value in the tags map
        Returns:
        this builder for use in a chained invocation
      • tags

        public final ImmutableWebHookOutput.Builder tags​(@Nullable
                                                         Map<String,​? extends String> entries)
        Sets or replaces all mappings from the specified map as entries for the tags map. Nulls are not permitted as keys or values, but parameter itself can be null
        Parameters:
        entries - The entries that will be added to the tags map
        Returns:
        this builder for use in a chained invocation
      • putAllTags

        public final ImmutableWebHookOutput.Builder putAllTags​(Map<String,​? extends String> entries)
        Put all mappings from the specified map as entries to tags map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the tags map
        Returns:
        this builder for use in a chained invocation
      • url

        public final ImmutableWebHookOutput.Builder url​(String url)
        Initializes the value for the url attribute.
        Parameters:
        url - The value for url
        Returns:
        this builder for use in a chained invocation
      • basicAuthUser

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

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

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

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