Class: Google::Apis::PubsubliteV1::Reservation

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

Overview

Metadata about a reservation resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Reservation

Returns a new instance of Reservation.



684
685
686
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 684

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

Instance Attribute Details

#nameString

The name of the reservation. Structured like: projects/project_number/ locations/location/reservations/reservation_id Corresponds to the JSON property name

Returns:

  • (String)


674
675
676
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 674

def name
  @name
end

#throughput_capacityFixnum

The reserved throughput capacity. Every unit of throughput capacity is equivalent to 1 MiB/s of published messages or 2 MiB/s of subscribed messages. Any topics which are declared as using capacity from a Reservation will consume resources from this reservation instead of being charged individually. Corresponds to the JSON property throughputCapacity

Returns:

  • (Fixnum)


682
683
684
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 682

def throughput_capacity
  @throughput_capacity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



689
690
691
692
# File 'lib/google/apis/pubsublite_v1/classes.rb', line 689

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