/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.management.documentdb;
import com.microsoft.azure.management.apigeneration.Beta;
import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.documentdb.implementation.DatabaseAccountListConnectionStringsResultInner;
import com.microsoft.azure.management.documentdb.implementation.DatabaseAccountListKeysResultInner;
import com.microsoft.azure.management.documentdb.implementation.DatabaseAccountsInner;
import com.microsoft.azure.management.documentdb.implementation.DocumentDBManager;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByResourceGroup;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByResourceGroup;
import com.microsoft.azure.management.resources.fluentcore.arm.models.HasManager;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeletingById;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing;
import com.microsoft.azure.management.resources.fluentcore.model.HasInner;
import rx.Observable;
/**
* Entry point to document db management API.
*/
@Fluent()
@Beta
public interface DatabaseAccounts extends
SupportsCreating<DatabaseAccount.DefinitionStages.Blank>,
HasManager<DocumentDBManager>,
HasInner<DatabaseAccountsInner>,
SupportsBatchCreation<DatabaseAccount>,
SupportsGettingById<DatabaseAccount>,
SupportsDeletingById,
SupportsDeletingByResourceGroup,
SupportsListing<DatabaseAccount>,
SupportsListingByResourceGroup<DatabaseAccount>,
SupportsGettingByResourceGroup<DatabaseAccount> {
/**
* Changes the failover priority for the Azure DocumentDB database account. A failover priority of 0 indicates
* a write region. The maximum value for a failover priority = (total number of regions - 1).
* Failover priority values must be unique for each of the regions in which the database account exists.
* @param groupName the group name
* @param accountName the account name
* @param failoverPolicies the list of failover policies
*/
void failoverPriorityChange(String groupName, String accountName, FailoverPolicies failoverPolicies);
/**
* Lists the access keys for the specified Azure DocumentDB database account.
* @param groupName the group name
* @param accountName the account name
* @return a list of keys
*/
DatabaseAccountListKeysResultInner listKeys(String groupName, String accountName);
/**
* Lists the connection strings for the specified Azure DocumentDB database account.
* @param groupName the group name
* @param accountName the account name
* @return a list of connection strings
*/
DatabaseAccountListConnectionStringsResultInner listConnectionStrings(String groupName, String accountName);
/**
* Regenerates an access key for the specified Azure DocumentDB database account.
* @param groupName the group name
* @param accountName the account name
* @param keyKind the key kind
*/
void regenerateKey(String groupName, String accountName, KeyKind keyKind);
/**
* Changes the failover priority for the Azure DocumentDB database account. A failover priority of 0 indicates
* a write region. The maximum value for a failover priority = (total number of regions - 1).
* Failover priority values must be unique for each of the regions in which the database account exists.
* @param groupName the group name
* @param accountName the account name
* @param failoverPolicies the list of failover policies
* @return the ServiceResponse object if successful.
*/
Observable<Void> failoverPriorityChangeAsync(String groupName, String accountName, FailoverPolicies failoverPolicies);
/**
* Lists the access keys for the specified Azure DocumentDB database account.
* @param groupName the group name
* @param accountName the account name
* @return a list of keys
*/
Observable<DatabaseAccountListKeysResultInner> listKeysAsync(String groupName, String accountName);
/**
* Lists the connection strings for the specified Azure DocumentDB database account.
* @param groupName the group name
* @param accountName the account name
* @return a list of connection strings
*/
Observable<DatabaseAccountListConnectionStringsResultInner> listConnectionStringsAsync(String groupName, String accountName);
/**
* Regenerates an access key for the specified Azure DocumentDB database account.
* @param groupName the group name
* @param accountName the account name
* @param keyKind the key kind
* @return the ServiceResponse object if successful.
*/
Observable<Void> regenerateKeyAsync(String groupName, String accountName, KeyKind keyKind);
}