Manages contacts for important Google Cloud notifications.
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
EssentialContactsServiceClient(EssentialContactsServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
EssentialContactsServiceClient const &
|
EssentialContactsServiceClient(EssentialContactsServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
EssentialContactsServiceClient &&
|
EssentialContactsServiceClient(std::shared_ptr< EssentialContactsServiceConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< EssentialContactsServiceConnection >
|
opts |
Options
|
Operators
operator=(EssentialContactsServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
EssentialContactsServiceClient const &
|
Returns | |
---|---|
Type | Description |
EssentialContactsServiceClient & |
operator=(EssentialContactsServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
EssentialContactsServiceClient &&
|
Returns | |
---|---|
Type | Description |
EssentialContactsServiceClient & |
Functions
CreateContact(std::string const &, google::cloud::essentialcontacts::v1::Contact const &, Options)
Adds a new contact for a resource.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The resource to save this contact for. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id} |
contact |
google::cloud::essentialcontacts::v1::Contact const &
Required. The contact to create. Must specify an email address and language tag. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::essentialcontacts::v1::Contact > |
the result of the RPC. The response message type (google.cloud.essentialcontacts.v1.Contact) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateContact(google::cloud::essentialcontacts::v1::CreateContactRequest const &, Options)
Adds a new contact for a resource.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::essentialcontacts::v1::CreateContactRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::essentialcontacts::v1::Contact > |
the result of the RPC. The response message type (google.cloud.essentialcontacts.v1.Contact) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateContact(google::cloud::essentialcontacts::v1::Contact const &, google::protobuf::FieldMask const &, Options)
Updates a contact.
Note: A contact's email address cannot be changed.
Parameters | |
---|---|
Name | Description |
contact |
google::cloud::essentialcontacts::v1::Contact const &
Required. The contact resource to replace the existing saved contact. Note: the email address of the contact cannot be modified. |
update_mask |
google::protobuf::FieldMask const &
Optional. The update mask applied to the resource. For the |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::essentialcontacts::v1::Contact > |
the result of the RPC. The response message type (google.cloud.essentialcontacts.v1.Contact) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateContact(google::cloud::essentialcontacts::v1::UpdateContactRequest const &, Options)
Updates a contact.
Note: A contact's email address cannot be changed.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::essentialcontacts::v1::UpdateContactRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::essentialcontacts::v1::Contact > |
the result of the RPC. The response message type (google.cloud.essentialcontacts.v1.Contact) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListContacts(std::string const &, Options)
Lists the contacts that have been set on a resource.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The parent resource name. Format: organizations/{organization_id}, folders/{folder_id} or projects/{project_id} |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::essentialcontacts::v1::Contact > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListContacts(google::cloud::essentialcontacts::v1::ListContactsRequest, Options)
Lists the contacts that have been set on a resource.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::essentialcontacts::v1::ListContactsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::essentialcontacts::v1::Contact > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
GetContact(std::string const &, Options)
Gets a single contact.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The name of the contact to retrieve. Format: organizations/{organization_id}/contacts/{contact_id}, folders/{folder_id}/contacts/{contact_id} or projects/{project_id}/contacts/{contact_id} |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::essentialcontacts::v1::Contact > |
the result of the RPC. The response message type (google.cloud.essentialcontacts.v1.Contact) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetContact(google::cloud::essentialcontacts::v1::GetContactRequest const &, Options)
Gets a single contact.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::essentialcontacts::v1::GetContactRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::essentialcontacts::v1::Contact > |
the result of the RPC. The response message type (google.cloud.essentialcontacts.v1.Contact) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
DeleteContact(std::string const &, Options)
Deletes a contact.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The name of the contact to delete. Format: organizations/{organization_id}/contacts/{contact_id}, folders/{folder_id}/contacts/{contact_id} or projects/{project_id}/contacts/{contact_id} |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
DeleteContact(google::cloud::essentialcontacts::v1::DeleteContactRequest const &, Options)
Deletes a contact.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::essentialcontacts::v1::DeleteContactRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
ComputeContacts(google::cloud::essentialcontacts::v1::ComputeContactsRequest, Options)
Lists all contacts for the resource that are subscribed to the specified notification categories, including contacts inherited from any parent resources.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::essentialcontacts::v1::ComputeContactsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::essentialcontacts::v1::Contact > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
SendTestMessage(google::cloud::essentialcontacts::v1::SendTestMessageRequest const &, Options)
Allows a contact admin to send a test message to contact to verify that it has been configured correctly.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::essentialcontacts::v1::SendTestMessageRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |