Class: Google::Apis::SpannerV1::ChangeQuorumRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/google/apis/spanner_v1/representations.rb

Overview

The request for ChangeQuorum.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ChangeQuorumRequest

Returns a new instance of ChangeQuorumRequest.



982
983
984
# File 'lib/google/apis/spanner_v1/classes.rb', line 982

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#etagString

Optional. The etag is the hash of the QuorumInfo. The ChangeQuorum operation is only performed if the etag matches that of the QuorumInfo in the current database resource. Otherwise the API returns an ABORTED error. The etag is used for optimistic concurrency control as a way to help prevent simultaneous change quorum requests that could create a race condition. Corresponds to the JSON property etag

Returns:

  • (String)


968
969
970
# File 'lib/google/apis/spanner_v1/classes.rb', line 968

def etag
  @etag
end

#nameString

Required. Name of the database in which to apply ChangeQuorum. Values are of the form projects//instances//databases/. Corresponds to the JSON property name

Returns:

  • (String)


974
975
976
# File 'lib/google/apis/spanner_v1/classes.rb', line 974

def name
  @name
end

#quorum_typeGoogle::Apis::SpannerV1::QuorumType

Information about the database quorum type. This only applies to dual-region instance configs. Corresponds to the JSON property quorumType



980
981
982
# File 'lib/google/apis/spanner_v1/classes.rb', line 980

def quorum_type
  @quorum_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



987
988
989
990
991
# File 'lib/google/apis/spanner_v1/classes.rb', line 987

def update!(**args)
  @etag = args[:etag] if args.key?(:etag)
  @name = args[:name] if args.key?(:name)
  @quorum_type = args[:quorum_type] if args.key?(:quorum_type)
end