All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.dataprotection.outputs.BackupPolicyPostgresqlFlexibleServerRetentionRule Maven / Gradle / Ivy

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

import com.pulumi.azure.dataprotection.outputs.BackupPolicyPostgresqlFlexibleServerRetentionRuleCriteria;
import com.pulumi.azure.dataprotection.outputs.BackupPolicyPostgresqlFlexibleServerRetentionRuleLifeCycle;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;

@CustomType
public final class BackupPolicyPostgresqlFlexibleServerRetentionRule {
    /**
     * @return A `criteria` block as defined below. Changing this forces a new resource to be created.
     * 
     */
    private BackupPolicyPostgresqlFlexibleServerRetentionRuleCriteria criteria;
    /**
     * @return A `life_cycle` block as defined below. Changing this forces a new resource to be created.
     * 
     */
    private List lifeCycles;
    /**
     * @return Specifies the name of the retention rule. Changing this forces a new resource to be created.
     * 
     */
    private String name;
    /**
     * @return Specifies the priority of the rule. The priority number must be unique for each rule. The lower the priority number, the higher the priority of the rule. Changing this forces a new resource to be created.
     * 
     */
    private Integer priority;

    private BackupPolicyPostgresqlFlexibleServerRetentionRule() {}
    /**
     * @return A `criteria` block as defined below. Changing this forces a new resource to be created.
     * 
     */
    public BackupPolicyPostgresqlFlexibleServerRetentionRuleCriteria criteria() {
        return this.criteria;
    }
    /**
     * @return A `life_cycle` block as defined below. Changing this forces a new resource to be created.
     * 
     */
    public List lifeCycles() {
        return this.lifeCycles;
    }
    /**
     * @return Specifies the name of the retention rule. Changing this forces a new resource to be created.
     * 
     */
    public String name() {
        return this.name;
    }
    /**
     * @return Specifies the priority of the rule. The priority number must be unique for each rule. The lower the priority number, the higher the priority of the rule. Changing this forces a new resource to be created.
     * 
     */
    public Integer priority() {
        return this.priority;
    }

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

    public static Builder builder(BackupPolicyPostgresqlFlexibleServerRetentionRule defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private BackupPolicyPostgresqlFlexibleServerRetentionRuleCriteria criteria;
        private List lifeCycles;
        private String name;
        private Integer priority;
        public Builder() {}
        public Builder(BackupPolicyPostgresqlFlexibleServerRetentionRule defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.criteria = defaults.criteria;
    	      this.lifeCycles = defaults.lifeCycles;
    	      this.name = defaults.name;
    	      this.priority = defaults.priority;
        }

        @CustomType.Setter
        public Builder criteria(BackupPolicyPostgresqlFlexibleServerRetentionRuleCriteria criteria) {
            if (criteria == null) {
              throw new MissingRequiredPropertyException("BackupPolicyPostgresqlFlexibleServerRetentionRule", "criteria");
            }
            this.criteria = criteria;
            return this;
        }
        @CustomType.Setter
        public Builder lifeCycles(List lifeCycles) {
            if (lifeCycles == null) {
              throw new MissingRequiredPropertyException("BackupPolicyPostgresqlFlexibleServerRetentionRule", "lifeCycles");
            }
            this.lifeCycles = lifeCycles;
            return this;
        }
        public Builder lifeCycles(BackupPolicyPostgresqlFlexibleServerRetentionRuleLifeCycle... lifeCycles) {
            return lifeCycles(List.of(lifeCycles));
        }
        @CustomType.Setter
        public Builder name(String name) {
            if (name == null) {
              throw new MissingRequiredPropertyException("BackupPolicyPostgresqlFlexibleServerRetentionRule", "name");
            }
            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder priority(Integer priority) {
            if (priority == null) {
              throw new MissingRequiredPropertyException("BackupPolicyPostgresqlFlexibleServerRetentionRule", "priority");
            }
            this.priority = priority;
            return this;
        }
        public BackupPolicyPostgresqlFlexibleServerRetentionRule build() {
            final var _resultValue = new BackupPolicyPostgresqlFlexibleServerRetentionRule();
            _resultValue.criteria = criteria;
            _resultValue.lifeCycles = lifeCycles;
            _resultValue.name = name;
            _resultValue.priority = priority;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy