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

com.pulumi.azurenative.containerregistry.TokenArgs 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.TokenStatus;
import com.pulumi.azurenative.containerregistry.inputs.TokenCredentialsPropertiesArgs;
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.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final TokenArgs Empty = new TokenArgs();

    /**
     * The credentials that can be used for authenticating the token.
     * 
     */
    @Import(name="credentials")
    private @Nullable Output credentials;

    /**
     * @return The credentials that can be used for authenticating the token.
     * 
     */
    public Optional> credentials() {
        return Optional.ofNullable(this.credentials);
    }

    /**
     * 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 resource ID of the scope map to which the token will be associated with.
     * 
     */
    @Import(name="scopeMapId")
    private @Nullable Output scopeMapId;

    /**
     * @return The resource ID of the scope map to which the token will be associated with.
     * 
     */
    public Optional> scopeMapId() {
        return Optional.ofNullable(this.scopeMapId);
    }

    /**
     * The status of the token example enabled or disabled.
     * 
     */
    @Import(name="status")
    private @Nullable Output> status;

    /**
     * @return The status of the token example enabled or disabled.
     * 
     */
    public Optional>> status() {
        return Optional.ofNullable(this.status);
    }

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

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

    private TokenArgs() {}

    private TokenArgs(TokenArgs $) {
        this.credentials = $.credentials;
        this.registryName = $.registryName;
        this.resourceGroupName = $.resourceGroupName;
        this.scopeMapId = $.scopeMapId;
        this.status = $.status;
        this.tokenName = $.tokenName;
    }

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

    public static final class Builder {
        private TokenArgs $;

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

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

        /**
         * @param credentials The credentials that can be used for authenticating the token.
         * 
         * @return builder
         * 
         */
        public Builder credentials(@Nullable Output credentials) {
            $.credentials = credentials;
            return this;
        }

        /**
         * @param credentials The credentials that can be used for authenticating the token.
         * 
         * @return builder
         * 
         */
        public Builder credentials(TokenCredentialsPropertiesArgs credentials) {
            return credentials(Output.of(credentials));
        }

        /**
         * @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 scopeMapId The resource ID of the scope map to which the token will be associated with.
         * 
         * @return builder
         * 
         */
        public Builder scopeMapId(@Nullable Output scopeMapId) {
            $.scopeMapId = scopeMapId;
            return this;
        }

        /**
         * @param scopeMapId The resource ID of the scope map to which the token will be associated with.
         * 
         * @return builder
         * 
         */
        public Builder scopeMapId(String scopeMapId) {
            return scopeMapId(Output.of(scopeMapId));
        }

        /**
         * @param status The status of the token example enabled or disabled.
         * 
         * @return builder
         * 
         */
        public Builder status(@Nullable Output> status) {
            $.status = status;
            return this;
        }

        /**
         * @param status The status of the token example enabled or disabled.
         * 
         * @return builder
         * 
         */
        public Builder status(Either status) {
            return status(Output.of(status));
        }

        /**
         * @param status The status of the token example enabled or disabled.
         * 
         * @return builder
         * 
         */
        public Builder status(String status) {
            return status(Either.ofLeft(status));
        }

        /**
         * @param status The status of the token example enabled or disabled.
         * 
         * @return builder
         * 
         */
        public Builder status(TokenStatus status) {
            return status(Either.ofRight(status));
        }

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

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

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy