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

com.pulumi.azurenative.containerregistry.WebhookArgs 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.containerregistry;

import com.pulumi.azurenative.containerregistry.enums.WebhookAction;
import com.pulumi.azurenative.containerregistry.enums.WebhookStatus;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final WebhookArgs Empty = new WebhookArgs();

    /**
     * The list of actions that trigger the webhook to post notifications.
     * 
     */
    @Import(name="actions", required=true)
    private Output>> actions;

    /**
     * @return The list of actions that trigger the webhook to post notifications.
     * 
     */
    public Output>> actions() {
        return this.actions;
    }

    /**
     * Custom headers that will be added to the webhook notifications.
     * 
     */
    @Import(name="customHeaders")
    private @Nullable Output> customHeaders;

    /**
     * @return Custom headers that will be added to the webhook notifications.
     * 
     */
    public Optional>> customHeaders() {
        return Optional.ofNullable(this.customHeaders);
    }

    /**
     * The location of the webhook. This cannot be changed after the resource is created.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return The location of the webhook. This cannot be changed after the resource is created.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * The name of the container registry.
     * 
     */
    @Import(name="registryName", required=true)
    private Output registryName;

    /**
     * @return The name of the container registry.
     * 
     */
    public Output registryName() {
        return this.registryName;
    }

    /**
     * The name of the resource group. The name is case insensitive.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group. The name is case insensitive.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events.
     * 
     */
    @Import(name="scope")
    private @Nullable Output scope;

    /**
     * @return The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events.
     * 
     */
    public Optional> scope() {
        return Optional.ofNullable(this.scope);
    }

    /**
     * The service URI for the webhook to post notifications.
     * 
     */
    @Import(name="serviceUri", required=true)
    private Output serviceUri;

    /**
     * @return The service URI for the webhook to post notifications.
     * 
     */
    public Output serviceUri() {
        return this.serviceUri;
    }

    /**
     * The status of the webhook at the time the operation was called.
     * 
     */
    @Import(name="status")
    private @Nullable Output> status;

    /**
     * @return The status of the webhook at the time the operation was called.
     * 
     */
    public Optional>> status() {
        return Optional.ofNullable(this.status);
    }

    /**
     * The tags for the webhook.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return The tags for the webhook.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * The name of the webhook.
     * 
     */
    @Import(name="webhookName")
    private @Nullable Output webhookName;

    /**
     * @return The name of the webhook.
     * 
     */
    public Optional> webhookName() {
        return Optional.ofNullable(this.webhookName);
    }

    private WebhookArgs() {}

    private WebhookArgs(WebhookArgs $) {
        this.actions = $.actions;
        this.customHeaders = $.customHeaders;
        this.location = $.location;
        this.registryName = $.registryName;
        this.resourceGroupName = $.resourceGroupName;
        this.scope = $.scope;
        this.serviceUri = $.serviceUri;
        this.status = $.status;
        this.tags = $.tags;
        this.webhookName = $.webhookName;
    }

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

    public static final class Builder {
        private WebhookArgs $;

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

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

        /**
         * @param actions The list of actions that trigger the webhook to post notifications.
         * 
         * @return builder
         * 
         */
        public Builder actions(Output>> actions) {
            $.actions = actions;
            return this;
        }

        /**
         * @param actions The list of actions that trigger the webhook to post notifications.
         * 
         * @return builder
         * 
         */
        public Builder actions(List> actions) {
            return actions(Output.of(actions));
        }

        /**
         * @param actions The list of actions that trigger the webhook to post notifications.
         * 
         * @return builder
         * 
         */
        public Builder actions(Either... actions) {
            return actions(List.of(actions));
        }

        /**
         * @param customHeaders Custom headers that will be added to the webhook notifications.
         * 
         * @return builder
         * 
         */
        public Builder customHeaders(@Nullable Output> customHeaders) {
            $.customHeaders = customHeaders;
            return this;
        }

        /**
         * @param customHeaders Custom headers that will be added to the webhook notifications.
         * 
         * @return builder
         * 
         */
        public Builder customHeaders(Map customHeaders) {
            return customHeaders(Output.of(customHeaders));
        }

        /**
         * @param location The location of the webhook. This cannot be changed after the resource is created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The location of the webhook. This cannot be changed after the resource is created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param registryName The name of the container registry.
         * 
         * @return builder
         * 
         */
        public Builder registryName(Output registryName) {
            $.registryName = registryName;
            return this;
        }

        /**
         * @param registryName The name of the container registry.
         * 
         * @return builder
         * 
         */
        public Builder registryName(String registryName) {
            return registryName(Output.of(registryName));
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param scope The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events.
         * 
         * @return builder
         * 
         */
        public Builder scope(@Nullable Output scope) {
            $.scope = scope;
            return this;
        }

        /**
         * @param scope The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to 'foo:latest'. Empty means all events.
         * 
         * @return builder
         * 
         */
        public Builder scope(String scope) {
            return scope(Output.of(scope));
        }

        /**
         * @param serviceUri The service URI for the webhook to post notifications.
         * 
         * @return builder
         * 
         */
        public Builder serviceUri(Output serviceUri) {
            $.serviceUri = serviceUri;
            return this;
        }

        /**
         * @param serviceUri The service URI for the webhook to post notifications.
         * 
         * @return builder
         * 
         */
        public Builder serviceUri(String serviceUri) {
            return serviceUri(Output.of(serviceUri));
        }

        /**
         * @param status The status of the webhook at the time the operation was called.
         * 
         * @return builder
         * 
         */
        public Builder status(@Nullable Output> status) {
            $.status = status;
            return this;
        }

        /**
         * @param status The status of the webhook at the time the operation was called.
         * 
         * @return builder
         * 
         */
        public Builder status(Either status) {
            return status(Output.of(status));
        }

        /**
         * @param status The status of the webhook at the time the operation was called.
         * 
         * @return builder
         * 
         */
        public Builder status(String status) {
            return status(Either.ofLeft(status));
        }

        /**
         * @param status The status of the webhook at the time the operation was called.
         * 
         * @return builder
         * 
         */
        public Builder status(WebhookStatus status) {
            return status(Either.ofRight(status));
        }

        /**
         * @param tags The tags for the webhook.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags The tags for the webhook.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

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

        /**
         * @param webhookName The name of the webhook.
         * 
         * @return builder
         * 
         */
        public Builder webhookName(String webhookName) {
            return webhookName(Output.of(webhookName));
        }

        public WebhookArgs build() {
            if ($.actions == null) {
                throw new MissingRequiredPropertyException("WebhookArgs", "actions");
            }
            if ($.registryName == null) {
                throw new MissingRequiredPropertyException("WebhookArgs", "registryName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("WebhookArgs", "resourceGroupName");
            }
            if ($.serviceUri == null) {
                throw new MissingRequiredPropertyException("WebhookArgs", "serviceUri");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy