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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;


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

    public static final RolePolicyAttachmentArgs Empty = new RolePolicyAttachmentArgs();

    /**
     * The ARN of the policy you want to apply
     * 
     */
    @Import(name="policyArn", required=true)
    private Output<String> policyArn;

    /**
     * @return The ARN of the policy you want to apply
     * 
     */
    public Output<String> policyArn() {
        return this.policyArn;
    }

    /**
     * The name of the IAM role to which the policy should be applied
     * 
     */
    @Import(name="role", required=true)
    private Output<String> role;

    /**
     * @return The name of the IAM role to which the policy should be applied
     * 
     */
    public Output<String> role() {
        return this.role;
    }

    private RolePolicyAttachmentArgs() {}

    private RolePolicyAttachmentArgs(RolePolicyAttachmentArgs $) {
        this.policyArn = $.policyArn;
        this.role = $.role;
    }

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

    public static final class Builder {
        private RolePolicyAttachmentArgs $;

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

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

        /**
         * @param policyArn The ARN of the policy you want to apply
         * 
         * @return builder
         * 
         */
        public Builder policyArn(Output<String> policyArn) {
            $.policyArn = policyArn;
            return this;
        }

        /**
         * @param policyArn The ARN of the policy you want to apply
         * 
         * @return builder
         * 
         */
        public Builder policyArn(String policyArn) {
            return policyArn(Output.of(policyArn));
        }

        /**
         * @param role The name of the IAM role to which the policy should be applied
         * 
         * @return builder
         * 
         */
        public Builder role(Output<String> role) {
            $.role = role;
            return this;
        }

        /**
         * @param role The name of the IAM role to which the policy should be applied
         * 
         * @return builder
         * 
         */
        public Builder role(String role) {
            return role(Output.of(role));
        }

        public RolePolicyAttachmentArgs build() {
            $.policyArn = Objects.requireNonNull($.policyArn, "expected parameter 'policyArn' to be non-null");
            $.role = Objects.requireNonNull($.role, "expected parameter 'role' to be non-null");
            return $;
        }
    }

}
