Class: Google::Apis::PubsubV1::CreateSnapshotRequest

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

Overview

Request for the CreateSnapshot method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CreateSnapshotRequest

Returns a new instance of CreateSnapshotRequest.



834
835
836
# File 'lib/google/apis/pubsub_v1/classes.rb', line 834

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

Instance Attribute Details

#labelsHash<String,String>

Optional. See Creating and managing labels. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


813
814
815
# File 'lib/google/apis/pubsub_v1/classes.rb', line 813

def labels
  @labels
end

#subscriptionString

Required. The subscription whose backlog the snapshot retains. Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the subscription. More precisely, this is defined as the messages in the subscription's backlog that are unacknowledged upon the successful completion of the CreateSnapshot request; as well as: (b) Any messages published to the subscription's topic following the successful completion of the CreateSnapshot request. Format is projects/project/subscriptions/sub`. Corresponds to the JSON propertysubscription`

Returns:

  • (String)


824
825
826
# File 'lib/google/apis/pubsub_v1/classes.rb', line 824

def subscription
  @subscription
end

#tagsHash<String,String>

Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": " marketing" See https://$universe.dns_names.final_documentation_domain/pubsub/ docs/tags for more information on using tags with Pub/Sub resources. Corresponds to the JSON property tags

Returns:

  • (Hash<String,String>)


832
833
834
# File 'lib/google/apis/pubsub_v1/classes.rb', line 832

def tags
  @tags
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



839
840
841
842
843
# File 'lib/google/apis/pubsub_v1/classes.rb', line 839

def update!(**args)
  @labels = args[:labels] if args.key?(:labels)
  @subscription = args[:subscription] if args.key?(:subscription)
  @tags = args[:tags] if args.key?(:tags)
end