Class CreateSnapshotRequest (1.121.1)

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
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

SUBSCRIPTION_FIELD_NUMBER

public static final int SUBSCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static CreateSnapshotRequest getDefaultInstance()
Returns
TypeDescription
CreateSnapshotRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static CreateSnapshotRequest.Builder newBuilder()
Returns
TypeDescription
CreateSnapshotRequest.Builder

newBuilder(CreateSnapshotRequest prototype)

public static CreateSnapshotRequest.Builder newBuilder(CreateSnapshotRequest prototype)
Parameter
NameDescription
prototypeCreateSnapshotRequest
Returns
TypeDescription
CreateSnapshotRequest.Builder

parseDelimitedFrom(InputStream input)

public static CreateSnapshotRequest parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CreateSnapshotRequest
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CreateSnapshotRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateSnapshotRequest
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static CreateSnapshotRequest parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
CreateSnapshotRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CreateSnapshotRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateSnapshotRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CreateSnapshotRequest parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
CreateSnapshotRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CreateSnapshotRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateSnapshotRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CreateSnapshotRequest parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
CreateSnapshotRequest
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CreateSnapshotRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateSnapshotRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static CreateSnapshotRequest parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CreateSnapshotRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CreateSnapshotRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateSnapshotRequest
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static CreateSnapshotRequest parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
CreateSnapshotRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CreateSnapshotRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateSnapshotRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<CreateSnapshotRequest> parser()
Returns
TypeDescription
Parser<CreateSnapshotRequest>

Methods

containsLabels(String key)

public boolean containsLabels(String key)

See <a href="https://cloud.google.com/pubsub/docs/labels">; Creating and managing labels</a>.

map<string, string> labels = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public CreateSnapshotRequest getDefaultInstanceForType()
Returns
TypeDescription
CreateSnapshotRequest

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

See <a href="https://cloud.google.com/pubsub/docs/labels">; Creating and managing labels</a>.

map<string, string> labels = 3;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

See <a href="https://cloud.google.com/pubsub/docs/labels">; Creating and managing labels</a>.

map<string, string> labels = 3;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

See <a href="https://cloud.google.com/pubsub/docs/labels">; Creating and managing labels</a>.

map<string, string> labels = 3;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

See <a href="https://cloud.google.com/pubsub/docs/labels">; Creating and managing labels</a>.

map<string, string> labels = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getName()

public String getName()

Required. User-provided name for this snapshot. If the name is not provided in the request, the server will assign a random name for this snapshot on the same project as the subscription. Note that for REST API requests, you must specify a name. See the <a href="https://cloud.google.com/pubsub/docs/admin#resource_names">; resource name rules</a>. Format is projects/{project}/snapshots/{snap}.

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. User-provided name for this snapshot. If the name is not provided in the request, the server will assign a random name for this snapshot on the same project as the subscription. Note that for REST API requests, you must specify a name. See the <a href="https://cloud.google.com/pubsub/docs/admin#resource_names">; resource name rules</a>. Format is projects/{project}/snapshots/{snap}.

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<CreateSnapshotRequest> getParserForType()
Returns
TypeDescription
Parser<CreateSnapshotRequest>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
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
TypeDescription
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
TypeDescription
ByteString

The bytes for subscription.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public CreateSnapshotRequest.Builder newBuilderForType()
Returns
TypeDescription
CreateSnapshotRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CreateSnapshotRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
CreateSnapshotRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public CreateSnapshotRequest.Builder toBuilder()
Returns
TypeDescription
CreateSnapshotRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException