SetSchemaResponse.MigrationFailure
  public
  static
  
  
  class
  SetSchemaResponse.MigrationFailure
  
    extends Object
  
  
  
  
  
      implements
      
        Parcelable
      
  
  
| java.lang.Object | |
| ↳ | android.app.appsearch.SetSchemaResponse.MigrationFailure | 
The class represents a post-migrated GenericDocument that failed to be saved by
 AppSearchSession.setSchema.
Summary
| Inherited constants | 
|---|
| Fields | |
|---|---|
| 
    public
    static
    final
    Creator<SetSchemaResponse.MigrationFailure> | CREATOR
 | 
| Public constructors | |
|---|---|
| 
      MigrationFailure(String namespace, String documentId, String schemaType, AppSearchResult<?> failedResult)
      Constructs a new  | |
| Public methods | |
|---|---|
| 
        
        
        
        
        
        AppSearchResult<Void> | 
      getAppSearchResult()
      Returns the  | 
| 
        
        
        
        
        
        String | 
      getDocumentId()
      Returns the id of the  | 
| 
        
        
        
        
        
        String | 
      getNamespace()
      Returns the namespace of the  | 
| 
        
        
        
        
        
        String | 
      getSchemaType()
      Returns the schema type of the  | 
| 
        
        
        
        
        
        String | 
      toString()
      Returns a string representation of the object. | 
| 
        
        
        
        
        
        void | 
      writeToParcel(Parcel dest, int flags)
      Flatten this object in to a Parcel. | 
| Inherited methods | |
|---|---|
Fields
CREATOR
public static final Creator<SetSchemaResponse.MigrationFailure> CREATOR
Public constructors
MigrationFailure
public MigrationFailure (String namespace, String documentId, String schemaType, AppSearchResult<?> failedResult)
Constructs a new MigrationFailure.
| Parameters | |
|---|---|
| namespace | String: The namespace of the document which failed to be migrated.
 This value cannot benull. | 
| documentId | String: The id of the document which failed to be migrated.
 This value cannot benull. | 
| schemaType | String: The type of the document which failed to be migrated.
 This value cannot benull. | 
| failedResult | AppSearchResult: The reason why the document failed to be indexed.
 This value cannot benull. | 
| Throws | |
|---|---|
| IllegalArgumentException | if the provided failedResultwas not a failure. | 
Public methods
getAppSearchResult
public AppSearchResult<Void> getAppSearchResult ()
Returns the AppSearchResult that indicates why the post-migration GenericDocument failed to be indexed.
| Returns | |
|---|---|
| AppSearchResult<Void> | This value cannot be null. | 
getDocumentId
public String getDocumentId ()
Returns the id of the GenericDocument that failed to be migrated.
| Returns | |
|---|---|
| String | This value cannot be null. | 
getNamespace
public String getNamespace ()
Returns the namespace of the GenericDocument that failed to be migrated.
| Returns | |
|---|---|
| String | This value cannot be null. | 
getSchemaType
public String getSchemaType ()
Returns the schema type of the GenericDocument that failed to be migrated.
| Returns | |
|---|---|
| String | This value cannot be null. | 
toString
public String toString ()
Returns a string representation of the object.
| Returns | |
|---|---|
| String | This value cannot be null. | 
writeToParcel
public void writeToParcel (Parcel dest, int flags)
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
| dest | Parcel: This value cannot benull. | 
| flags | int: Additional flags about how the object should be written.
 May be 0 orParcelable.PARCELABLE_WRITE_RETURN_VALUE.
 Value is either0or a combination ofParcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES | 
