Class Reservation.Builder (1.10.0)

public static final class Reservation.Builder extends GeneratedMessageV3.Builder<Reservation.Builder> implements ReservationOrBuilder

Metadata about a reservation resource.

Protobuf type google.cloud.pubsublite.v1.Reservation

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Reservation build()
Returns
TypeDescription
Reservation

buildPartial()

public Reservation buildPartial()
Returns
TypeDescription
Reservation

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public Reservation.Builder clearName()

The name of the reservation. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}

string name = 1;

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Reservation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Reservation.Builder
Overrides

clearThroughputCapacity()

public Reservation.Builder clearThroughputCapacity()

The reserved throughput capacity. Every unit of throughput capacity is equivalent to 1 MiB/s of published messages or 2 MiB/s of subscribed messages. Any topics which are declared as using capacity from a Reservation will consume resources from this reservation instead of being charged individually.

int64 throughput_capacity = 2;

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public Reservation getDefaultInstanceForType()
Returns
TypeDescription
Reservation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getName()

public String getName()

The name of the reservation. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the reservation. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getThroughputCapacity()

public long getThroughputCapacity()

The reserved throughput capacity. Every unit of throughput capacity is equivalent to 1 MiB/s of published messages or 2 MiB/s of subscribed messages. Any topics which are declared as using capacity from a Reservation will consume resources from this reservation instead of being charged individually.

int64 throughput_capacity = 2;

Returns
TypeDescription
long

The throughputCapacity.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Reservation other)

public Reservation.Builder mergeFrom(Reservation other)
Parameter
NameDescription
otherReservation
Returns
TypeDescription
Reservation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public Reservation.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Reservation.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Reservation.Builder setName(String value)

The name of the reservation. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Reservation.Builder setNameBytes(ByteString value)

The name of the reservation. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

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

public Reservation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Reservation.Builder
Overrides

setThroughputCapacity(long value)

public Reservation.Builder setThroughputCapacity(long value)

The reserved throughput capacity. Every unit of throughput capacity is equivalent to 1 MiB/s of published messages or 2 MiB/s of subscribed messages. Any topics which are declared as using capacity from a Reservation will consume resources from this reservation instead of being charged individually.

int64 throughput_capacity = 2;

Parameter
NameDescription
valuelong

The throughputCapacity to set.

Returns
TypeDescription
Reservation.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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