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

    public static final AuthPolicyState Empty = new AuthPolicyState();

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

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

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

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

    /**
     * The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client&#39;s IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.
     * 
     */
    @Import(name="state")
    private @Nullable Output<String> state;

    /**
     * @return The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client&#39;s IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.
     * 
     */
    public Optional<Output<String>> state() {
        return Optional.ofNullable(this.state);
    }

    private AuthPolicyState() {}

    private AuthPolicyState(AuthPolicyState $) {
        this.policy = $.policy;
        this.resourceIdentifier = $.resourceIdentifier;
        this.state = $.state;
    }

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

    public static final class Builder {
        private AuthPolicyState $;

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

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

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

        /**
         * @param policy The auth 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 resourceIdentifier The ID or Amazon Resource Name (ARN) of the service network or service for which the policy is created.
         * 
         * @return builder
         * 
         */
        public Builder resourceIdentifier(@Nullable Output<String> resourceIdentifier) {
            $.resourceIdentifier = resourceIdentifier;
            return this;
        }

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

        /**
         * @param state The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client&#39;s IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.
         * 
         * @return builder
         * 
         */
        public Builder state(@Nullable Output<String> state) {
            $.state = state;
            return this;
        }

        /**
         * @param state The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client&#39;s IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.
         * 
         * @return builder
         * 
         */
        public Builder state(String state) {
            return state(Output.of(state));
        }

        public AuthPolicyState build() {
            return $;
        }
    }

}
