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

com.pulumi.azurenative.containerregistry.inputs.TrustPolicyArgs Maven / Gradle / Ivy

There is a newer version: 2.78.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.inputs;

import com.pulumi.azurenative.containerregistry.enums.PolicyStatus;
import com.pulumi.azurenative.containerregistry.enums.TrustPolicyType;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * The content trust policy for a container registry.
 * 
 */
public final class TrustPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final TrustPolicyArgs Empty = new TrustPolicyArgs();

    /**
     * The value that indicates whether the policy is enabled or not.
     * 
     */
    @Import(name="status")
    private @Nullable Output> status;

    /**
     * @return The value that indicates whether the policy is enabled or not.
     * 
     */
    public Optional>> status() {
        return Optional.ofNullable(this.status);
    }

    /**
     * The type of trust policy.
     * 
     */
    @Import(name="type")
    private @Nullable Output> type;

    /**
     * @return The type of trust policy.
     * 
     */
    public Optional>> type() {
        return Optional.ofNullable(this.type);
    }

    private TrustPolicyArgs() {}

    private TrustPolicyArgs(TrustPolicyArgs $) {
        this.status = $.status;
        this.type = $.type;
    }

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

    public static final class Builder {
        private TrustPolicyArgs $;

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

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

        /**
         * @param status The value that indicates whether the policy is enabled or not.
         * 
         * @return builder
         * 
         */
        public Builder status(@Nullable Output> status) {
            $.status = status;
            return this;
        }

        /**
         * @param status The value that indicates whether the policy is enabled or not.
         * 
         * @return builder
         * 
         */
        public Builder status(Either status) {
            return status(Output.of(status));
        }

        /**
         * @param status The value that indicates whether the policy is enabled or not.
         * 
         * @return builder
         * 
         */
        public Builder status(String status) {
            return status(Either.ofLeft(status));
        }

        /**
         * @param status The value that indicates whether the policy is enabled or not.
         * 
         * @return builder
         * 
         */
        public Builder status(PolicyStatus status) {
            return status(Either.ofRight(status));
        }

        /**
         * @param type The type of trust policy.
         * 
         * @return builder
         * 
         */
        public Builder type(@Nullable Output> type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The type of trust policy.
         * 
         * @return builder
         * 
         */
        public Builder type(Either type) {
            return type(Output.of(type));
        }

        /**
         * @param type The type of trust policy.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Either.ofLeft(type));
        }

        /**
         * @param type The type of trust policy.
         * 
         * @return builder
         * 
         */
        public Builder type(TrustPolicyType type) {
            return type(Either.ofRight(type));
        }

        public TrustPolicyArgs build() {
            $.status = Codegen.stringProp("status").left(PolicyStatus.class).output().arg($.status).def("disabled").getNullable();
            $.type = Codegen.stringProp("type").left(TrustPolicyType.class).output().arg($.type).def("Notary").getNullable();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy