class Google::Cloud::Bigtable::MutationOperations::Response

# MutationEntry::Response

Represents a response message from BigtableService.MutateRows.

@attr [Integer] index The index into the original request's `entries`

list of the Entry for which a result is being reported.

@attr [Google::Cloud::Bigtable::Status] The result of the request

Entry identified by `index`. Depending on how requests are batched
during execution, it is possible for one Entry to fail due to an
error with another Entry. In the event that this occurs, the same
error will be reported for both entries.

@example

require "google/cloud/bigtable"

bigtable = Google::Cloud::Bigtable.new

table = bigtable.table "my-instance", "my-table"

entries = []
entries << table.new_mutation_entry("row-1").set_cell("cf1", "field1", "XYZ")
entries << table.new_mutation_entry("row-2").set_cell("cf1", "field1", "ABC")
responses = table.mutate_rows entries

responses.each do |response|
  puts response.status.description
end

Attributes

index[R]
status[R]

Public Class Methods

from_grpc(grpc) click to toggle source

@private New MutationEntry::Response from a Google::Cloud::Bigtable::V2::MutateRowsResponse::Entry object.

# File lib/google/cloud/bigtable/mutation_operations.rb, line 351
def self.from_grpc grpc
  new grpc.index, Status.from_grpc(grpc.status)
end
new(index, status) click to toggle source

@private Creates a MutationEntry::Response object.

# File lib/google/cloud/bigtable/mutation_operations.rb, line 343
def initialize index, status
  @index = index
  @status = status
end