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

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


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

    public static final ResourcePolicyArgs Empty = new ResourcePolicyArgs();

    /**
     * An IAM policy. The policy string in JSON must not contain newlines or blank lines.
     * 
     */
    @Import(name="policy", required=true)
    private Output<String> policy;

    /**
     * @return An IAM policy. The policy string in JSON must not contain newlines or blank lines.
     * 
     */
    public Output<String> policy() {
        return this.policy;
    }

    /**
     * The ID or Amazon Resource Name (ARN) of the service network or service for which the policy is created.
     * 
     */
    @Import(name="resourceArn", required=true)
    private Output<String> resourceArn;

    /**
     * @return The ID or Amazon Resource Name (ARN) of the service network or service for which the policy is created.
     * 
     */
    public Output<String> resourceArn() {
        return this.resourceArn;
    }

    private ResourcePolicyArgs() {}

    private ResourcePolicyArgs(ResourcePolicyArgs $) {
        this.policy = $.policy;
        this.resourceArn = $.resourceArn;
    }

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

    public static final class Builder {
        private ResourcePolicyArgs $;

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

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

        /**
         * @param policy An IAM policy. The policy string in JSON must not contain newlines or blank lines.
         * 
         * @return builder
         * 
         */
        public Builder policy(Output<String> policy) {
            $.policy = policy;
            return this;
        }

        /**
         * @param policy An IAM policy. The policy string in JSON must not contain newlines or blank lines.
         * 
         * @return builder
         * 
         */
        public Builder policy(String policy) {
            return policy(Output.of(policy));
        }

        /**
         * @param resourceArn The ID or Amazon Resource Name (ARN) of the service network or service for which the policy is created.
         * 
         * @return builder
         * 
         */
        public Builder resourceArn(Output<String> resourceArn) {
            $.resourceArn = resourceArn;
            return this;
        }

        /**
         * @param resourceArn The ID or Amazon Resource Name (ARN) of the service network or service for which the policy is created.
         * 
         * @return builder
         * 
         */
        public Builder resourceArn(String resourceArn) {
            return resourceArn(Output.of(resourceArn));
        }

        public ResourcePolicyArgs build() {
            $.policy = Objects.requireNonNull($.policy, "expected parameter 'policy' to be non-null");
            $.resourceArn = Objects.requireNonNull($.resourceArn, "expected parameter 'resourceArn' to be non-null");
            return $;
        }
    }

}
