Class: Google::Apis::MybusinessnotificationsV1::NotificationSetting
- Inherits:
-
Object
- Object
- Google::Apis::MybusinessnotificationsV1::NotificationSetting
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/mybusinessnotifications_v1/classes.rb,
lib/google/apis/mybusinessnotifications_v1/representations.rb,
lib/google/apis/mybusinessnotifications_v1/representations.rb
Overview
A Google Pub/Sub topic where notifications can be published when a location is updated or has a new review. There will be only one notification setting resource per-account.
Instance Attribute Summary collapse
-
#name ⇒ String
Required.
-
#notification_types ⇒ Array<String>
The types of notifications that will be sent to the Pub/Sub topic.
-
#pubsub_topic ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ NotificationSetting
constructor
A new instance of NotificationSetting.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ NotificationSetting
Returns a new instance of NotificationSetting.
53 54 55 |
# File 'lib/google/apis/mybusinessnotifications_v1/classes.rb', line 53 def initialize(**args) update!(**args) end |
Instance Attribute Details
#name ⇒ String
Required. The resource name this setting is for. This is of the form accounts/
account_id/notificationSetting
.
Corresponds to the JSON property name
35 36 37 |
# File 'lib/google/apis/mybusinessnotifications_v1/classes.rb', line 35 def name @name end |
#notification_types ⇒ Array<String>
The types of notifications that will be sent to the Pub/Sub topic. To stop
receiving notifications entirely, use NotificationSettings.
UpdateNotificationSetting with an empty notification_types or set the
pubsub_topic to an empty string.
Corresponds to the JSON property notificationTypes
43 44 45 |
# File 'lib/google/apis/mybusinessnotifications_v1/classes.rb', line 43 def notification_types @notification_types end |
#pubsub_topic ⇒ String
Optional. The Google Pub/Sub topic that will receive notifications when
locations managed by this account are updated. If unset, no notifications will
be posted. The account mybusiness-api-pubsub@system.gserviceaccount.com must
have at least Publish permissions on the Pub/Sub topic.
Corresponds to the JSON property pubsubTopic
51 52 53 |
# File 'lib/google/apis/mybusinessnotifications_v1/classes.rb', line 51 def pubsub_topic @pubsub_topic end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
58 59 60 61 62 |
# File 'lib/google/apis/mybusinessnotifications_v1/classes.rb', line 58 def update!(**args) @name = args[:name] if args.key?(:name) @notification_types = args[:notification_types] if args.key?(:notification_types) @pubsub_topic = args[:pubsub_topic] if args.key?(:pubsub_topic) end |