SetSchemaRequest.Builder

public static final class SetSchemaRequest.Builder
extends Object

java.lang.Object
   ↳ androidx.appsearch.app.SetSchemaRequest.Builder


Builder for SetSchemaRequest objects.

Summary

Public constructors

Builder()

Public methods

SetSchemaRequest.Builder addDocumentClasses(Class...<?> documentClasses)

Adds one or more Document annotated classes to the schema.

SetSchemaRequest.Builder addDocumentClasses(Collection<? extends Class<?>> documentClasses)

Adds a collection of Document annotated classes to the schema.

SetSchemaRequest.Builder addSchemas(AppSearchSchema... schemas)

Adds one or more AppSearchSchema types to the schema.

SetSchemaRequest.Builder addSchemas(Collection<AppSearchSchema> schemas)

Adds a collection of AppSearchSchema objects to the schema.

SetSchemaRequest build()

Builds a new SetSchemaRequest object.

SetSchemaRequest.Builder setDocumentClassDisplayedBySystem(Class<?> documentClass, boolean displayed)

Sets whether or not documents from the provided Document annotated class will be displayed and visible on any system UI surface.

SetSchemaRequest.Builder setDocumentClassVisibilityForPackage(Class<?> documentClass, boolean visible, PackageIdentifier packageIdentifier)

Sets whether or not documents from the provided Document annotated class can be read by the specified package.