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

com.pulumi.azurenative.customproviders.inputs.CustomRPValidationsArgs 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.azurenative.customproviders.inputs;

import com.pulumi.azurenative.customproviders.enums.ValidationType;
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;


/**
 * A validation to apply on custom resource provider requests.
 * 
 */
public final class CustomRPValidationsArgs extends com.pulumi.resources.ResourceArgs {

    public static final CustomRPValidationsArgs Empty = new CustomRPValidationsArgs();

    /**
     * A link to the validation specification. The specification must be hosted on raw.githubusercontent.com.
     * 
     */
    @Import(name="specification", required=true)
    private Output specification;

    /**
     * @return A link to the validation specification. The specification must be hosted on raw.githubusercontent.com.
     * 
     */
    public Output specification() {
        return this.specification;
    }

    /**
     * The type of validation to run against a matching request.
     * 
     */
    @Import(name="validationType")
    private @Nullable Output> validationType;

    /**
     * @return The type of validation to run against a matching request.
     * 
     */
    public Optional>> validationType() {
        return Optional.ofNullable(this.validationType);
    }

    private CustomRPValidationsArgs() {}

    private CustomRPValidationsArgs(CustomRPValidationsArgs $) {
        this.specification = $.specification;
        this.validationType = $.validationType;
    }

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

    public static final class Builder {
        private CustomRPValidationsArgs $;

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

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

        /**
         * @param specification A link to the validation specification. The specification must be hosted on raw.githubusercontent.com.
         * 
         * @return builder
         * 
         */
        public Builder specification(Output specification) {
            $.specification = specification;
            return this;
        }

        /**
         * @param specification A link to the validation specification. The specification must be hosted on raw.githubusercontent.com.
         * 
         * @return builder
         * 
         */
        public Builder specification(String specification) {
            return specification(Output.of(specification));
        }

        /**
         * @param validationType The type of validation to run against a matching request.
         * 
         * @return builder
         * 
         */
        public Builder validationType(@Nullable Output> validationType) {
            $.validationType = validationType;
            return this;
        }

        /**
         * @param validationType The type of validation to run against a matching request.
         * 
         * @return builder
         * 
         */
        public Builder validationType(Either validationType) {
            return validationType(Output.of(validationType));
        }

        /**
         * @param validationType The type of validation to run against a matching request.
         * 
         * @return builder
         * 
         */
        public Builder validationType(String validationType) {
            return validationType(Either.ofLeft(validationType));
        }

        /**
         * @param validationType The type of validation to run against a matching request.
         * 
         * @return builder
         * 
         */
        public Builder validationType(ValidationType validationType) {
            return validationType(Either.ofRight(validationType));
        }

        public CustomRPValidationsArgs build() {
            if ($.specification == null) {
                throw new MissingRequiredPropertyException("CustomRPValidationsArgs", "specification");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy