aboutsummaryrefslogtreecommitdiffstats
path: root/ydb/core/ymq/base/action.h
blob: 1156cc56bbc2756038013061272be785df7308fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#pragma once 
 
#include <util/generic/string.h> 
 
namespace NKikimr::NSQS {
 
enum EAction {
    Unknown = 0, 
    ChangeMessageVisibility, 
    ChangeMessageVisibilityBatch, 
    CreateQueue, 
    CreateUser, 
    GetQueueAttributes, 
    GetQueueAttributesBatch,
    GetQueueUrl, 
    DeleteMessage, 
    DeleteMessageBatch, 
    DeleteQueue, 
    DeleteQueueBatch,
    DeleteUser, 
    ListQueues, 
    ListUsers, 
    PurgeQueue, 
    PurgeQueueBatch,
    ReceiveMessage, 
    SendMessage, 
    SendMessageBatch, 
    SetQueueAttributes, 
    ModifyPermissions,
    ListPermissions,
    ListDeadLetterSourceQueues,
    CountQueues,
 
    ActionsArraySize,
}; 
 
EAction ActionFromString(const TString& name); 
const TString& ActionToString(EAction action);
const TString& ActionToCloudConvMethod(EAction action);
 
bool IsBatchAction(EAction action);
bool IsActionForQueue(EAction action);
bool IsActionForQueueYMQ(EAction action);
bool IsActionForUser(EAction action);
bool IsActionForUserYMQ(EAction action);
bool IsProxyAction(EAction action);
bool IsActionForMessage(EAction action);
bool IsFastAction(EAction action);
bool IsPrivateAction(EAction action);

// get nonbatch action variant for given action
EAction GetNonBatchAction(EAction action);

// Actions with proxy
#define ENUMERATE_PROXY_ACTIONS(macro)      \
        macro(ChangeMessageVisibility)      \
        macro(ChangeMessageVisibilityBatch) \
        macro(DeleteMessage)                \
        macro(DeleteMessageBatch)           \
        macro(DeleteQueue)                  \
        macro(GetQueueAttributes)           \
        macro(PurgeQueue)                   \
        macro(ReceiveMessage)               \
        macro(SendMessage)                  \
        macro(SendMessageBatch)             \
        macro(ListDeadLetterSourceQueues)   \
        macro(SetQueueAttributes)

} // namespace NKikimr::NSQS