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

import com.pulumi.aws.dlm.outputs.LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleDeprecateRule;
import com.pulumi.aws.dlm.outputs.LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleRetainRule;
import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRule {
    /**
     * @return The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption. If this parameter is not specified, the default KMS key for the account is used.
     * 
     */
    private @Nullable String cmkArn;
    /**
     * @return Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
     * 
     */
    private @Nullable Boolean copyTags;
    /**
     * @return See the `deprecate_rule` block. Max of 1 per schedule.
     * 
     */
    private @Nullable LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleDeprecateRule deprecateRule;
    /**
     * @return To encrypt a copy of an unencrypted snapshot when encryption by default is not enabled, enable encryption using this parameter. Copies of encrypted snapshots are encrypted, even if this parameter is false or when encryption by default is not enabled.
     * 
     */
    private Boolean encrypted;
    /**
     * @return Specifies the retention rule for cross-Region snapshot copies. See the `retain_rule` block. Max of 1 per action.
     * 
     */
    private @Nullable LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleRetainRule retainRule;
    /**
     * @return The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies.
     * 
     */
    private String target;

    private LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRule() {}
    /**
     * @return The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption. If this parameter is not specified, the default KMS key for the account is used.
     * 
     */
    public Optional<String> cmkArn() {
        return Optional.ofNullable(this.cmkArn);
    }
    /**
     * @return Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
     * 
     */
    public Optional<Boolean> copyTags() {
        return Optional.ofNullable(this.copyTags);
    }
    /**
     * @return See the `deprecate_rule` block. Max of 1 per schedule.
     * 
     */
    public Optional<LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleDeprecateRule> deprecateRule() {
        return Optional.ofNullable(this.deprecateRule);
    }
    /**
     * @return To encrypt a copy of an unencrypted snapshot when encryption by default is not enabled, enable encryption using this parameter. Copies of encrypted snapshots are encrypted, even if this parameter is false or when encryption by default is not enabled.
     * 
     */
    public Boolean encrypted() {
        return this.encrypted;
    }
    /**
     * @return Specifies the retention rule for cross-Region snapshot copies. See the `retain_rule` block. Max of 1 per action.
     * 
     */
    public Optional<LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleRetainRule> retainRule() {
        return Optional.ofNullable(this.retainRule);
    }
    /**
     * @return The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies.
     * 
     */
    public String target() {
        return this.target;
    }

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

    public static Builder builder(LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRule defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String cmkArn;
        private @Nullable Boolean copyTags;
        private @Nullable LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleDeprecateRule deprecateRule;
        private Boolean encrypted;
        private @Nullable LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleRetainRule retainRule;
        private String target;
        public Builder() {}
        public Builder(LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRule defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.cmkArn = defaults.cmkArn;
    	      this.copyTags = defaults.copyTags;
    	      this.deprecateRule = defaults.deprecateRule;
    	      this.encrypted = defaults.encrypted;
    	      this.retainRule = defaults.retainRule;
    	      this.target = defaults.target;
        }

        @CustomType.Setter
        public Builder cmkArn(@Nullable String cmkArn) {
            this.cmkArn = cmkArn;
            return this;
        }
        @CustomType.Setter
        public Builder copyTags(@Nullable Boolean copyTags) {
            this.copyTags = copyTags;
            return this;
        }
        @CustomType.Setter
        public Builder deprecateRule(@Nullable LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleDeprecateRule deprecateRule) {
            this.deprecateRule = deprecateRule;
            return this;
        }
        @CustomType.Setter
        public Builder encrypted(Boolean encrypted) {
            this.encrypted = Objects.requireNonNull(encrypted);
            return this;
        }
        @CustomType.Setter
        public Builder retainRule(@Nullable LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRuleRetainRule retainRule) {
            this.retainRule = retainRule;
            return this;
        }
        @CustomType.Setter
        public Builder target(String target) {
            this.target = Objects.requireNonNull(target);
            return this;
        }
        public LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRule build() {
            final var o = new LifecyclePolicyPolicyDetailsScheduleCrossRegionCopyRule();
            o.cmkArn = cmkArn;
            o.copyTags = copyTags;
            o.deprecateRule = deprecateRule;
            o.encrypted = encrypted;
            o.retainRule = retainRule;
            o.target = target;
            return o;
        }
    }
}
