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

com.pulumi.aws.apigateway.MethodSettingsArgs 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.aws.apigateway;

import com.pulumi.aws.apigateway.inputs.MethodSettingsSettingsArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;


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

    public static final MethodSettingsArgs Empty = new MethodSettingsArgs();

    /**
     * Method path defined as `{resource_path}/{http_method}` for an individual method override, or `*/*` for overriding all methods in the stage. Ensure to trim any leading forward slashes in the path (e.g., `trimprefix(aws_api_gateway_resource.example.path, "/")`).
     * 
     */
    @Import(name="methodPath", required=true)
    private Output methodPath;

    /**
     * @return Method path defined as `{resource_path}/{http_method}` for an individual method override, or `*/*` for overriding all methods in the stage. Ensure to trim any leading forward slashes in the path (e.g., `trimprefix(aws_api_gateway_resource.example.path, "/")`).
     * 
     */
    public Output methodPath() {
        return this.methodPath;
    }

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

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

    /**
     * Settings block, see below.
     * 
     */
    @Import(name="settings", required=true)
    private Output settings;

    /**
     * @return Settings block, see below.
     * 
     */
    public Output settings() {
        return this.settings;
    }

    /**
     * Name of the stage
     * 
     */
    @Import(name="stageName", required=true)
    private Output stageName;

    /**
     * @return Name of the stage
     * 
     */
    public Output stageName() {
        return this.stageName;
    }

    private MethodSettingsArgs() {}

    private MethodSettingsArgs(MethodSettingsArgs $) {
        this.methodPath = $.methodPath;
        this.restApi = $.restApi;
        this.settings = $.settings;
        this.stageName = $.stageName;
    }

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

    public static final class Builder {
        private MethodSettingsArgs $;

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

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

        /**
         * @param methodPath Method path defined as `{resource_path}/{http_method}` for an individual method override, or `*/*` for overriding all methods in the stage. Ensure to trim any leading forward slashes in the path (e.g., `trimprefix(aws_api_gateway_resource.example.path, "/")`).
         * 
         * @return builder
         * 
         */
        public Builder methodPath(Output methodPath) {
            $.methodPath = methodPath;
            return this;
        }

        /**
         * @param methodPath Method path defined as `{resource_path}/{http_method}` for an individual method override, or `*/*` for overriding all methods in the stage. Ensure to trim any leading forward slashes in the path (e.g., `trimprefix(aws_api_gateway_resource.example.path, "/")`).
         * 
         * @return builder
         * 
         */
        public Builder methodPath(String methodPath) {
            return methodPath(Output.of(methodPath));
        }

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

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

        /**
         * @param settings Settings block, see below.
         * 
         * @return builder
         * 
         */
        public Builder settings(Output settings) {
            $.settings = settings;
            return this;
        }

        /**
         * @param settings Settings block, see below.
         * 
         * @return builder
         * 
         */
        public Builder settings(MethodSettingsSettingsArgs settings) {
            return settings(Output.of(settings));
        }

        /**
         * @param stageName Name of the stage
         * 
         * @return builder
         * 
         */
        public Builder stageName(Output stageName) {
            $.stageName = stageName;
            return this;
        }

        /**
         * @param stageName Name of the stage
         * 
         * @return builder
         * 
         */
        public Builder stageName(String stageName) {
            return stageName(Output.of(stageName));
        }

        public MethodSettingsArgs build() {
            if ($.methodPath == null) {
                throw new MissingRequiredPropertyException("MethodSettingsArgs", "methodPath");
            }
            if ($.restApi == null) {
                throw new MissingRequiredPropertyException("MethodSettingsArgs", "restApi");
            }
            if ($.settings == null) {
                throw new MissingRequiredPropertyException("MethodSettingsArgs", "settings");
            }
            if ($.stageName == null) {
                throw new MissingRequiredPropertyException("MethodSettingsArgs", "stageName");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy