// *** 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.azure.cosmosdb.outputs;

import com.pulumi.azure.cosmosdb.outputs.AccountRestoreDatabase;
import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import javax.annotation.Nullable;

@CustomType
public final class AccountRestore {
    /**
     * @return A `database` block as defined below. Changing this forces a new resource to be created.
     * 
     */
    private @Nullable List<AccountRestoreDatabase> databases;
    /**
     * @return The creation time of the database or the collection (Datetime Format `RFC 3339`). Changing this forces a new resource to be created.
     * 
     */
    private String restoreTimestampInUtc;
    /**
     * @return The resource ID of the restorable database account from which the restore has to be initiated. The example is `/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}`. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** Any database account with `Continuous` type (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved by `azure.cosmosdb.getRestorableDatabaseAccounts`.
     * 
     */
    private String sourceCosmosdbAccountId;

    private AccountRestore() {}
    /**
     * @return A `database` block as defined below. Changing this forces a new resource to be created.
     * 
     */
    public List<AccountRestoreDatabase> databases() {
        return this.databases == null ? List.of() : this.databases;
    }
    /**
     * @return The creation time of the database or the collection (Datetime Format `RFC 3339`). Changing this forces a new resource to be created.
     * 
     */
    public String restoreTimestampInUtc() {
        return this.restoreTimestampInUtc;
    }
    /**
     * @return The resource ID of the restorable database account from which the restore has to be initiated. The example is `/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}`. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE:** Any database account with `Continuous` type (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved by `azure.cosmosdb.getRestorableDatabaseAccounts`.
     * 
     */
    public String sourceCosmosdbAccountId() {
        return this.sourceCosmosdbAccountId;
    }

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

    public static Builder builder(AccountRestore defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<AccountRestoreDatabase> databases;
        private String restoreTimestampInUtc;
        private String sourceCosmosdbAccountId;
        public Builder() {}
        public Builder(AccountRestore defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.databases = defaults.databases;
    	      this.restoreTimestampInUtc = defaults.restoreTimestampInUtc;
    	      this.sourceCosmosdbAccountId = defaults.sourceCosmosdbAccountId;
        }

        @CustomType.Setter
        public Builder databases(@Nullable List<AccountRestoreDatabase> databases) {
            this.databases = databases;
            return this;
        }
        public Builder databases(AccountRestoreDatabase... databases) {
            return databases(List.of(databases));
        }
        @CustomType.Setter
        public Builder restoreTimestampInUtc(String restoreTimestampInUtc) {
            this.restoreTimestampInUtc = Objects.requireNonNull(restoreTimestampInUtc);
            return this;
        }
        @CustomType.Setter
        public Builder sourceCosmosdbAccountId(String sourceCosmosdbAccountId) {
            this.sourceCosmosdbAccountId = Objects.requireNonNull(sourceCosmosdbAccountId);
            return this;
        }
        public AccountRestore build() {
            final var o = new AccountRestore();
            o.databases = databases;
            o.restoreTimestampInUtc = restoreTimestampInUtc;
            o.sourceCosmosdbAccountId = sourceCosmosdbAccountId;
            return o;
        }
    }
}
