Class: Google::Apis::SpannerV1::ReplicaInfo

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ReplicaInfo

Returns a new instance of ReplicaInfo.



2542
2543
2544
# File 'generated/google/apis/spanner_v1/classes.rb', line 2542

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

Instance Attribute Details

#default_leader_locationBoolean Also known as: default_leader_location?

If true, this location is designated as the default leader location where leader replicas are placed. See the region types documentation for more details. Corresponds to the JSON property defaultLeaderLocation

Returns:

  • (Boolean)


2529
2530
2531
# File 'generated/google/apis/spanner_v1/classes.rb', line 2529

def default_leader_location
  @default_leader_location
end

#locationString

The location of the serving resources, e.g. "us-central1". Corresponds to the JSON property location

Returns:

  • (String)


2535
2536
2537
# File 'generated/google/apis/spanner_v1/classes.rb', line 2535

def location
  @location
end

#typeString

The type of replica. Corresponds to the JSON property type

Returns:

  • (String)


2540
2541
2542
# File 'generated/google/apis/spanner_v1/classes.rb', line 2540

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2547
2548
2549
2550
2551
# File 'generated/google/apis/spanner_v1/classes.rb', line 2547

def update!(**args)
  @default_leader_location = args[:default_leader_location] if args.key?(:default_leader_location)
  @location = args[:location] if args.key?(:location)
  @type = args[:type] if args.key?(:type)
end