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

com.pulumi.azure.containerservice.RegistryWebookArgs Maven / Gradle / Ivy

// *** 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.containerservice;

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 RegistryWebookArgs extends com.pulumi.resources.ResourceArgs {

    public static final RegistryWebookArgs Empty = new RegistryWebookArgs();

    /**
     * A list of actions that trigger the Webhook to post notifications. At least one action needs to be specified. Valid values are: `push`, `delete`, `quarantine`, `chart_push`, `chart_delete`
     * 
     */
    @Import(name="actions", required=true)
    private Output> actions;

    /**
     * @return A list of actions that trigger the Webhook to post notifications. At least one action needs to be specified. Valid values are: `push`, `delete`, `quarantine`, `chart_push`, `chart_delete`
     * 
     */
    public Output> actions() {
        return this.actions;
    }

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

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

    /**
     * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * Specifies the name of the Container Registry Webhook. Only Alphanumeric characters allowed. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Specifies the name of the Container Registry Webhook. Only Alphanumeric characters allowed. Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The Name of Container registry this Webhook belongs to. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="registryName", required=true)
    private Output registryName;

    /**
     * @return The Name of Container registry this Webhook belongs to. Changing this forces a new resource to be created.
     * 
     */
    public Output registryName() {
        return this.registryName;
    }

    /**
     * The name of the resource group in which to create the Container Registry Webhook. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group in which to create the Container Registry Webhook. Changing this forces a new resource to be created.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * Specifies the scope of repositories that can trigger an event. 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. Defaults to `""`.
     * 
     */
    @Import(name="scope")
    private @Nullable Output scope;

    /**
     * @return Specifies the scope of repositories that can trigger an event. 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. Defaults to `""`.
     * 
     */
    public Optional> scope() {
        return Optional.ofNullable(this.scope);
    }

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

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

    /**
     * Specifies if this Webhook triggers notifications or not. Valid values: `enabled` and `disabled`. Default is `enabled`.
     * 
     */
    @Import(name="status")
    private @Nullable Output status;

    /**
     * @return Specifies if this Webhook triggers notifications or not. Valid values: `enabled` and `disabled`. Default is `enabled`.
     * 
     */
    public Optional> status() {
        return Optional.ofNullable(this.status);
    }

    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private RegistryWebookArgs() {}

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

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

    public static final class Builder {
        private RegistryWebookArgs $;

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

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

        /**
         * @param actions A list of actions that trigger the Webhook to post notifications. At least one action needs to be specified. Valid values are: `push`, `delete`, `quarantine`, `chart_push`, `chart_delete`
         * 
         * @return builder
         * 
         */
        public Builder actions(Output> actions) {
            $.actions = actions;
            return this;
        }

        /**
         * @param actions A list of actions that trigger the Webhook to post notifications. At least one action needs to be specified. Valid values are: `push`, `delete`, `quarantine`, `chart_push`, `chart_delete`
         * 
         * @return builder
         * 
         */
        public Builder actions(List actions) {
            return actions(Output.of(actions));
        }

        /**
         * @param actions A list of actions that trigger the Webhook to post notifications. At least one action needs to be specified. Valid values are: `push`, `delete`, `quarantine`, `chart_push`, `chart_delete`
         * 
         * @return builder
         * 
         */
        public Builder actions(String... actions) {
            return actions(List.of(actions));
        }

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

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

        /**
         * @param location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param name Specifies the name of the Container Registry Webhook. Only Alphanumeric characters allowed. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the Container Registry Webhook. Only Alphanumeric characters allowed. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param registryName The Name of Container registry this Webhook belongs to. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder registryName(Output registryName) {
            $.registryName = registryName;
            return this;
        }

        /**
         * @param registryName The Name of Container registry this Webhook belongs to. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder registryName(String registryName) {
            return registryName(Output.of(registryName));
        }

        /**
         * @param resourceGroupName The name of the resource group in which to create the Container Registry Webhook. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group in which to create the Container Registry Webhook. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param scope Specifies the scope of repositories that can trigger an event. 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. Defaults to `""`.
         * 
         * @return builder
         * 
         */
        public Builder scope(@Nullable Output scope) {
            $.scope = scope;
            return this;
        }

        /**
         * @param scope Specifies the scope of repositories that can trigger an event. 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. Defaults to `""`.
         * 
         * @return builder
         * 
         */
        public Builder scope(String scope) {
            return scope(Output.of(scope));
        }

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

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

        /**
         * @param status Specifies if this Webhook triggers notifications or not. Valid values: `enabled` and `disabled`. Default is `enabled`.
         * 
         * @return builder
         * 
         */
        public Builder status(@Nullable Output status) {
            $.status = status;
            return this;
        }

        /**
         * @param status Specifies if this Webhook triggers notifications or not. Valid values: `enabled` and `disabled`. Default is `enabled`.
         * 
         * @return builder
         * 
         */
        public Builder status(String status) {
            return status(Output.of(status));
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy