// *** 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.gcp.secretmanager.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.secretmanager.outputs.SecretReplicationUserManaged;
import java.lang.Boolean;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class SecretReplication {
    /**
     * @return The Secret will automatically be replicated without any restrictions.
     * 
     */
    private @Nullable Boolean automatic;
    /**
     * @return The Secret will be replicated to the regions specified by the user.
     * Structure is documented below.
     * 
     */
    private @Nullable SecretReplicationUserManaged userManaged;

    private SecretReplication() {}
    /**
     * @return The Secret will automatically be replicated without any restrictions.
     * 
     */
    public Optional<Boolean> automatic() {
        return Optional.ofNullable(this.automatic);
    }
    /**
     * @return The Secret will be replicated to the regions specified by the user.
     * Structure is documented below.
     * 
     */
    public Optional<SecretReplicationUserManaged> userManaged() {
        return Optional.ofNullable(this.userManaged);
    }

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

    public static Builder builder(SecretReplication defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Boolean automatic;
        private @Nullable SecretReplicationUserManaged userManaged;
        public Builder() {}
        public Builder(SecretReplication defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.automatic = defaults.automatic;
    	      this.userManaged = defaults.userManaged;
        }

        @CustomType.Setter
        public Builder automatic(@Nullable Boolean automatic) {
            this.automatic = automatic;
            return this;
        }
        @CustomType.Setter
        public Builder userManaged(@Nullable SecretReplicationUserManaged userManaged) {
            this.userManaged = userManaged;
            return this;
        }
        public SecretReplication build() {
            final var o = new SecretReplication();
            o.automatic = automatic;
            o.userManaged = userManaged;
            return o;
        }
    }
}
