Class: Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/essentialcontacts_v1/classes.rb,
lib/google/apis/essentialcontacts_v1/representations.rb,
lib/google/apis/essentialcontacts_v1/representations.rb

Overview

A contact that will receive notifications from Google Cloud.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudEssentialcontactsV1Contact

Returns a new instance of GoogleCloudEssentialcontactsV1Contact.



98
99
100
# File 'lib/google/apis/essentialcontacts_v1/classes.rb', line 98

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#emailString

Required. The email address to send notifications to. The email address does not need to be a Google Account. Corresponds to the JSON property email

Returns:

  • (String)


63
64
65
# File 'lib/google/apis/essentialcontacts_v1/classes.rb', line 63

def email
  @email
end

#language_tagString

Required. The preferred language for notifications, as a ISO 639-1 language code. See Supported languages for a list of supported languages. Corresponds to the JSON property languageTag

Returns:

  • (String)


71
72
73
# File 'lib/google/apis/essentialcontacts_v1/classes.rb', line 71

def language_tag
  @language_tag
end

#nameString

Output only. The identifier for the contact. Format: resource_type/ resource_id/contacts/contact_id Corresponds to the JSON property name

Returns:

  • (String)


77
78
79
# File 'lib/google/apis/essentialcontacts_v1/classes.rb', line 77

def name
  @name
end

#notification_category_subscriptionsArray<String>

Required. The categories of notifications that the contact will receive communications for. Corresponds to the JSON property notificationCategorySubscriptions

Returns:

  • (Array<String>)


83
84
85
# File 'lib/google/apis/essentialcontacts_v1/classes.rb', line 83

def notification_category_subscriptions
  @notification_category_subscriptions
end

#validate_timeString

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. Corresponds to the JSON property validateTime

Returns:

  • (String)


90
91
92
# File 'lib/google/apis/essentialcontacts_v1/classes.rb', line 90

def validate_time
  @validate_time
end

#validation_stateString

The validity of the contact. A contact is considered valid if it is the correct recipient for notifications for a particular resource. Corresponds to the JSON property validationState

Returns:

  • (String)


96
97
98
# File 'lib/google/apis/essentialcontacts_v1/classes.rb', line 96

def validation_state
  @validation_state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



103
104
105
106
107
108
109
110
# File 'lib/google/apis/essentialcontacts_v1/classes.rb', line 103

def update!(**args)
  @email = args[:email] if args.key?(:email)
  @language_tag = args[:language_tag] if args.key?(:language_tag)
  @name = args[:name] if args.key?(:name)
  @notification_category_subscriptions = args[:notification_category_subscriptions] if args.key?(:notification_category_subscriptions)
  @validate_time = args[:validate_time] if args.key?(:validate_time)
  @validation_state = args[:validation_state] if args.key?(:validation_state)
end