// *** 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.ses.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 MailFromState extends com.pulumi.resources.ResourceArgs {

    public static final MailFromState Empty = new MailFromState();

    /**
     * The action that you want Amazon SES to take if it cannot successfully read the required MX record when you send an email. Defaults to `UseDefaultValue`. See the [SES API documentation](https://docs.aws.amazon.com/ses/latest/APIReference/API_SetIdentityMailFromDomain.html) for more information.
     * 
     */
    @Import(name="behaviorOnMxFailure")
    private @Nullable Output<String> behaviorOnMxFailure;

    /**
     * @return The action that you want Amazon SES to take if it cannot successfully read the required MX record when you send an email. Defaults to `UseDefaultValue`. See the [SES API documentation](https://docs.aws.amazon.com/ses/latest/APIReference/API_SetIdentityMailFromDomain.html) for more information.
     * 
     */
    public Optional<Output<String>> behaviorOnMxFailure() {
        return Optional.ofNullable(this.behaviorOnMxFailure);
    }

    /**
     * Verified domain name or email identity to generate DKIM tokens for.
     * 
     */
    @Import(name="domain")
    private @Nullable Output<String> domain;

    /**
     * @return Verified domain name or email identity to generate DKIM tokens for.
     * 
     */
    public Optional<Output<String>> domain() {
        return Optional.ofNullable(this.domain);
    }

    /**
     * Subdomain (of above domain) which is to be used as MAIL FROM address (Required for DMARC validation)
     * 
     * The following arguments are optional:
     * 
     */
    @Import(name="mailFromDomain")
    private @Nullable Output<String> mailFromDomain;

    /**
     * @return Subdomain (of above domain) which is to be used as MAIL FROM address (Required for DMARC validation)
     * 
     * The following arguments are optional:
     * 
     */
    public Optional<Output<String>> mailFromDomain() {
        return Optional.ofNullable(this.mailFromDomain);
    }

    private MailFromState() {}

    private MailFromState(MailFromState $) {
        this.behaviorOnMxFailure = $.behaviorOnMxFailure;
        this.domain = $.domain;
        this.mailFromDomain = $.mailFromDomain;
    }

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

    public static final class Builder {
        private MailFromState $;

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

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

        /**
         * @param behaviorOnMxFailure The action that you want Amazon SES to take if it cannot successfully read the required MX record when you send an email. Defaults to `UseDefaultValue`. See the [SES API documentation](https://docs.aws.amazon.com/ses/latest/APIReference/API_SetIdentityMailFromDomain.html) for more information.
         * 
         * @return builder
         * 
         */
        public Builder behaviorOnMxFailure(@Nullable Output<String> behaviorOnMxFailure) {
            $.behaviorOnMxFailure = behaviorOnMxFailure;
            return this;
        }

        /**
         * @param behaviorOnMxFailure The action that you want Amazon SES to take if it cannot successfully read the required MX record when you send an email. Defaults to `UseDefaultValue`. See the [SES API documentation](https://docs.aws.amazon.com/ses/latest/APIReference/API_SetIdentityMailFromDomain.html) for more information.
         * 
         * @return builder
         * 
         */
        public Builder behaviorOnMxFailure(String behaviorOnMxFailure) {
            return behaviorOnMxFailure(Output.of(behaviorOnMxFailure));
        }

        /**
         * @param domain Verified domain name or email identity to generate DKIM tokens for.
         * 
         * @return builder
         * 
         */
        public Builder domain(@Nullable Output<String> domain) {
            $.domain = domain;
            return this;
        }

        /**
         * @param domain Verified domain name or email identity to generate DKIM tokens for.
         * 
         * @return builder
         * 
         */
        public Builder domain(String domain) {
            return domain(Output.of(domain));
        }

        /**
         * @param mailFromDomain Subdomain (of above domain) which is to be used as MAIL FROM address (Required for DMARC validation)
         * 
         * The following arguments are optional:
         * 
         * @return builder
         * 
         */
        public Builder mailFromDomain(@Nullable Output<String> mailFromDomain) {
            $.mailFromDomain = mailFromDomain;
            return this;
        }

        /**
         * @param mailFromDomain Subdomain (of above domain) which is to be used as MAIL FROM address (Required for DMARC validation)
         * 
         * The following arguments are optional:
         * 
         * @return builder
         * 
         */
        public Builder mailFromDomain(String mailFromDomain) {
            return mailFromDomain(Output.of(mailFromDomain));
        }

        public MailFromState build() {
            return $;
        }
    }

}
