Class: Google::Apis::FirebaserulesV1::FunctionMock
- Inherits:
-
Object
- Object
- Google::Apis::FirebaserulesV1::FunctionMock
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/firebaserules_v1/classes.rb,
generated/google/apis/firebaserules_v1/representations.rb,
generated/google/apis/firebaserules_v1/representations.rb
Overview
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.
Instance Attribute Summary collapse
-
#args ⇒ Array<Google::Apis::FirebaserulesV1::Arg>
The list of
Argvalues to match. -
#function ⇒ String
The name of the function.
-
#result ⇒ Google::Apis::FirebaserulesV1::Result
Possible result values from the function mock invocation.
Instance Method Summary collapse
-
#initialize(**args) ⇒ FunctionMock
constructor
A new instance of FunctionMock.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ FunctionMock
Returns a new instance of FunctionMock
590 591 592 |
# File 'generated/google/apis/firebaserules_v1/classes.rb', line 590 def initialize(**args) update!(**args) end |
Instance Attribute Details
#args ⇒ Array<Google::Apis::FirebaserulesV1::Arg>
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
588 589 590 |
# File 'generated/google/apis/firebaserules_v1/classes.rb', line 588 def args @args end |
#function ⇒ String
The name of the function.
The function name must match one provided by a service declaration.
Corresponds to the JSON property function
576 577 578 |
# File 'generated/google/apis/firebaserules_v1/classes.rb', line 576 def function @function end |
#result ⇒ Google::Apis::FirebaserulesV1::Result
Possible result values from the function mock invocation.
Corresponds to the JSON property result
581 582 583 |
# File 'generated/google/apis/firebaserules_v1/classes.rb', line 581 def result @result end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
595 596 597 598 599 |
# File 'generated/google/apis/firebaserules_v1/classes.rb', line 595 def update!(**args) @function = args[:function] if args.key?(:function) @result = args[:result] if args.key?(:result) @args = args[:args] if args.key?(:args) end |