GeneratedMutation

interface GeneratedMutation<Connector : GeneratedConnector<Connector>, Data : Any?, Variables : Any?> : GeneratedOperation


The specialization of GeneratedOperation for mutations.

Safe for Concurrent Use

All methods and properties of GeneratedMutation are thread-safe and may be safely called and/or accessed concurrently from multiple threads and/or coroutines.

Stable for Inheritance

The GeneratedMutation interface is stable for inheritance in third-party libraries, as new methods will not be added to this interface and contracts of the existing methods will not be changed, except possibly during major version number changes.

Summary

Public functions

GeneratedMutation<Connector, Data, Variables>
@ExperimentalFirebaseDataConnect
copy(
    connector: Connector,
    operationName: String,
    dataDeserializer: DeserializationStrategy<Data>,
    variablesSerializer: SerializationStrategy<Variables>
)

Creates and returns a new object that is a copy of this object, but with the properties whose names corresponding to the given arguments changed to the respective argument's value.

open MutationRef<Data, Variables>
ref(variables: Variables)

Returns a OperationRef that can be used to execute this operation with the given variables.

GeneratedMutation<Connector, NewData, Variables>
@ExperimentalFirebaseDataConnect
<NewData : Any?> withDataDeserializer(
    dataDeserializer: DeserializationStrategy<NewData>
)

Creates and returns a new object that is a copy of this object, just like copy, except that the dataDeserializer can be a different type than Data.

GeneratedMutation<Connector, Data, NewVariables>
@ExperimentalFirebaseDataConnect
<NewVariables : Any?> withVariablesSerializer(
    variablesSerializer: SerializationStrategy<NewVariables>
)

Creates and returns a new object that is a copy of this object, just like copy, except that the variablesSerializer can be a different type than Variables.

Inherited functions

From com.google.firebase.dataconnect.generated.GeneratedOperation
operator Boolean
equals(other: Any?)

Compares this object with another object for equality.

Int

Calculates and returns the hash code for this object.

String

Returns a string representation of this object, useful for debugging.

Inherited properties

From com.google.firebase.dataconnect.generated.GeneratedOperation
Connector

The GeneratedConnector with which this object is associated.

DeserializationStrategy<Data>

The deserializer to use to deserialize the response data for this operation.

String

The name of the operation, as defined in GraphQL.

SerializationStrategy<Variables>

The serializer to use to serialize the variables for this operation.

Public functions

copy

@ExperimentalFirebaseDataConnect
fun copy(
    connector: Connector,
    operationName: String,
    dataDeserializer: DeserializationStrategy<Data>,
    variablesSerializer: SerializationStrategy<Variables>
): GeneratedMutation<Connector, Data, Variables>

Creates and returns a new object that is a copy of this object, but with the properties whose names corresponding to the given arguments changed to the respective argument's value.

This function is essentially the same as the copy() method that is generated by the Kotlin compiler for data class classes.

ref

open fun ref(variables: Variables): MutationRef<Data, Variables>

Returns a OperationRef that can be used to execute this operation with the given variables.

withDataDeserializer

@ExperimentalFirebaseDataConnect
fun <NewData : Any?> withDataDeserializer(
    dataDeserializer: DeserializationStrategy<NewData>
): GeneratedMutation<Connector, NewData, Variables>

Creates and returns a new object that is a copy of this object, just like copy, except that the dataDeserializer can be a different type than Data.

withVariablesSerializer

@ExperimentalFirebaseDataConnect
fun <NewVariables : Any?> withVariablesSerializer(
    variablesSerializer: SerializationStrategy<NewVariables>
): GeneratedMutation<Connector, Data, NewVariables>

Creates and returns a new object that is a copy of this object, just like copy, except that the variablesSerializer can be a different type than Variables.