Class CreateSubscriptionRequest.Builder (1.7.1)

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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CreateSubscriptionRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CreateSubscriptionRequest.Builder
Overrides

build()

public CreateSubscriptionRequest build()
Returns
TypeDescription
CreateSubscriptionRequest

buildPartial()

public CreateSubscriptionRequest buildPartial()
Returns
TypeDescription
CreateSubscriptionRequest

clear()

public CreateSubscriptionRequest.Builder clear()
Returns
TypeDescription
CreateSubscriptionRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public CreateSubscriptionRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
CreateSubscriptionRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public CreateSubscriptionRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
CreateSubscriptionRequest.Builder

This builder for chaining.

clone()

public CreateSubscriptionRequest.Builder clone()
Returns
TypeDescription
CreateSubscriptionRequest.Builder
Overrides

getDefaultInstanceForType()

public CreateSubscriptionRequest getDefaultInstanceForType()
Returns
TypeDescription
CreateSubscriptionRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the subscription field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CreateSubscriptionRequest other)

public CreateSubscriptionRequest.Builder mergeFrom(CreateSubscriptionRequest other)
Parameter
NameDescription
otherCreateSubscriptionRequest
Returns
TypeDescription
CreateSubscriptionRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CreateSubscriptionRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateSubscriptionRequest.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public CreateSubscriptionRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueSubscription
Returns
TypeDescription
CreateSubscriptionRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CreateSubscriptionRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CreateSubscriptionRequest.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public CreateSubscriptionRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The parent to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for parent to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueboolean

The skipBacklog to set.

Returns
TypeDescription
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
NameDescription
valueSubscription
Returns
TypeDescription
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
NameDescription
builderForValueSubscription.Builder
Returns
TypeDescription
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
NameDescription
valueString

The subscriptionId to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for subscriptionId to set.

Returns
TypeDescription
CreateSubscriptionRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final CreateSubscriptionRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CreateSubscriptionRequest.Builder
Overrides