Class: Google::Apis::ManagedkafkaV1::ConsumerPartitionMetadata

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

Overview

Metadata for a consumer group corresponding to a specific partition.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ConsumerPartitionMetadata

Returns a new instance of ConsumerPartitionMetadata.



724
725
726
# File 'lib/google/apis/managedkafka_v1/classes.rb', line 724

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

Instance Attribute Details

#metadataString

Optional. The associated metadata for this partition, or empty if it does not exist. Corresponds to the JSON property metadata

Returns:

  • (String)


716
717
718
# File 'lib/google/apis/managedkafka_v1/classes.rb', line 716

def 
  @metadata
end

#offsetFixnum

Required. The current offset for this partition, or 0 if no offset has been committed. Corresponds to the JSON property offset

Returns:

  • (Fixnum)


722
723
724
# File 'lib/google/apis/managedkafka_v1/classes.rb', line 722

def offset
  @offset
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



729
730
731
732
# File 'lib/google/apis/managedkafka_v1/classes.rb', line 729

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