# ResidentKeyRequirement

public final enum **ResidentKeyRequirement** extends [Enum](https://developer.android.com/reference/java/lang/Enum.html)\<[ResidentKeyRequirement](https://developers.google.com/android/reference/com/google/android/gms/fido/fido2/api/common/ResidentKeyRequirement)\>  
implements [Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) An enum that describes the Resident Key (Discoverable Credential) requirements.

According to WebAuthn, this structure describes the Relying Party's requirements for
client-side discoverable credentials (formerly known as resident credentials or resident
keys):

If the resident key requirement is set to "required", then the Relying Party requires a
client-side discoverable credential and is prepared to receive an error if it can't be
created. If the resident key requirement is set to "preferred", the Relying party strongly
prefers a client-side discoverable credential but will accept a server-side credential. If
the resident key requirement is set to "discouraged" then a server-side credential is
preferable, but will accept a client-side discoverable credential.

See [Resident Key
Requirement Enumeration](https://developers.google.com/android/reference/com/google/android/gms/fido/fido2/api/common/www.w3.org/TR/webauthn-2#enum-residentKeyRequirement)

### Nested Class Summary

|---|---|---|---|
| class | [ResidentKeyRequirement.UnsupportedResidentKeyRequirementException](https://developers.google.com/android/reference/com/google/android/gms/fido/fido2/api/common/ResidentKeyRequirement.UnsupportedResidentKeyRequirementException) || Exception thrown when an unsupported or unrecognized resident key requirement is encountered. |

### Inherited Constant Summary

From interface android.os.Parcelable

|---|---|---|
| int | CONTENTS_FILE_DESCRIPTOR |   |
| int | PARCELABLE_WRITE_RETURN_VALUE |   |

### Inherited Method Summary

From class java.lang.Enum

|---|---|
| final [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| final int | compareTo([ResidentKeyRequirement](https://developers.google.com/android/reference/com/google/android/gms/fido/fido2/api/common/ResidentKeyRequirement) arg0) |
| int | compareTo([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| final [Optional](https://developer.android.com/reference/java/util/Optional.html)\<EnumDesc\<[ResidentKeyRequirement](https://developers.google.com/android/reference/com/google/android/gms/fido/fido2/api/common/ResidentKeyRequirement)\>\> | describeConstable() |
| final boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| final void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<[ResidentKeyRequirement](https://developers.google.com/android/reference/com/google/android/gms/fido/fido2/api/common/ResidentKeyRequirement)\> | getDeclaringClass() |
| final int | hashCode() |
| final [String](https://developer.android.com/reference/java/lang/String.html) | name() |
| final int | ordinal() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| static \<T extends [Enum](https://developer.android.com/reference/java/lang/Enum.html)\<T\>\> T | valueOf([Class](https://developer.android.com/reference/java/lang/Class.html)\<T\> arg0, [String](https://developer.android.com/reference/java/lang/String.html) arg1) |

From class java.lang.Object

|---|---|
| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

From interface java.lang.constant.Constable

|---|---|
| abstract [Optional](https://developer.android.com/reference/java/util/Optional.html)\<? extends ConstantDesc\> | describeConstable() |

From interface java.lang.Comparable

|---|---|
| abstract int | compareTo([ResidentKeyRequirement](https://developers.google.com/android/reference/com/google/android/gms/fido/fido2/api/common/ResidentKeyRequirement) arg0) |

From interface android.os.Parcelable

|---|---|
| abstract int | describeContents() |
| abstract void | writeToParcel([Parcel](https://developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |

## Enum Values

#### public static final ResidentKeyRequirement **RESIDENT_KEY_DISCOURAGED**

#### public static final ResidentKeyRequirement **RESIDENT_KEY_PREFERRED**

#### public static final ResidentKeyRequirement **RESIDENT_KEY_REQUIRED**