Class: Google::Apps::Events::Subscriptions::V1::Subscription

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/apps/events/subscriptions/v1/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

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.



117
118
119
120
121
122
123
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
# File 'proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb', line 117

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

  # 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::V1::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:



117
118
119
120
121
122
123
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
# File 'proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb', line 117

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

  # 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::V1::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.



117
118
119
120
121
122
123
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
# File 'proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb', line 117

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

  # 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::V1::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. Immutable. 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. Immutable. 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.



117
118
119
120
121
122
123
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
# File 'proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb', line 117

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

  # 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::V1::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.

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.



117
118
119
120
121
122
123
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
# File 'proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb', line 117

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

  # 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::V1::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 Optional. Immutable. Identifier. Resource name of the subscription.

Format: subscriptions/{subscription}.

Returns:

  • (::String)

    Optional. Immutable. Identifier. Resource name of the subscription.

    Format: subscriptions/{subscription}



117
118
119
120
121
122
123
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
# File 'proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb', line 117

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

  # 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::V1::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::V1::NotificationEndpoint

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

Returns:



117
118
119
120
121
122
123
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
# File 'proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb', line 117

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

  # 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::V1::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::V1::PayloadOptions

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

Returns:



117
118
119
120
121
122
123
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
# File 'proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb', line 117

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

  # 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::V1::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.



117
118
119
120
121
122
123
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
# File 'proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb', line 117

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

  # 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::V1::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::V1::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:



117
118
119
120
121
122
123
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
# File 'proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb', line 117

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

  # 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::V1::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::V1::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:



117
118
119
120
121
122
123
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
# File 'proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb', line 117

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

  # 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::V1::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.



117
118
119
120
121
122
123
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
# File 'proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb', line 117

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

  # 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::V1::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.

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.



117
118
119
120
121
122
123
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
# File 'proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb', line 117

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

  # 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::V1::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.



117
118
119
120
121
122
123
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
# File 'proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb', line 117

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

  # 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::V1::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:



117
118
119
120
121
122
123
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
# File 'proto_docs/google/apps/events/subscriptions/v1/subscription_resource.rb', line 117

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

  # 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::V1::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