class Google::Apis::FirebaserulesV1::FunctionMock

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[RW]

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. Corresponds to the JSON property `args` @return [Array<Google::Apis::FirebaserulesV1::Arg>]

function[RW]

The name of the function. The function name must match one provided by a service declaration. Corresponds to the JSON property `function` @return [String]

result[RW]

Possible result values from the function mock invocation. Corresponds to the JSON property `result` @return [Google::Apis::FirebaserulesV1::Result]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/firebaserules_v1/classes.rb, line 189
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/firebaserules_v1/classes.rb, line 194
def update!(**args)
  @args = args[:args] if args.key?(:args)
  @function = args[:function] if args.key?(:function)
  @result = args[:result] if args.key?(:result)
end