public static final class CreateSnapshotRequest.Builder extends GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder> implements CreateSnapshotRequestOrBuilder
Request for the CreateSnapshot
method.
Protobuf type google.pubsub.v1.CreateSnapshotRequest
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public CreateSnapshotRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public CreateSnapshotRequest build()
Returns
buildPartial()
public CreateSnapshotRequest buildPartial()
Returns
clear()
public CreateSnapshotRequest.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public CreateSnapshotRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearLabels()
public CreateSnapshotRequest.Builder clearLabels()
Returns
clearName()
public CreateSnapshotRequest.Builder clearName()
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
clearOneof(Descriptors.OneofDescriptor oneof)
public CreateSnapshotRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearSubscription()
public CreateSnapshotRequest.Builder clearSubscription()
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
clone()
public CreateSnapshotRequest.Builder clone()
Returns
Overrides
containsLabels(String key)
public boolean containsLabels(String key)
Parameter
Returns
getDefaultInstanceForType()
public CreateSnapshotRequest getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
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
getMutableLabels()
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
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
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.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
public CreateSnapshotRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public CreateSnapshotRequest.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeFrom(CreateSnapshotRequest other)
public CreateSnapshotRequest.Builder mergeFrom(CreateSnapshotRequest other)
Parameter
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final CreateSnapshotRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
putAllLabels(Map<String,String> values)
public CreateSnapshotRequest.Builder putAllLabels(Map<String,String> values)
Parameter
Returns
putLabels(String key, String value)
public CreateSnapshotRequest.Builder putLabels(String key, String value)
Parameters
Returns
removeLabels(String key)
public CreateSnapshotRequest.Builder removeLabels(String key)
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public CreateSnapshotRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setName(String value)
public CreateSnapshotRequest.Builder setName(String value)
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) = { ... }
Parameter
Name | Description |
value | String
The name to set.
|
Returns
setNameBytes(ByteString value)
public CreateSnapshotRequest.Builder setNameBytes(ByteString value)
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) = { ... }
Parameter
Name | Description |
value | ByteString
The bytes for name to set.
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public CreateSnapshotRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setSubscription(String value)
public CreateSnapshotRequest.Builder setSubscription(String value)
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) = { ... }
Parameter
Name | Description |
value | String
The subscription to set.
|
Returns
setSubscriptionBytes(ByteString value)
public CreateSnapshotRequest.Builder setSubscriptionBytes(ByteString value)
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) = { ... }
Parameter
Name | Description |
value | ByteString
The bytes for subscription to set.
|
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final CreateSnapshotRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides