target.apidocs.com.google.api.services.pubsub.model.Snapshot.html Maven / Gradle / Ivy
Snapshot (Cloud Pub/Sub API v1-rev20240607-2.0.0)
com.google.api.services.pubsub.model
Class Snapshot
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.pubsub.model.Snapshot
-
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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
Snapshot()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Snapshot
clone()
String
getExpireTime()
Optional.
Map<String,String>
getLabels()
Optional.
String
getName()
Optional.
String
getTopic()
Optional.
Snapshot
set(String fieldName,
Object value)
Snapshot
setExpireTime(String expireTime)
Optional.
Snapshot
setLabels(Map<String,String> labels)
Optional.
Snapshot
setName(String name)
Optional.
Snapshot
setTopic(String topic)
Optional.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
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 - 2025 Weber Informatics LLC | Privacy Policy