public static final class CreateSnapshotRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder> implements CreateSnapshotRequestOrBuilder
Request for the `CreateSnapshot` method.Protobuf type
google.pubsub.v1.CreateSnapshotRequest
Modifier and Type | Method and Description |
---|---|
CreateSnapshotRequest.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
CreateSnapshotRequest |
build() |
CreateSnapshotRequest |
buildPartial() |
CreateSnapshotRequest.Builder |
clear() |
CreateSnapshotRequest.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
CreateSnapshotRequest.Builder |
clearLabels() |
CreateSnapshotRequest.Builder |
clearName()
Required.
|
CreateSnapshotRequest.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
CreateSnapshotRequest.Builder |
clearSubscription()
Required.
|
CreateSnapshotRequest.Builder |
clone() |
boolean |
containsLabels(String key)
See [Creating and managing
labels](https://cloud.google.com/pubsub/docs/labels).
|
CreateSnapshotRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
Map<String,String> |
getLabels()
Deprecated.
|
int |
getLabelsCount()
See [Creating and managing
labels](https://cloud.google.com/pubsub/docs/labels).
|
Map<String,String> |
getLabelsMap()
See [Creating and managing
labels](https://cloud.google.com/pubsub/docs/labels).
|
String |
getLabelsOrDefault(String key,
String defaultValue)
See [Creating and managing
labels](https://cloud.google.com/pubsub/docs/labels).
|
String |
getLabelsOrThrow(String key)
See [Creating and managing
labels](https://cloud.google.com/pubsub/docs/labels).
|
Map<String,String> |
getMutableLabels()
Deprecated.
|
String |
getName()
Required.
|
com.google.protobuf.ByteString |
getNameBytes()
Required.
|
String |
getSubscription()
Required.
|
com.google.protobuf.ByteString |
getSubscriptionBytes()
Required.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapField |
internalGetMapField(int number) |
protected com.google.protobuf.MapField |
internalGetMutableMapField(int number) |
boolean |
isInitialized() |
CreateSnapshotRequest.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
CreateSnapshotRequest.Builder |
mergeFrom(CreateSnapshotRequest other) |
CreateSnapshotRequest.Builder |
mergeFrom(com.google.protobuf.Message other) |
CreateSnapshotRequest.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
CreateSnapshotRequest.Builder |
putAllLabels(Map<String,String> values)
See [Creating and managing
labels](https://cloud.google.com/pubsub/docs/labels).
|
CreateSnapshotRequest.Builder |
putLabels(String key,
String value)
See [Creating and managing
labels](https://cloud.google.com/pubsub/docs/labels).
|
CreateSnapshotRequest.Builder |
removeLabels(String key)
See [Creating and managing
labels](https://cloud.google.com/pubsub/docs/labels).
|
CreateSnapshotRequest.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
CreateSnapshotRequest.Builder |
setName(String value)
Required.
|
CreateSnapshotRequest.Builder |
setNameBytes(com.google.protobuf.ByteString value)
Required.
|
CreateSnapshotRequest.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
CreateSnapshotRequest.Builder |
setSubscription(String value)
Required.
|
CreateSnapshotRequest.Builder |
setSubscriptionBytes(com.google.protobuf.ByteString value)
Required.
|
CreateSnapshotRequest.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
internalGetMapField
in class com.google.protobuf.GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder>
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
internalGetMutableMapField
in class com.google.protobuf.GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder>
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder>
public CreateSnapshotRequest.Builder clear()
clear
in interface com.google.protobuf.Message.Builder
clear
in interface com.google.protobuf.MessageLite.Builder
clear
in class com.google.protobuf.GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder>
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.Message.Builder
getDescriptorForType
in interface com.google.protobuf.MessageOrBuilder
getDescriptorForType
in class com.google.protobuf.GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder>
public CreateSnapshotRequest getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public CreateSnapshotRequest build()
build
in interface com.google.protobuf.Message.Builder
build
in interface com.google.protobuf.MessageLite.Builder
public CreateSnapshotRequest buildPartial()
buildPartial
in interface com.google.protobuf.Message.Builder
buildPartial
in interface com.google.protobuf.MessageLite.Builder
public CreateSnapshotRequest.Builder clone()
clone
in interface com.google.protobuf.Message.Builder
clone
in interface com.google.protobuf.MessageLite.Builder
clone
in class com.google.protobuf.GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder>
public CreateSnapshotRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField
in interface com.google.protobuf.Message.Builder
setField
in class com.google.protobuf.GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder>
public CreateSnapshotRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField
in interface com.google.protobuf.Message.Builder
clearField
in class com.google.protobuf.GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder>
public CreateSnapshotRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof
in interface com.google.protobuf.Message.Builder
clearOneof
in class com.google.protobuf.GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder>
public CreateSnapshotRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField
in interface com.google.protobuf.Message.Builder
setRepeatedField
in class com.google.protobuf.GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder>
public CreateSnapshotRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField
in interface com.google.protobuf.Message.Builder
addRepeatedField
in class com.google.protobuf.GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder>
public CreateSnapshotRequest.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<CreateSnapshotRequest.Builder>
public CreateSnapshotRequest.Builder mergeFrom(CreateSnapshotRequest other)
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder>
public CreateSnapshotRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
in interface com.google.protobuf.MessageLite.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<CreateSnapshotRequest.Builder>
IOException
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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format is `projects/{project}/snapshots/{snap}`.
string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
getName
in interface CreateSnapshotRequestOrBuilder
public com.google.protobuf.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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format is `projects/{project}/snapshots/{snap}`.
string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
getNameBytes
in interface CreateSnapshotRequestOrBuilder
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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format is `projects/{project}/snapshots/{snap}`.
string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
value
- The name to set.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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format is `projects/{project}/snapshots/{snap}`.
string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
public CreateSnapshotRequest.Builder setNameBytes(com.google.protobuf.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](https://cloud.google.com/pubsub/docs/admin#resource_names). Format is `projects/{project}/snapshots/{snap}`.
string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
value
- The bytes for name to set.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) = { ... }
getSubscription
in interface CreateSnapshotRequestOrBuilder
public com.google.protobuf.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) = { ... }
getSubscriptionBytes
in interface CreateSnapshotRequestOrBuilder
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) = { ... }
value
- The subscription to set.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) = { ... }
public CreateSnapshotRequest.Builder setSubscriptionBytes(com.google.protobuf.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) = { ... }
value
- The bytes for subscription to set.public int getLabelsCount()
CreateSnapshotRequestOrBuilder
See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 3;
getLabelsCount
in interface CreateSnapshotRequestOrBuilder
public boolean containsLabels(String key)
See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 3;
containsLabels
in interface CreateSnapshotRequestOrBuilder
@Deprecated public Map<String,String> getLabels()
getLabelsMap()
instead.getLabels
in interface CreateSnapshotRequestOrBuilder
public Map<String,String> getLabelsMap()
See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 3;
getLabelsMap
in interface CreateSnapshotRequestOrBuilder
public String getLabelsOrDefault(String key, String defaultValue)
See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 3;
getLabelsOrDefault
in interface CreateSnapshotRequestOrBuilder
public String getLabelsOrThrow(String key)
See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 3;
getLabelsOrThrow
in interface CreateSnapshotRequestOrBuilder
public CreateSnapshotRequest.Builder clearLabels()
public CreateSnapshotRequest.Builder removeLabels(String key)
See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 3;
@Deprecated public Map<String,String> getMutableLabels()
public CreateSnapshotRequest.Builder putLabels(String key, String value)
See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 3;
public CreateSnapshotRequest.Builder putAllLabels(Map<String,String> values)
See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 3;
public final CreateSnapshotRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields
in interface com.google.protobuf.Message.Builder
setUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder>
public final CreateSnapshotRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields
in interface com.google.protobuf.Message.Builder
mergeUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<CreateSnapshotRequest.Builder>
Copyright © 2023 Google LLC. All rights reserved.