SetSchemaResponse.MigrationFailure


public class SetSchemaResponse.MigrationFailure


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

Summary

Public constructors

MigrationFailure(
    @NonNull String namespace,
    @NonNull String documentId,
    @NonNull String schemaType,
    @NonNull AppSearchResult<Object> failedResult
)

Constructs a new MigrationFailure.

Public methods

@NonNull AppSearchResult<Void>

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

@NonNull String

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

@NonNull String

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

@NonNull String

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

@NonNull String

Public constructors

MigrationFailure

Added in 1.1.0-alpha06
public MigrationFailure(
    @NonNull String namespace,
    @NonNull String documentId,
    @NonNull String schemaType,
    @NonNull AppSearchResult<Object> failedResult
)

Constructs a new MigrationFailure.

Parameters
@NonNull String namespace

The namespace of the document which failed to be migrated.

@NonNull String documentId

The id of the document which failed to be migrated.

@NonNull String schemaType

The type of the document which failed to be migrated.

@NonNull AppSearchResult<Object> failedResult

The reason why the document failed to be indexed.

Throws
java.lang.IllegalArgumentException

if the provided failedResult was not a failure.

Public methods

getAppSearchResult

Added in 1.1.0-alpha06
public @NonNull AppSearchResult<VoidgetAppSearchResult()

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

getDocumentId

Added in 1.1.0-alpha06
public @NonNull String getDocumentId()

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

getNamespace

Added in 1.1.0-alpha06
public @NonNull String getNamespace()

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

getSchemaType

Added in 1.1.0-alpha06
public @NonNull String getSchemaType()

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

toString

public @NonNull String toString()