// *** 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.azure.securitycenter.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class AutomationAction {
    /**
     * @return (Optional, but required when `type` is `EventHub`) A connection string to send data to the target Event Hub namespace, this should include a key with send permissions.
     * 
     */
    private @Nullable String connectionString;
    /**
     * @return The resource id of the target Logic App, Event Hub namespace or Log Analytics workspace.
     * 
     */
    private String resourceId;
    /**
     * @return (Optional, but required when `type` is `LogicApp`) The callback URL to trigger the Logic App that will receive and process data sent by this automation. This can be found in the Azure Portal under &#34;See trigger history&#34;
     * 
     */
    private @Nullable String triggerUrl;
    /**
     * @return Type of Azure resource to send data to. Must be set to one of: `LogicApp`, `EventHub` or `LogAnalytics`.
     * 
     */
    private String type;

    private AutomationAction() {}
    /**
     * @return (Optional, but required when `type` is `EventHub`) A connection string to send data to the target Event Hub namespace, this should include a key with send permissions.
     * 
     */
    public Optional<String> connectionString() {
        return Optional.ofNullable(this.connectionString);
    }
    /**
     * @return The resource id of the target Logic App, Event Hub namespace or Log Analytics workspace.
     * 
     */
    public String resourceId() {
        return this.resourceId;
    }
    /**
     * @return (Optional, but required when `type` is `LogicApp`) The callback URL to trigger the Logic App that will receive and process data sent by this automation. This can be found in the Azure Portal under &#34;See trigger history&#34;
     * 
     */
    public Optional<String> triggerUrl() {
        return Optional.ofNullable(this.triggerUrl);
    }
    /**
     * @return Type of Azure resource to send data to. Must be set to one of: `LogicApp`, `EventHub` or `LogAnalytics`.
     * 
     */
    public String type() {
        return this.type;
    }

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

    public static Builder builder(AutomationAction defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String connectionString;
        private String resourceId;
        private @Nullable String triggerUrl;
        private String type;
        public Builder() {}
        public Builder(AutomationAction defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.connectionString = defaults.connectionString;
    	      this.resourceId = defaults.resourceId;
    	      this.triggerUrl = defaults.triggerUrl;
    	      this.type = defaults.type;
        }

        @CustomType.Setter
        public Builder connectionString(@Nullable String connectionString) {
            this.connectionString = connectionString;
            return this;
        }
        @CustomType.Setter
        public Builder resourceId(String resourceId) {
            this.resourceId = Objects.requireNonNull(resourceId);
            return this;
        }
        @CustomType.Setter
        public Builder triggerUrl(@Nullable String triggerUrl) {
            this.triggerUrl = triggerUrl;
            return this;
        }
        @CustomType.Setter
        public Builder type(String type) {
            this.type = Objects.requireNonNull(type);
            return this;
        }
        public AutomationAction build() {
            final var o = new AutomationAction();
            o.connectionString = connectionString;
            o.resourceId = resourceId;
            o.triggerUrl = triggerUrl;
            o.type = type;
            return o;
        }
    }
}
