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

com.pulumi.azurenative.storage.BlobArgs Maven / Gradle / Ivy

There is a newer version: 2.78.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.storage;

import com.pulumi.asset.AssetOrArchive;
import com.pulumi.azurenative.storage.enums.BlobAccessTier;
import com.pulumi.azurenative.storage.enums.BlobType;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final BlobArgs Empty = new BlobArgs();

    /**
     * The access tier of the storage blob. Only supported for standard storage accounts, not premium.
     * 
     */
    @Import(name="accessTier")
    private @Nullable Output accessTier;

    /**
     * @return The access tier of the storage blob. Only supported for standard storage accounts, not premium.
     * 
     */
    public Optional> accessTier() {
        return Optional.ofNullable(this.accessTier);
    }

    /**
     * Specifies the storage account in which to create the storage container.
     * 
     */
    @Import(name="accountName", required=true)
    private Output accountName;

    /**
     * @return Specifies the storage account in which to create the storage container.
     * 
     */
    public Output accountName() {
        return this.accountName;
    }

    /**
     * The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.
     * 
     */
    @Import(name="blobName")
    private @Nullable Output blobName;

    /**
     * @return The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.
     * 
     */
    public Optional> blobName() {
        return Optional.ofNullable(this.blobName);
    }

    /**
     * The name of the storage container in which this blob should be created.
     * 
     */
    @Import(name="containerName", required=true)
    private Output containerName;

    /**
     * @return The name of the storage container in which this blob should be created.
     * 
     */
    public Output containerName() {
        return this.containerName;
    }

    /**
     * The MD5 sum of the blob contents. Cannot be defined if blob type is Append.
     * 
     */
    @Import(name="contentMd5")
    private @Nullable Output contentMd5;

    /**
     * @return The MD5 sum of the blob contents. Cannot be defined if blob type is Append.
     * 
     */
    public Optional> contentMd5() {
        return Optional.ofNullable(this.contentMd5);
    }

    /**
     * The content type of the storage blob. Defaults to `application/octet-stream`.
     * 
     */
    @Import(name="contentType")
    private @Nullable Output contentType;

    /**
     * @return The content type of the storage blob. Defaults to `application/octet-stream`.
     * 
     */
    public Optional> contentType() {
        return Optional.ofNullable(this.contentType);
    }

    /**
     * A map of custom blob metadata.
     * 
     */
    @Import(name="metadata")
    private @Nullable Output> metadata;

    /**
     * @return A map of custom blob metadata.
     * 
     */
    public Optional>> metadata() {
        return Optional.ofNullable(this.metadata);
    }

    /**
     * The name of the resource group within the user's subscription.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group within the user's subscription.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * An asset to copy to the blob contents. This field cannot be specified for Append blobs.
     * 
     */
    @Import(name="source")
    private @Nullable Output source;

    /**
     * @return An asset to copy to the blob contents. This field cannot be specified for Append blobs.
     * 
     */
    public Optional> source() {
        return Optional.ofNullable(this.source);
    }

    /**
     * The type of the storage blob to be created. Defaults to 'Block'.
     * 
     */
    @Import(name="type")
    private @Nullable Output type;

    /**
     * @return The type of the storage blob to be created. Defaults to 'Block'.
     * 
     */
    public Optional> type() {
        return Optional.ofNullable(this.type);
    }

    private BlobArgs() {}

    private BlobArgs(BlobArgs $) {
        this.accessTier = $.accessTier;
        this.accountName = $.accountName;
        this.blobName = $.blobName;
        this.containerName = $.containerName;
        this.contentMd5 = $.contentMd5;
        this.contentType = $.contentType;
        this.metadata = $.metadata;
        this.resourceGroupName = $.resourceGroupName;
        this.source = $.source;
        this.type = $.type;
    }

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

    public static final class Builder {
        private BlobArgs $;

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

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

        /**
         * @param accessTier The access tier of the storage blob. Only supported for standard storage accounts, not premium.
         * 
         * @return builder
         * 
         */
        public Builder accessTier(@Nullable Output accessTier) {
            $.accessTier = accessTier;
            return this;
        }

        /**
         * @param accessTier The access tier of the storage blob. Only supported for standard storage accounts, not premium.
         * 
         * @return builder
         * 
         */
        public Builder accessTier(BlobAccessTier accessTier) {
            return accessTier(Output.of(accessTier));
        }

        /**
         * @param accountName Specifies the storage account in which to create the storage container.
         * 
         * @return builder
         * 
         */
        public Builder accountName(Output accountName) {
            $.accountName = accountName;
            return this;
        }

        /**
         * @param accountName Specifies the storage account in which to create the storage container.
         * 
         * @return builder
         * 
         */
        public Builder accountName(String accountName) {
            return accountName(Output.of(accountName));
        }

        /**
         * @param blobName The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.
         * 
         * @return builder
         * 
         */
        public Builder blobName(@Nullable Output blobName) {
            $.blobName = blobName;
            return this;
        }

        /**
         * @param blobName The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.
         * 
         * @return builder
         * 
         */
        public Builder blobName(String blobName) {
            return blobName(Output.of(blobName));
        }

        /**
         * @param containerName The name of the storage container in which this blob should be created.
         * 
         * @return builder
         * 
         */
        public Builder containerName(Output containerName) {
            $.containerName = containerName;
            return this;
        }

        /**
         * @param containerName The name of the storage container in which this blob should be created.
         * 
         * @return builder
         * 
         */
        public Builder containerName(String containerName) {
            return containerName(Output.of(containerName));
        }

        /**
         * @param contentMd5 The MD5 sum of the blob contents. Cannot be defined if blob type is Append.
         * 
         * @return builder
         * 
         */
        public Builder contentMd5(@Nullable Output contentMd5) {
            $.contentMd5 = contentMd5;
            return this;
        }

        /**
         * @param contentMd5 The MD5 sum of the blob contents. Cannot be defined if blob type is Append.
         * 
         * @return builder
         * 
         */
        public Builder contentMd5(String contentMd5) {
            return contentMd5(Output.of(contentMd5));
        }

        /**
         * @param contentType The content type of the storage blob. Defaults to `application/octet-stream`.
         * 
         * @return builder
         * 
         */
        public Builder contentType(@Nullable Output contentType) {
            $.contentType = contentType;
            return this;
        }

        /**
         * @param contentType The content type of the storage blob. Defaults to `application/octet-stream`.
         * 
         * @return builder
         * 
         */
        public Builder contentType(String contentType) {
            return contentType(Output.of(contentType));
        }

        /**
         * @param metadata A map of custom blob metadata.
         * 
         * @return builder
         * 
         */
        public Builder metadata(@Nullable Output> metadata) {
            $.metadata = metadata;
            return this;
        }

        /**
         * @param metadata A map of custom blob metadata.
         * 
         * @return builder
         * 
         */
        public Builder metadata(Map metadata) {
            return metadata(Output.of(metadata));
        }

        /**
         * @param resourceGroupName The name of the resource group within the user's subscription.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group within the user's subscription.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param source An asset to copy to the blob contents. This field cannot be specified for Append blobs.
         * 
         * @return builder
         * 
         */
        public Builder source(@Nullable Output source) {
            $.source = source;
            return this;
        }

        /**
         * @param source An asset to copy to the blob contents. This field cannot be specified for Append blobs.
         * 
         * @return builder
         * 
         */
        public Builder source(AssetOrArchive source) {
            return source(Output.of(source));
        }

        /**
         * @param type The type of the storage blob to be created. Defaults to 'Block'.
         * 
         * @return builder
         * 
         */
        public Builder type(@Nullable Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The type of the storage blob to be created. Defaults to 'Block'.
         * 
         * @return builder
         * 
         */
        public Builder type(BlobType type) {
            return type(Output.of(type));
        }

        public BlobArgs build() {
            if ($.accountName == null) {
                throw new MissingRequiredPropertyException("BlobArgs", "accountName");
            }
            if ($.containerName == null) {
                throw new MissingRequiredPropertyException("BlobArgs", "containerName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("BlobArgs", "resourceGroupName");
            }
            $.type = Codegen.objectProp("type", BlobType.class).output().arg($.type).def(BlobType.Block).getNullable();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy