Class: Google::Apis::WorkspaceeventsV1::Subscription
- Inherits:
-
Object
- Object
- Google::Apis::WorkspaceeventsV1::Subscription
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/workspaceevents_v1/classes.rb,
lib/google/apis/workspaceevents_v1/representations.rb,
lib/google/apis/workspaceevents_v1/representations.rb
Overview
A subscription to receive events about a Google Workspace resource. To learn more about subscriptions, see the Google Workspace Events API overview.
Instance Attribute Summary collapse
-
#authority ⇒ String
Output only.
-
#create_time ⇒ String
Output only.
-
#drive_options ⇒ Google::Apis::WorkspaceeventsV1::DriveOptions
Additional supported options for serving Drive events.
-
#etag ⇒ String
Optional.
-
#event_types ⇒ Array<String>
Required.
-
#expire_time ⇒ String
Non-empty default.
-
#name ⇒ String
Identifier.
-
#notification_endpoint ⇒ Google::Apis::WorkspaceeventsV1::NotificationEndpoint
The endpoint where the subscription delivers events.
-
#payload_options ⇒ Google::Apis::WorkspaceeventsV1::PayloadOptions
Options about what data to include in the event payload.
-
#reconciling ⇒ Boolean
(also: #reconciling?)
Output only.
-
#service_account_authority ⇒ String
Output only.
-
#state ⇒ String
Output only.
-
#suspension_reason ⇒ String
Output only.
-
#target_resource ⇒ String
Required.
-
#ttl ⇒ String
Input only.
-
#uid ⇒ String
Output only.
-
#update_time ⇒ String
Output only.
-
#user_authority ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Subscription
constructor
A new instance of Subscription.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Subscription
Returns a new instance of Subscription.
870 871 872 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 870 def initialize(**args) update!(**args) end |
Instance Attribute Details
#authority ⇒ String
Output only. The user who authorized the creation of the subscription. When a
user authorizes the subscription, this field and the user_authority field
have the same value and the format is: Format: users/userFor Google
Workspace users, theuser`value is the [user.id](https://developers.
google.com/admin-sdk/directory/reference/rest/v1/users#User.FIELDS.ids) field
from the Directory API. When a Chat app authorizes the subscription, only
service_account_authorityfield populates and this field is empty.
Corresponds to the JSON propertyauthority`
751 752 753 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 751 def @authority end |
#create_time ⇒ String
Output only. The time when the subscription is created.
Corresponds to the JSON property createTime
756 757 758 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 756 def create_time @create_time end |
#drive_options ⇒ Google::Apis::WorkspaceeventsV1::DriveOptions
Additional supported options for serving Drive events.
Corresponds to the JSON property driveOptions
761 762 763 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 761 def @drive_options end |
#etag ⇒ String
Optional. This checksum is computed by the server based on the value of other
fields, and might be sent on update requests to ensure the client has an up-to-
date value before proceeding.
Corresponds to the JSON property etag
768 769 770 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 768 def etag @etag end |
#event_types ⇒ Array<String>
Required. Unordered list. Input for creating a subscription. Otherwise, output
only. One or more types of events to receive about the target resource.
Formatted according to the CloudEvents specification. The supported event
types depend on the target resource of your subscription. For details, see
Supported Google Workspace events. By default, you also receive events about the
lifecycle of your subscription. You don't need to specify lifecycle events
for this field. If you specify an event type that doesn't exist for the target
resource, the request returns an HTTP 400 Bad Request status code.
Corresponds to the JSON property eventTypes
782 783 784 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 782 def event_types @event_types end |
#expire_time ⇒ String
Non-empty default. The timestamp in UTC when the subscription expires. Always
displayed on output, regardless of what was used on input.
Corresponds to the JSON property expireTime
788 789 790 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 788 def expire_time @expire_time end |
#name ⇒ String
Identifier. Resource name of the subscription. Format: subscriptions/
subscription`
Corresponds to the JSON propertyname`
794 795 796 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 794 def name @name end |
#notification_endpoint ⇒ Google::Apis::WorkspaceeventsV1::NotificationEndpoint
The endpoint where the subscription delivers events.
Corresponds to the JSON property notificationEndpoint
799 800 801 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 799 def notification_endpoint @notification_endpoint end |
#payload_options ⇒ Google::Apis::WorkspaceeventsV1::PayloadOptions
Options about what data to include in the event payload. Only supported for
Google Chat and Google Drive events.
Corresponds to the JSON property payloadOptions
805 806 807 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 805 def @payload_options end |
#reconciling ⇒ Boolean Also known as: reconciling?
Output only. If true, the subscription is in the process of being updated.
Corresponds to the JSON property reconciling
810 811 812 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 810 def reconciling @reconciling end |
#service_account_authority ⇒ String
Output only. The service account that was used to authorize the creation of
the subscription. This service account must be owned by the same Google Cloud
project where you created this subscription. Format: projects/project_id/
serviceAccounts/service_account_id`
Corresponds to the JSON propertyserviceAccountAuthority`
819 820 821 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 819 def @service_account_authority end |
#state ⇒ String
Output only. The state of the subscription. Determines whether the
subscription can receive events and deliver them to the notification endpoint.
Corresponds to the JSON property state
825 826 827 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 825 def state @state end |
#suspension_reason ⇒ String
Output only. The error that suspended the subscription. To reactivate the
subscription, resolve the error and call the ReactivateSubscription method.
Corresponds to the JSON property suspensionReason
831 832 833 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 831 def suspension_reason @suspension_reason end |
#target_resource ⇒ String
Required. Immutable. The Google Workspace resource that's monitored for events,
formatted as the full resource name. To learn about target resources and the events that they
support, see Supported Google Workspace events. A user can only authorize your app to
create one subscription for a given target resource. If your app tries to
create another subscription with the same user credentials, the request
returns an ALREADY_EXISTS error.
Corresponds to the JSON property targetResource
843 844 845 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 843 def target_resource @target_resource end |
#ttl ⇒ String
Input only. The time-to-live (TTL) or duration for the subscription. If
unspecified or set to 0, uses the maximum possible duration.
Corresponds to the JSON property ttl
849 850 851 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 849 def ttl @ttl end |
#uid ⇒ String
Output only. System-assigned unique identifier for the subscription.
Corresponds to the JSON property uid
854 855 856 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 854 def uid @uid end |
#update_time ⇒ String
Output only. The last time that the subscription is updated.
Corresponds to the JSON property updateTime
859 860 861 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 859 def update_time @update_time end |
#user_authority ⇒ String
Output only. The user who authorized the creation of the subscription. The
user must be able to view the target_resource. For Google Workspace users,
the user value is the user.id field from the
Directory API. Format: users/user`
Corresponds to the JSON propertyuserAuthority`
868 869 870 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 868 def @user_authority end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 875 def update!(**args) @authority = args[:authority] if args.key?(:authority) @create_time = args[:create_time] if args.key?(:create_time) @drive_options = args[:drive_options] if args.key?(:drive_options) @etag = args[:etag] if args.key?(:etag) @event_types = args[:event_types] if args.key?(:event_types) @expire_time = args[:expire_time] if args.key?(:expire_time) @name = args[:name] if args.key?(:name) @notification_endpoint = args[:notification_endpoint] if args.key?(:notification_endpoint) @payload_options = args[:payload_options] if args.key?(:payload_options) @reconciling = args[:reconciling] if args.key?(:reconciling) @service_account_authority = args[:service_account_authority] if args.key?(:service_account_authority) @state = args[:state] if args.key?(:state) @suspension_reason = args[:suspension_reason] if args.key?(:suspension_reason) @target_resource = args[:target_resource] if args.key?(:target_resource) @ttl = args[:ttl] if args.key?(:ttl) @uid = args[:uid] if args.key?(:uid) @update_time = args[:update_time] if args.key?(:update_time) @user_authority = args[:user_authority] if args.key?(:user_authority) end |