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

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


/**
 * Role and policy attachments with default setup unless explicitly skipped or an existing role ARN provided.
 * 
 */
public final class DefaultRoleWithPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final DefaultRoleWithPolicyArgs Empty = new DefaultRoleWithPolicyArgs();

    /**
     * Args to use when creating the role and policies. Can&#39;t be specified if `roleArn` is used.
     * 
     */
    @Import(name="args")
    private @Nullable RoleWithPolicyArgs args;

    /**
     * @return Args to use when creating the role and policies. Can&#39;t be specified if `roleArn` is used.
     * 
     */
    public Optional<RoleWithPolicyArgs> args() {
        return Optional.ofNullable(this.args);
    }

    /**
     * ARN of existing role to use instead of creating a new role. Cannot be used in combination with `args` or `opts`.
     * 
     */
    @Import(name="roleArn")
    private @Nullable Output<String> roleArn;

    /**
     * @return ARN of existing role to use instead of creating a new role. Cannot be used in combination with `args` or `opts`.
     * 
     */
    public Optional<Output<String>> roleArn() {
        return Optional.ofNullable(this.roleArn);
    }

    /**
     * Skips creation of the role if set to `true`.
     * 
     */
    @Import(name="skip")
    private @Nullable Boolean skip;

    /**
     * @return Skips creation of the role if set to `true`.
     * 
     */
    public Optional<Boolean> skip() {
        return Optional.ofNullable(this.skip);
    }

    private DefaultRoleWithPolicyArgs() {}

    private DefaultRoleWithPolicyArgs(DefaultRoleWithPolicyArgs $) {
        this.args = $.args;
        this.roleArn = $.roleArn;
        this.skip = $.skip;
    }

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

    public static final class Builder {
        private DefaultRoleWithPolicyArgs $;

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

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

        /**
         * @param args Args to use when creating the role and policies. Can&#39;t be specified if `roleArn` is used.
         * 
         * @return builder
         * 
         */
        public Builder args(@Nullable RoleWithPolicyArgs args) {
            $.args = args;
            return this;
        }

        /**
         * @param roleArn ARN of existing role to use instead of creating a new role. Cannot be used in combination with `args` or `opts`.
         * 
         * @return builder
         * 
         */
        public Builder roleArn(@Nullable Output<String> roleArn) {
            $.roleArn = roleArn;
            return this;
        }

        /**
         * @param roleArn ARN of existing role to use instead of creating a new role. Cannot be used in combination with `args` or `opts`.
         * 
         * @return builder
         * 
         */
        public Builder roleArn(String roleArn) {
            return roleArn(Output.of(roleArn));
        }

        /**
         * @param skip Skips creation of the role if set to `true`.
         * 
         * @return builder
         * 
         */
        public Builder skip(@Nullable Boolean skip) {
            $.skip = skip;
            return this;
        }

        public DefaultRoleWithPolicyArgs build() {
            return $;
        }
    }

}
