# SelectedCredentialSet

Artifact: [androidx.credentials.registry:registry-provider](https://developer.android.com/jetpack/androidx/releases/credentials-registry) [View Source](https://cs.android.com/search?q=file:androidx/credentials/registry/provider/ProviderGetCredentialRequest.kt+class:androidx.credentials.registry.provider.SelectedCredentialSet) Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

*** ** * ** ***


```
class SelectedCredentialSet
```

<br />

*** ** * ** ***

Contains information about the user selection result on the Credential Manager UI.

During the `https://developer.android.com/reference/kotlin/androidx/credentials/CredentialManager#getCredential(android.content.Context,androidx.credentials.GetCredentialRequest)` invocation, the user will be presented a Credential Manager selector \& permission UI that displays the available credentials to choose from. The selector may display credential options in two dimensions. First, it may display a set of options; then each credential set can contain a list of credentials that must be all returned at once.

For example, the user could be presented options of `{ {cred1, cred2, cred3}, {cred1, cred4}, {cred5} }` and may choose to use the {cred1, cred4} credential set. In that case, the selected provider will be invoked and be given a `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/SelectedCredentialSet` containing the corresponding `setId` and `credentialId`s for each individual credential in the set.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `credentials` is empty |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/SelectedCredentialSet#SelectedCredentialSet(kotlin.String,kotlin.collections.List)( credentialSetId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, credentials: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/SelectedCredential> )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/SelectedCredentialSet#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/SelectedCredentialSet#hashCode()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/SelectedCredentialSet#credentialSetId()` the id of the selected credential set; the `credentialSetId` is generated by the provider's matcher (see `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#matcher()`) and therefore its format is specific to the matcher |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/SelectedCredential>` | `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/SelectedCredentialSet#credentials()` the non-empty list of credentials in this selected credential set; the provider must return all credentials to the caller |

## Public constructors

### SelectedCredentialSet

Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

```
SelectedCredentialSet(
    credentialSetId: String,
    credentials: List<SelectedCredential>
)
```

| Parameters |
|---|---|
| `credentialSetId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the id of the selected credential set; the `credentialSetId` is generated by the provider's matcher (see `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#matcher()`) and therefore its format is specific to the matcher |
| `credentials: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/SelectedCredential>` | the non-empty list of credentials in this selected credential set; the provider must return all credentials to the caller |

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

## Public properties

### credentialSetId

Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

```
val credentialSetId: String
```

the id of the selected credential set; the `credentialSetId` is generated by the provider's matcher (see `https://developer.android.com/reference/kotlin/androidx/credentials/registry/provider/RegisterCredentialsRequest#matcher()`) and therefore its format is specific to the matcher

### credentials

Added in [1.0.0-alpha05](https://developer.android.com/jetpack/androidx/releases/credentials-registry#1.0.0-alpha05)

```
val credentials: List<SelectedCredential>
```

the non-empty list of credentials in this selected credential set; the provider must return all credentials to the caller