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

com.pulumi.azurenative.securityinsights.outputs.AutomationRuleTriggeringLogicResponse Maven / Gradle / Ivy

The 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.azurenative.securityinsights.outputs;

import com.pulumi.azurenative.securityinsights.outputs.PropertyArrayChangedConditionPropertiesResponse;
import com.pulumi.azurenative.securityinsights.outputs.PropertyChangedConditionPropertiesResponse;
import com.pulumi.azurenative.securityinsights.outputs.PropertyConditionPropertiesResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class AutomationRuleTriggeringLogicResponse {
    /**
     * @return The conditions to evaluate to determine if the automation rule should be triggered on a given object.
     * 
     */
    private @Nullable List conditions;
    /**
     * @return Determines when the automation rule should automatically expire and be disabled.
     * 
     */
    private @Nullable String expirationTimeUtc;
    /**
     * @return Determines whether the automation rule is enabled or disabled.
     * 
     */
    private Boolean isEnabled;
    private String triggersOn;
    private String triggersWhen;

    private AutomationRuleTriggeringLogicResponse() {}
    /**
     * @return The conditions to evaluate to determine if the automation rule should be triggered on a given object.
     * 
     */
    public List conditions() {
        return this.conditions == null ? List.of() : this.conditions;
    }
    /**
     * @return Determines when the automation rule should automatically expire and be disabled.
     * 
     */
    public Optional expirationTimeUtc() {
        return Optional.ofNullable(this.expirationTimeUtc);
    }
    /**
     * @return Determines whether the automation rule is enabled or disabled.
     * 
     */
    public Boolean isEnabled() {
        return this.isEnabled;
    }
    public String triggersOn() {
        return this.triggersOn;
    }
    public String triggersWhen() {
        return this.triggersWhen;
    }

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

    public static Builder builder(AutomationRuleTriggeringLogicResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List conditions;
        private @Nullable String expirationTimeUtc;
        private Boolean isEnabled;
        private String triggersOn;
        private String triggersWhen;
        public Builder() {}
        public Builder(AutomationRuleTriggeringLogicResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.conditions = defaults.conditions;
    	      this.expirationTimeUtc = defaults.expirationTimeUtc;
    	      this.isEnabled = defaults.isEnabled;
    	      this.triggersOn = defaults.triggersOn;
    	      this.triggersWhen = defaults.triggersWhen;
        }

        @CustomType.Setter
        public Builder conditions(@Nullable List conditions) {

            this.conditions = conditions;
            return this;
        }
        public Builder conditions(Object... conditions) {
            return conditions(List.of(conditions));
        }
        @CustomType.Setter
        public Builder expirationTimeUtc(@Nullable String expirationTimeUtc) {

            this.expirationTimeUtc = expirationTimeUtc;
            return this;
        }
        @CustomType.Setter
        public Builder isEnabled(Boolean isEnabled) {
            if (isEnabled == null) {
              throw new MissingRequiredPropertyException("AutomationRuleTriggeringLogicResponse", "isEnabled");
            }
            this.isEnabled = isEnabled;
            return this;
        }
        @CustomType.Setter
        public Builder triggersOn(String triggersOn) {
            if (triggersOn == null) {
              throw new MissingRequiredPropertyException("AutomationRuleTriggeringLogicResponse", "triggersOn");
            }
            this.triggersOn = triggersOn;
            return this;
        }
        @CustomType.Setter
        public Builder triggersWhen(String triggersWhen) {
            if (triggersWhen == null) {
              throw new MissingRequiredPropertyException("AutomationRuleTriggeringLogicResponse", "triggersWhen");
            }
            this.triggersWhen = triggersWhen;
            return this;
        }
        public AutomationRuleTriggeringLogicResponse build() {
            final var _resultValue = new AutomationRuleTriggeringLogicResponse();
            _resultValue.conditions = conditions;
            _resultValue.expirationTimeUtc = expirationTimeUtc;
            _resultValue.isEnabled = isEnabled;
            _resultValue.triggersOn = triggersOn;
            _resultValue.triggersWhen = triggersWhen;
            return _resultValue;
        }
    }
}