Method: Gapic::Operation#initialize

Defined in:
lib/gapic/operation.rb

#initialize(grpc_op, client, result_type: nil, metadata_type: nil, options: {}) ⇒ Operation

Returns a new instance of Operation.

Parameters:

  • grpc_op (Google::Longrunning::Operation)

    The inital longrunning operation.

  • client (Google::Longrunning::OperationsClient)

    The client that handles the grpc operations.

  • result_type (Class) (defaults to: nil)

    The class type to be unpacked from the result. If not provided the class type will be looked up. Optional.

  • metadata_type (Class) (defaults to: nil)

    The class type to be unpacked from the metadata. If not provided the class type will be looked up. Optional.

  • options (Gapic::CallOptions) (defaults to: {})

    call options for this operation



88
89
90
91
92
93
94
95
# File 'lib/gapic/operation.rb', line 88

def initialize grpc_op, client, result_type: nil, metadata_type: nil, options: {}
  @grpc_op = grpc_op
  @client = client
  @result_type = result_type
  @metadata_type = 
  @on_done_callbacks = []
  @options = options
end