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

com.pulumi.azurenative.awsconnector.inputs.DefaultRetentionArgs 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.azurenative.awsconnector.inputs;

import com.pulumi.azurenative.awsconnector.enums.DefaultRetentionMode;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Definition of DefaultRetention
 * 
 */
public final class DefaultRetentionArgs extends com.pulumi.resources.ResourceArgs {

    public static final DefaultRetentionArgs Empty = new DefaultRetentionArgs();

    /**
     * The number of days that you want to specify for the default retention period. If Object Lock is turned on, you must specify ``Mode`` and specify either ``Days`` or ``Years``.
     * 
     */
    @Import(name="days")
    private @Nullable Output days;

    /**
     * @return The number of days that you want to specify for the default retention period. If Object Lock is turned on, you must specify ``Mode`` and specify either ``Days`` or ``Years``.
     * 
     */
    public Optional> days() {
        return Optional.ofNullable(this.days);
    }

    /**
     * The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. If Object Lock is turned on, you must specify ``Mode`` and specify either ``Days`` or ``Years``.
     * 
     */
    @Import(name="mode")
    private @Nullable Output> mode;

    /**
     * @return The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. If Object Lock is turned on, you must specify ``Mode`` and specify either ``Days`` or ``Years``.
     * 
     */
    public Optional>> mode() {
        return Optional.ofNullable(this.mode);
    }

    /**
     * The number of years that you want to specify for the default retention period. If Object Lock is turned on, you must specify ``Mode`` and specify either ``Days`` or ``Years``.
     * 
     */
    @Import(name="years")
    private @Nullable Output years;

    /**
     * @return The number of years that you want to specify for the default retention period. If Object Lock is turned on, you must specify ``Mode`` and specify either ``Days`` or ``Years``.
     * 
     */
    public Optional> years() {
        return Optional.ofNullable(this.years);
    }

    private DefaultRetentionArgs() {}

    private DefaultRetentionArgs(DefaultRetentionArgs $) {
        this.days = $.days;
        this.mode = $.mode;
        this.years = $.years;
    }

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

    public static final class Builder {
        private DefaultRetentionArgs $;

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

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

        /**
         * @param days The number of days that you want to specify for the default retention period. If Object Lock is turned on, you must specify ``Mode`` and specify either ``Days`` or ``Years``.
         * 
         * @return builder
         * 
         */
        public Builder days(@Nullable Output days) {
            $.days = days;
            return this;
        }

        /**
         * @param days The number of days that you want to specify for the default retention period. If Object Lock is turned on, you must specify ``Mode`` and specify either ``Days`` or ``Years``.
         * 
         * @return builder
         * 
         */
        public Builder days(Integer days) {
            return days(Output.of(days));
        }

        /**
         * @param mode The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. If Object Lock is turned on, you must specify ``Mode`` and specify either ``Days`` or ``Years``.
         * 
         * @return builder
         * 
         */
        public Builder mode(@Nullable Output> mode) {
            $.mode = mode;
            return this;
        }

        /**
         * @param mode The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. If Object Lock is turned on, you must specify ``Mode`` and specify either ``Days`` or ``Years``.
         * 
         * @return builder
         * 
         */
        public Builder mode(Either mode) {
            return mode(Output.of(mode));
        }

        /**
         * @param mode The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. If Object Lock is turned on, you must specify ``Mode`` and specify either ``Days`` or ``Years``.
         * 
         * @return builder
         * 
         */
        public Builder mode(String mode) {
            return mode(Either.ofLeft(mode));
        }

        /**
         * @param mode The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. If Object Lock is turned on, you must specify ``Mode`` and specify either ``Days`` or ``Years``.
         * 
         * @return builder
         * 
         */
        public Builder mode(DefaultRetentionMode mode) {
            return mode(Either.ofRight(mode));
        }

        /**
         * @param years The number of years that you want to specify for the default retention period. If Object Lock is turned on, you must specify ``Mode`` and specify either ``Days`` or ``Years``.
         * 
         * @return builder
         * 
         */
        public Builder years(@Nullable Output years) {
            $.years = years;
            return this;
        }

        /**
         * @param years The number of years that you want to specify for the default retention period. If Object Lock is turned on, you must specify ``Mode`` and specify either ``Days`` or ``Years``.
         * 
         * @return builder
         * 
         */
        public Builder years(Integer years) {
            return years(Output.of(years));
        }

        public DefaultRetentionArgs build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy