Class AdminServiceClient (2.23.0-rc)

The service that a client application uses to manage topics and subscriptions, such creating, listing, and deleting topics and subscriptions.

Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.

Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

Constructors

AdminServiceClient(AdminServiceClient const &)

Copy and move support

Parameter
NameDescription
AdminServiceClient const &

AdminServiceClient(AdminServiceClient &&)

Copy and move support

Parameter
NameDescription
AdminServiceClient &&

AdminServiceClient(std::shared_ptr< AdminServiceConnection >, Options)

Parameters
NameDescription
connection std::shared_ptr< AdminServiceConnection >
opts Options

Operators

operator=(AdminServiceClient const &)

Copy and move support

Parameter
NameDescription
AdminServiceClient const &
Returns
TypeDescription
AdminServiceClient &

operator=(AdminServiceClient &&)

Copy and move support

Parameter
NameDescription
AdminServiceClient &&
Returns
TypeDescription
AdminServiceClient &

Functions

CreateTopic(std::string const &, google::cloud::pubsublite::v1::Topic const &, std::string const &, Options)

Creates a new topic.

Parameters
NameDescription
parent std::string const &

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

topic google::cloud::pubsublite::v1::Topic const &

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

topic_id std::string const &

Required. The ID to use for the topic, which will become the final component of the topic's name.
This value is structured like: my-topic-name.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Topic >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Topic) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateTopic(google::cloud::pubsublite::v1::CreateTopicRequest const &, Options)

Creates a new topic.

Parameters
NameDescription
request google::cloud::pubsublite::v1::CreateTopicRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.CreateTopicRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Topic >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Topic) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetTopic(std::string const &, Options)

Returns the topic configuration.

Parameters
NameDescription
name std::string const &

Required. The name of the topic whose configuration to return.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Topic >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Topic) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetTopic(google::cloud::pubsublite::v1::GetTopicRequest const &, Options)

Returns the topic configuration.

Parameters
NameDescription
request google::cloud::pubsublite::v1::GetTopicRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.GetTopicRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Topic >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Topic) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetTopicPartitions(std::string const &, Options)

Returns the partition information for the requested topic.

Parameters
NameDescription
name std::string const &

Required. The topic whose partition information to return.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::TopicPartitions >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.TopicPartitions) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetTopicPartitions(google::cloud::pubsublite::v1::GetTopicPartitionsRequest const &, Options)

Returns the partition information for the requested topic.

Parameters
NameDescription
request google::cloud::pubsublite::v1::GetTopicPartitionsRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.GetTopicPartitionsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::TopicPartitions >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.TopicPartitions) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListTopics(std::string const &, Options)

Returns the list of topics for the given project.

Parameters
NameDescription
parent std::string const &

Required. The parent whose topics are to be listed. Structured like projects/{project_number}/locations/{location}.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::pubsublite::v1::Topic >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.pubsublite.v1.Topic, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListTopics(google::cloud::pubsublite::v1::ListTopicsRequest, Options)

Returns the list of topics for the given project.

Parameters
NameDescription
request google::cloud::pubsublite::v1::ListTopicsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.ListTopicsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::pubsublite::v1::Topic >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.pubsublite.v1.Topic, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

UpdateTopic(google::cloud::pubsublite::v1::Topic const &, google::protobuf::FieldMask const &, Options)

Updates properties of the specified topic.

Parameters
NameDescription
topic google::cloud::pubsublite::v1::Topic const &

Required. The topic to update. Its name field must be populated.

update_mask google::protobuf::FieldMask const &

Required. A mask specifying the topic fields to change.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Topic >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Topic) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateTopic(google::cloud::pubsublite::v1::UpdateTopicRequest const &, Options)

Updates properties of the specified topic.

Parameters
NameDescription
request google::cloud::pubsublite::v1::UpdateTopicRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.UpdateTopicRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Topic >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Topic) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteTopic(std::string const &, Options)

Deletes the specified topic.

Parameters
NameDescription
name std::string const &

Required. The name of the topic to delete.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteTopic(google::cloud::pubsublite::v1::DeleteTopicRequest const &, Options)

Deletes the specified topic.

Parameters
NameDescription
request google::cloud::pubsublite::v1::DeleteTopicRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.DeleteTopicRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
Status

a Status object. If the request failed, the status contains the details of the failure.

ListTopicSubscriptions(std::string const &, Options)

