Google Cloud Essential Contacts V1 Client - Class Contact (0.2.13)

Reference documentation and code samples for the Google Cloud Essential Contacts V1 Client class Contact.

A contact that will receive notifications from Google Cloud.

Generated from protobuf message google.cloud.essentialcontacts.v1.Contact

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

The identifier for the contact. Format: {resource_type}/{resource_id}/contacts/{contact_id}

↳ email string

Required. The email address to send notifications to. This does not need to be a Google account.

↳ notification_category_subscriptions array

The categories of notifications that the contact will receive communications for.

↳ language_tag string

The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.

↳ validation_state int

The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.

↳ validate_time Google\Protobuf\Timestamp

The last time the validation_state was updated, either manually or automatically. A contact is considered stale if its validation state was updated more than 1 year ago.

getName

The identifier for the contact.

Format: {resource_type}/{resource_id}/contacts/{contact_id}

Returns
TypeDescription
string

setName

The identifier for the contact.

Format: {resource_type}/{resource_id}/contacts/{contact_id}

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getEmail

Required. The email address to send notifications to. This does not need to be a Google account.

Returns
TypeDescription
string

setEmail

Required. The email address to send notifications to. This does not need to be a Google account.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getNotificationCategorySubscriptions

The categories of notifications that the contact will receive communications for.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setNotificationCategorySubscriptions

The categories of notifications that the contact will receive communications for.

Parameter
NameDescription
var int[]
Returns
TypeDescription
$this

getLanguageTag

The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.

Returns
TypeDescription
string

setLanguageTag

The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getValidationState

The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.

Returns
TypeDescription
int

setValidationState

The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getValidateTime

The last time the validation_state was updated, either manually or automatically. A contact is considered stale if its validation state was updated more than 1 year ago.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasValidateTime

clearValidateTime

setValidateTime

The last time the validation_state was updated, either manually or automatically. A contact is considered stale if its validation state was updated more than 1 year ago.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this