public static final class CreateSnapshotRequest.Builder extends GeneratedMessage.Builder<CreateSnapshotRequest.Builder> implements CreateSnapshotRequestOrBuilder Request for the CreateSnapshot method.
Protobuf type google.pubsub.v1.CreateSnapshotRequest
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > CreateSnapshotRequest.BuilderImplements
CreateSnapshotRequestOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public CreateSnapshotRequest build()| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest |
|
buildPartial()
public CreateSnapshotRequest buildPartial()| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest |
|
clear()
public CreateSnapshotRequest.Builder clear()| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
|
clearLabels()
public CreateSnapshotRequest.Builder clearLabels()| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
|
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 resource name
rules.
Format is projects/{project}/snapshots/{snap}.
string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
This builder for chaining. |
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 | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
This builder for chaining. |
clearTags()
public CreateSnapshotRequest.Builder clearTags()| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
|
containsLabels(String key)
public boolean containsLabels(String key)Optional. See Creating and managing labels.
map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
containsTags(String key)
public boolean containsTags(String key)Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https://docs.cloud.google.com/pubsub/docs/tags for more information on using tags with Pub/Sub resources.
map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getDefaultInstanceForType()
public CreateSnapshotRequest getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getLabels() (deprecated)
public Map<String,String> getLabels()Use #getLabelsMap() instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,String> |
|
getLabelsCount()
public int getLabelsCount()Optional. See Creating and managing labels.
map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
|
getLabelsMap()
public Map<String,String> getLabelsMap()Optional. See Creating and managing labels.
map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Map<String,String> |
|
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, String defaultValue)Optional. See Creating and managing labels.
map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
key |
String |
defaultValue |
String |
| Returns | |
|---|---|
| Type | Description |
String |
|
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)Optional. See Creating and managing labels.
map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
String |
|
getMutableLabels() (deprecated)
public Map<String,String> getMutableLabels()Use alternate mutation accessors instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,String> |
|
getMutableTags() (deprecated)
public Map<String,String> getMutableTags()Use alternate mutation accessors instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,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 resource name
rules.
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 resource name
rules.
Format is projects/{project}/snapshots/{snap}.
string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for name. |
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. |
getTags() (deprecated)
public Map<String,String> getTags()Use #getTagsMap() instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,String> |
|
getTagsCount()
public int getTagsCount()Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https://docs.cloud.google.com/pubsub/docs/tags for more information on using tags with Pub/Sub resources.
map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
|
getTagsMap()
public Map<String,String> getTagsMap()Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https://docs.cloud.google.com/pubsub/docs/tags for more information on using tags with Pub/Sub resources.
map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Map<String,String> |
|
getTagsOrDefault(String key, String defaultValue)
public String getTagsOrDefault(String key, String defaultValue)Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https://docs.cloud.google.com/pubsub/docs/tags for more information on using tags with Pub/Sub resources.
map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
key |
String |
defaultValue |
String |
| Returns | |
|---|---|
| Type | Description |
String |
|
getTagsOrThrow(String key)
public String getTagsOrThrow(String key)Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https://docs.cloud.google.com/pubsub/docs/tags for more information on using tags with Pub/Sub resources.
map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
String |
|
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
internalGetMutableMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public CreateSnapshotRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public CreateSnapshotRequest.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
|
mergeFrom(CreateSnapshotRequest other)
public CreateSnapshotRequest.Builder mergeFrom(CreateSnapshotRequest other)| Parameter | |
|---|---|
| Name | Description |
other |
CreateSnapshotRequest |
| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
|
putAllLabels(Map<String,String> values)
public CreateSnapshotRequest.Builder putAllLabels(Map<String,String> values)Optional. See Creating and managing labels.
map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
values |
Map<String,String> |
| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
|
putAllTags(Map<String,String> values)
public CreateSnapshotRequest.Builder putAllTags(Map<String,String> values)Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https://docs.cloud.google.com/pubsub/docs/tags for more information on using tags with Pub/Sub resources.
map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
values |
Map<String,String> |
| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
|
putLabels(String key, String value)
public CreateSnapshotRequest.Builder putLabels(String key, String value)Optional. See Creating and managing labels.
map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
key |
String |
value |
String |
| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
|
putTags(String key, String value)
public CreateSnapshotRequest.Builder putTags(String key, String value)Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https://docs.cloud.google.com/pubsub/docs/tags for more information on using tags with Pub/Sub resources.
map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
key |
String |
value |
String |
| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
|
removeLabels(String key)
public CreateSnapshotRequest.Builder removeLabels(String key)Optional. See Creating and managing labels.
map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
|
removeTags(String key)
public CreateSnapshotRequest.Builder removeTags(String key)Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" See https://docs.cloud.google.com/pubsub/docs/tags for more information on using tags with Pub/Sub resources.
map<string, string> tags = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
|
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 resource name
rules.
Format is projects/{project}/snapshots/{snap}.
string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe name to set. |
| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
This builder for chaining. |
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 resource name
rules.
Format is projects/{project}/snapshots/{snap}.
string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for name to set. |
| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
This builder for chaining. |
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 |
StringThe subscription to set. |
| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
This builder for chaining. |
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 |
ByteStringThe bytes for subscription to set. |
| Returns | |
|---|---|
| Type | Description |
CreateSnapshotRequest.Builder |
This builder for chaining. |