mirror of
https://github.com/mattermost/mattermost.git
synced 2026-02-03 20:40:00 -05:00
Go side: - Log hooks returned by Implemented() - Log each hook name -> ID mapping - Log OnActivate implementation status - Log OnActivate call flow Python side: - Log Implemented() return value - Log OnActivate gRPC receipt and handler invocation This is temporary debug logging to diagnose why OnActivate isn't being called for Python plugins. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
478 lines
22 KiB
Python
478 lines
22 KiB
Python
"""
|
|
@generated by mypy-protobuf. Do not edit manually!
|
|
isort:skip_file
|
|
Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
See LICENSE.txt for license information.
|
|
"""
|
|
|
|
from collections import abc as _abc
|
|
from google.protobuf import descriptor as _descriptor
|
|
from google.protobuf import message as _message
|
|
from google.protobuf import struct_pb2 as _struct_pb2
|
|
from google.protobuf.internal import containers as _containers
|
|
import builtins as _builtins
|
|
import file_pb2 as _file_pb2
|
|
import sys
|
|
import typing as _typing
|
|
import user_pb2 as _user_pb2
|
|
|
|
if sys.version_info >= (3, 10):
|
|
from typing import TypeAlias as _TypeAlias
|
|
else:
|
|
from typing_extensions import TypeAlias as _TypeAlias
|
|
|
|
DESCRIPTOR: _descriptor.FileDescriptor
|
|
|
|
@_typing.final
|
|
class PostMetadata(_message.Message):
|
|
"""PostMetadata contains additional metadata about a post.
|
|
Maps to model.PostMetadata in Go.
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
@_typing.final
|
|
class ImagesEntry(_message.Message):
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
KEY_FIELD_NUMBER: _builtins.int
|
|
VALUE_FIELD_NUMBER: _builtins.int
|
|
key: _builtins.str
|
|
@_builtins.property
|
|
def value(self) -> Global___PostImage: ...
|
|
def __init__(
|
|
self,
|
|
*,
|
|
key: _builtins.str = ...,
|
|
value: Global___PostImage | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
EMBEDS_FIELD_NUMBER: _builtins.int
|
|
REACTIONS_FIELD_NUMBER: _builtins.int
|
|
FILES_FIELD_NUMBER: _builtins.int
|
|
IMAGES_FIELD_NUMBER: _builtins.int
|
|
PRIORITY_FIELD_NUMBER: _builtins.int
|
|
ACKNOWLEDGEMENTS_FIELD_NUMBER: _builtins.int
|
|
@_builtins.property
|
|
def embeds(self) -> _containers.RepeatedCompositeFieldContainer[Global___PostEmbed]:
|
|
"""Embedded content (link previews, etc.)"""
|
|
|
|
@_builtins.property
|
|
def reactions(self) -> _containers.RepeatedCompositeFieldContainer[Global___Reaction]:
|
|
"""Emoji reactions on this post"""
|
|
|
|
@_builtins.property
|
|
def files(self) -> _containers.RepeatedCompositeFieldContainer[_file_pb2.FileInfo]:
|
|
"""File attachments"""
|
|
|
|
@_builtins.property
|
|
def images(self) -> _containers.MessageMap[_builtins.str, Global___PostImage]:
|
|
"""Images in the post (URLs to dimensions)"""
|
|
|
|
@_builtins.property
|
|
def priority(self) -> Global___PostPriority:
|
|
"""Post priority information"""
|
|
|
|
@_builtins.property
|
|
def acknowledgements(self) -> _containers.RepeatedCompositeFieldContainer[Global___PostAcknowledgement]:
|
|
"""Acknowledgements from users"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
embeds: _abc.Iterable[Global___PostEmbed] | None = ...,
|
|
reactions: _abc.Iterable[Global___Reaction] | None = ...,
|
|
files: _abc.Iterable[_file_pb2.FileInfo] | None = ...,
|
|
images: _abc.Mapping[_builtins.str, Global___PostImage] | None = ...,
|
|
priority: Global___PostPriority | None = ...,
|
|
acknowledgements: _abc.Iterable[Global___PostAcknowledgement] | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["_priority", b"_priority", "priority", b"priority"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["_priority", b"_priority", "acknowledgements", b"acknowledgements", "embeds", b"embeds", "files", b"files", "images", b"images", "priority", b"priority", "reactions", b"reactions"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
_WhichOneofReturnType__priority: _TypeAlias = _typing.Literal["priority"] # noqa: Y015
|
|
_WhichOneofArgType__priority: _TypeAlias = _typing.Literal["_priority", b"_priority"] # noqa: Y015
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__priority) -> _WhichOneofReturnType__priority | None: ...
|
|
|
|
Global___PostMetadata: _TypeAlias = PostMetadata # noqa: Y015
|
|
|
|
@_typing.final
|
|
class PostEmbed(_message.Message):
|
|
"""PostEmbed represents embedded content in a post."""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
TYPE_FIELD_NUMBER: _builtins.int
|
|
URL_FIELD_NUMBER: _builtins.int
|
|
DATA_FIELD_NUMBER: _builtins.int
|
|
type: _builtins.str
|
|
"""The type of embed (e.g., "link", "opengraph", "image")"""
|
|
url: _builtins.str
|
|
"""The URL being embedded"""
|
|
@_builtins.property
|
|
def data(self) -> _struct_pb2.Struct:
|
|
"""The embedded data (structure depends on type)"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
type: _builtins.str = ...,
|
|
url: _builtins.str = ...,
|
|
data: _struct_pb2.Struct | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["data", b"data"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "type", b"type", "url", b"url"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___PostEmbed: _TypeAlias = PostEmbed # noqa: Y015
|
|
|
|
@_typing.final
|
|
class PostImage(_message.Message):
|
|
"""PostImage represents image dimensions."""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
WIDTH_FIELD_NUMBER: _builtins.int
|
|
HEIGHT_FIELD_NUMBER: _builtins.int
|
|
FORMAT_FIELD_NUMBER: _builtins.int
|
|
FRAME_COUNT_FIELD_NUMBER: _builtins.int
|
|
width: _builtins.int
|
|
height: _builtins.int
|
|
format: _builtins.str
|
|
frame_count: _builtins.int
|
|
def __init__(
|
|
self,
|
|
*,
|
|
width: _builtins.int = ...,
|
|
height: _builtins.int = ...,
|
|
format: _builtins.str = ...,
|
|
frame_count: _builtins.int = ...,
|
|
) -> None: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["format", b"format", "frame_count", b"frame_count", "height", b"height", "width", b"width"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___PostImage: _TypeAlias = PostImage # noqa: Y015
|
|
|
|
@_typing.final
|
|
class PostPriority(_message.Message):
|
|
"""PostPriority represents priority settings for a post."""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
PRIORITY_FIELD_NUMBER: _builtins.int
|
|
REQUESTED_ACK_FIELD_NUMBER: _builtins.int
|
|
PERSISTENT_NOTIFICATIONS_FIELD_NUMBER: _builtins.int
|
|
priority: _builtins.str
|
|
"""Priority level (e.g., "urgent")"""
|
|
requested_ack: _builtins.bool
|
|
"""Whether acknowledgement was requested"""
|
|
persistent_notifications: _builtins.bool
|
|
"""Whether persistent notifications are enabled"""
|
|
def __init__(
|
|
self,
|
|
*,
|
|
priority: _builtins.str | None = ...,
|
|
requested_ack: _builtins.bool | None = ...,
|
|
persistent_notifications: _builtins.bool | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["_persistent_notifications", b"_persistent_notifications", "_priority", b"_priority", "_requested_ack", b"_requested_ack", "persistent_notifications", b"persistent_notifications", "priority", b"priority", "requested_ack", b"requested_ack"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["_persistent_notifications", b"_persistent_notifications", "_priority", b"_priority", "_requested_ack", b"_requested_ack", "persistent_notifications", b"persistent_notifications", "priority", b"priority", "requested_ack", b"requested_ack"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
_WhichOneofReturnType__persistent_notifications: _TypeAlias = _typing.Literal["persistent_notifications"] # noqa: Y015
|
|
_WhichOneofArgType__persistent_notifications: _TypeAlias = _typing.Literal["_persistent_notifications", b"_persistent_notifications"] # noqa: Y015
|
|
_WhichOneofReturnType__priority: _TypeAlias = _typing.Literal["priority"] # noqa: Y015
|
|
_WhichOneofArgType__priority: _TypeAlias = _typing.Literal["_priority", b"_priority"] # noqa: Y015
|
|
_WhichOneofReturnType__requested_ack: _TypeAlias = _typing.Literal["requested_ack"] # noqa: Y015
|
|
_WhichOneofArgType__requested_ack: _TypeAlias = _typing.Literal["_requested_ack", b"_requested_ack"] # noqa: Y015
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__persistent_notifications) -> _WhichOneofReturnType__persistent_notifications | None: ...
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__priority) -> _WhichOneofReturnType__priority | None: ...
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__requested_ack) -> _WhichOneofReturnType__requested_ack | None: ...
|
|
|
|
Global___PostPriority: _TypeAlias = PostPriority # noqa: Y015
|
|
|
|
@_typing.final
|
|
class PostAcknowledgement(_message.Message):
|
|
"""PostAcknowledgement represents a user's acknowledgement of a post."""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
USER_ID_FIELD_NUMBER: _builtins.int
|
|
POST_ID_FIELD_NUMBER: _builtins.int
|
|
ACKNOWLEDGED_AT_FIELD_NUMBER: _builtins.int
|
|
user_id: _builtins.str
|
|
post_id: _builtins.str
|
|
acknowledged_at: _builtins.int
|
|
def __init__(
|
|
self,
|
|
*,
|
|
user_id: _builtins.str = ...,
|
|
post_id: _builtins.str = ...,
|
|
acknowledged_at: _builtins.int = ...,
|
|
) -> None: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["acknowledged_at", b"acknowledged_at", "post_id", b"post_id", "user_id", b"user_id"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___PostAcknowledgement: _TypeAlias = PostAcknowledgement # noqa: Y015
|
|
|
|
@_typing.final
|
|
class Reaction(_message.Message):
|
|
"""Reaction represents a user's emoji reaction to a post.
|
|
Maps to model.Reaction in Go.
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
USER_ID_FIELD_NUMBER: _builtins.int
|
|
POST_ID_FIELD_NUMBER: _builtins.int
|
|
EMOJI_NAME_FIELD_NUMBER: _builtins.int
|
|
CREATE_AT_FIELD_NUMBER: _builtins.int
|
|
UPDATE_AT_FIELD_NUMBER: _builtins.int
|
|
DELETE_AT_FIELD_NUMBER: _builtins.int
|
|
REMOTE_ID_FIELD_NUMBER: _builtins.int
|
|
CHANNEL_ID_FIELD_NUMBER: _builtins.int
|
|
user_id: _builtins.str
|
|
post_id: _builtins.str
|
|
emoji_name: _builtins.str
|
|
create_at: _builtins.int
|
|
update_at: _builtins.int
|
|
delete_at: _builtins.int
|
|
remote_id: _builtins.str
|
|
channel_id: _builtins.str
|
|
def __init__(
|
|
self,
|
|
*,
|
|
user_id: _builtins.str = ...,
|
|
post_id: _builtins.str = ...,
|
|
emoji_name: _builtins.str = ...,
|
|
create_at: _builtins.int = ...,
|
|
update_at: _builtins.int = ...,
|
|
delete_at: _builtins.int = ...,
|
|
remote_id: _builtins.str | None = ...,
|
|
channel_id: _builtins.str | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["_channel_id", b"_channel_id", "_remote_id", b"_remote_id", "channel_id", b"channel_id", "remote_id", b"remote_id"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["_channel_id", b"_channel_id", "_remote_id", b"_remote_id", "channel_id", b"channel_id", "create_at", b"create_at", "delete_at", b"delete_at", "emoji_name", b"emoji_name", "post_id", b"post_id", "remote_id", b"remote_id", "update_at", b"update_at", "user_id", b"user_id"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
_WhichOneofReturnType__channel_id: _TypeAlias = _typing.Literal["channel_id"] # noqa: Y015
|
|
_WhichOneofArgType__channel_id: _TypeAlias = _typing.Literal["_channel_id", b"_channel_id"] # noqa: Y015
|
|
_WhichOneofReturnType__remote_id: _TypeAlias = _typing.Literal["remote_id"] # noqa: Y015
|
|
_WhichOneofArgType__remote_id: _TypeAlias = _typing.Literal["_remote_id", b"_remote_id"] # noqa: Y015
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__channel_id) -> _WhichOneofReturnType__channel_id | None: ...
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__remote_id) -> _WhichOneofReturnType__remote_id | None: ...
|
|
|
|
Global___Reaction: _TypeAlias = Reaction # noqa: Y015
|
|
|
|
@_typing.final
|
|
class Post(_message.Message):
|
|
"""Post represents a message/post in Mattermost.
|
|
Maps to model.Post in Go.
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
ID_FIELD_NUMBER: _builtins.int
|
|
CREATE_AT_FIELD_NUMBER: _builtins.int
|
|
UPDATE_AT_FIELD_NUMBER: _builtins.int
|
|
EDIT_AT_FIELD_NUMBER: _builtins.int
|
|
DELETE_AT_FIELD_NUMBER: _builtins.int
|
|
IS_PINNED_FIELD_NUMBER: _builtins.int
|
|
USER_ID_FIELD_NUMBER: _builtins.int
|
|
CHANNEL_ID_FIELD_NUMBER: _builtins.int
|
|
ROOT_ID_FIELD_NUMBER: _builtins.int
|
|
ORIGINAL_ID_FIELD_NUMBER: _builtins.int
|
|
MESSAGE_FIELD_NUMBER: _builtins.int
|
|
MESSAGE_SOURCE_FIELD_NUMBER: _builtins.int
|
|
TYPE_FIELD_NUMBER: _builtins.int
|
|
PROPS_FIELD_NUMBER: _builtins.int
|
|
HASHTAGS_FIELD_NUMBER: _builtins.int
|
|
FILE_IDS_FIELD_NUMBER: _builtins.int
|
|
PENDING_POST_ID_FIELD_NUMBER: _builtins.int
|
|
HAS_REACTIONS_FIELD_NUMBER: _builtins.int
|
|
REMOTE_ID_FIELD_NUMBER: _builtins.int
|
|
REPLY_COUNT_FIELD_NUMBER: _builtins.int
|
|
LAST_REPLY_AT_FIELD_NUMBER: _builtins.int
|
|
PARTICIPANTS_FIELD_NUMBER: _builtins.int
|
|
IS_FOLLOWING_FIELD_NUMBER: _builtins.int
|
|
METADATA_FIELD_NUMBER: _builtins.int
|
|
id: _builtins.str
|
|
"""Unique identifier for the post (26-char ID)"""
|
|
create_at: _builtins.int
|
|
"""Timestamp when the post was created (milliseconds since epoch)"""
|
|
update_at: _builtins.int
|
|
"""Timestamp when the post was last updated (milliseconds since epoch)"""
|
|
edit_at: _builtins.int
|
|
"""Timestamp when the post was last edited (0 if never edited)"""
|
|
delete_at: _builtins.int
|
|
"""Timestamp when the post was deleted (0 if not deleted)"""
|
|
is_pinned: _builtins.bool
|
|
"""Whether the post is pinned to the channel"""
|
|
user_id: _builtins.str
|
|
"""ID of the user who created the post"""
|
|
channel_id: _builtins.str
|
|
"""ID of the channel this post belongs to"""
|
|
root_id: _builtins.str
|
|
"""ID of the root post if this is a reply (empty for root posts)"""
|
|
original_id: _builtins.str
|
|
"""Original post ID (used for cross-posting)"""
|
|
message: _builtins.str
|
|
"""The message content"""
|
|
message_source: _builtins.str
|
|
"""Original message before server modifications (for edit boxes)"""
|
|
type: _builtins.str
|
|
"""Post type (empty for normal posts, "system_*" for system messages)"""
|
|
hashtags: _builtins.str
|
|
"""Extracted hashtags from the message"""
|
|
pending_post_id: _builtins.str
|
|
"""Client-generated ID for deduplication"""
|
|
has_reactions: _builtins.bool
|
|
"""Whether this post has emoji reactions"""
|
|
remote_id: _builtins.str
|
|
"""Remote cluster ID if this post is from a shared channel"""
|
|
reply_count: _builtins.int
|
|
"""Number of replies (for root posts only)"""
|
|
last_reply_at: _builtins.int
|
|
"""Timestamp of the last reply (for root posts only)"""
|
|
is_following: _builtins.bool
|
|
"""Whether the current user is following this thread"""
|
|
@_builtins.property
|
|
def props(self) -> _struct_pb2.Struct:
|
|
"""Post-specific properties (attachments, webhook data, etc.)
|
|
Maps to model.StringInterface (map[string]any) in Go
|
|
"""
|
|
|
|
@_builtins.property
|
|
def file_ids(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]:
|
|
"""IDs of attached files"""
|
|
|
|
@_builtins.property
|
|
def participants(self) -> _containers.RepeatedCompositeFieldContainer[_user_pb2.User]:
|
|
"""Users who participated in the thread"""
|
|
|
|
@_builtins.property
|
|
def metadata(self) -> Global___PostMetadata:
|
|
"""Additional metadata (embeds, reactions, files, etc.)"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
id: _builtins.str = ...,
|
|
create_at: _builtins.int = ...,
|
|
update_at: _builtins.int = ...,
|
|
edit_at: _builtins.int = ...,
|
|
delete_at: _builtins.int = ...,
|
|
is_pinned: _builtins.bool = ...,
|
|
user_id: _builtins.str = ...,
|
|
channel_id: _builtins.str = ...,
|
|
root_id: _builtins.str = ...,
|
|
original_id: _builtins.str = ...,
|
|
message: _builtins.str = ...,
|
|
message_source: _builtins.str = ...,
|
|
type: _builtins.str = ...,
|
|
props: _struct_pb2.Struct | None = ...,
|
|
hashtags: _builtins.str = ...,
|
|
file_ids: _abc.Iterable[_builtins.str] | None = ...,
|
|
pending_post_id: _builtins.str = ...,
|
|
has_reactions: _builtins.bool = ...,
|
|
remote_id: _builtins.str | None = ...,
|
|
reply_count: _builtins.int = ...,
|
|
last_reply_at: _builtins.int = ...,
|
|
participants: _abc.Iterable[_user_pb2.User] | None = ...,
|
|
is_following: _builtins.bool | None = ...,
|
|
metadata: Global___PostMetadata | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["_is_following", b"_is_following", "_metadata", b"_metadata", "_remote_id", b"_remote_id", "is_following", b"is_following", "metadata", b"metadata", "props", b"props", "remote_id", b"remote_id"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["_is_following", b"_is_following", "_metadata", b"_metadata", "_remote_id", b"_remote_id", "channel_id", b"channel_id", "create_at", b"create_at", "delete_at", b"delete_at", "edit_at", b"edit_at", "file_ids", b"file_ids", "has_reactions", b"has_reactions", "hashtags", b"hashtags", "id", b"id", "is_following", b"is_following", "is_pinned", b"is_pinned", "last_reply_at", b"last_reply_at", "message", b"message", "message_source", b"message_source", "metadata", b"metadata", "original_id", b"original_id", "participants", b"participants", "pending_post_id", b"pending_post_id", "props", b"props", "remote_id", b"remote_id", "reply_count", b"reply_count", "root_id", b"root_id", "type", b"type", "update_at", b"update_at", "user_id", b"user_id"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
_WhichOneofReturnType__is_following: _TypeAlias = _typing.Literal["is_following"] # noqa: Y015
|
|
_WhichOneofArgType__is_following: _TypeAlias = _typing.Literal["_is_following", b"_is_following"] # noqa: Y015
|
|
_WhichOneofReturnType__metadata: _TypeAlias = _typing.Literal["metadata"] # noqa: Y015
|
|
_WhichOneofArgType__metadata: _TypeAlias = _typing.Literal["_metadata", b"_metadata"] # noqa: Y015
|
|
_WhichOneofReturnType__remote_id: _TypeAlias = _typing.Literal["remote_id"] # noqa: Y015
|
|
_WhichOneofArgType__remote_id: _TypeAlias = _typing.Literal["_remote_id", b"_remote_id"] # noqa: Y015
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__is_following) -> _WhichOneofReturnType__is_following | None: ...
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__metadata) -> _WhichOneofReturnType__metadata | None: ...
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__remote_id) -> _WhichOneofReturnType__remote_id | None: ...
|
|
|
|
Global___Post: _TypeAlias = Post # noqa: Y015
|
|
|
|
@_typing.final
|
|
class PostList(_message.Message):
|
|
"""PostList represents a list of posts with ordering information.
|
|
Maps to model.PostList in Go.
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
@_typing.final
|
|
class PostsEntry(_message.Message):
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
KEY_FIELD_NUMBER: _builtins.int
|
|
VALUE_FIELD_NUMBER: _builtins.int
|
|
key: _builtins.str
|
|
@_builtins.property
|
|
def value(self) -> Global___Post: ...
|
|
def __init__(
|
|
self,
|
|
*,
|
|
key: _builtins.str = ...,
|
|
value: Global___Post | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["value", b"value"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["key", b"key", "value", b"value"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
ORDER_FIELD_NUMBER: _builtins.int
|
|
POSTS_FIELD_NUMBER: _builtins.int
|
|
NEXT_POST_ID_FIELD_NUMBER: _builtins.int
|
|
PREV_POST_ID_FIELD_NUMBER: _builtins.int
|
|
FIRST_INACCESSIBLE_POST_TIME_FIELD_NUMBER: _builtins.int
|
|
HAS_NEXT_FIELD_NUMBER: _builtins.int
|
|
next_post_id: _builtins.str
|
|
"""The ID to use for fetching the next page"""
|
|
prev_post_id: _builtins.str
|
|
"""The ID to use for fetching the previous page"""
|
|
first_inaccessible_post_time: _builtins.bool
|
|
"""Whether the first post in the list is at the channel's first unread"""
|
|
has_next: _builtins.bool
|
|
"""Whether there are more posts to fetch"""
|
|
@_builtins.property
|
|
def order(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]:
|
|
"""Ordered list of post IDs"""
|
|
|
|
@_builtins.property
|
|
def posts(self) -> _containers.MessageMap[_builtins.str, Global___Post]:
|
|
"""Map of post ID to Post"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
order: _abc.Iterable[_builtins.str] | None = ...,
|
|
posts: _abc.Mapping[_builtins.str, Global___Post] | None = ...,
|
|
next_post_id: _builtins.str = ...,
|
|
prev_post_id: _builtins.str = ...,
|
|
first_inaccessible_post_time: _builtins.bool = ...,
|
|
has_next: _builtins.bool = ...,
|
|
) -> None: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["first_inaccessible_post_time", b"first_inaccessible_post_time", "has_next", b"has_next", "next_post_id", b"next_post_id", "order", b"order", "posts", b"posts", "prev_post_id", b"prev_post_id"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___PostList: _TypeAlias = PostList # noqa: Y015
|