// *** 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.inputs;

import com.pulumi.azure.cosmosdb.inputs.AccountRestoreDatabaseArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final AccountRestoreArgs Empty = new AccountRestoreArgs();

    /**
     * A `database` block as defined below. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="databases")
    private @Nullable Output<List<AccountRestoreDatabaseArgs>> databases;

    /**
     * @return A `database` block as defined below. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<List<AccountRestoreDatabaseArgs>>> databases() {
        return Optional.ofNullable(this.databases);
    }

    /**
     * The creation time of the database or the collection (Datetime Format `RFC 3339`). Changing this forces a new resource to be created.
     * 
     */
    @Import(name="restoreTimestampInUtc", required=true)
    private Output<String> restoreTimestampInUtc;

    /**
     * @return The creation time of the database or the collection (Datetime Format `RFC 3339`). Changing this forces a new resource to be created.
     * 
     */
    public Output<String> restoreTimestampInUtc() {
        return this.restoreTimestampInUtc;
    }

    /**
     * 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`.
     * 
     */
    @Import(name="sourceCosmosdbAccountId", required=true)
    private Output<String> sourceCosmosdbAccountId;

    /**
     * @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 Output<String> sourceCosmosdbAccountId() {
        return this.sourceCosmosdbAccountId;
    }

    private AccountRestoreArgs() {}

    private AccountRestoreArgs(AccountRestoreArgs $) {
        this.databases = $.databases;
        this.restoreTimestampInUtc = $.restoreTimestampInUtc;
        this.sourceCosmosdbAccountId = $.sourceCosmosdbAccountId;
    }

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

    public static final class Builder {
        private AccountRestoreArgs $;

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

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

        /**
         * @param databases A `database` block as defined below. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder databases(@Nullable Output<List<AccountRestoreDatabaseArgs>> databases) {
            $.databases = databases;
            return this;
        }

        /**
         * @param databases A `database` block as defined below. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder databases(List<AccountRestoreDatabaseArgs> databases) {
            return databases(Output.of(databases));
        }

        /**
         * @param databases A `database` block as defined below. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder databases(AccountRestoreDatabaseArgs... databases) {
            return databases(List.of(databases));
        }

        /**
         * @param restoreTimestampInUtc The creation time of the database or the collection (Datetime Format `RFC 3339`). Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder restoreTimestampInUtc(Output<String> restoreTimestampInUtc) {
            $.restoreTimestampInUtc = restoreTimestampInUtc;
            return this;
        }

        /**
         * @param restoreTimestampInUtc The creation time of the database or the collection (Datetime Format `RFC 3339`). Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder restoreTimestampInUtc(String restoreTimestampInUtc) {
            return restoreTimestampInUtc(Output.of(restoreTimestampInUtc));
        }

        /**
         * @param sourceCosmosdbAccountId 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`.
         * 
         * @return builder
         * 
         */
        public Builder sourceCosmosdbAccountId(Output<String> sourceCosmosdbAccountId) {
            $.sourceCosmosdbAccountId = sourceCosmosdbAccountId;
            return this;
        }

        /**
         * @param sourceCosmosdbAccountId 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`.
         * 
         * @return builder
         * 
         */
        public Builder sourceCosmosdbAccountId(String sourceCosmosdbAccountId) {
            return sourceCosmosdbAccountId(Output.of(sourceCosmosdbAccountId));
        }

        public AccountRestoreArgs build() {
            $.restoreTimestampInUtc = Objects.requireNonNull($.restoreTimestampInUtc, "expected parameter 'restoreTimestampInUtc' to be non-null");
            $.sourceCosmosdbAccountId = Objects.requireNonNull($.sourceCosmosdbAccountId, "expected parameter 'sourceCosmosdbAccountId' to be non-null");
            return $;
        }
    }

}
