mattermost/python-sdk/build/lib/mattermost_plugin/grpc/hooks_lifecycle_pb2.pyi
Nick Misasi 01643af641 debug: add extensive logging to trace hook registration flow
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>
2026-01-20 09:12:22 -05:00

647 lines
25 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 wrappers_pb2 as _wrappers_pb2
from google.protobuf.internal import containers as _containers
import builtins as _builtins
import common_pb2 as _common_pb2
import hooks_common_pb2 as _hooks_common_pb2
import sys
import typing as _typing
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 OnInstallEvent(_message.Message):
"""-----------------------------------------------------------------------------
OnInstallEvent - Model type for OnInstall hook
Maps to model.OnInstallEvent in Go (server/public/model/plugin_on_install_event.go)
-----------------------------------------------------------------------------
OnInstallEvent is sent to the plugin when it gets installed.
"""
DESCRIPTOR: _descriptor.Descriptor
USER_ID_FIELD_NUMBER: _builtins.int
user_id: _builtins.str
"""The user who installed the plugin"""
def __init__(
self,
*,
user_id: _builtins.str = ...,
) -> None: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["user_id", b"user_id"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___OnInstallEvent: _TypeAlias = OnInstallEvent # noqa: Y015
@_typing.final
class FilesLimits(_message.Message):
"""-----------------------------------------------------------------------------
ProductLimits - Model types for OnCloudLimitsUpdated hook
Maps to model.ProductLimits in Go (server/public/model/cloud.go)
Uses protobuf wrappers for nullable integers to distinguish "not set" from 0.
-----------------------------------------------------------------------------
FilesLimits contains limits related to file storage.
"""
DESCRIPTOR: _descriptor.Descriptor
TOTAL_STORAGE_FIELD_NUMBER: _builtins.int
@_builtins.property
def total_storage(self) -> _wrappers_pb2.Int64Value:
"""Total storage limit in bytes. Null means unlimited."""
def __init__(
self,
*,
total_storage: _wrappers_pb2.Int64Value | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["total_storage", b"total_storage"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["total_storage", b"total_storage"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___FilesLimits: _TypeAlias = FilesLimits # noqa: Y015
@_typing.final
class MessagesLimits(_message.Message):
"""MessagesLimits contains limits related to message history."""
DESCRIPTOR: _descriptor.Descriptor
HISTORY_FIELD_NUMBER: _builtins.int
@_builtins.property
def history(self) -> _wrappers_pb2.Int32Value:
"""Number of days of message history to retain. Null means unlimited."""
def __init__(
self,
*,
history: _wrappers_pb2.Int32Value | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["history", b"history"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["history", b"history"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___MessagesLimits: _TypeAlias = MessagesLimits # noqa: Y015
@_typing.final
class TeamsLimits(_message.Message):
"""TeamsLimits contains limits related to teams."""
DESCRIPTOR: _descriptor.Descriptor
ACTIVE_FIELD_NUMBER: _builtins.int
@_builtins.property
def active(self) -> _wrappers_pb2.Int32Value:
"""Maximum number of active teams. Null means unlimited."""
def __init__(
self,
*,
active: _wrappers_pb2.Int32Value | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["active", b"active"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["active", b"active"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___TeamsLimits: _TypeAlias = TeamsLimits # noqa: Y015
@_typing.final
class ProductLimits(_message.Message):
"""ProductLimits represents cloud product tier limits.
Maps to model.ProductLimits in Go.
"""
DESCRIPTOR: _descriptor.Descriptor
FILES_FIELD_NUMBER: _builtins.int
MESSAGES_FIELD_NUMBER: _builtins.int
TEAMS_FIELD_NUMBER: _builtins.int
@_builtins.property
def files(self) -> Global___FilesLimits:
"""File storage limits (may be null if no limits apply)"""
@_builtins.property
def messages(self) -> Global___MessagesLimits:
"""Message history limits (may be null if no limits apply)"""
@_builtins.property
def teams(self) -> Global___TeamsLimits:
"""Team limits (may be null if no limits apply)"""
def __init__(
self,
*,
files: Global___FilesLimits | None = ...,
messages: Global___MessagesLimits | None = ...,
teams: Global___TeamsLimits | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["files", b"files", "messages", b"messages", "teams", b"teams"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["files", b"files", "messages", b"messages", "teams", b"teams"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___ProductLimits: _TypeAlias = ProductLimits # noqa: Y015
@_typing.final
class ConfigJson(_message.Message):
"""-----------------------------------------------------------------------------
ConfigJson - Wrapper for model.Config (massive struct, uses JSON blob)
model.Config is too large and volatile to define as a protobuf message.
We use a JSON blob approach to avoid maintaining a 5k+ line proto schema.
-----------------------------------------------------------------------------
ConfigJson wraps a serialized model.Config as JSON bytes.
The Go server serializes model.Config via json.Marshal before sending,
and deserializes via json.Unmarshal when receiving.
"""
DESCRIPTOR: _descriptor.Descriptor
CONFIG_JSON_FIELD_NUMBER: _builtins.int
config_json: _builtins.bytes
"""JSON-encoded model.Config"""
def __init__(
self,
*,
config_json: _builtins.bytes = ...,
) -> None: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["config_json", b"config_json"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___ConfigJson: _TypeAlias = ConfigJson # noqa: Y015
@_typing.final
class ImplementedRequest(_message.Message):
"""-----------------------------------------------------------------------------
Implemented Hook
Signature: Implemented() ([]string, error)
Returns the list of hooks implemented by the plugin.
-----------------------------------------------------------------------------
"""
DESCRIPTOR: _descriptor.Descriptor
CONTEXT_FIELD_NUMBER: _builtins.int
@_builtins.property
def context(self) -> _common_pb2.RequestContext: ...
def __init__(
self,
*,
context: _common_pb2.RequestContext | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___ImplementedRequest: _TypeAlias = ImplementedRequest # noqa: Y015
@_typing.final
class ImplementedResponse(_message.Message):
DESCRIPTOR: _descriptor.Descriptor
ERROR_FIELD_NUMBER: _builtins.int
HOOKS_FIELD_NUMBER: _builtins.int
@_builtins.property
def error(self) -> _common_pb2.AppError: ...
@_builtins.property
def hooks(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]:
"""List of hook names implemented by the plugin
Examples: "OnActivate", "MessageWillBePosted", "ServeHTTP"
"""
def __init__(
self,
*,
error: _common_pb2.AppError | None = ...,
hooks: _abc.Iterable[_builtins.str] | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error", "hooks", b"hooks"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___ImplementedResponse: _TypeAlias = ImplementedResponse # noqa: Y015
@_typing.final
class OnActivateRequest(_message.Message):
"""-----------------------------------------------------------------------------
OnActivate Hook
Signature: OnActivate() error
Invoked when the plugin is activated.
-----------------------------------------------------------------------------
"""
DESCRIPTOR: _descriptor.Descriptor
CONTEXT_FIELD_NUMBER: _builtins.int
@_builtins.property
def context(self) -> _common_pb2.RequestContext: ...
def __init__(
self,
*,
context: _common_pb2.RequestContext | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___OnActivateRequest: _TypeAlias = OnActivateRequest # noqa: Y015
@_typing.final
class OnActivateResponse(_message.Message):
DESCRIPTOR: _descriptor.Descriptor
ERROR_FIELD_NUMBER: _builtins.int
@_builtins.property
def error(self) -> _common_pb2.AppError: ...
def __init__(
self,
*,
error: _common_pb2.AppError | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___OnActivateResponse: _TypeAlias = OnActivateResponse # noqa: Y015
@_typing.final
class OnDeactivateRequest(_message.Message):
"""-----------------------------------------------------------------------------
OnDeactivate Hook
Signature: OnDeactivate() error
Invoked when the plugin is deactivated.
-----------------------------------------------------------------------------
"""
DESCRIPTOR: _descriptor.Descriptor
CONTEXT_FIELD_NUMBER: _builtins.int
@_builtins.property
def context(self) -> _common_pb2.RequestContext: ...
def __init__(
self,
*,
context: _common_pb2.RequestContext | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___OnDeactivateRequest: _TypeAlias = OnDeactivateRequest # noqa: Y015
@_typing.final
class OnDeactivateResponse(_message.Message):
DESCRIPTOR: _descriptor.Descriptor
ERROR_FIELD_NUMBER: _builtins.int
@_builtins.property
def error(self) -> _common_pb2.AppError: ...
def __init__(
self,
*,
error: _common_pb2.AppError | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___OnDeactivateResponse: _TypeAlias = OnDeactivateResponse # noqa: Y015
@_typing.final
class OnConfigurationChangeRequest(_message.Message):
"""-----------------------------------------------------------------------------
OnConfigurationChange Hook
Signature: OnConfigurationChange() error
Invoked when configuration changes may have been made.
-----------------------------------------------------------------------------
"""
DESCRIPTOR: _descriptor.Descriptor
CONTEXT_FIELD_NUMBER: _builtins.int
@_builtins.property
def context(self) -> _common_pb2.RequestContext: ...
def __init__(
self,
*,
context: _common_pb2.RequestContext | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___OnConfigurationChangeRequest: _TypeAlias = OnConfigurationChangeRequest # noqa: Y015
@_typing.final
class OnConfigurationChangeResponse(_message.Message):
DESCRIPTOR: _descriptor.Descriptor
ERROR_FIELD_NUMBER: _builtins.int
@_builtins.property
def error(self) -> _common_pb2.AppError: ...
def __init__(
self,
*,
error: _common_pb2.AppError | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___OnConfigurationChangeResponse: _TypeAlias = OnConfigurationChangeResponse # noqa: Y015
@_typing.final
class OnInstallRequest(_message.Message):
"""-----------------------------------------------------------------------------
OnInstall Hook
Signature: OnInstall(c *Context, event model.OnInstallEvent) error
Invoked after the installation of a plugin as part of onboarding.
-----------------------------------------------------------------------------
"""
DESCRIPTOR: _descriptor.Descriptor
CONTEXT_FIELD_NUMBER: _builtins.int
PLUGIN_CONTEXT_FIELD_NUMBER: _builtins.int
EVENT_FIELD_NUMBER: _builtins.int
@_builtins.property
def context(self) -> _common_pb2.RequestContext: ...
@_builtins.property
def plugin_context(self) -> _hooks_common_pb2.PluginContext:
"""Plugin context with session/request metadata"""
@_builtins.property
def event(self) -> Global___OnInstallEvent:
"""The install event containing the user who installed the plugin"""
def __init__(
self,
*,
context: _common_pb2.RequestContext | None = ...,
plugin_context: _hooks_common_pb2.PluginContext | None = ...,
event: Global___OnInstallEvent | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "event", b"event", "plugin_context", b"plugin_context"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "event", b"event", "plugin_context", b"plugin_context"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___OnInstallRequest: _TypeAlias = OnInstallRequest # noqa: Y015
@_typing.final
class OnInstallResponse(_message.Message):
DESCRIPTOR: _descriptor.Descriptor
ERROR_FIELD_NUMBER: _builtins.int
@_builtins.property
def error(self) -> _common_pb2.AppError: ...
def __init__(
self,
*,
error: _common_pb2.AppError | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___OnInstallResponse: _TypeAlias = OnInstallResponse # noqa: Y015
@_typing.final
class OnSendDailyTelemetryRequest(_message.Message):
"""-----------------------------------------------------------------------------
OnSendDailyTelemetry Hook
Signature: OnSendDailyTelemetry()
Invoked when the server sends daily telemetry data.
Note: This hook has no parameters and returns nothing.
-----------------------------------------------------------------------------
"""
DESCRIPTOR: _descriptor.Descriptor
CONTEXT_FIELD_NUMBER: _builtins.int
@_builtins.property
def context(self) -> _common_pb2.RequestContext: ...
def __init__(
self,
*,
context: _common_pb2.RequestContext | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___OnSendDailyTelemetryRequest: _TypeAlias = OnSendDailyTelemetryRequest # noqa: Y015
@_typing.final
class OnSendDailyTelemetryResponse(_message.Message):
"""No error field because the Go signature has no return value.
Hook failures are logged but do not affect server operation.
"""
DESCRIPTOR: _descriptor.Descriptor
def __init__(
self,
) -> None: ...
Global___OnSendDailyTelemetryResponse: _TypeAlias = OnSendDailyTelemetryResponse # noqa: Y015
@_typing.final
class RunDataRetentionRequest(_message.Message):
"""-----------------------------------------------------------------------------
RunDataRetention Hook
Signature: RunDataRetention(nowTime, batchSize int64) (int64, error)
Invoked during a DataRetentionJob to allow plugins to clean up old data.
-----------------------------------------------------------------------------
"""
DESCRIPTOR: _descriptor.Descriptor
CONTEXT_FIELD_NUMBER: _builtins.int
NOW_TIME_FIELD_NUMBER: _builtins.int
BATCH_SIZE_FIELD_NUMBER: _builtins.int
now_time: _builtins.int
"""The current time as Unix timestamp in milliseconds.
Plugins should delete data older than their retention policy relative to this time.
"""
batch_size: _builtins.int
"""The maximum number of items to process in this batch.
Plugins should respect this limit to avoid long-running operations.
"""
@_builtins.property
def context(self) -> _common_pb2.RequestContext: ...
def __init__(
self,
*,
context: _common_pb2.RequestContext | None = ...,
now_time: _builtins.int = ...,
batch_size: _builtins.int = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["batch_size", b"batch_size", "context", b"context", "now_time", b"now_time"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___RunDataRetentionRequest: _TypeAlias = RunDataRetentionRequest # noqa: Y015
@_typing.final
class RunDataRetentionResponse(_message.Message):
DESCRIPTOR: _descriptor.Descriptor
ERROR_FIELD_NUMBER: _builtins.int
DELETED_COUNT_FIELD_NUMBER: _builtins.int
deleted_count: _builtins.int
"""The number of items deleted in this batch.
Used for reporting and determining if another batch is needed.
"""
@_builtins.property
def error(self) -> _common_pb2.AppError: ...
def __init__(
self,
*,
error: _common_pb2.AppError | None = ...,
deleted_count: _builtins.int = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["deleted_count", b"deleted_count", "error", b"error"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___RunDataRetentionResponse: _TypeAlias = RunDataRetentionResponse # noqa: Y015
@_typing.final
class OnCloudLimitsUpdatedRequest(_message.Message):
"""-----------------------------------------------------------------------------
OnCloudLimitsUpdated Hook
Signature: OnCloudLimitsUpdated(limits *model.ProductLimits)
Invoked when cloud product limits change (e.g., plan tier changes).
Note: This hook returns nothing.
-----------------------------------------------------------------------------
"""
DESCRIPTOR: _descriptor.Descriptor
CONTEXT_FIELD_NUMBER: _builtins.int
LIMITS_FIELD_NUMBER: _builtins.int
@_builtins.property
def context(self) -> _common_pb2.RequestContext: ...
@_builtins.property
def limits(self) -> Global___ProductLimits:
"""The updated product limits. May be null if limits are removed."""
def __init__(
self,
*,
context: _common_pb2.RequestContext | None = ...,
limits: Global___ProductLimits | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "limits", b"limits"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "limits", b"limits"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___OnCloudLimitsUpdatedRequest: _TypeAlias = OnCloudLimitsUpdatedRequest # noqa: Y015
@_typing.final
class OnCloudLimitsUpdatedResponse(_message.Message):
"""No error field because the Go signature has no return value.
Hook failures are logged but do not affect server operation.
"""
DESCRIPTOR: _descriptor.Descriptor
def __init__(
self,
) -> None: ...
Global___OnCloudLimitsUpdatedResponse: _TypeAlias = OnCloudLimitsUpdatedResponse # noqa: Y015
@_typing.final
class ConfigurationWillBeSavedRequest(_message.Message):
"""-----------------------------------------------------------------------------
ConfigurationWillBeSaved Hook
Signature: ConfigurationWillBeSaved(newCfg *model.Config) (*model.Config, error)
Invoked before saving the configuration to the backing store.
Allows plugins to reject or modify configuration changes.
-----------------------------------------------------------------------------
"""
DESCRIPTOR: _descriptor.Descriptor
CONTEXT_FIELD_NUMBER: _builtins.int
NEW_CONFIG_FIELD_NUMBER: _builtins.int
@_builtins.property
def context(self) -> _common_pb2.RequestContext: ...
@_builtins.property
def new_config(self) -> Global___ConfigJson:
"""The new configuration about to be saved, as JSON bytes."""
def __init__(
self,
*,
context: _common_pb2.RequestContext | None = ...,
new_config: Global___ConfigJson | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "new_config", b"new_config"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "new_config", b"new_config"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___ConfigurationWillBeSavedRequest: _TypeAlias = ConfigurationWillBeSavedRequest # noqa: Y015
@_typing.final
class ConfigurationWillBeSavedResponse(_message.Message):
DESCRIPTOR: _descriptor.Descriptor
ERROR_FIELD_NUMBER: _builtins.int
MODIFIED_CONFIG_FIELD_NUMBER: _builtins.int
@_builtins.property
def error(self) -> _common_pb2.AppError: ...
@_builtins.property
def modified_config(self) -> Global___ConfigJson:
"""The modified configuration to save instead, as JSON bytes.
If null/empty and error is null, the original new_config is saved.
If set, this configuration is saved instead of new_config.
"""
def __init__(
self,
*,
error: _common_pb2.AppError | None = ...,
modified_config: Global___ConfigJson | None = ...,
) -> None: ...
_HasFieldArgType: _TypeAlias = _typing.Literal["error", b"error", "modified_config", b"modified_config"] # noqa: Y015
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
_ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error", "modified_config", b"modified_config"] # noqa: Y015
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
Global___ConfigurationWillBeSavedResponse: _TypeAlias = ConfigurationWillBeSavedResponse # noqa: Y015