Class: Google::Apps::Events::Subscriptions::V1beta::Subscription

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb

Overview

A subscription to receive events about a Google Workspace resource. To learn more about subscriptions, see the Google Workspace Events API overview.

Defined Under Namespace

Modules: ErrorType, State Classes: DriveOptions

Instance Attribute Summary collapse

Instance Attribute Details

#authority::String (readonly)

Returns Output only. The user who authorized the creation of the subscription.

Format: users/{user}

For Google Workspace users, the {user} value is the user.id field from the Directory API.

Returns:

  • (::String)

    Output only. The user who authorized the creation of the subscription.

    Format: users/{user}

    For Google Workspace users, the {user} value is the user.id field from the Directory API.



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end

#create_time::Google::Protobuf::Timestamp (readonly)

Returns Output only. The time when the subscription is created.

Returns:



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end

#drive_options::Google::Apps::Events::Subscriptions::V1beta::Subscription::DriveOptions

Returns Optional. Features that are supported only for subscriptions on Drive resources.

Returns:



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end

#etag::String

Returns 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.

Returns:

  • (::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.



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end

#event_types::Array<::String>

Returns 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.

Returns:

  • (::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.



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end

#expire_time::Google::Protobuf::Timestamp

Returns Non-empty default. The timestamp in UTC when the subscription expires. Always displayed on output, regardless of what was used on input.

Note: The following fields are mutually exclusive: expire_time, ttl. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Protobuf::Timestamp)

    Non-empty default. The timestamp in UTC when the subscription expires. Always displayed on output, regardless of what was used on input.

    Note: The following fields are mutually exclusive: expire_time, ttl. If a field in that set is populated, all other fields in the set will automatically be cleared.



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end

#name::String

Returns Identifier. Resource name of the subscription.

Format: subscriptions/{subscription}.

Returns:

  • (::String)

    Identifier. Resource name of the subscription.

    Format: subscriptions/{subscription}



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end

#notification_endpoint::Google::Apps::Events::Subscriptions::V1beta::NotificationEndpoint

Returns Required. Immutable. The endpoint where the subscription delivers events, such as a Pub/Sub topic.

Returns:



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end

#payload_options::Google::Apps::Events::Subscriptions::V1beta::PayloadOptions

Returns Optional. Options about what data to include in the event payload. Only supported for Google Chat events.

Returns:



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end

#reconciling::Boolean (readonly)

Returns Output only. If true, the subscription is in the process of being updated.

Returns:

  • (::Boolean)

    Output only. If true, the subscription is in the process of being updated.



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end

#state::Google::Apps::Events::Subscriptions::V1beta::Subscription::State (readonly)

Returns Output only. The state of the subscription. Determines whether the subscription can receive events and deliver them to the notification endpoint.

Returns:



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end

#suspension_reason::Google::Apps::Events::Subscriptions::V1beta::Subscription::ErrorType (readonly)

Returns Output only. The error that suspended the subscription.

To reactivate the subscription, resolve the error and call the ReactivateSubscription method.

Returns:



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end

#target_resource::String

Returns 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.

Returns:

  • (::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.



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end

#ttl::Google::Protobuf::Duration

Returns Input only. The time-to-live (TTL) or duration for the subscription. If unspecified or set to 0, uses the maximum possible duration.

Note: The following fields are mutually exclusive: ttl, expire_time. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns:

  • (::Google::Protobuf::Duration)

    Input only. The time-to-live (TTL) or duration for the subscription. If unspecified or set to 0, uses the maximum possible duration.

    Note: The following fields are mutually exclusive: ttl, expire_time. If a field in that set is populated, all other fields in the set will automatically be cleared.



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end

#uid::String (readonly)

Returns Output only. System-assigned unique identifier for the subscription.

Returns:

  • (::String)

    Output only. System-assigned unique identifier for the subscription.



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end

#update_time::Google::Protobuf::Timestamp (readonly)

Returns Output only. The last time that the subscription is updated.

Returns:



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'proto_docs/google/apps/events/subscriptions/v1beta/subscription_resource.rb', line 124

class Subscription
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Additional supported options for serving Drive events.
  # @!attribute [rw] include_descendants
  #   @return [::Boolean]
  #     Optional. Immutable. Whether to include all the descendant Drive files in
  #     the list of events. If false, the subscription will be created for the
  #     single file/drive that is specified as the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}.
  #
  #     This flag can be used when the
  #     {::Google::Apps::Events::Subscriptions::V1beta::Subscription#target_resource `target_resource`}
  #     is either a
  #     [Drive](https://developers.google.com/drive/api/reference/rest/v3/drives)
  #     or a [Drive
  #     file](https://developers.google.com/drive/api/reference/rest/v3/files)
  #     that has mimeType set to `application/vnd.google-apps.folder`.
  class DriveOptions
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Possible states for the subscription.
  module State
    # Default value. This value is unused.
    STATE_UNSPECIFIED = 0

    # The subscription is active and can receive and deliver events to its
    # notification endpoint.
    ACTIVE = 1

    # The subscription is unable to receive events due to an error.
    # To identify the error, see the
    # {::Google::Apps::Events::Subscriptions::V1beta::Subscription#suspension_reason `suspension_reason`}
    # field.
    SUSPENDED = 2

    # The subscription is deleted.
    DELETED = 3
  end

  # Possible errors for a subscription.
  module ErrorType
    # Default value. This value is unused.
    ERROR_TYPE_UNSPECIFIED = 0

    # The authorizing user has revoked the grant of one or more OAuth scopes.
    # To learn more about authorization for Google Workspace, see [Configure
    # the OAuth consent
    # screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).
    USER_SCOPE_REVOKED = 1

    # The target resource for the subscription no longer exists.
    RESOURCE_DELETED = 2

    # The user that authorized the creation of the subscription no longer has
    # access to the subscription's target resource.
    USER_AUTHORIZATION_FAILURE = 3

    # The Google Workspace application doesn't have access to deliver
    # events to your subscription's notification endpoint.
    ENDPOINT_PERMISSION_DENIED = 4

    # The subscription's notification endpoint doesn't exist, or the endpoint
    # can't be found in the Google Cloud project where you created the
    # subscription.
    ENDPOINT_NOT_FOUND = 6

    # The subscription's notification endpoint failed to receive events due to
    # insufficient quota or reaching rate limiting.
    ENDPOINT_RESOURCE_EXHAUSTED = 7

    # An unidentified error has occurred.
    OTHER = 5
  end
end