Added in API level 31

MigrationFailure

class MigrationFailure : Parcelable
kotlin.Any
   ↳ android.app.appsearch.SetSchemaResponse.MigrationFailure

The class represents a post-migrated GenericDocument that failed to be saved by AppSearchSession#setSchema.

Summary

Inherited constants
Public constructors
MigrationFailure(namespace: String, documentId: String, schemaType: String, failedResult: AppSearchResult<*>)

Constructs a new MigrationFailure.

Public methods
open AppSearchResult<Void!>

Returns the AppSearchResult that indicates why the post-migration GenericDocument failed to be indexed.

open String

Returns the id of the GenericDocument that failed to be migrated.

open String

Returns the namespace of the GenericDocument that failed to be migrated.

open String

Returns the schema type of the GenericDocument that failed to be migrated.

open String

Returns a string representation of the object.

open Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<SetSchemaResponse.MigrationFailure!>

Public constructors

MigrationFailure

Added in API level 31
MigrationFailure(
    namespace: String,
    documentId: String,
    schemaType: String,
    failedResult: AppSearchResult<*>)

Constructs a new MigrationFailure.

Parameters
namespace String: The namespace of the document which failed to be migrated. This value cannot be null.
documentId String: The id of the document which failed to be migrated. This value cannot be null.
schemaType String: The type of the document which failed to be migrated. This value cannot be null.
failedResult AppSearchResult<*>: The reason why the document failed to be indexed. This value cannot be null.
Exceptions
java.lang.IllegalArgumentException if the provided failedResult was not a failure.

Public methods

getAppSearchResult

Added in API level 31
open fun getAppSearchResult(): AppSearchResult<Void!>

Returns the AppSearchResult that indicates why the post-migration GenericDocument failed to be indexed.

Return
AppSearchResult<Void!> This value cannot be null.

getDocumentId

Added in API level 31
open fun getDocumentId(): String

Returns the id of the GenericDocument that failed to be migrated.

Return
String This value cannot be null.

getNamespace

Added in API level 31
open fun getNamespace(): String

Returns the namespace of the GenericDocument that failed to be migrated.

Return
String This value cannot be null.

getSchemaType

Added in API level 31
open fun getSchemaType(): String

Returns the schema type of the GenericDocument that failed to be migrated.

Return
String This value cannot be null.

toString

Added in API level 31
open fun toString(): String

Returns a string representation of the object.

Return
String This value cannot be null.

writeToParcel

open fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties