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

com.pulumi.digitalocean.inputs.SpacesBucketState Maven / Gradle / Ivy

There is a newer version: 4.35.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.digitalocean.inputs;

import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.digitalocean.enums.Region;
import com.pulumi.digitalocean.inputs.SpacesBucketCorsRuleArgs;
import com.pulumi.digitalocean.inputs.SpacesBucketLifecycleRuleArgs;
import com.pulumi.digitalocean.inputs.SpacesBucketVersioningArgs;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class SpacesBucketState extends com.pulumi.resources.ResourceArgs {

    public static final SpacesBucketState Empty = new SpacesBucketState();

    /**
     * Canned ACL applied on bucket creation (`private` or `public-read`)
     * 
     */
    @Import(name="acl")
    private @Nullable Output acl;

    /**
     * @return Canned ACL applied on bucket creation (`private` or `public-read`)
     * 
     */
    public Optional> acl() {
        return Optional.ofNullable(this.acl);
    }

    /**
     * The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
     * 
     */
    @Import(name="bucketDomainName")
    private @Nullable Output bucketDomainName;

    /**
     * @return The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
     * 
     */
    public Optional> bucketDomainName() {
        return Optional.ofNullable(this.bucketDomainName);
    }

    /**
     * The uniform resource name for the bucket
     * 
     */
    @Import(name="bucketUrn")
    private @Nullable Output bucketUrn;

    /**
     * @return The uniform resource name for the bucket
     * 
     */
    public Optional> bucketUrn() {
        return Optional.ofNullable(this.bucketUrn);
    }

    /**
     * A rule of Cross-Origin Resource Sharing (documented below).
     * 
     * @deprecated
     * Terraform will only perform drift detection if a configuration value is provided. Use the resource `digitalocean.SpacesBucketCorsConfiguration` instead.
     * 
     */
    @Deprecated /* Terraform will only perform drift detection if a configuration value is provided. Use the resource `digitalocean.SpacesBucketCorsConfiguration` instead. */
    @Import(name="corsRules")
    private @Nullable Output> corsRules;

    /**
     * @return A rule of Cross-Origin Resource Sharing (documented below).
     * 
     * @deprecated
     * Terraform will only perform drift detection if a configuration value is provided. Use the resource `digitalocean.SpacesBucketCorsConfiguration` instead.
     * 
     */
    @Deprecated /* Terraform will only perform drift detection if a configuration value is provided. Use the resource `digitalocean.SpacesBucketCorsConfiguration` instead. */
    public Optional>> corsRules() {
        return Optional.ofNullable(this.corsRules);
    }

    /**
     * The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
     * 
     */
    @Import(name="endpoint")
    private @Nullable Output endpoint;

    /**
     * @return The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
     * 
     */
    public Optional> endpoint() {
        return Optional.ofNullable(this.endpoint);
    }

    /**
     * Unless `true`, the bucket will only be destroyed if empty (Defaults to `false`)
     * 
     */
    @Import(name="forceDestroy")
    private @Nullable Output forceDestroy;

    /**
     * @return Unless `true`, the bucket will only be destroyed if empty (Defaults to `false`)
     * 
     */
    public Optional> forceDestroy() {
        return Optional.ofNullable(this.forceDestroy);
    }

    /**
     * A configuration of object lifecycle management (documented below).
     * 
     */
    @Import(name="lifecycleRules")
    private @Nullable Output> lifecycleRules;

    /**
     * @return A configuration of object lifecycle management (documented below).
     * 
     */
    public Optional>> lifecycleRules() {
        return Optional.ofNullable(this.lifecycleRules);
    }

    /**
     * The name of the bucket
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the bucket
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The region where the bucket resides (Defaults to `nyc3`)
     * 
     */
    @Import(name="region")
    private @Nullable Output> region;

    /**
     * @return The region where the bucket resides (Defaults to `nyc3`)
     * 
     */
    public Optional>> region() {
        return Optional.ofNullable(this.region);
    }

    /**
     * A state of versioning (documented below)
     * 
     */
    @Import(name="versioning")
    private @Nullable Output versioning;

    /**
     * @return A state of versioning (documented below)
     * 
     */
    public Optional> versioning() {
        return Optional.ofNullable(this.versioning);
    }

    private SpacesBucketState() {}

    private SpacesBucketState(SpacesBucketState $) {
        this.acl = $.acl;
        this.bucketDomainName = $.bucketDomainName;
        this.bucketUrn = $.bucketUrn;
        this.corsRules = $.corsRules;
        this.endpoint = $.endpoint;
        this.forceDestroy = $.forceDestroy;
        this.lifecycleRules = $.lifecycleRules;
        this.name = $.name;
        this.region = $.region;
        this.versioning = $.versioning;
    }

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

    public static final class Builder {
        private SpacesBucketState $;

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

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

        /**
         * @param acl Canned ACL applied on bucket creation (`private` or `public-read`)
         * 
         * @return builder
         * 
         */
        public Builder acl(@Nullable Output acl) {
            $.acl = acl;
            return this;
        }

        /**
         * @param acl Canned ACL applied on bucket creation (`private` or `public-read`)
         * 
         * @return builder
         * 
         */
        public Builder acl(String acl) {
            return acl(Output.of(acl));
        }

        /**
         * @param bucketDomainName The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
         * 
         * @return builder
         * 
         */
        public Builder bucketDomainName(@Nullable Output bucketDomainName) {
            $.bucketDomainName = bucketDomainName;
            return this;
        }

        /**
         * @param bucketDomainName The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
         * 
         * @return builder
         * 
         */
        public Builder bucketDomainName(String bucketDomainName) {
            return bucketDomainName(Output.of(bucketDomainName));
        }

        /**
         * @param bucketUrn The uniform resource name for the bucket
         * 
         * @return builder
         * 
         */
        public Builder bucketUrn(@Nullable Output bucketUrn) {
            $.bucketUrn = bucketUrn;
            return this;
        }

        /**
         * @param bucketUrn The uniform resource name for the bucket
         * 
         * @return builder
         * 
         */
        public Builder bucketUrn(String bucketUrn) {
            return bucketUrn(Output.of(bucketUrn));
        }

        /**
         * @param corsRules A rule of Cross-Origin Resource Sharing (documented below).
         * 
         * @return builder
         * 
         * @deprecated
         * Terraform will only perform drift detection if a configuration value is provided. Use the resource `digitalocean.SpacesBucketCorsConfiguration` instead.
         * 
         */
        @Deprecated /* Terraform will only perform drift detection if a configuration value is provided. Use the resource `digitalocean.SpacesBucketCorsConfiguration` instead. */
        public Builder corsRules(@Nullable Output> corsRules) {
            $.corsRules = corsRules;
            return this;
        }

        /**
         * @param corsRules A rule of Cross-Origin Resource Sharing (documented below).
         * 
         * @return builder
         * 
         * @deprecated
         * Terraform will only perform drift detection if a configuration value is provided. Use the resource `digitalocean.SpacesBucketCorsConfiguration` instead.
         * 
         */
        @Deprecated /* Terraform will only perform drift detection if a configuration value is provided. Use the resource `digitalocean.SpacesBucketCorsConfiguration` instead. */
        public Builder corsRules(List corsRules) {
            return corsRules(Output.of(corsRules));
        }

        /**
         * @param corsRules A rule of Cross-Origin Resource Sharing (documented below).
         * 
         * @return builder
         * 
         * @deprecated
         * Terraform will only perform drift detection if a configuration value is provided. Use the resource `digitalocean.SpacesBucketCorsConfiguration` instead.
         * 
         */
        @Deprecated /* Terraform will only perform drift detection if a configuration value is provided. Use the resource `digitalocean.SpacesBucketCorsConfiguration` instead. */
        public Builder corsRules(SpacesBucketCorsRuleArgs... corsRules) {
            return corsRules(List.of(corsRules));
        }

        /**
         * @param endpoint The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
         * 
         * @return builder
         * 
         */
        public Builder endpoint(@Nullable Output endpoint) {
            $.endpoint = endpoint;
            return this;
        }

        /**
         * @param endpoint The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
         * 
         * @return builder
         * 
         */
        public Builder endpoint(String endpoint) {
            return endpoint(Output.of(endpoint));
        }

        /**
         * @param forceDestroy Unless `true`, the bucket will only be destroyed if empty (Defaults to `false`)
         * 
         * @return builder
         * 
         */
        public Builder forceDestroy(@Nullable Output forceDestroy) {
            $.forceDestroy = forceDestroy;
            return this;
        }

        /**
         * @param forceDestroy Unless `true`, the bucket will only be destroyed if empty (Defaults to `false`)
         * 
         * @return builder
         * 
         */
        public Builder forceDestroy(Boolean forceDestroy) {
            return forceDestroy(Output.of(forceDestroy));
        }

        /**
         * @param lifecycleRules A configuration of object lifecycle management (documented below).
         * 
         * @return builder
         * 
         */
        public Builder lifecycleRules(@Nullable Output> lifecycleRules) {
            $.lifecycleRules = lifecycleRules;
            return this;
        }

        /**
         * @param lifecycleRules A configuration of object lifecycle management (documented below).
         * 
         * @return builder
         * 
         */
        public Builder lifecycleRules(List lifecycleRules) {
            return lifecycleRules(Output.of(lifecycleRules));
        }

        /**
         * @param lifecycleRules A configuration of object lifecycle management (documented below).
         * 
         * @return builder
         * 
         */
        public Builder lifecycleRules(SpacesBucketLifecycleRuleArgs... lifecycleRules) {
            return lifecycleRules(List.of(lifecycleRules));
        }

        /**
         * @param name The name of the bucket
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the bucket
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param region The region where the bucket resides (Defaults to `nyc3`)
         * 
         * @return builder
         * 
         */
        public Builder region(@Nullable Output> region) {
            $.region = region;
            return this;
        }

        /**
         * @param region The region where the bucket resides (Defaults to `nyc3`)
         * 
         * @return builder
         * 
         */
        public Builder region(Either region) {
            return region(Output.of(region));
        }

        /**
         * @param region The region where the bucket resides (Defaults to `nyc3`)
         * 
         * @return builder
         * 
         */
        public Builder region(String region) {
            return region(Either.ofLeft(region));
        }

        /**
         * @param region The region where the bucket resides (Defaults to `nyc3`)
         * 
         * @return builder
         * 
         */
        public Builder region(Region region) {
            return region(Either.ofRight(region));
        }

        /**
         * @param versioning A state of versioning (documented below)
         * 
         * @return builder
         * 
         */
        public Builder versioning(@Nullable Output versioning) {
            $.versioning = versioning;
            return this;
        }

        /**
         * @param versioning A state of versioning (documented below)
         * 
         * @return builder
         * 
         */
        public Builder versioning(SpacesBucketVersioningArgs versioning) {
            return versioning(Output.of(versioning));
        }

        public SpacesBucketState build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy