All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.signalfx.WebhookIntegrationArgs Maven / Gradle / Ivy

There is a newer version: 7.5.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.signalfx;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.signalfx.inputs.WebhookIntegrationHeaderArgs;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class WebhookIntegrationArgs extends com.pulumi.resources.ResourceArgs {

    public static final WebhookIntegrationArgs Empty = new WebhookIntegrationArgs();

    /**
     * Whether the integration is enabled.
     * 
     */
    @Import(name="enabled", required=true)
    private Output enabled;

    /**
     * @return Whether the integration is enabled.
     * 
     */
    public Output enabled() {
        return this.enabled;
    }

    /**
     * A header to send with the request
     * 
     */
    @Import(name="headers")
    private @Nullable Output> headers;

    /**
     * @return A header to send with the request
     * 
     */
    public Optional>> headers() {
        return Optional.ofNullable(this.headers);
    }

    /**
     * HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
     * 
     */
    @Import(name="method")
    private @Nullable Output method;

    /**
     * @return HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
     * 
     */
    public Optional> method() {
        return Optional.ofNullable(this.method);
    }

    /**
     * Name of the integration.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Name of the integration.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Template for the payload to be sent with the webhook request in JSON format
     * 
     */
    @Import(name="payloadTemplate")
    private @Nullable Output payloadTemplate;

    /**
     * @return Template for the payload to be sent with the webhook request in JSON format
     * 
     */
    public Optional> payloadTemplate() {
        return Optional.ofNullable(this.payloadTemplate);
    }

    @Import(name="sharedSecret")
    private @Nullable Output sharedSecret;

    public Optional> sharedSecret() {
        return Optional.ofNullable(this.sharedSecret);
    }

    /**
     * The URL to request
     * 
     */
    @Import(name="url")
    private @Nullable Output url;

    /**
     * @return The URL to request
     * 
     */
    public Optional> url() {
        return Optional.ofNullable(this.url);
    }

    private WebhookIntegrationArgs() {}

    private WebhookIntegrationArgs(WebhookIntegrationArgs $) {
        this.enabled = $.enabled;
        this.headers = $.headers;
        this.method = $.method;
        this.name = $.name;
        this.payloadTemplate = $.payloadTemplate;
        this.sharedSecret = $.sharedSecret;
        this.url = $.url;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(WebhookIntegrationArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private WebhookIntegrationArgs $;

        public Builder() {
            $ = new WebhookIntegrationArgs();
        }

        public Builder(WebhookIntegrationArgs defaults) {
            $ = new WebhookIntegrationArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param enabled Whether the integration is enabled.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Whether the integration is enabled.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param headers A header to send with the request
         * 
         * @return builder
         * 
         */
        public Builder headers(@Nullable Output> headers) {
            $.headers = headers;
            return this;
        }

        /**
         * @param headers A header to send with the request
         * 
         * @return builder
         * 
         */
        public Builder headers(List headers) {
            return headers(Output.of(headers));
        }

        /**
         * @param headers A header to send with the request
         * 
         * @return builder
         * 
         */
        public Builder headers(WebhookIntegrationHeaderArgs... headers) {
            return headers(List.of(headers));
        }

        /**
         * @param method HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
         * 
         * @return builder
         * 
         */
        public Builder method(@Nullable Output method) {
            $.method = method;
            return this;
        }

        /**
         * @param method HTTP method used for the webhook request, such as 'GET', 'POST' and 'PUT'
         * 
         * @return builder
         * 
         */
        public Builder method(String method) {
            return method(Output.of(method));
        }

        /**
         * @param name Name of the integration.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the integration.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param payloadTemplate Template for the payload to be sent with the webhook request in JSON format
         * 
         * @return builder
         * 
         */
        public Builder payloadTemplate(@Nullable Output payloadTemplate) {
            $.payloadTemplate = payloadTemplate;
            return this;
        }

        /**
         * @param payloadTemplate Template for the payload to be sent with the webhook request in JSON format
         * 
         * @return builder
         * 
         */
        public Builder payloadTemplate(String payloadTemplate) {
            return payloadTemplate(Output.of(payloadTemplate));
        }

        public Builder sharedSecret(@Nullable Output sharedSecret) {
            $.sharedSecret = sharedSecret;
            return this;
        }

        public Builder sharedSecret(String sharedSecret) {
            return sharedSecret(Output.of(sharedSecret));
        }

        /**
         * @param url The URL to request
         * 
         * @return builder
         * 
         */
        public Builder url(@Nullable Output url) {
            $.url = url;
            return this;
        }

        /**
         * @param url The URL to request
         * 
         * @return builder
         * 
         */
        public Builder url(String url) {
            return url(Output.of(url));
        }

        public WebhookIntegrationArgs build() {
            if ($.enabled == null) {
                throw new MissingRequiredPropertyException("WebhookIntegrationArgs", "enabled");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy