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

import com.pulumi.aws.iam.inputs.GetPolicyDocumentStatementArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class GetPolicyDocumentArgs extends com.pulumi.resources.InvokeArgs {

    public static final GetPolicyDocumentArgs Empty = new GetPolicyDocumentArgs();

    /**
     * IAM policy document whose statements with non-blank `sid`s will override statements with the same `sid` from documents assigned to the `source_json`, `source_policy_documents`, and `override_policy_documents` arguments. Non-overriding statements will be added to the exported document.
     * 
     * &gt; **NOTE:** Statements without a `sid` cannot be overridden. In other words, a statement without a `sid` from documents assigned to the `source_json` or `source_policy_documents` arguments cannot be overridden by statements from documents assigned to the `override_json` or `override_policy_documents` arguments.
     * 
     * @deprecated
     * Use the attribute &#34;override_policy_documents&#34; instead.
     * 
     */
    @Deprecated /* Use the attribute ""override_policy_documents"" instead. */
    @Import(name="overrideJson")
    private @Nullable Output<String> overrideJson;

    /**
     * @return IAM policy document whose statements with non-blank `sid`s will override statements with the same `sid` from documents assigned to the `source_json`, `source_policy_documents`, and `override_policy_documents` arguments. Non-overriding statements will be added to the exported document.
     * 
     * &gt; **NOTE:** Statements without a `sid` cannot be overridden. In other words, a statement without a `sid` from documents assigned to the `source_json` or `source_policy_documents` arguments cannot be overridden by statements from documents assigned to the `override_json` or `override_policy_documents` arguments.
     * 
     * @deprecated
     * Use the attribute &#34;override_policy_documents&#34; instead.
     * 
     */
    @Deprecated /* Use the attribute ""override_policy_documents"" instead. */
    public Optional<Output<String>> overrideJson() {
        return Optional.ofNullable(this.overrideJson);
    }

    /**
     * List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid` from earlier documents in the list. Statements with non-blank `sid`s will also override statements with the same `sid` from documents provided in the `source_json` and `source_policy_documents` arguments.  Non-overriding statements will be added to the exported document.
     * 
     */
    @Import(name="overridePolicyDocuments")
    private @Nullable Output<List<String>> overridePolicyDocuments;

    /**
     * @return List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid` from earlier documents in the list. Statements with non-blank `sid`s will also override statements with the same `sid` from documents provided in the `source_json` and `source_policy_documents` arguments.  Non-overriding statements will be added to the exported document.
     * 
     */
    public Optional<Output<List<String>>> overridePolicyDocuments() {
        return Optional.ofNullable(this.overridePolicyDocuments);
    }

    /**
     * ID for the policy document.
     * 
     */
    @Import(name="policyId")
    private @Nullable Output<String> policyId;

    /**
     * @return ID for the policy document.
     * 
     */
    public Optional<Output<String>> policyId() {
        return Optional.ofNullable(this.policyId);
    }

    /**
     * IAM policy document used as a base for the exported policy document. Statements with the same `sid` from documents assigned to the `override_json` and `override_policy_documents` arguments will override source statements.
     * 
     * @deprecated
     * Use the attribute &#34;source_policy_documents&#34; instead.
     * 
     */
    @Deprecated /* Use the attribute ""source_policy_documents"" instead. */
    @Import(name="sourceJson")
    private @Nullable Output<String> sourceJson;

    /**
     * @return IAM policy document used as a base for the exported policy document. Statements with the same `sid` from documents assigned to the `override_json` and `override_policy_documents` arguments will override source statements.
     * 
     * @deprecated
     * Use the attribute &#34;source_policy_documents&#34; instead.
     * 
     */
    @Deprecated /* Use the attribute ""source_policy_documents"" instead. */
    public Optional<Output<String>> sourceJson() {
        return Optional.ofNullable(this.sourceJson);
    }

    /**
     * List of IAM policy documents that are merged together into the exported document. Statements defined in `source_policy_documents` or `source_json` must have unique `sid`s. Statements with the same `sid` from documents assigned to the `override_json` and `override_policy_documents` arguments will override source statements.
     * 
     */
    @Import(name="sourcePolicyDocuments")
    private @Nullable Output<List<String>> sourcePolicyDocuments;

    /**
     * @return List of IAM policy documents that are merged together into the exported document. Statements defined in `source_policy_documents` or `source_json` must have unique `sid`s. Statements with the same `sid` from documents assigned to the `override_json` and `override_policy_documents` arguments will override source statements.
     * 
     */
    public Optional<Output<List<String>>> sourcePolicyDocuments() {
        return Optional.ofNullable(this.sourcePolicyDocuments);
    }

    /**
     * Configuration block for a policy statement. Detailed below.
     * 
     */
    @Import(name="statements")
    private @Nullable Output<List<GetPolicyDocumentStatementArgs>> statements;

    /**
     * @return Configuration block for a policy statement. Detailed below.
     * 
     */
    public Optional<Output<List<GetPolicyDocumentStatementArgs>>> statements() {
        return Optional.ofNullable(this.statements);
    }

    /**
     * IAM policy document version. Valid values are `2008-10-17` and `2012-10-17`. Defaults to `2012-10-17`. For more information, see the [AWS IAM User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_version.html).
     * 
     */
    @Import(name="version")
    private @Nullable Output<String> version;

    /**
     * @return IAM policy document version. Valid values are `2008-10-17` and `2012-10-17`. Defaults to `2012-10-17`. For more information, see the [AWS IAM User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_version.html).
     * 
     */
    public Optional<Output<String>> version() {
        return Optional.ofNullable(this.version);
    }

    private GetPolicyDocumentArgs() {}

    private GetPolicyDocumentArgs(GetPolicyDocumentArgs $) {
        this.overrideJson = $.overrideJson;
        this.overridePolicyDocuments = $.overridePolicyDocuments;
        this.policyId = $.policyId;
        this.sourceJson = $.sourceJson;
        this.sourcePolicyDocuments = $.sourcePolicyDocuments;
        this.statements = $.statements;
        this.version = $.version;
    }

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

    public static final class Builder {
        private GetPolicyDocumentArgs $;

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

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

        /**
         * @param overrideJson IAM policy document whose statements with non-blank `sid`s will override statements with the same `sid` from documents assigned to the `source_json`, `source_policy_documents`, and `override_policy_documents` arguments. Non-overriding statements will be added to the exported document.
         * 
         * &gt; **NOTE:** Statements without a `sid` cannot be overridden. In other words, a statement without a `sid` from documents assigned to the `source_json` or `source_policy_documents` arguments cannot be overridden by statements from documents assigned to the `override_json` or `override_policy_documents` arguments.
         * 
         * @return builder
         * 
         * @deprecated
         * Use the attribute &#34;override_policy_documents&#34; instead.
         * 
         */
        @Deprecated /* Use the attribute ""override_policy_documents"" instead. */
        public Builder overrideJson(@Nullable Output<String> overrideJson) {
            $.overrideJson = overrideJson;
            return this;
        }

        /**
         * @param overrideJson IAM policy document whose statements with non-blank `sid`s will override statements with the same `sid` from documents assigned to the `source_json`, `source_policy_documents`, and `override_policy_documents` arguments. Non-overriding statements will be added to the exported document.
         * 
         * &gt; **NOTE:** Statements without a `sid` cannot be overridden. In other words, a statement without a `sid` from documents assigned to the `source_json` or `source_policy_documents` arguments cannot be overridden by statements from documents assigned to the `override_json` or `override_policy_documents` arguments.
         * 
         * @return builder
         * 
         * @deprecated
         * Use the attribute &#34;override_policy_documents&#34; instead.
         * 
         */
        @Deprecated /* Use the attribute ""override_policy_documents"" instead. */
        public Builder overrideJson(String overrideJson) {
            return overrideJson(Output.of(overrideJson));
        }

        /**
         * @param overridePolicyDocuments List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid` from earlier documents in the list. Statements with non-blank `sid`s will also override statements with the same `sid` from documents provided in the `source_json` and `source_policy_documents` arguments.  Non-overriding statements will be added to the exported document.
         * 
         * @return builder
         * 
         */
        public Builder overridePolicyDocuments(@Nullable Output<List<String>> overridePolicyDocuments) {
            $.overridePolicyDocuments = overridePolicyDocuments;
            return this;
        }

        /**
         * @param overridePolicyDocuments List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid` from earlier documents in the list. Statements with non-blank `sid`s will also override statements with the same `sid` from documents provided in the `source_json` and `source_policy_documents` arguments.  Non-overriding statements will be added to the exported document.
         * 
         * @return builder
         * 
         */
        public Builder overridePolicyDocuments(List<String> overridePolicyDocuments) {
            return overridePolicyDocuments(Output.of(overridePolicyDocuments));
        }

        /**
         * @param overridePolicyDocuments List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid` from earlier documents in the list. Statements with non-blank `sid`s will also override statements with the same `sid` from documents provided in the `source_json` and `source_policy_documents` arguments.  Non-overriding statements will be added to the exported document.
         * 
         * @return builder
         * 
         */
        public Builder overridePolicyDocuments(String... overridePolicyDocuments) {
            return overridePolicyDocuments(List.of(overridePolicyDocuments));
        }

        /**
         * @param policyId ID for the policy document.
         * 
         * @return builder
         * 
         */
        public Builder policyId(@Nullable Output<String> policyId) {
            $.policyId = policyId;
            return this;
        }

        /**
         * @param policyId ID for the policy document.
         * 
         * @return builder
         * 
         */
        public Builder policyId(String policyId) {
            return policyId(Output.of(policyId));
        }

        /**
         * @param sourceJson IAM policy document used as a base for the exported policy document. Statements with the same `sid` from documents assigned to the `override_json` and `override_policy_documents` arguments will override source statements.
         * 
         * @return builder
         * 
         * @deprecated
         * Use the attribute &#34;source_policy_documents&#34; instead.
         * 
         */
        @Deprecated /* Use the attribute ""source_policy_documents"" instead. */
        public Builder sourceJson(@Nullable Output<String> sourceJson) {
            $.sourceJson = sourceJson;
            return this;
        }

        /**
         * @param sourceJson IAM policy document used as a base for the exported policy document. Statements with the same `sid` from documents assigned to the `override_json` and `override_policy_documents` arguments will override source statements.
         * 
         * @return builder
         * 
         * @deprecated
         * Use the attribute &#34;source_policy_documents&#34; instead.
         * 
         */
        @Deprecated /* Use the attribute ""source_policy_documents"" instead. */
        public Builder sourceJson(String sourceJson) {
            return sourceJson(Output.of(sourceJson));
        }

        /**
         * @param sourcePolicyDocuments List of IAM policy documents that are merged together into the exported document. Statements defined in `source_policy_documents` or `source_json` must have unique `sid`s. Statements with the same `sid` from documents assigned to the `override_json` and `override_policy_documents` arguments will override source statements.
         * 
         * @return builder
         * 
         */
        public Builder sourcePolicyDocuments(@Nullable Output<List<String>> sourcePolicyDocuments) {
            $.sourcePolicyDocuments = sourcePolicyDocuments;
            return this;
        }

        /**
         * @param sourcePolicyDocuments List of IAM policy documents that are merged together into the exported document. Statements defined in `source_policy_documents` or `source_json` must have unique `sid`s. Statements with the same `sid` from documents assigned to the `override_json` and `override_policy_documents` arguments will override source statements.
         * 
         * @return builder
         * 
         */
        public Builder sourcePolicyDocuments(List<String> sourcePolicyDocuments) {
            return sourcePolicyDocuments(Output.of(sourcePolicyDocuments));
        }

        /**
         * @param sourcePolicyDocuments List of IAM policy documents that are merged together into the exported document. Statements defined in `source_policy_documents` or `source_json` must have unique `sid`s. Statements with the same `sid` from documents assigned to the `override_json` and `override_policy_documents` arguments will override source statements.
         * 
         * @return builder
         * 
         */
        public Builder sourcePolicyDocuments(String... sourcePolicyDocuments) {
            return sourcePolicyDocuments(List.of(sourcePolicyDocuments));
        }

        /**
         * @param statements Configuration block for a policy statement. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder statements(@Nullable Output<List<GetPolicyDocumentStatementArgs>> statements) {
            $.statements = statements;
            return this;
        }

        /**
         * @param statements Configuration block for a policy statement. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder statements(List<GetPolicyDocumentStatementArgs> statements) {
            return statements(Output.of(statements));
        }

        /**
         * @param statements Configuration block for a policy statement. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder statements(GetPolicyDocumentStatementArgs... statements) {
            return statements(List.of(statements));
        }

        /**
         * @param version IAM policy document version. Valid values are `2008-10-17` and `2012-10-17`. Defaults to `2012-10-17`. For more information, see the [AWS IAM User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_version.html).
         * 
         * @return builder
         * 
         */
        public Builder version(@Nullable Output<String> version) {
            $.version = version;
            return this;
        }

        /**
         * @param version IAM policy document version. Valid values are `2008-10-17` and `2012-10-17`. Defaults to `2012-10-17`. For more information, see the [AWS IAM User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_version.html).
         * 
         * @return builder
         * 
         */
        public Builder version(String version) {
            return version(Output.of(version));
        }

        public GetPolicyDocumentArgs build() {
            return $;
        }
    }

}
