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

com.ovhcloud.pulumi.ovh.CloudProject.RegionStoragePresignArgs Maven / Gradle / Ivy

There is a newer version: 1.1.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.ovhcloud.pulumi.ovh.CloudProject;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final RegionStoragePresignArgs Empty = new RegionStoragePresignArgs();

    /**
     * Define, in seconds, for how long your URL will be valid.
     * 
     */
    @Import(name="expire", required=true)
    private Output expire;

    /**
     * @return Define, in seconds, for how long your URL will be valid.
     * 
     */
    public Output expire() {
        return this.expire;
    }

    /**
     * The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
     * 
     */
    @Import(name="method", required=true)
    private Output method;

    /**
     * @return The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
     * 
     */
    public Output method() {
        return this.method;
    }

    /**
     * The name of your S3 storage container/bucket.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of your S3 storage container/bucket.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The name of the object in your S3 bucket.
     * 
     */
    @Import(name="object", required=true)
    private Output object;

    /**
     * @return The name of the object in your S3 bucket.
     * 
     */
    public Output object() {
        return this.object;
    }

    /**
     * The region in which your storage is located.
     * Ex.: "GRA".
     * 
     */
    @Import(name="regionName", required=true)
    private Output regionName;

    /**
     * @return The region in which your storage is located.
     * Ex.: "GRA".
     * 
     */
    public Output regionName() {
        return this.regionName;
    }

    /**
     * The id of the public cloud project. If omitted,
     * the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
     * 
     */
    @Import(name="serviceName", required=true)
    private Output serviceName;

    /**
     * @return The id of the public cloud project. If omitted,
     * the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
     * 
     */
    public Output serviceName() {
        return this.serviceName;
    }

    private RegionStoragePresignArgs() {}

    private RegionStoragePresignArgs(RegionStoragePresignArgs $) {
        this.expire = $.expire;
        this.method = $.method;
        this.name = $.name;
        this.object = $.object;
        this.regionName = $.regionName;
        this.serviceName = $.serviceName;
    }

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

    public static final class Builder {
        private RegionStoragePresignArgs $;

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

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

        /**
         * @param expire Define, in seconds, for how long your URL will be valid.
         * 
         * @return builder
         * 
         */
        public Builder expire(Output expire) {
            $.expire = expire;
            return this;
        }

        /**
         * @param expire Define, in seconds, for how long your URL will be valid.
         * 
         * @return builder
         * 
         */
        public Builder expire(Integer expire) {
            return expire(Output.of(expire));
        }

        /**
         * @param method The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
         * 
         * @return builder
         * 
         */
        public Builder method(Output method) {
            $.method = method;
            return this;
        }

        /**
         * @param method The method you want to use to interact with your object. Can be either 'GET' or 'PUT'.
         * 
         * @return builder
         * 
         */
        public Builder method(String method) {
            return method(Output.of(method));
        }

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

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

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

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

        /**
         * @param regionName The region in which your storage is located.
         * Ex.: "GRA".
         * 
         * @return builder
         * 
         */
        public Builder regionName(Output regionName) {
            $.regionName = regionName;
            return this;
        }

        /**
         * @param regionName The region in which your storage is located.
         * Ex.: "GRA".
         * 
         * @return builder
         * 
         */
        public Builder regionName(String regionName) {
            return regionName(Output.of(regionName));
        }

        /**
         * @param serviceName The id of the public cloud project. If omitted,
         * the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
         * 
         * @return builder
         * 
         */
        public Builder serviceName(Output serviceName) {
            $.serviceName = serviceName;
            return this;
        }

        /**
         * @param serviceName The id of the public cloud project. If omitted,
         * the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
         * 
         * @return builder
         * 
         */
        public Builder serviceName(String serviceName) {
            return serviceName(Output.of(serviceName));
        }

        public RegionStoragePresignArgs build() {
            if ($.expire == null) {
                throw new MissingRequiredPropertyException("RegionStoragePresignArgs", "expire");
            }
            if ($.method == null) {
                throw new MissingRequiredPropertyException("RegionStoragePresignArgs", "method");
            }
            if ($.object == null) {
                throw new MissingRequiredPropertyException("RegionStoragePresignArgs", "object");
            }
            if ($.regionName == null) {
                throw new MissingRequiredPropertyException("RegionStoragePresignArgs", "regionName");
            }
            if ($.serviceName == null) {
                throw new MissingRequiredPropertyException("RegionStoragePresignArgs", "serviceName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy