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()
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
Type | Description |
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
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
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