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

com.pulumi.azurenative.insights.outputs.AutoscaleNotificationResponse Maven / Gradle / Ivy

There is a newer version: 2.82.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.azurenative.insights.outputs;

import com.pulumi.azurenative.insights.outputs.EmailNotificationResponse;
import com.pulumi.azurenative.insights.outputs.WebhookNotificationResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class AutoscaleNotificationResponse {
    /**
     * @return the email notification.
     * 
     */
    private @Nullable EmailNotificationResponse email;
    /**
     * @return the operation associated with the notification and its value must be "scale"
     * 
     */
    private String operation;
    /**
     * @return the collection of webhook notifications.
     * 
     */
    private @Nullable List webhooks;

    private AutoscaleNotificationResponse() {}
    /**
     * @return the email notification.
     * 
     */
    public Optional email() {
        return Optional.ofNullable(this.email);
    }
    /**
     * @return the operation associated with the notification and its value must be "scale"
     * 
     */
    public String operation() {
        return this.operation;
    }
    /**
     * @return the collection of webhook notifications.
     * 
     */
    public List webhooks() {
        return this.webhooks == null ? List.of() : this.webhooks;
    }

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

    public static Builder builder(AutoscaleNotificationResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable EmailNotificationResponse email;
        private String operation;
        private @Nullable List webhooks;
        public Builder() {}
        public Builder(AutoscaleNotificationResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.email = defaults.email;
    	      this.operation = defaults.operation;
    	      this.webhooks = defaults.webhooks;
        }

        @CustomType.Setter
        public Builder email(@Nullable EmailNotificationResponse email) {

            this.email = email;
            return this;
        }
        @CustomType.Setter
        public Builder operation(String operation) {
            if (operation == null) {
              throw new MissingRequiredPropertyException("AutoscaleNotificationResponse", "operation");
            }
            this.operation = operation;
            return this;
        }
        @CustomType.Setter
        public Builder webhooks(@Nullable List webhooks) {

            this.webhooks = webhooks;
            return this;
        }
        public Builder webhooks(WebhookNotificationResponse... webhooks) {
            return webhooks(List.of(webhooks));
        }
        public AutoscaleNotificationResponse build() {
            final var _resultValue = new AutoscaleNotificationResponse();
            _resultValue.email = email;
            _resultValue.operation = operation;
            _resultValue.webhooks = webhooks;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy