SetSchemaResponse.MigrationFailure


class SetSchemaResponse.MigrationFailure


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

Summary

Public constructors

MigrationFailure(
    namespace: String,
    documentId: String,
    schemaType: String,
    failedResult: AppSearchResult<Any!>
)

Constructs a new MigrationFailure.

Public functions

AppSearchResult<Void!>

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

String

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

String

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

String

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

String

Public constructors

MigrationFailure

Added in 1.1.0-alpha06
MigrationFailure(
    namespace: String,
    documentId: String,
    schemaType: String,
    failedResult: AppSearchResult<Any!>
)

Constructs a new MigrationFailure.

Parameters
namespace: String

The namespace of the document which failed to be migrated.

documentId: String

The id of the document which failed to be migrated.

schemaType: String

The type of the document which failed to be migrated.

failedResult: AppSearchResult<Any!>

The reason why the document failed to be indexed.

Throws
java.lang.IllegalArgumentException

if the provided failedResult was not a failure.

Public functions

getAppSearchResult

Added in 1.1.0-alpha06
fun getAppSearchResult(): AppSearchResult<Void!>

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

getDocumentId

Added in 1.1.0-alpha06
fun getDocumentId(): String

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

getNamespace

Added in 1.1.0-alpha06
fun getNamespace(): String

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

getSchemaType

Added in 1.1.0-alpha06
fun getSchemaType(): String

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

toString

fun toString(): String