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

com.pulumi.azurenative.web.inputs.DatabaseBackupSettingArgs 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.web.inputs;

import com.pulumi.azurenative.web.enums.DatabaseType;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Database backup settings.
 * 
 */
public final class DatabaseBackupSettingArgs extends com.pulumi.resources.ResourceArgs {

    public static final DatabaseBackupSettingArgs Empty = new DatabaseBackupSettingArgs();

    /**
     * Contains a connection string to a database which is being backed up or restored. If the restore should happen to a new database, the database name inside is the new one.
     * 
     */
    @Import(name="connectionString")
    private @Nullable Output connectionString;

    /**
     * @return Contains a connection string to a database which is being backed up or restored. If the restore should happen to a new database, the database name inside is the new one.
     * 
     */
    public Optional> connectionString() {
        return Optional.ofNullable(this.connectionString);
    }

    /**
     * Contains a connection string name that is linked to the SiteConfig.ConnectionStrings.
     * This is used during restore with overwrite connection strings options.
     * 
     */
    @Import(name="connectionStringName")
    private @Nullable Output connectionStringName;

    /**
     * @return Contains a connection string name that is linked to the SiteConfig.ConnectionStrings.
     * This is used during restore with overwrite connection strings options.
     * 
     */
    public Optional> connectionStringName() {
        return Optional.ofNullable(this.connectionStringName);
    }

    /**
     * Database type (e.g. SqlAzure / MySql).
     * 
     */
    @Import(name="databaseType", required=true)
    private Output> databaseType;

    /**
     * @return Database type (e.g. SqlAzure / MySql).
     * 
     */
    public Output> databaseType() {
        return this.databaseType;
    }

    @Import(name="name")
    private @Nullable Output name;

    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    private DatabaseBackupSettingArgs() {}

    private DatabaseBackupSettingArgs(DatabaseBackupSettingArgs $) {
        this.connectionString = $.connectionString;
        this.connectionStringName = $.connectionStringName;
        this.databaseType = $.databaseType;
        this.name = $.name;
    }

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

    public static final class Builder {
        private DatabaseBackupSettingArgs $;

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

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

        /**
         * @param connectionString Contains a connection string to a database which is being backed up or restored. If the restore should happen to a new database, the database name inside is the new one.
         * 
         * @return builder
         * 
         */
        public Builder connectionString(@Nullable Output connectionString) {
            $.connectionString = connectionString;
            return this;
        }

        /**
         * @param connectionString Contains a connection string to a database which is being backed up or restored. If the restore should happen to a new database, the database name inside is the new one.
         * 
         * @return builder
         * 
         */
        public Builder connectionString(String connectionString) {
            return connectionString(Output.of(connectionString));
        }

        /**
         * @param connectionStringName Contains a connection string name that is linked to the SiteConfig.ConnectionStrings.
         * This is used during restore with overwrite connection strings options.
         * 
         * @return builder
         * 
         */
        public Builder connectionStringName(@Nullable Output connectionStringName) {
            $.connectionStringName = connectionStringName;
            return this;
        }

        /**
         * @param connectionStringName Contains a connection string name that is linked to the SiteConfig.ConnectionStrings.
         * This is used during restore with overwrite connection strings options.
         * 
         * @return builder
         * 
         */
        public Builder connectionStringName(String connectionStringName) {
            return connectionStringName(Output.of(connectionStringName));
        }

        /**
         * @param databaseType Database type (e.g. SqlAzure / MySql).
         * 
         * @return builder
         * 
         */
        public Builder databaseType(Output> databaseType) {
            $.databaseType = databaseType;
            return this;
        }

        /**
         * @param databaseType Database type (e.g. SqlAzure / MySql).
         * 
         * @return builder
         * 
         */
        public Builder databaseType(Either databaseType) {
            return databaseType(Output.of(databaseType));
        }

        /**
         * @param databaseType Database type (e.g. SqlAzure / MySql).
         * 
         * @return builder
         * 
         */
        public Builder databaseType(String databaseType) {
            return databaseType(Either.ofLeft(databaseType));
        }

        /**
         * @param databaseType Database type (e.g. SqlAzure / MySql).
         * 
         * @return builder
         * 
         */
        public Builder databaseType(DatabaseType databaseType) {
            return databaseType(Either.ofRight(databaseType));
        }

        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        public Builder name(String name) {
            return name(Output.of(name));
        }

        public DatabaseBackupSettingArgs build() {
            if ($.databaseType == null) {
                throw new MissingRequiredPropertyException("DatabaseBackupSettingArgs", "databaseType");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy