Class CreateSubscriptionRequest.Builder (1.14.8)

public static final class CreateSubscriptionRequest.Builder extends GeneratedMessageV3.Builder<CreateSubscriptionRequest.Builder> implements CreateSubscriptionRequestOrBuilder

Request for CreateSubscription.

Protobuf type google.cloud.pubsublite.v1.CreateSubscriptionRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CreateSubscriptionRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CreateSubscriptionRequest.Builder
Overrides

build()

public CreateSubscriptionRequest build()
Returns
Type Description
CreateSubscriptionRequest

buildPartial()

public CreateSubscriptionRequest buildPartial()
Returns
Type Description
CreateSubscriptionRequest

clear()

public CreateSubscriptionRequest.Builder clear()
Returns
Type Description
CreateSubscriptionRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public CreateSubscriptionRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CreateSubscriptionRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public CreateSubscriptionRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CreateSubscriptionRequest.Builder
Overrides

clearParent()

public CreateSubscriptionRequest.Builder clearParent()

Required. The parent location in which to create the subscription. Structured like projects/{project_number}/locations/{location}.

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

Returns
Type Description
CreateSubscriptionRequest.Builder

This builder for chaining.

clearSkipBacklog()

public CreateSubscriptionRequest.Builder clearSkipBacklog()

If true, the newly created subscription will only receive messages published after the subscription was created. Otherwise, the entire message backlog will be received on the subscription. Defaults to false.

bool skip_backlog = 4;

Returns
Type Description
CreateSubscriptionRequest.Builder

This builder for chaining.

clearSubscription()

public CreateSubscriptionRequest.Builder clearSubscription()

Required. Configuration of the subscription to create. Its name field is ignored.

.google.cloud.pubsublite.v1.Subscription subscription = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreateSubscriptionRequest.Builder

clearSubscriptionId()

public CreateSubscriptionRequest.Builder clearSubscriptionId()

Required. The ID to use for the subscription, which will become the final component of the subscription's name.

This value is structured like: my-sub-name.

string subscription_id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreateSubscriptionRequest.Builder

This builder for chaining.

clone()

public CreateSubscriptionRequest.Builder clone()
Returns
Type Description
CreateSubscriptionRequest.Builder
Overrides

getDefaultInstanceForType()

public CreateSubscriptionRequest getDefaultInstanceForType()
Returns
Type Description
CreateSubscriptionRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getParent()

public String getParent()

Required. The parent location in which to create the subscription. Structured like projects/{project_number}/locations/{location}.

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

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The parent location in which to create the subscription. Structured like projects/{project_number}/locations/{location}.

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

Returns
Type Description
ByteString

The bytes for parent.

getSkipBacklog()

public boolean getSkipBacklog()

If true, the newly created subscription will only receive messages published after the subscription was created. Otherwise, the entire message backlog will be received on the subscription. Defaults to false.

bool skip_backlog = 4;

Returns
Type Description
boolean

The skipBacklog.

getSubscription()

public Subscription getSubscription()

Required. Configuration of the subscription to create. Its name field is ignored.

.google.cloud.pubsublite.v1.Subscription subscription = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Subscription

The subscription.

getSubscriptionBuilder()

public Subscription.Builder getSubscriptionBuilder()

Required. Configuration of the subscription to create. Its name field is ignored.

.google.cloud.pubsublite.v1.Subscription subscription = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Subscription.Builder

getSubscriptionId()

public String getSubscriptionId()

Required. The ID to use for the subscription, which will become the final component of the subscription's name.

This value is structured like: my-sub-name.

string subscription_id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The subscriptionId.

getSubscriptionIdBytes()

public ByteString getSubscriptionIdBytes()

Required. The ID to use for the subscription, which will become the final component of the subscription's name.

This value is structured like: my-sub-name.

string subscription_id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for subscriptionId.

getSubscriptionOrBuilder()

public SubscriptionOrBuilder getSubscriptionOrBuilder()

Required. Configuration of the subscription to create. Its name field is ignored.

.google.cloud.pubsublite.v1.Subscription subscription = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SubscriptionOrBuilder

hasSubscription()

public boolean hasSubscription()

Required. Configuration of the subscription to create. Its name field is ignored.

.google.cloud.pubsublite.v1.Subscription subscription = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the subscription field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CreateSubscriptionRequest other)

public CreateSubscriptionRequest.Builder mergeFrom(CreateSubscriptionRequest other)
Parameter
Name Description
other CreateSubscriptionRequest
Returns
Type Description
CreateSubscriptionRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CreateSubscriptionRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreateSubscriptionRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CreateSubscriptionRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CreateSubscriptionRequest.Builder
Overrides

mergeSubscription(Subscription value)

public CreateSubscriptionRequest.Builder mergeSubscription(Subscription value)

Required. Configuration of the subscription to create. Its name field is ignored.

.google.cloud.pubsublite.v1.Subscription subscription = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Subscription
Returns
Type Description
CreateSubscriptionRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CreateSubscriptionRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CreateSubscriptionRequest.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public CreateSubscriptionRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CreateSubscriptionRequest.Builder
Overrides

setParent(String value)

public CreateSubscriptionRequest.Builder setParent(String value)

Required. The parent location in which to create the subscription. Structured like projects/{project_number}/locations/{location}.

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

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
CreateSubscriptionRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public CreateSubscriptionRequest.Builder setParentBytes(ByteString value)

Required. The parent location in which to create the subscription. Structured like projects/{project_number}/locations/{location}.

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

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
CreateSubscriptionRequest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CreateSubscriptionRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CreateSubscriptionRequest.Builder
Overrides

setSkipBacklog(boolean value)

public CreateSubscriptionRequest.Builder setSkipBacklog(boolean value)

If true, the newly created subscription will only receive messages published after the subscription was created. Otherwise, the entire message backlog will be received on the subscription. Defaults to false.

bool skip_backlog = 4;

Parameter
Name Description
value boolean

The skipBacklog to set.

Returns
Type Description
CreateSubscriptionRequest.Builder

This builder for chaining.

setSubscription(Subscription value)

public CreateSubscriptionRequest.Builder setSubscription(Subscription value)

Required. Configuration of the subscription to create. Its name field is ignored.

.google.cloud.pubsublite.v1.Subscription subscription = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Subscription
Returns
Type Description
CreateSubscriptionRequest.Builder

setSubscription(Subscription.Builder builderForValue)

public CreateSubscriptionRequest.Builder setSubscription(Subscription.Builder builderForValue)

Required. Configuration of the subscription to create. Its name field is ignored.

.google.cloud.pubsublite.v1.Subscription subscription = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Subscription.Builder
Returns
Type Description
CreateSubscriptionRequest.Builder

setSubscriptionId(String value)

public CreateSubscriptionRequest.Builder setSubscriptionId(String value)

Required. The ID to use for the subscription, which will become the final component of the subscription's name.

This value is structured like: my-sub-name.

string subscription_id = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The subscriptionId to set.

Returns
Type Description
CreateSubscriptionRequest.Builder

This builder for chaining.

setSubscriptionIdBytes(ByteString value)

public CreateSubscriptionRequest.Builder setSubscriptionIdBytes(ByteString value)

Required. The ID to use for the subscription, which will become the final component of the subscription's name.

This value is structured like: my-sub-name.

string subscription_id = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for subscriptionId to set.

Returns
Type Description
CreateSubscriptionRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final CreateSubscriptionRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CreateSubscriptionRequest.Builder
Overrides