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

com.pulumi.azurenative.recoveryservices.outputs.SimpleRetentionPolicyResponse Maven / Gradle / Ivy

There is a newer version: 2.82.0
Show newest version
// *** 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.azurenative.recoveryservices.outputs;

import com.pulumi.azurenative.recoveryservices.outputs.RetentionDurationResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class SimpleRetentionPolicyResponse {
    /**
     * @return Retention duration of the protection policy.
     * 
     */
    private @Nullable RetentionDurationResponse retentionDuration;
    /**
     * @return This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
     * Expected value is 'SimpleRetentionPolicy'.
     * 
     */
    private String retentionPolicyType;

    private SimpleRetentionPolicyResponse() {}
    /**
     * @return Retention duration of the protection policy.
     * 
     */
    public Optional retentionDuration() {
        return Optional.ofNullable(this.retentionDuration);
    }
    /**
     * @return This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
     * Expected value is 'SimpleRetentionPolicy'.
     * 
     */
    public String retentionPolicyType() {
        return this.retentionPolicyType;
    }

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

    public static Builder builder(SimpleRetentionPolicyResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable RetentionDurationResponse retentionDuration;
        private String retentionPolicyType;
        public Builder() {}
        public Builder(SimpleRetentionPolicyResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.retentionDuration = defaults.retentionDuration;
    	      this.retentionPolicyType = defaults.retentionPolicyType;
        }

        @CustomType.Setter
        public Builder retentionDuration(@Nullable RetentionDurationResponse retentionDuration) {

            this.retentionDuration = retentionDuration;
            return this;
        }
        @CustomType.Setter
        public Builder retentionPolicyType(String retentionPolicyType) {
            if (retentionPolicyType == null) {
              throw new MissingRequiredPropertyException("SimpleRetentionPolicyResponse", "retentionPolicyType");
            }
            this.retentionPolicyType = retentionPolicyType;
            return this;
        }
        public SimpleRetentionPolicyResponse build() {
            final var _resultValue = new SimpleRetentionPolicyResponse();
            _resultValue.retentionDuration = retentionDuration;
            _resultValue.retentionPolicyType = retentionPolicyType;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy