// *** 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.amplify.inputs;

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


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

    public static final AppCustomRuleArgs Empty = new AppCustomRuleArgs();

    /**
     * Condition for a URL rewrite or redirect rule, such as a country code.
     * 
     */
    @Import(name="condition")
    private @Nullable Output<String> condition;

    /**
     * @return Condition for a URL rewrite or redirect rule, such as a country code.
     * 
     */
    public Optional<Output<String>> condition() {
        return Optional.ofNullable(this.condition);
    }

    /**
     * Source pattern for a URL rewrite or redirect rule.
     * 
     */
    @Import(name="source", required=true)
    private Output<String> source;

    /**
     * @return Source pattern for a URL rewrite or redirect rule.
     * 
     */
    public Output<String> source() {
        return this.source;
    }

    /**
     * Status code for a URL rewrite or redirect rule. Valid values: `200`, `301`, `302`, `404`, `404-200`.
     * 
     */
    @Import(name="status")
    private @Nullable Output<String> status;

    /**
     * @return Status code for a URL rewrite or redirect rule. Valid values: `200`, `301`, `302`, `404`, `404-200`.
     * 
     */
    public Optional<Output<String>> status() {
        return Optional.ofNullable(this.status);
    }

    /**
     * Target pattern for a URL rewrite or redirect rule.
     * 
     */
    @Import(name="target", required=true)
    private Output<String> target;

    /**
     * @return Target pattern for a URL rewrite or redirect rule.
     * 
     */
    public Output<String> target() {
        return this.target;
    }

    private AppCustomRuleArgs() {}

    private AppCustomRuleArgs(AppCustomRuleArgs $) {
        this.condition = $.condition;
        this.source = $.source;
        this.status = $.status;
        this.target = $.target;
    }

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

    public static final class Builder {
        private AppCustomRuleArgs $;

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

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

        /**
         * @param condition Condition for a URL rewrite or redirect rule, such as a country code.
         * 
         * @return builder
         * 
         */
        public Builder condition(@Nullable Output<String> condition) {
            $.condition = condition;
            return this;
        }

        /**
         * @param condition Condition for a URL rewrite or redirect rule, such as a country code.
         * 
         * @return builder
         * 
         */
        public Builder condition(String condition) {
            return condition(Output.of(condition));
        }

        /**
         * @param source Source pattern for a URL rewrite or redirect rule.
         * 
         * @return builder
         * 
         */
        public Builder source(Output<String> source) {
            $.source = source;
            return this;
        }

        /**
         * @param source Source pattern for a URL rewrite or redirect rule.
         * 
         * @return builder
         * 
         */
        public Builder source(String source) {
            return source(Output.of(source));
        }

        /**
         * @param status Status code for a URL rewrite or redirect rule. Valid values: `200`, `301`, `302`, `404`, `404-200`.
         * 
         * @return builder
         * 
         */
        public Builder status(@Nullable Output<String> status) {
            $.status = status;
            return this;
        }

        /**
         * @param status Status code for a URL rewrite or redirect rule. Valid values: `200`, `301`, `302`, `404`, `404-200`.
         * 
         * @return builder
         * 
         */
        public Builder status(String status) {
            return status(Output.of(status));
        }

        /**
         * @param target Target pattern for a URL rewrite or redirect rule.
         * 
         * @return builder
         * 
         */
        public Builder target(Output<String> target) {
            $.target = target;
            return this;
        }

        /**
         * @param target Target pattern for a URL rewrite or redirect rule.
         * 
         * @return builder
         * 
         */
        public Builder target(String target) {
            return target(Output.of(target));
        }

        public AppCustomRuleArgs build() {
            $.source = Objects.requireNonNull($.source, "expected parameter 'source' to be non-null");
            $.target = Objects.requireNonNull($.target, "expected parameter 'target' to be non-null");
            return $;
        }
    }

}