Lists the subscriptions attached to the specified topic.

Parameters
NameDescription
name std::string const &

Required. The name of the topic whose subscriptions to list.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< std::string >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains a std::string.

ListTopicSubscriptions(google::cloud::pubsublite::v1::ListTopicSubscriptionsRequest, Options)

Lists the subscriptions attached to the specified topic.

Parameters
NameDescription
request google::cloud::pubsublite::v1::ListTopicSubscriptionsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.ListTopicSubscriptionsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< std::string >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains a std::string.

CreateSubscription(std::string const &, google::cloud::pubsublite::v1::Subscription const &, std::string const &, Options)

Creates a new subscription.

Parameters
NameDescription
parent std::string const &

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

subscription google::cloud::pubsublite::v1::Subscription const &

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

subscription_id std::string const &

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.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Subscription >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Subscription) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateSubscription(google::cloud::pubsublite::v1::CreateSubscriptionRequest const &, Options)

Creates a new subscription.

Parameters
NameDescription
request google::cloud::pubsublite::v1::CreateSubscriptionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.CreateSubscriptionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Subscription >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Subscription) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetSubscription(std::string const &, Options)

Returns the subscription configuration.

Parameters
NameDescription
name std::string const &

Required. The name of the subscription whose configuration to return.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Subscription >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Subscription) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetSubscription(google::cloud::pubsublite::v1::GetSubscriptionRequest const &, Options)

Returns the subscription configuration.

Parameters
NameDescription
request google::cloud::pubsublite::v1::GetSubscriptionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.GetSubscriptionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Subscription >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Subscription) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListSubscriptions(std::string const &, Options)

Returns the list of subscriptions for the given project.

Parameters
NameDescription
parent std::string const &

Required. The parent whose subscriptions are to be listed. Structured like projects/{project_number}/locations/{location}.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::pubsublite::v1::Subscription >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.pubsublite.v1.Subscription, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListSubscriptions(google::cloud::pubsublite::v1::ListSubscriptionsRequest, Options)

Returns the list of subscriptions for the given project.

Parameters
NameDescription
request google::cloud::pubsublite::v1::ListSubscriptionsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.ListSubscriptionsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::pubsublite::v1::Subscription >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.pubsublite.v1.Subscription, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

UpdateSubscription(google::cloud::pubsublite::v1::Subscription const &, google::protobuf::FieldMask const &, Options)

Updates properties of the specified subscription.

Parameters
NameDescription
subscription google::cloud::pubsublite::v1::Subscription const &

Required. The subscription to update. Its name field must be populated. Topic field must not be populated.

update_mask google::protobuf::FieldMask const &

Required. A mask specifying the subscription fields to change.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Subscription >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Subscription) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateSubscription(google::cloud::pubsublite::v1::UpdateSubscriptionRequest const &, Options)

Updates properties of the specified subscription.

Parameters
NameDescription
request google::cloud::pubsublite::v1::UpdateSubscriptionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.UpdateSubscriptionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Subscription >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Subscription) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteSubscription(std::string const &, Options)

Deletes the specified subscription.

Parameters
NameDescription
name std::string const &

Required. The name of the subscription to delete.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteSubscription(google::cloud::pubsublite::v1::DeleteSubscriptionRequest const &, Options)

Deletes the specified subscription.

Parameters
NameDescription
request google::cloud::pubsublite::v1::DeleteSubscriptionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.DeleteSubscriptionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
Status

a Status object. If the request failed, the status contains the details of the failure.

SeekSubscription(google::cloud::pubsublite::v1::SeekSubscriptionRequest const &, Options)

Performs an out-of-band seek for a subscription to a specified target, which may be timestamps or named positions within the message backlog.

Seek translates these targets to cursors for each partition and orchestrates subscribers to start consuming messages from these seek cursors.

If an operation is returned, the seek has been registered and subscribers will eventually receive messages from the seek cursors (i.e. eventual consistency), as long as they are using a minimum supported client library version and not a system that tracks cursors independently of Pub/Sub Lite (e.g. Apache Beam, Dataflow, Spark). The seek operation will fail for unsupported clients.

If clients would like to know when subscribers react to the seek (or not), they can poll the operation. The seek operation will succeed and complete once subscribers are ready to receive messages from the seek cursors for all partitions of the topic. This means that the seek operation will not complete until all subscribers come online.

If the previous seek operation has not yet completed, it will be aborted and the new invocation of seek will supersede it.

