Send feedback
Class CreateSnapshotRequest (1.119.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version 1.119.1keyboard_arrow_down
public final class CreateSnapshotRequest extends GeneratedMessageV3 implements CreateSnapshotRequestOrBuilder
Request for the CreateSnapshot method.
Protobuf type google.pubsub.v1.CreateSnapshotRequest
Static Fields
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
SUBSCRIPTION_FIELD_NUMBER
public static final int SUBSCRIPTION_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static CreateSnapshotRequest getDefaultInstance ()
Returns
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Returns
newBuilder()
public static CreateSnapshotRequest . Builder newBuilder ()
Returns
newBuilder(CreateSnapshotRequest prototype)
public static CreateSnapshotRequest . Builder newBuilder ( CreateSnapshotRequest prototype )
Parameter
Returns
public static CreateSnapshotRequest parseDelimitedFrom ( InputStream input )
Parameter
Returns
Exceptions
public static CreateSnapshotRequest parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static CreateSnapshotRequest parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CreateSnapshotRequest parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static CreateSnapshotRequest parseFrom ( ByteString data )
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CreateSnapshotRequest parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static CreateSnapshotRequest parseFrom ( CodedInputStream input )
Parameter
Returns
Exceptions
public static CreateSnapshotRequest parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
public static CreateSnapshotRequest parseFrom ( InputStream input )
Parameter
Returns
Exceptions
public static CreateSnapshotRequest parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static CreateSnapshotRequest parseFrom ( ByteBuffer data )
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static CreateSnapshotRequest parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Exceptions
parser()
public static Parser<CreateSnapshotRequest> parser ()
Returns
Methods
containsLabels(String key)
public boolean containsLabels ( String key )
Parameter
Returns
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Returns
Overrides
getDefaultInstanceForType()
public CreateSnapshotRequest getDefaultInstanceForType ()
Returns
getLabels()
public Map<String , String > getLabels ()
Returns
getLabelsCount()
public int getLabelsCount ()
Returns
getLabelsMap()
public Map<String , String > getLabelsMap ()
Returns
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault ( String key , String defaultValue )
Parameters
Returns
getLabelsOrThrow(String key)
public String getLabelsOrThrow ( String key )
Parameter
Returns
getName()
Returns
Type
Description
String
The name.
getNameBytes()
public ByteString getNameBytes ()
Returns
getParserForType()
public Parser<CreateSnapshotRequest> getParserForType ()
Returns
Overrides
getSerializedSize()
public int getSerializedSize ()
Returns
Overrides
getSubscription()
public String getSubscription ()
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}.
string subscription = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Returns
Type
Description
String
The subscription.
getSubscriptionBytes()
public ByteString getSubscriptionBytes ()
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}.
string subscription = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Returns
Type
Description
ByteString
The bytes for subscription.
getUnknownFields()
public final UnknownFieldSet getUnknownFields ()
Returns
Overrides
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField ( int number )
Parameter
Name
Description
number
int
Returns
Overrides
isInitialized()
public final boolean isInitialized ()
Returns
Overrides
newBuilderForType()
public CreateSnapshotRequest . Builder newBuilderForType ()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected CreateSnapshotRequest . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Parameter
Returns
Overrides
toBuilder()
public CreateSnapshotRequest . Builder toBuilder ()
Returns
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Parameter
Overrides
Exceptions
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-01 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-02-01 UTC."],[],[]]