Google Cloud Pub/Sub C++ Client 2.13.0
A C++ Client Library for Google Cloud Pub/Sub
|
Service for doing schema-related operations. More...
#include <google/cloud/pubsub/schema_client.h>
Public Member Functions | |
SchemaServiceClient (std::shared_ptr< SchemaServiceConnection > connection, Options opts={}) | |
~SchemaServiceClient () | |
StatusOr< google::pubsub::v1::Schema > | CreateSchema (std::string const &parent, google::pubsub::v1::Schema const &schema, std::string const &schema_id, Options opts={}) |
Creates a schema. More... | |
StatusOr< google::pubsub::v1::Schema > | CreateSchema (google::pubsub::v1::CreateSchemaRequest const &request, Options opts={}) |
Creates a schema. More... | |
StatusOr< google::pubsub::v1::Schema > | GetSchema (std::string const &name, Options opts={}) |
Gets a schema. More... | |
StatusOr< google::pubsub::v1::Schema > | GetSchema (google::pubsub::v1::GetSchemaRequest const &request, Options opts={}) |
Gets a schema. More... | |
StreamRange< google::pubsub::v1::Schema > | ListSchemas (std::string const &parent, Options opts={}) |
Lists schemas in a project. More... | |
StreamRange< google::pubsub::v1::Schema > | ListSchemas (google::pubsub::v1::ListSchemasRequest request, Options opts={}) |
Lists schemas in a project. More... | |
StreamRange< google::pubsub::v1::Schema > | ListSchemaRevisions (std::string const &name, Options opts={}) |
Lists all schema revisions for the named schema. More... | |
StreamRange< google::pubsub::v1::Schema > | ListSchemaRevisions (google::pubsub::v1::ListSchemaRevisionsRequest request, Options opts={}) |
Lists all schema revisions for the named schema. More... | |
StatusOr< google::pubsub::v1::Schema > | CommitSchema (std::string const &name, google::pubsub::v1::Schema const &schema, Options opts={}) |
Commits a new schema revision to an existing schema. More... | |
StatusOr< google::pubsub::v1::Schema > | CommitSchema (google::pubsub::v1::CommitSchemaRequest const &request, Options opts={}) |
Commits a new schema revision to an existing schema. More... | |
StatusOr< google::pubsub::v1::Schema > | RollbackSchema (std::string const &name, std::string const &revision_id, Options opts={}) |
Creates a new schema revision that is a copy of the provided revision_id. More... | |
StatusOr< google::pubsub::v1::Schema > | RollbackSchema (google::pubsub::v1::RollbackSchemaRequest const &request, Options opts={}) |
Creates a new schema revision that is a copy of the provided revision_id. More... | |
StatusOr< google::pubsub::v1::Schema > | DeleteSchemaRevision (std::string const &name, std::string const &revision_id, Options opts={}) |
Deletes a specific schema revision. More... | |
StatusOr< google::pubsub::v1::Schema > | DeleteSchemaRevision (google::pubsub::v1::DeleteSchemaRevisionRequest const &request, Options opts={}) |
Deletes a specific schema revision. More... | |
Status | DeleteSchema (std::string const &name, Options opts={}) |
Deletes a schema. More... | |
Status | DeleteSchema (google::pubsub::v1::DeleteSchemaRequest const &request, Options opts={}) |
Deletes a schema. More... | |
StatusOr< google::pubsub::v1::ValidateSchemaResponse > | ValidateSchema (std::string const &parent, google::pubsub::v1::Schema const &schema, Options opts={}) |
Validates a schema. More... | |
StatusOr< google::pubsub::v1::ValidateSchemaResponse > | ValidateSchema (google::pubsub::v1::ValidateSchemaRequest const &request, Options opts={}) |
Validates a schema. More... | |
StatusOr< google::pubsub::v1::ValidateMessageResponse > | ValidateMessage (google::pubsub::v1::ValidateMessageRequest const &request, Options opts={}) |
Validates a message against a schema. More... | |
Copy and move support | |
SchemaServiceClient (SchemaServiceClient const &)=default | |
SchemaServiceClient & | operator= (SchemaServiceClient const &)=default |
SchemaServiceClient (SchemaServiceClient &&)=default | |
SchemaServiceClient & | operator= (SchemaServiceClient &&)=default |
Friends | |
Equality | |
bool | operator== (SchemaServiceClient const &a, SchemaServiceClient const &b) |
bool | operator!= (SchemaServiceClient const &a, SchemaServiceClient const &b) |
Service for doing schema-related operations.
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.
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.
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.
|
explicit |
google::cloud::pubsub::SchemaServiceClient::~SchemaServiceClient | ( | ) |
|
default |
|
default |
StatusOr< google::pubsub::v1::Schema > google::cloud::pubsub::SchemaServiceClient::CommitSchema | ( | google::pubsub::v1::CommitSchemaRequest const & | request, |
Options | opts = {} |
||
) |
Commits a new schema revision to an existing schema.
request | 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.pubsub.v1.CommitSchemaRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::pubsub::v1::Schema > google::cloud::pubsub::SchemaServiceClient::CommitSchema | ( | std::string const & | name, |
google::pubsub::v1::Schema const & | schema, | ||
Options | opts = {} |
||
) |
Commits a new schema revision to an existing schema.
name | Required. The name of the schema we are revising. Format is projects/{project}/schemas/{schema} . |
schema | Required. The schema revision to commit. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::pubsub::v1::Schema > google::cloud::pubsub::SchemaServiceClient::CreateSchema | ( | google::pubsub::v1::CreateSchemaRequest const & | request, |
Options | opts = {} |
||
) |
Creates a schema.
request | 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.pubsub.v1.CreateSchemaRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::pubsub::v1::Schema > google::cloud::pubsub::SchemaServiceClient::CreateSchema | ( | std::string const & | parent, |
google::pubsub::v1::Schema const & | schema, | ||
std::string const & | schema_id, | ||
Options | opts = {} |
||
) |
Creates a schema.
parent | Required. The name of the project in which to create the schema. Format is projects/{project-id} . |
schema | Required. The schema object to create. This schema's name parameter is ignored. The schema object returned by CreateSchema will have a name made using the given parent and schema_id . |
schema_id | The ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name constraints. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
Status google::cloud::pubsub::SchemaServiceClient::DeleteSchema | ( | google::pubsub::v1::DeleteSchemaRequest const & | request, |
Options | opts = {} |
||
) |
Deletes a schema.
request | 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.pubsub.v1.DeleteSchemaRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
Status google::cloud::pubsub::SchemaServiceClient::DeleteSchema | ( | std::string const & | name, |
Options | opts = {} |
||
) |
Deletes a schema.
name | Required. Name of the schema to delete. Format is projects/{project}/schemas/{schema} . |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::pubsub::v1::Schema > google::cloud::pubsub::SchemaServiceClient::DeleteSchemaRevision | ( | google::pubsub::v1::DeleteSchemaRevisionRequest const & | request, |
Options | opts = {} |
||
) |
Deletes a specific schema revision.
request | 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.pubsub.v1.DeleteSchemaRevisionRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::pubsub::v1::Schema > google::cloud::pubsub::SchemaServiceClient::DeleteSchemaRevision | ( | std::string const & | name, |
std::string const & | revision_id, | ||
Options | opts = {} |
||
) |
Deletes a specific schema revision.
name | Required. The name of the schema revision to be deleted, with a revision ID explicitly included. Example: projects/123/schemas/my-schema@c7cfa2a8 |
revision_id | Optional. This field is deprecated and should not be used for specifying the revision ID. The revision ID should be specified via the name parameter. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::pubsub::v1::Schema > google::cloud::pubsub::SchemaServiceClient::GetSchema | ( | google::pubsub::v1::GetSchemaRequest const & | request, |
Options | opts = {} |
||
) |
Gets a schema.
request | 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.pubsub.v1.GetSchemaRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::pubsub::v1::Schema > google::cloud::pubsub::SchemaServiceClient::GetSchema | ( | std::string const & | name, |
Options | opts = {} |
||
) |
Gets a schema.
name | Required. The name of the schema to get. Format is projects/{project}/schemas/{schema} . |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StreamRange< google::pubsub::v1::Schema > google::cloud::pubsub::SchemaServiceClient::ListSchemaRevisions | ( | google::pubsub::v1::ListSchemaRevisionsRequest | request, |
Options | opts = {} |
||
) |
Lists all schema revisions for the named schema.
request | 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.pubsub.v1.ListSchemaRevisionsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.pubsub.v1.Schema, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules. StreamRange< google::pubsub::v1::Schema > google::cloud::pubsub::SchemaServiceClient::ListSchemaRevisions | ( | std::string const & | name, |
Options | opts = {} |
||
) |
Lists all schema revisions for the named schema.
name | Required. The name of the schema to list revisions for. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.pubsub.v1.Schema, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules. StreamRange< google::pubsub::v1::Schema > google::cloud::pubsub::SchemaServiceClient::ListSchemas | ( | google::pubsub::v1::ListSchemasRequest | request, |
Options | opts = {} |
||
) |
Lists schemas in a project.
request | 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.pubsub.v1.ListSchemasRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.pubsub.v1.Schema, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules. StreamRange< google::pubsub::v1::Schema > google::cloud::pubsub::SchemaServiceClient::ListSchemas | ( | std::string const & | parent, |
Options | opts = {} |
||
) |
Lists schemas in a project.
parent | Required. The name of the project in which to list schemas. Format is projects/{project-id} . |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
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.pubsub.v1.Schema, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.
|
default |
|
default |
StatusOr< google::pubsub::v1::Schema > google::cloud::pubsub::SchemaServiceClient::RollbackSchema | ( | google::pubsub::v1::RollbackSchemaRequest const & | request, |
Options | opts = {} |
||
) |
Creates a new schema revision that is a copy of the provided revision_id.
request | 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.pubsub.v1.RollbackSchemaRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::pubsub::v1::Schema > google::cloud::pubsub::SchemaServiceClient::RollbackSchema | ( | std::string const & | name, |
std::string const & | revision_id, | ||
Options | opts = {} |
||
) |
Creates a new schema revision that is a copy of the provided revision_id.
name | Required. The schema being rolled back with revision id. |
revision_id | Required. The revision ID to roll back to. It must be a revision of the same schema. Example: c7cfa2a8 |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::pubsub::v1::ValidateMessageResponse > google::cloud::pubsub::SchemaServiceClient::ValidateMessage | ( | google::pubsub::v1::ValidateMessageRequest const & | request, |
Options | opts = {} |
||
) |
Validates a message against a schema.
request | 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.pubsub.v1.ValidateMessageRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::pubsub::v1::ValidateSchemaResponse > google::cloud::pubsub::SchemaServiceClient::ValidateSchema | ( | google::pubsub::v1::ValidateSchemaRequest const & | request, |
Options | opts = {} |
||
) |
Validates a schema.
request | 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.pubsub.v1.ValidateSchemaRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
StatusOr< google::pubsub::v1::ValidateSchemaResponse > google::cloud::pubsub::SchemaServiceClient::ValidateSchema | ( | std::string const & | parent, |
google::pubsub::v1::Schema const & | schema, | ||
Options | opts = {} |
||
) |
Validates a schema.
parent | Required. The name of the project in which to validate schemas. Format is projects/{project-id} . |
schema | Required. The schema object to validate. |
opts | Optional. Override the class-level options, such as retry and backoff policies. |
|
friend |
|
friend |