View Source GoogleApi.FirebaseRules.V1.Model.FunctionMock (google_api_firebase_rules v0.17.0)

Mock function definition. Mocks must refer to a function declared by the target service. The type of the function args and result will be inferred at test time. If either the arg or result values are not compatible with function type declaration, the request will be considered invalid. More than one FunctionMock may be provided for a given function name so long as the Arg matchers are distinct. There may be only one function for a given overload where all Arg values are Arg.any_value.

Attributes

  • args (type: list(GoogleApi.FirebaseRules.V1.Model.Arg.t), default: nil) - The list of Arg values to match. The order in which the arguments are provided is the order in which they must appear in the function invocation.
  • function (type: String.t, default: nil) - The name of the function. The function name must match one provided by a service declaration.
  • result (type: GoogleApi.FirebaseRules.V1.Model.Result.t, default: nil) - The mock result of the function call.

Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Types

@type t() :: %GoogleApi.FirebaseRules.V1.Model.FunctionMock{
  args: [GoogleApi.FirebaseRules.V1.Model.Arg.t()] | nil,
  function: String.t() | nil,
  result: GoogleApi.FirebaseRules.V1.Model.Result.t() | nil
}

Functions

@spec decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.