Parameters
NameDescription
request google::cloud::pubsublite::v1::SeekSubscriptionRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.SeekSubscriptionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::pubsublite::v1::SeekSubscriptionResponse > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.pubsublite.v1.SeekSubscriptionResponse proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

CreateReservation(std::string const &, google::cloud::pubsublite::v1::Reservation const &, std::string const &, Options)

Creates a new reservation.

Parameters
NameDescription
parent std::string const &

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

reservation google::cloud::pubsublite::v1::Reservation const &

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

reservation_id std::string const &

Required. The ID to use for the reservation, which will become the final component of the reservation's name.
This value is structured like: my-reservation-name.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Reservation >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Reservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateReservation(google::cloud::pubsublite::v1::CreateReservationRequest const &, Options)

Creates a new reservation.

Parameters
NameDescription
request google::cloud::pubsublite::v1::CreateReservationRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.CreateReservationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Reservation >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Reservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetReservation(std::string const &, Options)

Returns the reservation configuration.

Parameters
NameDescription
name std::string const &

Required. The name of the reservation whose configuration to return. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Reservation >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Reservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetReservation(google::cloud::pubsublite::v1::GetReservationRequest const &, Options)

Returns the reservation configuration.

Parameters
NameDescription
request google::cloud::pubsublite::v1::GetReservationRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.GetReservationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Reservation >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Reservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListReservations(std::string const &, Options)

Returns the list of reservations for the given project.

Parameters
NameDescription
parent std::string const &

Required. The parent whose reservations are to be listed. Structured like projects/{project_number}/locations/{location}.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::pubsublite::v1::Reservation >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.pubsublite.v1.Reservation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListReservations(google::cloud::pubsublite::v1::ListReservationsRequest, Options)

Returns the list of reservations for the given project.

Parameters
NameDescription
request google::cloud::pubsublite::v1::ListReservationsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.ListReservationsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::pubsublite::v1::Reservation >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.pubsublite.v1.Reservation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

UpdateReservation(google::cloud::pubsublite::v1::Reservation const &, google::protobuf::FieldMask const &, Options)

Updates properties of the specified reservation.

Parameters
NameDescription
reservation google::cloud::pubsublite::v1::Reservation const &

Required. The reservation to update. Its name field must be populated.

update_mask google::protobuf::FieldMask const &

Required. A mask specifying the reservation fields to change.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Reservation >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Reservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateReservation(google::cloud::pubsublite::v1::UpdateReservationRequest const &, Options)

Updates properties of the specified reservation.

Parameters
NameDescription
request google::cloud::pubsublite::v1::UpdateReservationRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.UpdateReservationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::pubsublite::v1::Reservation >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.Reservation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteReservation(std::string const &, Options)

Deletes the specified reservation.

Parameters
NameDescription
name std::string const &

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

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteReservation(google::cloud::pubsublite::v1::DeleteReservationRequest const &, Options)

Deletes the specified reservation.

Parameters
NameDescription
request google::cloud::pubsublite::v1::DeleteReservationRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.DeleteReservationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
Status

a Status object. If the request failed, the status contains the details of the failure.

ListReservationTopics(std::string const &, Options)

Lists the topics attached to the specified reservation.

Parameters
NameDescription
name std::string const &

Required. The name of the reservation whose topics to list. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< std::string >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains a std::string.

ListReservationTopics(google::cloud::pubsublite::v1::ListReservationTopicsRequest, Options)

Lists the topics attached to the specified reservation.

Parameters
NameDescription
request google::cloud::pubsublite::v1::ListReservationTopicsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.ListReservationTopicsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< std::string >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains a std::string.

AsyncGetTopicPartitions(std::string const &, Options)

Returns the partition information for the requested topic.

Parameters
NameDescription
name std::string const &

Required. The topic whose partition information to return.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::pubsublite::v1::TopicPartitions > >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.TopicPartitions) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

AsyncGetTopicPartitions(google::cloud::pubsublite::v1::GetTopicPartitionsRequest const &, Options)

Returns the partition information for the requested topic.

Parameters
NameDescription
request google::cloud::pubsublite::v1::GetTopicPartitionsRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.pubsublite.v1.GetTopicPartitionsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
future< StatusOr< google::cloud::pubsublite::v1::TopicPartitions > >

the result of the RPC. The response message type (google.cloud.pubsublite.v1.TopicPartitions) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.