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

com.pulumi.aws.apigateway.RequestValidatorArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

The 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.aws.apigateway;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final RequestValidatorArgs Empty = new RequestValidatorArgs();

    /**
     * Name of the request validator
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Name of the request validator
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * ID of the associated Rest API
     * 
     */
    @Import(name="restApi", required=true)
    private Output restApi;

    /**
     * @return ID of the associated Rest API
     * 
     */
    public Output restApi() {
        return this.restApi;
    }

    /**
     * Boolean whether to validate request body. Defaults to `false`.
     * 
     */
    @Import(name="validateRequestBody")
    private @Nullable Output validateRequestBody;

    /**
     * @return Boolean whether to validate request body. Defaults to `false`.
     * 
     */
    public Optional> validateRequestBody() {
        return Optional.ofNullable(this.validateRequestBody);
    }

    /**
     * Boolean whether to validate request parameters. Defaults to `false`.
     * 
     */
    @Import(name="validateRequestParameters")
    private @Nullable Output validateRequestParameters;

    /**
     * @return Boolean whether to validate request parameters. Defaults to `false`.
     * 
     */
    public Optional> validateRequestParameters() {
        return Optional.ofNullable(this.validateRequestParameters);
    }

    private RequestValidatorArgs() {}

    private RequestValidatorArgs(RequestValidatorArgs $) {
        this.name = $.name;
        this.restApi = $.restApi;
        this.validateRequestBody = $.validateRequestBody;
        this.validateRequestParameters = $.validateRequestParameters;
    }

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

    public static final class Builder {
        private RequestValidatorArgs $;

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

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

        /**
         * @param name Name of the request validator
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the request validator
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param restApi ID of the associated Rest API
         * 
         * @return builder
         * 
         */
        public Builder restApi(Output restApi) {
            $.restApi = restApi;
            return this;
        }

        /**
         * @param restApi ID of the associated Rest API
         * 
         * @return builder
         * 
         */
        public Builder restApi(String restApi) {
            return restApi(Output.of(restApi));
        }

        /**
         * @param validateRequestBody Boolean whether to validate request body. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder validateRequestBody(@Nullable Output validateRequestBody) {
            $.validateRequestBody = validateRequestBody;
            return this;
        }

        /**
         * @param validateRequestBody Boolean whether to validate request body. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder validateRequestBody(Boolean validateRequestBody) {
            return validateRequestBody(Output.of(validateRequestBody));
        }

        /**
         * @param validateRequestParameters Boolean whether to validate request parameters. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder validateRequestParameters(@Nullable Output validateRequestParameters) {
            $.validateRequestParameters = validateRequestParameters;
            return this;
        }

        /**
         * @param validateRequestParameters Boolean whether to validate request parameters. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder validateRequestParameters(Boolean validateRequestParameters) {
            return validateRequestParameters(Output.of(validateRequestParameters));
        }

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy