OperationRef

A reference to an operation of a connector with a fixed set of variables: execute sends it and decodes its data. A reference is immutable; copy, withVariablesSerializer and withDataDeserializer derive new ones.

Inheritors

Properties

Link copied to clipboard

Which SDK created this reference.

Link copied to clipboard

The instance this reference belongs to.

Link copied to clipboard
abstract val dataDeserializer: DeserializationStrategy<Data>

Decodes the data the operation returns.

Link copied to clipboard
abstract val dataSerializersModule: SerializersModule?

The module dataDeserializer resolves contextual serializers from, if any.

Link copied to clipboard
abstract val operationName: String

The name of the operation in the connector.

Link copied to clipboard
abstract val variables: Variables

The variables sent with the operation.

Link copied to clipboard
abstract val variablesSerializer: SerializationStrategy<Variables>

Encodes variables.

Link copied to clipboard
abstract val variablesSerializersModule: SerializersModule?

The module variablesSerializer resolves contextual serializers from, if any.

Functions

Link copied to clipboard
abstract fun copy(operationName: String = this.operationName, variables: Variables = this.variables, dataDeserializer: DeserializationStrategy<Data> = this.dataDeserializer, variablesSerializer: SerializationStrategy<Variables> = this.variablesSerializer, callerSdkType: FirebaseDataConnect.CallerSdkType = this.callerSdkType, dataSerializersModule: SerializersModule? = this.dataSerializersModule, variablesSerializersModule: SerializersModule? = this.variablesSerializersModule): OperationRef<Data, Variables>

A copy of this reference with the given values replaced.

Link copied to clipboard
abstract operator override fun equals(other: Any?): Boolean
Link copied to clipboard
abstract suspend fun execute(): OperationResult<Data, Variables>

Executes the operation; throws DataConnectOperationException when the server reports errors.

Link copied to clipboard
abstract override fun hashCode(): Int
Link copied to clipboard
abstract override fun toString(): String
Link copied to clipboard
abstract fun <NewData> withDataDeserializer(dataDeserializer: DeserializationStrategy<NewData>, dataSerializersModule: SerializersModule? = this.dataSerializersModule): OperationRef<NewData, Variables>

A copy of this reference decoding its data with another deserializer.

Link copied to clipboard
abstract fun <NewVariables> withVariablesSerializer(variables: NewVariables, variablesSerializer: SerializationStrategy<NewVariables>, variablesSerializersModule: SerializersModule? = this.variablesSerializersModule): OperationRef<Data, NewVariables>

A copy of this reference with other variables, and their serializer.