Documentation ¶
Index ¶
- Variables
- func RegisterSubscriptionsServiceServer(s *grpc.Server, srv SubscriptionsServiceServer)
- type CreateSubscriptionMetadata
- type CreateSubscriptionRequest
- func (*CreateSubscriptionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateSubscriptionRequest) GetSubscription() *Subscription
- func (x *CreateSubscriptionRequest) GetValidateOnly() bool
- func (*CreateSubscriptionRequest) ProtoMessage()
- func (x *CreateSubscriptionRequest) ProtoReflect() protoreflect.Message
- func (x *CreateSubscriptionRequest) Reset()
- func (x *CreateSubscriptionRequest) String() string
- type DeleteSubscriptionMetadata
- type DeleteSubscriptionRequest
- func (*DeleteSubscriptionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteSubscriptionRequest) GetAllowMissing() bool
- func (x *DeleteSubscriptionRequest) GetEtag() string
- func (x *DeleteSubscriptionRequest) GetName() string
- func (x *DeleteSubscriptionRequest) GetValidateOnly() bool
- func (*DeleteSubscriptionRequest) ProtoMessage()
- func (x *DeleteSubscriptionRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteSubscriptionRequest) Reset()
- func (x *DeleteSubscriptionRequest) String() string
- type GetSubscriptionRequest
- func (*GetSubscriptionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetSubscriptionRequest) GetName() string
- func (*GetSubscriptionRequest) ProtoMessage()
- func (x *GetSubscriptionRequest) ProtoReflect() protoreflect.Message
- func (x *GetSubscriptionRequest) Reset()
- func (x *GetSubscriptionRequest) String() string
- type ListSubscriptionsRequest
- func (*ListSubscriptionsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListSubscriptionsRequest) GetFilter() string
- func (x *ListSubscriptionsRequest) GetPageSize() int32
- func (x *ListSubscriptionsRequest) GetPageToken() string
- func (*ListSubscriptionsRequest) ProtoMessage()
- func (x *ListSubscriptionsRequest) ProtoReflect() protoreflect.Message
- func (x *ListSubscriptionsRequest) Reset()
- func (x *ListSubscriptionsRequest) String() string
- type ListSubscriptionsResponse
- func (*ListSubscriptionsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListSubscriptionsResponse) GetNextPageToken() string
- func (x *ListSubscriptionsResponse) GetSubscriptions() []*Subscription
- func (*ListSubscriptionsResponse) ProtoMessage()
- func (x *ListSubscriptionsResponse) ProtoReflect() protoreflect.Message
- func (x *ListSubscriptionsResponse) Reset()
- func (x *ListSubscriptionsResponse) String() string
- type NotificationEndpoint
- func (*NotificationEndpoint) Descriptor() ([]byte, []int)deprecated
- func (m *NotificationEndpoint) GetEndpoint() isNotificationEndpoint_Endpoint
- func (x *NotificationEndpoint) GetPubsubTopic() string
- func (*NotificationEndpoint) ProtoMessage()
- func (x *NotificationEndpoint) ProtoReflect() protoreflect.Message
- func (x *NotificationEndpoint) Reset()
- func (x *NotificationEndpoint) String() string
- type NotificationEndpoint_PubsubTopic
- type PayloadOptions
- func (*PayloadOptions) Descriptor() ([]byte, []int)deprecated
- func (x *PayloadOptions) GetFieldMask() *fieldmaskpb.FieldMask
- func (x *PayloadOptions) GetIncludeResource() bool
- func (*PayloadOptions) ProtoMessage()
- func (x *PayloadOptions) ProtoReflect() protoreflect.Message
- func (x *PayloadOptions) Reset()
- func (x *PayloadOptions) String() string
- type ReactivateSubscriptionMetadata
- func (*ReactivateSubscriptionMetadata) Descriptor() ([]byte, []int)deprecated
- func (*ReactivateSubscriptionMetadata) ProtoMessage()
- func (x *ReactivateSubscriptionMetadata) ProtoReflect() protoreflect.Message
- func (x *ReactivateSubscriptionMetadata) Reset()
- func (x *ReactivateSubscriptionMetadata) String() string
- type ReactivateSubscriptionRequest
- func (*ReactivateSubscriptionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReactivateSubscriptionRequest) GetName() string
- func (*ReactivateSubscriptionRequest) ProtoMessage()
- func (x *ReactivateSubscriptionRequest) ProtoReflect() protoreflect.Message
- func (x *ReactivateSubscriptionRequest) Reset()
- func (x *ReactivateSubscriptionRequest) String() string
- type Subscription
- func (*Subscription) Descriptor() ([]byte, []int)deprecated
- func (x *Subscription) GetAuthority() string
- func (x *Subscription) GetCreateTime() *timestamppb.Timestamp
- func (x *Subscription) GetEtag() string
- func (x *Subscription) GetEventTypes() []string
- func (m *Subscription) GetExpiration() isSubscription_Expiration
- func (x *Subscription) GetExpireTime() *timestamppb.Timestamp
- func (x *Subscription) GetName() string
- func (x *Subscription) GetNotificationEndpoint() *NotificationEndpoint
- func (x *Subscription) GetPayloadOptions() *PayloadOptions
- func (x *Subscription) GetReconciling() bool
- func (x *Subscription) GetState() Subscription_State
- func (x *Subscription) GetSuspensionReason() Subscription_ErrorType
- func (x *Subscription) GetTargetResource() string
- func (x *Subscription) GetTtl() *durationpb.Duration
- func (x *Subscription) GetUid() string
- func (x *Subscription) GetUpdateTime() *timestamppb.Timestamp
- func (*Subscription) ProtoMessage()
- func (x *Subscription) ProtoReflect() protoreflect.Message
- func (x *Subscription) Reset()
- func (x *Subscription) String() string
- type Subscription_ErrorType
- func (Subscription_ErrorType) Descriptor() protoreflect.EnumDescriptor
- func (x Subscription_ErrorType) Enum() *Subscription_ErrorType
- func (Subscription_ErrorType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Subscription_ErrorType) Number() protoreflect.EnumNumber
- func (x Subscription_ErrorType) String() string
- func (Subscription_ErrorType) Type() protoreflect.EnumType
- type Subscription_ExpireTime
- type Subscription_State
- func (Subscription_State) Descriptor() protoreflect.EnumDescriptor
- func (x Subscription_State) Enum() *Subscription_State
- func (Subscription_State) EnumDescriptor() ([]byte, []int)deprecated
- func (x Subscription_State) Number() protoreflect.EnumNumber
- func (x Subscription_State) String() string
- func (Subscription_State) Type() protoreflect.EnumType
- type Subscription_Ttl
- type SubscriptionsServiceClient
- type SubscriptionsServiceServer
- type UnimplementedSubscriptionsServiceServer
- func (*UnimplementedSubscriptionsServiceServer) CreateSubscription(context.Context, *CreateSubscriptionRequest) (*longrunningpb.Operation, error)
- func (*UnimplementedSubscriptionsServiceServer) DeleteSubscription(context.Context, *DeleteSubscriptionRequest) (*longrunningpb.Operation, error)
- func (*UnimplementedSubscriptionsServiceServer) GetSubscription(context.Context, *GetSubscriptionRequest) (*Subscription, error)
- func (*UnimplementedSubscriptionsServiceServer) ListSubscriptions(context.Context, *ListSubscriptionsRequest) (*ListSubscriptionsResponse, error)
- func (*UnimplementedSubscriptionsServiceServer) ReactivateSubscription(context.Context, *ReactivateSubscriptionRequest) (*longrunningpb.Operation, error)
- func (*UnimplementedSubscriptionsServiceServer) UpdateSubscription(context.Context, *UpdateSubscriptionRequest) (*longrunningpb.Operation, error)
- type UpdateSubscriptionMetadata
- type UpdateSubscriptionRequest
- func (*UpdateSubscriptionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateSubscriptionRequest) GetSubscription() *Subscription
- func (x *UpdateSubscriptionRequest) GetUpdateMask() *fieldmaskpb.FieldMask
- func (x *UpdateSubscriptionRequest) GetValidateOnly() bool
- func (*UpdateSubscriptionRequest) ProtoMessage()
- func (x *UpdateSubscriptionRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateSubscriptionRequest) Reset()
- func (x *UpdateSubscriptionRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var ( Subscription_State_name = map[int32]string{ 0: "STATE_UNSPECIFIED", 1: "ACTIVE", 2: "SUSPENDED", 3: "DELETED", } Subscription_State_value = map[string]int32{ "STATE_UNSPECIFIED": 0, "ACTIVE": 1, "SUSPENDED": 2, "DELETED": 3, } )
Enum value maps for Subscription_State.
var ( Subscription_ErrorType_name = map[int32]string{ 0: "ERROR_TYPE_UNSPECIFIED", 1: "USER_SCOPE_REVOKED", 2: "RESOURCE_DELETED", 3: "USER_AUTHORIZATION_FAILURE", 4: "ENDPOINT_PERMISSION_DENIED", 6: "ENDPOINT_NOT_FOUND", 7: "ENDPOINT_RESOURCE_EXHAUSTED", 5: "OTHER", } Subscription_ErrorType_value = map[string]int32{ "ERROR_TYPE_UNSPECIFIED": 0, "USER_SCOPE_REVOKED": 1, "RESOURCE_DELETED": 2, "USER_AUTHORIZATION_FAILURE": 3, "ENDPOINT_PERMISSION_DENIED": 4, "ENDPOINT_NOT_FOUND": 6, "ENDPOINT_RESOURCE_EXHAUSTED": 7, "OTHER": 5, } )
Enum value maps for Subscription_ErrorType.
var File_google_apps_events_subscriptions_v1_subscription_resource_proto protoreflect.FileDescriptor
var File_google_apps_events_subscriptions_v1_subscriptions_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterSubscriptionsServiceServer ¶
func RegisterSubscriptionsServiceServer(s *grpc.Server, srv SubscriptionsServiceServer)
Types ¶
type CreateSubscriptionMetadata ¶
type CreateSubscriptionMetadata struct {
// contains filtered or unexported fields
}
Metadata for CreateSubscription LRO.
func (*CreateSubscriptionMetadata) Descriptor
deprecated
func (*CreateSubscriptionMetadata) Descriptor() ([]byte, []int)
Deprecated: Use CreateSubscriptionMetadata.ProtoReflect.Descriptor instead.
func (*CreateSubscriptionMetadata) ProtoMessage ¶
func (*CreateSubscriptionMetadata) ProtoMessage()
func (*CreateSubscriptionMetadata) ProtoReflect ¶
func (x *CreateSubscriptionMetadata) ProtoReflect() protoreflect.Message
func (*CreateSubscriptionMetadata) Reset ¶
func (x *CreateSubscriptionMetadata) Reset()
func (*CreateSubscriptionMetadata) String ¶
func (x *CreateSubscriptionMetadata) String() string
type CreateSubscriptionRequest ¶
type CreateSubscriptionRequest struct { // Required. The subscription resource to create. Subscription *Subscription `protobuf:"bytes,1,opt,name=subscription,proto3" json:"subscription,omitempty"` // Optional. If set to `true`, validates and previews the request, but doesn't // create the subscription. ValidateOnly bool `protobuf:"varint,2,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` // contains filtered or unexported fields }
The request message for [SubscriptionsService.CreateSubscription][google.apps.events.subscriptions.v1.SubscriptionsService.CreateSubscription].
func (*CreateSubscriptionRequest) Descriptor
deprecated
func (*CreateSubscriptionRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateSubscriptionRequest.ProtoReflect.Descriptor instead.
func (*CreateSubscriptionRequest) GetSubscription ¶
func (x *CreateSubscriptionRequest) GetSubscription() *Subscription
func (*CreateSubscriptionRequest) GetValidateOnly ¶
func (x *CreateSubscriptionRequest) GetValidateOnly() bool
func (*CreateSubscriptionRequest) ProtoMessage ¶
func (*CreateSubscriptionRequest) ProtoMessage()
func (*CreateSubscriptionRequest) ProtoReflect ¶
func (x *CreateSubscriptionRequest) ProtoReflect() protoreflect.Message
func (*CreateSubscriptionRequest) Reset ¶
func (x *CreateSubscriptionRequest) Reset()
func (*CreateSubscriptionRequest) String ¶
func (x *CreateSubscriptionRequest) String() string
type DeleteSubscriptionMetadata ¶
type DeleteSubscriptionMetadata struct {
// contains filtered or unexported fields
}
Metadata for DeleteSubscription LRO.
func (*DeleteSubscriptionMetadata) Descriptor
deprecated
func (*DeleteSubscriptionMetadata) Descriptor() ([]byte, []int)
Deprecated: Use DeleteSubscriptionMetadata.ProtoReflect.Descriptor instead.
func (*DeleteSubscriptionMetadata) ProtoMessage ¶
func (*DeleteSubscriptionMetadata) ProtoMessage()
func (*DeleteSubscriptionMetadata) ProtoReflect ¶
func (x *DeleteSubscriptionMetadata) ProtoReflect() protoreflect.Message
func (*DeleteSubscriptionMetadata) Reset ¶
func (x *DeleteSubscriptionMetadata) Reset()
func (*DeleteSubscriptionMetadata) String ¶
func (x *DeleteSubscriptionMetadata) String() string
type DeleteSubscriptionRequest ¶
type DeleteSubscriptionRequest struct { // Required. Resource name of the subscription to delete. // // Format: `subscriptions/{subscription}` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Optional. If set to `true`, validates and previews the request, but doesn't // delete the subscription. ValidateOnly bool `protobuf:"varint,2,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` // Optional. If set to `true` and the subscription isn't found, the request // succeeds but doesn't delete the subscription. AllowMissing bool `protobuf:"varint,3,opt,name=allow_missing,json=allowMissing,proto3" json:"allow_missing,omitempty"` // Optional. Etag of the subscription. // // If present, it must match with the server's etag. Otherwise, request // fails with the status `ABORTED`. Etag string `protobuf:"bytes,4,opt,name=etag,proto3" json:"etag,omitempty"` // contains filtered or unexported fields }
The request message for [SubscriptionsService.DeleteSubscription][google.apps.events.subscriptions.v1.SubscriptionsService.DeleteSubscription].
func (*DeleteSubscriptionRequest) Descriptor
deprecated
func (*DeleteSubscriptionRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteSubscriptionRequest.ProtoReflect.Descriptor instead.
func (*DeleteSubscriptionRequest) GetAllowMissing ¶
func (x *DeleteSubscriptionRequest) GetAllowMissing() bool
func (*DeleteSubscriptionRequest) GetEtag ¶
func (x *DeleteSubscriptionRequest) GetEtag() string
func (*DeleteSubscriptionRequest) GetName ¶
func (x *DeleteSubscriptionRequest) GetName() string
func (*DeleteSubscriptionRequest) GetValidateOnly ¶
func (x *DeleteSubscriptionRequest) GetValidateOnly() bool
func (*DeleteSubscriptionRequest) ProtoMessage ¶
func (*DeleteSubscriptionRequest) ProtoMessage()
func (*DeleteSubscriptionRequest) ProtoReflect ¶
func (x *DeleteSubscriptionRequest) ProtoReflect() protoreflect.Message
func (*DeleteSubscriptionRequest) Reset ¶
func (x *DeleteSubscriptionRequest) Reset()
func (*DeleteSubscriptionRequest) String ¶
func (x *DeleteSubscriptionRequest) String() string
type GetSubscriptionRequest ¶
type GetSubscriptionRequest struct { // Required. Resource name of the subscription. // // Format: `subscriptions/{subscription}` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
The request message for [SubscriptionsService.GetSubscription][google.apps.events.subscriptions.v1.SubscriptionsService.GetSubscription].
func (*GetSubscriptionRequest) Descriptor
deprecated
func (*GetSubscriptionRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetSubscriptionRequest.ProtoReflect.Descriptor instead.
func (*GetSubscriptionRequest) GetName ¶
func (x *GetSubscriptionRequest) GetName() string
func (*GetSubscriptionRequest) ProtoMessage ¶
func (*GetSubscriptionRequest) ProtoMessage()
func (*GetSubscriptionRequest) ProtoReflect ¶
func (x *GetSubscriptionRequest) ProtoReflect() protoreflect.Message
func (*GetSubscriptionRequest) Reset ¶
func (x *GetSubscriptionRequest) Reset()
func (*GetSubscriptionRequest) String ¶
func (x *GetSubscriptionRequest) String() string
type ListSubscriptionsRequest ¶
type ListSubscriptionsRequest struct { // Optional. The maximum number of subscriptions to return. The service might // return fewer than this value. // // If unspecified or set to `0`, up to 50 subscriptions are returned. // // The maximum value is 100. If you specify a value more than 100, the system // only returns 100 subscriptions. PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // Optional. A page token, received from a previous list subscriptions call. // Provide this parameter to retrieve the subsequent page. // // When paginating, the filter value should match the call that provided the // page token. Passing a different value might lead to unexpected results. PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // Required. A query filter. // // You can filter subscriptions by event type (`event_types`) // and target resource (`target_resource`). // // You must specify at least one event type in your query. To filter for // multiple event types, use the `OR` operator. // // To filter by both event type and target resource, use the `AND` operator // and specify the full resource name, such as // `//chat.googleapis.com/spaces/{space}`. // // For example, the following queries are valid: // // “` // event_types:"google.workspace.chat.membership.v1.updated" OR // // event_types:"google.workspace.chat.message.v1.created" // // event_types:"google.workspace.chat.message.v1.created" AND // // target_resource="//chat.googleapis.com/spaces/{space}" // // ( event_types:"google.workspace.chat.membership.v1.updated" OR // // event_types:"google.workspace.chat.message.v1.created" ) AND // target_resource="//chat.googleapis.com/spaces/{space}" // // “` // // The server rejects invalid queries with an `INVALID_ARGUMENT` // error. Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` // contains filtered or unexported fields }
The request message for [SubscriptionsService.ListSubscriptions][google.apps.events.subscriptions.v1.SubscriptionsService.ListSubscriptions].
func (*ListSubscriptionsRequest) Descriptor
deprecated
func (*ListSubscriptionsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListSubscriptionsRequest.ProtoReflect.Descriptor instead.
func (*ListSubscriptionsRequest) GetFilter ¶
func (x *ListSubscriptionsRequest) GetFilter() string
func (*ListSubscriptionsRequest) GetPageSize ¶
func (x *ListSubscriptionsRequest) GetPageSize() int32
func (*ListSubscriptionsRequest) GetPageToken ¶
func (x *ListSubscriptionsRequest) GetPageToken() string
func (*ListSubscriptionsRequest) ProtoMessage ¶
func (*ListSubscriptionsRequest) ProtoMessage()
func (*ListSubscriptionsRequest) ProtoReflect ¶
func (x *ListSubscriptionsRequest) ProtoReflect() protoreflect.Message
func (*ListSubscriptionsRequest) Reset ¶
func (x *ListSubscriptionsRequest) Reset()
func (*ListSubscriptionsRequest) String ¶
func (x *ListSubscriptionsRequest) String() string
type ListSubscriptionsResponse ¶
type ListSubscriptionsResponse struct { // List of subscriptions. Subscriptions []*Subscription `protobuf:"bytes,1,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"` // A token, which can be sent as `page_token` to retrieve the next page. // If this field is omitted, there are no subsequent pages. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // contains filtered or unexported fields }
The response message for [SubscriptionsService.ListSubscriptions][google.apps.events.subscriptions.v1.SubscriptionsService.ListSubscriptions].
func (*ListSubscriptionsResponse) Descriptor
deprecated
func (*ListSubscriptionsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListSubscriptionsResponse.ProtoReflect.Descriptor instead.
func (*ListSubscriptionsResponse) GetNextPageToken ¶
func (x *ListSubscriptionsResponse) GetNextPageToken() string
func (*ListSubscriptionsResponse) GetSubscriptions ¶
func (x *ListSubscriptionsResponse) GetSubscriptions() []*Subscription
func (*ListSubscriptionsResponse) ProtoMessage ¶
func (*ListSubscriptionsResponse) ProtoMessage()
func (*ListSubscriptionsResponse) ProtoReflect ¶
func (x *ListSubscriptionsResponse) ProtoReflect() protoreflect.Message
func (*ListSubscriptionsResponse) Reset ¶
func (x *ListSubscriptionsResponse) Reset()
func (*ListSubscriptionsResponse) String ¶
func (x *ListSubscriptionsResponse) String() string
type NotificationEndpoint ¶
type NotificationEndpoint struct { // Types that are assignable to Endpoint: // // *NotificationEndpoint_PubsubTopic Endpoint isNotificationEndpoint_Endpoint `protobuf_oneof:"endpoint"` // contains filtered or unexported fields }
The endpoint where the subscription delivers events.
func (*NotificationEndpoint) Descriptor
deprecated
func (*NotificationEndpoint) Descriptor() ([]byte, []int)
Deprecated: Use NotificationEndpoint.ProtoReflect.Descriptor instead.
func (*NotificationEndpoint) GetEndpoint ¶
func (m *NotificationEndpoint) GetEndpoint() isNotificationEndpoint_Endpoint
func (*NotificationEndpoint) GetPubsubTopic ¶
func (x *NotificationEndpoint) GetPubsubTopic() string
func (*NotificationEndpoint) ProtoMessage ¶
func (*NotificationEndpoint) ProtoMessage()
func (*NotificationEndpoint) ProtoReflect ¶
func (x *NotificationEndpoint) ProtoReflect() protoreflect.Message
func (*NotificationEndpoint) Reset ¶
func (x *NotificationEndpoint) Reset()
func (*NotificationEndpoint) String ¶
func (x *NotificationEndpoint) String() string
type NotificationEndpoint_PubsubTopic ¶
type NotificationEndpoint_PubsubTopic struct { // Immutable. The Cloud Pub/Sub topic that receives events for the // subscription. // // Format: `projects/{project}/topics/{topic}` // // You must create the topic in the same Google Cloud project where // you create this subscription. // // When the topic receives events, the events are encoded as Cloud Pub/Sub // messages. For details, see the [Google Cloud Pub/Sub Protocol Binding for // CloudEvents](https://github.com/googleapis/google-cloudevents/blob/main/docs/spec/pubsub.md). PubsubTopic string `protobuf:"bytes,1,opt,name=pubsub_topic,json=pubsubTopic,proto3,oneof"` }
type PayloadOptions ¶
type PayloadOptions struct { // Optional. Whether the event payload includes data about the resource that // changed. For example, for an event where a Google Chat message was created, // whether the payload contains data about the // [`Message`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages) // resource. If false, the event payload only includes the name of the changed // resource. IncludeResource bool `protobuf:"varint,1,opt,name=include_resource,json=includeResource,proto3" json:"include_resource,omitempty"` // Optional. If `include_resource` is set to `true`, the list of fields to // include in the event payload. Separate fields with a comma. For example, to // include a Google Chat message's sender and create time, enter // `message.sender,message.createTime`. If omitted, the payload includes all // fields for the resource. // // If you specify a field that doesn't exist for the resource, the system // ignores the field. FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` // contains filtered or unexported fields }
Options about what data to include in the event payload. Only supported for Google Chat events.
func (*PayloadOptions) Descriptor
deprecated
func (*PayloadOptions) Descriptor() ([]byte, []int)
Deprecated: Use PayloadOptions.ProtoReflect.Descriptor instead.
func (*PayloadOptions) GetFieldMask ¶
func (x *PayloadOptions) GetFieldMask() *fieldmaskpb.FieldMask
func (*PayloadOptions) GetIncludeResource ¶
func (x *PayloadOptions) GetIncludeResource() bool
func (*PayloadOptions) ProtoMessage ¶
func (*PayloadOptions) ProtoMessage()
func (*PayloadOptions) ProtoReflect ¶
func (x *PayloadOptions) ProtoReflect() protoreflect.Message
func (*PayloadOptions) Reset ¶
func (x *PayloadOptions) Reset()
func (*PayloadOptions) String ¶
func (x *PayloadOptions) String() string
type ReactivateSubscriptionMetadata ¶
type ReactivateSubscriptionMetadata struct {
// contains filtered or unexported fields
}
Metadata for ReactivateSubscription LRO.
func (*ReactivateSubscriptionMetadata) Descriptor
deprecated
func (*ReactivateSubscriptionMetadata) Descriptor() ([]byte, []int)
Deprecated: Use ReactivateSubscriptionMetadata.ProtoReflect.Descriptor instead.
func (*ReactivateSubscriptionMetadata) ProtoMessage ¶
func (*ReactivateSubscriptionMetadata) ProtoMessage()
func (*ReactivateSubscriptionMetadata) ProtoReflect ¶
func (x *ReactivateSubscriptionMetadata) ProtoReflect() protoreflect.Message
func (*ReactivateSubscriptionMetadata) Reset ¶
func (x *ReactivateSubscriptionMetadata) Reset()
func (*ReactivateSubscriptionMetadata) String ¶
func (x *ReactivateSubscriptionMetadata) String() string
type ReactivateSubscriptionRequest ¶
type ReactivateSubscriptionRequest struct { // Required. Resource name of the subscription. // // Format: `subscriptions/{subscription}` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
The request message for [SubscriptionsService.ReactivateSubscription][google.apps.events.subscriptions.v1.SubscriptionsService.ReactivateSubscription].
func (*ReactivateSubscriptionRequest) Descriptor
deprecated
func (*ReactivateSubscriptionRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReactivateSubscriptionRequest.ProtoReflect.Descriptor instead.
func (*ReactivateSubscriptionRequest) GetName ¶
func (x *ReactivateSubscriptionRequest) GetName() string
func (*ReactivateSubscriptionRequest) ProtoMessage ¶
func (*ReactivateSubscriptionRequest) ProtoMessage()
func (*ReactivateSubscriptionRequest) ProtoReflect ¶
func (x *ReactivateSubscriptionRequest) ProtoReflect() protoreflect.Message
func (*ReactivateSubscriptionRequest) Reset ¶
func (x *ReactivateSubscriptionRequest) Reset()
func (*ReactivateSubscriptionRequest) String ¶
func (x *ReactivateSubscriptionRequest) String() string
type Subscription ¶
type Subscription struct { // The time when the subscription expires. // // The maximum expiration time depends on whether your subscription includes // resource data in event payloads (specified in the // [PayloadOptions][google.apps.events.subscriptions.v1.PayloadOptions] // field): // // * If payloads omit resource data, up to 7 days. // * If payloads include resource data, up to 4 hours. If your Google // Workspace organization grants access to the resource through [domain-wide // delegation](https://support.google.com/a/answer/162106), you can extend the // subscription's expiration time to up to 24 hours. // // After a subscription expires, it's deleted automatically. You receive // lifecycle events to the // [notification_endpoint][google.apps.events.subscriptions.v1.Subscription.notification_endpoint] // 12 hours and one hour before the subscription expires. For details, see // [Receive and respond to lifecycle // events](https://developers.google.com/workspace/events/guides/events-lifecycle). // // To prevent a subscription from expiring, you can use the // [`UpdateSubscription`][google.apps.events.subscriptions.v1.SubscriptionsService.UpdateSubscription] // method to extend its expiration date. For details, see [Update or renew a // subscription](https://developers.google.com/workspace/events/guides/update-subscription). // // Types that are assignable to Expiration: // // *Subscription_ExpireTime // *Subscription_Ttl Expiration isSubscription_Expiration `protobuf_oneof:"expiration"` // Optional. Immutable. Identifier. Resource name of the subscription. // // Format: `subscriptions/{subscription}` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Output only. System-assigned unique identifier for the subscription. Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` // Required. Immutable. The Google Workspace resource that's monitored for // events, formatted as the [full resource // name](https://google.aip.dev/122#full-resource-names). To learn about // target resources and the events that they support, see [Supported Google // Workspace // events](https://developers.google.com/workspace/events#supported-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. TargetResource string `protobuf:"bytes,4,opt,name=target_resource,json=targetResource,proto3" json:"target_resource,omitempty"` // 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](https://developers.google.com/workspace/events/guides#supported-events). // // By default, you also receive events about the [lifecycle of your // subscription](https://developers.google.com/workspace/events/guides/events-lifecycle). // 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. EventTypes []string `protobuf:"bytes,5,rep,name=event_types,json=eventTypes,proto3" json:"event_types,omitempty"` // Optional. Options about what data to include in the event payload. Only // supported for Google Chat events. PayloadOptions *PayloadOptions `protobuf:"bytes,6,opt,name=payload_options,json=payloadOptions,proto3" json:"payload_options,omitempty"` // Required. Immutable. The endpoint where the subscription delivers events, // such as a Pub/Sub topic. NotificationEndpoint *NotificationEndpoint `protobuf:"bytes,7,opt,name=notification_endpoint,json=notificationEndpoint,proto3" json:"notification_endpoint,omitempty"` // Output only. The state of the subscription. Determines whether the // subscription can receive events and deliver them to the notification // endpoint. State Subscription_State `protobuf:"varint,8,opt,name=state,proto3,enum=google.apps.events.subscriptions.v1.Subscription_State" json:"state,omitempty"` // Output only. The error that suspended the subscription. // // To reactivate the subscription, resolve the error and call the // [`ReactivateSubscription`][google.apps.events.subscriptions.v1.SubscriptionsService.ReactivateSubscription] // method. SuspensionReason Subscription_ErrorType `` /* 175-byte string literal not displayed */ // 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`](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#User.FIELDS.ids) // field from the Directory API. Authority string `protobuf:"bytes,10,opt,name=authority,proto3" json:"authority,omitempty"` // Output only. The time when the subscription is created. CreateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // Output only. The last time that the subscription is updated. UpdateTime *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` // Output only. If `true`, the subscription is in the process of being // updated. Reconciling bool `protobuf:"varint,15,opt,name=reconciling,proto3" json:"reconciling,omitempty"` // 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. Etag string `protobuf:"bytes,17,opt,name=etag,proto3" json:"etag,omitempty"` // contains filtered or unexported fields }
A subscription to receive events about a Google Workspace resource. To learn more about subscriptions, see the [Google Workspace Events API overview](https://developers.google.com/workspace/events).
func (*Subscription) Descriptor
deprecated
func (*Subscription) Descriptor() ([]byte, []int)
Deprecated: Use Subscription.ProtoReflect.Descriptor instead.
func (*Subscription) GetAuthority ¶
func (x *Subscription) GetAuthority() string
func (*Subscription) GetCreateTime ¶
func (x *Subscription) GetCreateTime() *timestamppb.Timestamp
func (*Subscription) GetEtag ¶
func (x *Subscription) GetEtag() string
func (*Subscription) GetEventTypes ¶
func (x *Subscription) GetEventTypes() []string
func (*Subscription) GetExpiration ¶
func (m *Subscription) GetExpiration() isSubscription_Expiration
func (*Subscription) GetExpireTime ¶
func (x *Subscription) GetExpireTime() *timestamppb.Timestamp
func (*Subscription) GetName ¶
func (x *Subscription) GetName() string
func (*Subscription) GetNotificationEndpoint ¶
func (x *Subscription) GetNotificationEndpoint() *NotificationEndpoint
func (*Subscription) GetPayloadOptions ¶
func (x *Subscription) GetPayloadOptions() *PayloadOptions
func (*Subscription) GetReconciling ¶
func (x *Subscription) GetReconciling() bool
func (*Subscription) GetState ¶
func (x *Subscription) GetState() Subscription_State
func (*Subscription) GetSuspensionReason ¶
func (x *Subscription) GetSuspensionReason() Subscription_ErrorType
func (*Subscription) GetTargetResource ¶
func (x *Subscription) GetTargetResource() string
func (*Subscription) GetTtl ¶
func (x *Subscription) GetTtl() *durationpb.Duration
func (*Subscription) GetUid ¶
func (x *Subscription) GetUid() string
func (*Subscription) GetUpdateTime ¶
func (x *Subscription) GetUpdateTime() *timestamppb.Timestamp
func (*Subscription) ProtoMessage ¶
func (*Subscription) ProtoMessage()
func (*Subscription) ProtoReflect ¶
func (x *Subscription) ProtoReflect() protoreflect.Message
func (*Subscription) Reset ¶
func (x *Subscription) Reset()
func (*Subscription) String ¶
func (x *Subscription) String() string
type Subscription_ErrorType ¶
type Subscription_ErrorType int32
Possible errors for a subscription.
const ( // Default value. This value is unused. Subscription_ERROR_TYPE_UNSPECIFIED Subscription_ErrorType = 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). Subscription_USER_SCOPE_REVOKED Subscription_ErrorType = 1 // The target resource for the subscription no longer exists. Subscription_RESOURCE_DELETED Subscription_ErrorType = 2 // The user that authorized the creation of the subscription no longer has // access to the subscription's target resource. Subscription_USER_AUTHORIZATION_FAILURE Subscription_ErrorType = 3 // The Google Workspace application doesn't have access to deliver // events to your subscription's notification endpoint. Subscription_ENDPOINT_PERMISSION_DENIED Subscription_ErrorType = 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. Subscription_ENDPOINT_NOT_FOUND Subscription_ErrorType = 6 // The subscription's notification endpoint failed to receive events due to // insufficient quota or reaching rate limiting. Subscription_ENDPOINT_RESOURCE_EXHAUSTED Subscription_ErrorType = 7 // An unidentified error has occurred. Subscription_OTHER Subscription_ErrorType = 5 )
func (Subscription_ErrorType) Descriptor ¶
func (Subscription_ErrorType) Descriptor() protoreflect.EnumDescriptor
func (Subscription_ErrorType) Enum ¶
func (x Subscription_ErrorType) Enum() *Subscription_ErrorType
func (Subscription_ErrorType) EnumDescriptor
deprecated
func (Subscription_ErrorType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Subscription_ErrorType.Descriptor instead.
func (Subscription_ErrorType) Number ¶
func (x Subscription_ErrorType) Number() protoreflect.EnumNumber
func (Subscription_ErrorType) String ¶
func (x Subscription_ErrorType) String() string
func (Subscription_ErrorType) Type ¶
func (Subscription_ErrorType) Type() protoreflect.EnumType
type Subscription_ExpireTime ¶
type Subscription_ExpireTime struct { // Non-empty default. The timestamp in UTC when the subscription expires. // Always displayed on output, regardless of what was used on input. ExpireTime *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=expire_time,json=expireTime,proto3,oneof"` }
type Subscription_State ¶
type Subscription_State int32
Possible states for the subscription.
const ( // Default value. This value is unused. Subscription_STATE_UNSPECIFIED Subscription_State = 0 // The subscription is active and can receive and deliver events to its // notification endpoint. Subscription_ACTIVE Subscription_State = 1 // The subscription is unable to receive events due to an error. // To identify the error, see the // [`suspension_reason`][google.apps.events.subscriptions.v1.Subscription.suspension_reason] // field. Subscription_SUSPENDED Subscription_State = 2 // The subscription is deleted. Subscription_DELETED Subscription_State = 3 )
func (Subscription_State) Descriptor ¶
func (Subscription_State) Descriptor() protoreflect.EnumDescriptor
func (Subscription_State) Enum ¶
func (x Subscription_State) Enum() *Subscription_State
func (Subscription_State) EnumDescriptor
deprecated
func (Subscription_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use Subscription_State.Descriptor instead.
func (Subscription_State) Number ¶
func (x Subscription_State) Number() protoreflect.EnumNumber
func (Subscription_State) String ¶
func (x Subscription_State) String() string
func (Subscription_State) Type ¶
func (Subscription_State) Type() protoreflect.EnumType
type Subscription_Ttl ¶
type Subscription_Ttl struct { // Input only. The time-to-live (TTL) or duration for the subscription. If // unspecified or set to `0`, uses the maximum possible duration. Ttl *durationpb.Duration `protobuf:"bytes,14,opt,name=ttl,proto3,oneof"` }
type SubscriptionsServiceClient ¶
type SubscriptionsServiceClient interface { // Creates a Google Workspace subscription. To learn how to use this // method, see [Create a Google Workspace // subscription](https://developers.google.com/workspace/events/guides/create-subscription). CreateSubscription(ctx context.Context, in *CreateSubscriptionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) // Deletes a Google Workspace subscription. // To learn how to use this method, see [Delete a Google Workspace // subscription](https://developers.google.com/workspace/events/guides/delete-subscription). DeleteSubscription(ctx context.Context, in *DeleteSubscriptionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) // Gets details about a Google Workspace subscription. To learn how to use // this method, see [Get details about a Google Workspace // subscription](https://developers.google.com/workspace/events/guides/get-subscription). GetSubscription(ctx context.Context, in *GetSubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error) // Lists Google Workspace subscriptions. To learn how to use this method, see // [List Google Workspace // subscriptions](https://developers.google.com/workspace/events/guides/list-subscriptions). ListSubscriptions(ctx context.Context, in *ListSubscriptionsRequest, opts ...grpc.CallOption) (*ListSubscriptionsResponse, error) // Updates or renews a Google Workspace subscription. To learn how to use this // method, see [Update or renew a Google Workspace // subscription](https://developers.google.com/workspace/events/guides/update-subscription). UpdateSubscription(ctx context.Context, in *UpdateSubscriptionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) // Reactivates a suspended Google Workspace subscription. // // This method resets your subscription's `State` field to `ACTIVE`. Before // you use this method, you must fix the error that suspended the // subscription. To learn how to use this method, see [Reactivate a Google // Workspace // subscription](https://developers.google.com/workspace/events/guides/reactivate-subscription). ReactivateSubscription(ctx context.Context, in *ReactivateSubscriptionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) }
SubscriptionsServiceClient is the client API for SubscriptionsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSubscriptionsServiceClient ¶
func NewSubscriptionsServiceClient(cc grpc.ClientConnInterface) SubscriptionsServiceClient
type SubscriptionsServiceServer ¶
type SubscriptionsServiceServer interface { // Creates a Google Workspace subscription. To learn how to use this // method, see [Create a Google Workspace // subscription](https://developers.google.com/workspace/events/guides/create-subscription). CreateSubscription(context.Context, *CreateSubscriptionRequest) (*longrunningpb.Operation, error) // Deletes a Google Workspace subscription. // To learn how to use this method, see [Delete a Google Workspace // subscription](https://developers.google.com/workspace/events/guides/delete-subscription). DeleteSubscription(context.Context, *DeleteSubscriptionRequest) (*longrunningpb.Operation, error) // Gets details about a Google Workspace subscription. To learn how to use // this method, see [Get details about a Google Workspace // subscription](https://developers.google.com/workspace/events/guides/get-subscription). GetSubscription(context.Context, *GetSubscriptionRequest) (*Subscription, error) // Lists Google Workspace subscriptions. To learn how to use this method, see // [List Google Workspace // subscriptions](https://developers.google.com/workspace/events/guides/list-subscriptions). ListSubscriptions(context.Context, *ListSubscriptionsRequest) (*ListSubscriptionsResponse, error) // Updates or renews a Google Workspace subscription. To learn how to use this // method, see [Update or renew a Google Workspace // subscription](https://developers.google.com/workspace/events/guides/update-subscription). UpdateSubscription(context.Context, *UpdateSubscriptionRequest) (*longrunningpb.Operation, error) // Reactivates a suspended Google Workspace subscription. // // This method resets your subscription's `State` field to `ACTIVE`. Before // you use this method, you must fix the error that suspended the // subscription. To learn how to use this method, see [Reactivate a Google // Workspace // subscription](https://developers.google.com/workspace/events/guides/reactivate-subscription). ReactivateSubscription(context.Context, *ReactivateSubscriptionRequest) (*longrunningpb.Operation, error) }
SubscriptionsServiceServer is the server API for SubscriptionsService service.
type UnimplementedSubscriptionsServiceServer ¶
type UnimplementedSubscriptionsServiceServer struct { }
UnimplementedSubscriptionsServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedSubscriptionsServiceServer) CreateSubscription ¶
func (*UnimplementedSubscriptionsServiceServer) CreateSubscription(context.Context, *CreateSubscriptionRequest) (*longrunningpb.Operation, error)
func (*UnimplementedSubscriptionsServiceServer) DeleteSubscription ¶
func (*UnimplementedSubscriptionsServiceServer) DeleteSubscription(context.Context, *DeleteSubscriptionRequest) (*longrunningpb.Operation, error)
func (*UnimplementedSubscriptionsServiceServer) GetSubscription ¶
func (*UnimplementedSubscriptionsServiceServer) GetSubscription(context.Context, *GetSubscriptionRequest) (*Subscription, error)
func (*UnimplementedSubscriptionsServiceServer) ListSubscriptions ¶
func (*UnimplementedSubscriptionsServiceServer) ListSubscriptions(context.Context, *ListSubscriptionsRequest) (*ListSubscriptionsResponse, error)
func (*UnimplementedSubscriptionsServiceServer) ReactivateSubscription ¶
func (*UnimplementedSubscriptionsServiceServer) ReactivateSubscription(context.Context, *ReactivateSubscriptionRequest) (*longrunningpb.Operation, error)
func (*UnimplementedSubscriptionsServiceServer) UpdateSubscription ¶
func (*UnimplementedSubscriptionsServiceServer) UpdateSubscription(context.Context, *UpdateSubscriptionRequest) (*longrunningpb.Operation, error)
type UpdateSubscriptionMetadata ¶
type UpdateSubscriptionMetadata struct {
// contains filtered or unexported fields
}
Metadata for UpdateSubscription LRO.
func (*UpdateSubscriptionMetadata) Descriptor
deprecated
func (*UpdateSubscriptionMetadata) Descriptor() ([]byte, []int)
Deprecated: Use UpdateSubscriptionMetadata.ProtoReflect.Descriptor instead.
func (*UpdateSubscriptionMetadata) ProtoMessage ¶
func (*UpdateSubscriptionMetadata) ProtoMessage()
func (*UpdateSubscriptionMetadata) ProtoReflect ¶
func (x *UpdateSubscriptionMetadata) ProtoReflect() protoreflect.Message
func (*UpdateSubscriptionMetadata) Reset ¶
func (x *UpdateSubscriptionMetadata) Reset()
func (*UpdateSubscriptionMetadata) String ¶
func (x *UpdateSubscriptionMetadata) String() string
type UpdateSubscriptionRequest ¶
type UpdateSubscriptionRequest struct { // Required. The subscription to update. // // The subscription's `name` field is used to identify the subscription to // update. Subscription *Subscription `protobuf:"bytes,1,opt,name=subscription,proto3" json:"subscription,omitempty"` // Optional. Required. The field to update. // // You can update one of the following fields in a subscription: // // - [`expire_time`][google.apps.events.subscriptions.v1.Subscription.expire_time]: The timestamp when the // subscription expires. // - [`ttl`][google.apps.events.subscriptions.v1.Subscription.ttl]: The // // time-to-live (TTL) or duration of the // // subscription. UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` // Optional. If set to `true`, validates and previews the request, but doesn't // update the subscription. ValidateOnly bool `protobuf:"varint,3,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` // contains filtered or unexported fields }
The request message for [SubscriptionsService.UpdateSubscription][google.apps.events.subscriptions.v1.SubscriptionsService.UpdateSubscription].
func (*UpdateSubscriptionRequest) Descriptor
deprecated
func (*UpdateSubscriptionRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateSubscriptionRequest.ProtoReflect.Descriptor instead.
func (*UpdateSubscriptionRequest) GetSubscription ¶
func (x *UpdateSubscriptionRequest) GetSubscription() *Subscription
func (*UpdateSubscriptionRequest) GetUpdateMask ¶
func (x *UpdateSubscriptionRequest) GetUpdateMask() *fieldmaskpb.FieldMask
func (*UpdateSubscriptionRequest) GetValidateOnly ¶
func (x *UpdateSubscriptionRequest) GetValidateOnly() bool
func (*UpdateSubscriptionRequest) ProtoMessage ¶
func (*UpdateSubscriptionRequest) ProtoMessage()
func (*UpdateSubscriptionRequest) ProtoReflect ¶
func (x *UpdateSubscriptionRequest) ProtoReflect() protoreflect.Message
func (*UpdateSubscriptionRequest) Reset ¶
func (x *UpdateSubscriptionRequest) Reset()
func (*UpdateSubscriptionRequest) String ¶
func (x *UpdateSubscriptionRequest) String() string