public class

SetSchemaResponse.MigrationFailure

extends AbstractSafeParcelable

 java.lang.Object

androidx.appsearch.safeparcel.AbstractSafeParcelable

↳androidx.appsearch.app.SetSchemaResponse.MigrationFailure

Overview

The class represents a post-migrated GenericDocument that failed to be saved by AppSearchSession.setSchemaAsync(SetSchemaRequest).

Summary

Fields
public static final <any>CREATOR

Constructors
publicMigrationFailure(java.lang.String namespace, java.lang.String documentId, java.lang.String schemaType, AppSearchResult<java.lang.Object> failedResult)

Constructs a new SetSchemaResponse.MigrationFailure.

Methods
public AppSearchResult<java.lang.Void>getAppSearchResult()

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

public java.lang.StringgetDocumentId()

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

public java.lang.StringgetNamespace()

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

public java.lang.StringgetSchemaType()

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

public java.lang.StringtoString()

public voidwriteToParcel(Parcel dest, int flags)

To be implemented by child classes.

from AbstractSafeParcelabledescribeContents
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Fields

public static final <any> CREATOR

Constructors

public MigrationFailure(java.lang.String namespace, java.lang.String documentId, java.lang.String schemaType, AppSearchResult<java.lang.Object> failedResult)

Constructs a new SetSchemaResponse.MigrationFailure.

Parameters:

namespace: The namespace of the document which failed to be migrated.
documentId: The id of the document which failed to be migrated.
schemaType: The type of the document which failed to be migrated.
failedResult: The reason why the document failed to be indexed.

Methods

public java.lang.String getNamespace()

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

public java.lang.String getDocumentId()

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

public java.lang.String getSchemaType()

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

public AppSearchResult<java.lang.Void> getAppSearchResult()

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

public java.lang.String toString()

public void writeToParcel(Parcel dest, int flags)

To be implemented by child classes.

This is purely for code sync purpose. Have writeToParcel here so we can keep "@Override" in child classes.