All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.pubsub.model.Snapshot.html Maven / Gradle / Ivy

There is a newer version: v1-rev20240730-2.0.0
Show newest version






Snapshot (Cloud Pub/Sub API v1-rev20240918-2.0.0)












com.google.api.services.pubsub.model

Class Snapshot

  • All Implemented Interfaces:
    Cloneable, Map<String,Object>


    public final class Snapshot
    extends com.google.api.client.json.GenericJson
    A snapshot resource. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay- overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.

    This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Cloud Pub/Sub API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json

    Author:
    Google, Inc.
    • Constructor Detail

      • Snapshot

        public Snapshot()
    • Method Detail

      • getExpireTime

        public String getExpireTime()
        Optional. The snapshot is guaranteed to exist up until this time. A newly-created snapshot expires no later than 7 days from the time of its creation. Its exact lifetime is determined at creation by the existing backlog in the source subscription. Specifically, the lifetime of the snapshot is `7 days - (age of oldest unacked message in the subscription)`. For example, consider a subscription whose oldest unacked message is 3 days old. If a snapshot is created from this subscription, the snapshot -- which will always capture this 3-day-old backlog as long as the snapshot exists -- will expire in 4 days. The service will refuse to create a snapshot that would expire in less than 1 hour after creation.
        Returns:
        value or null for none
      • setExpireTime

        public Snapshot setExpireTime(String expireTime)
        Optional. The snapshot is guaranteed to exist up until this time. A newly-created snapshot expires no later than 7 days from the time of its creation. Its exact lifetime is determined at creation by the existing backlog in the source subscription. Specifically, the lifetime of the snapshot is `7 days - (age of oldest unacked message in the subscription)`. For example, consider a subscription whose oldest unacked message is 3 days old. If a snapshot is created from this subscription, the snapshot -- which will always capture this 3-day-old backlog as long as the snapshot exists -- will expire in 4 days. The service will refuse to create a snapshot that would expire in less than 1 hour after creation.
        Parameters:
        expireTime - expireTime or null for none
      • getLabels

        public Map<String,String> getLabels()
        Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
        Returns:
        value or null for none
      • setLabels

        public Snapshot setLabels(Map<String,String> labels)
        Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
        Parameters:
        labels - labels or null for none
      • getName

        public String getName()
        Optional. The name of the snapshot.
        Returns:
        value or null for none
      • setName

        public Snapshot setName(String name)
        Optional. The name of the snapshot.
        Parameters:
        name - name or null for none
      • getTopic

        public String getTopic()
        Optional. The name of the topic from which this snapshot is retaining messages.
        Returns:
        value or null for none
      • setTopic

        public Snapshot setTopic(String topic)
        Optional. The name of the topic from which this snapshot is retaining messages.
        Parameters:
        topic - topic or null for none
      • set

        public Snapshot set(String fieldName,
                            Object value)
        Overrides:
        set in class com.google.api.client.json.GenericJson
      • clone

        public Snapshot clone()
        Overrides:
        clone in class com.google.api.client.json.GenericJson

Copyright © 2011–2024 Google. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy