com.pulumi.azurenative.web.inputs.DatabaseBackupSetting Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
The 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.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 DatabaseBackupSetting extends com.pulumi.resources.InvokeArgs {
public static final DatabaseBackupSetting Empty = new DatabaseBackupSetting();
/**
* 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 String 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 String 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 Either databaseType;
/**
* @return Database type (e.g. SqlAzure / MySql).
*
*/
public Either databaseType() {
return this.databaseType;
}
@Import(name="name")
private @Nullable String name;
public Optional name() {
return Optional.ofNullable(this.name);
}
private DatabaseBackupSetting() {}
private DatabaseBackupSetting(DatabaseBackupSetting $) {
this.connectionString = $.connectionString;
this.connectionStringName = $.connectionStringName;
this.databaseType = $.databaseType;
this.name = $.name;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(DatabaseBackupSetting defaults) {
return new Builder(defaults);
}
public static final class Builder {
private DatabaseBackupSetting $;
public Builder() {
$ = new DatabaseBackupSetting();
}
public Builder(DatabaseBackupSetting defaults) {
$ = new DatabaseBackupSetting(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 String connectionString) {
$.connectionString = connectionString;
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(@Nullable String connectionStringName) {
$.connectionStringName = connectionStringName;
return this;
}
/**
* @param databaseType Database type (e.g. SqlAzure / MySql).
*
* @return builder
*
*/
public Builder databaseType(Either databaseType) {
$.databaseType = databaseType;
return this;
}
/**
* @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 String name) {
$.name = name;
return this;
}
public DatabaseBackupSetting build() {
if ($.databaseType == null) {
throw new MissingRequiredPropertyException("DatabaseBackupSetting", "databaseType");
}
return $;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy