// Code generated by go generate; DO NOT EDIT.
package slack

import "errors"

type Permission int

const (
    Invalid Permission = iota
    AdminAnalyticsRead Permission = iota
    AdminAnalyticsGetfile Permission = iota
    AdminAppActivitiesRead Permission = iota
    AdminAppsActivitiesList Permission = iota
    AdminAppsWrite Permission = iota
    AdminAppsApprove Permission = iota
    AdminAppsClearresolution Permission = iota
    AdminAppsConfigSet Permission = iota
    AdminAppsRequestsCancel Permission = iota
    AdminAppsRestrict Permission = iota
    AdminAppsUninstall Permission = iota
    AdminAppsRead Permission = iota
    AdminAppsApprovedList Permission = iota
    AdminAppsConfigLookup Permission = iota
    AdminAppsRequestsList Permission = iota
    AdminAppsRestrictedList Permission = iota
    AdminUsersWrite Permission = iota
    AdminAuthPolicyAssignentities Permission = iota
    AdminAuthPolicyRemoveentities Permission = iota
    AdminUsersAssign Permission = iota
    AdminUsersInvite Permission = iota
    AdminUsersRemove Permission = iota
    AdminUsersSessionClearsettings Permission = iota
    AdminUsersSessionInvalidate Permission = iota
    AdminUsersSessionReset Permission = iota
    AdminUsersSessionResetbulk Permission = iota
    AdminUsersSessionSetsettings Permission = iota
    AdminUsersSetadmin Permission = iota
    AdminUsersSetexpiration Permission = iota
    AdminUsersSetowner Permission = iota
    AdminUsersSetregular Permission = iota
    AdminUsersRead Permission = iota
    AdminAuthPolicyGetentities Permission = iota
    AdminUsersList Permission = iota
    AdminUsersSessionGetsettings Permission = iota
    AdminUsersSessionList Permission = iota
    AdminUsersUnsupportedversionsExport Permission = iota
    AdminBarriersWrite Permission = iota
    AdminBarriersCreate Permission = iota
    AdminBarriersDelete Permission = iota
    AdminBarriersUpdate Permission = iota
    AdminBarriersRead Permission = iota
    AdminBarriersList Permission = iota
    AdminConversationsWrite Permission = iota
    AdminConversationsArchive Permission = iota
    AdminConversationsBulkarchive Permission = iota
    AdminConversationsBulkdelete Permission = iota
    AdminConversationsBulkmove Permission = iota
    AdminConversationsConverttoprivate Permission = iota
    AdminConversationsConverttopublic Permission = iota
    AdminConversationsCreate Permission = iota
    AdminConversationsDelete Permission = iota
    AdminConversationsDisconnectshared Permission = iota
    AdminConversationsInvite Permission = iota
    AdminConversationsRemovecustomretention Permission = iota
    AdminConversationsRename Permission = iota
    AdminConversationsRestrictaccessAddgroup Permission = iota
    AdminConversationsRestrictaccessRemovegroup Permission = iota
    AdminConversationsSetconversationprefs Permission = iota
    AdminConversationsSetcustomretention Permission = iota
    AdminConversationsSetteams Permission = iota
    AdminConversationsUnarchive Permission = iota
    AdminConversationsRead Permission = iota
    AdminConversationsEkmListoriginalconnectedchannelinfo Permission = iota
    AdminConversationsGetconversationprefs Permission = iota
    AdminConversationsGetcustomretention Permission = iota
    AdminConversationsGetteams Permission = iota
    AdminConversationsLookup Permission = iota
    AdminConversationsRestrictaccessListgroups Permission = iota
    AdminConversationsSearch Permission = iota
    AdminTeamsWrite Permission = iota
    AdminEmojiAdd Permission = iota
    AdminEmojiAddalias Permission = iota
    AdminEmojiRemove Permission = iota
    AdminTeamsCreate Permission = iota
    AdminTeamsSettingsSetdefaultchannels Permission = iota
    AdminTeamsSettingsSetdescription Permission = iota
    AdminTeamsSettingsSetdiscoverability Permission = iota
    AdminTeamsSettingsSeticon Permission = iota
    AdminTeamsSettingsSetname Permission = iota
    AdminUsergroupsAddteams Permission = iota
    AdminTeamsRead Permission = iota
    AdminEmojiList Permission = iota
    AdminTeamsAdminsList Permission = iota
    AdminTeamsList Permission = iota
    AdminTeamsOwnersList Permission = iota
    AdminTeamsSettingsInfo Permission = iota
    AdminWorkflowsRead Permission = iota
    AdminFunctionsList Permission = iota
    AdminFunctionsPermissionsLookup Permission = iota
    AdminWorkflowsPermissionsLookup Permission = iota
    AdminWorkflowsSearch Permission = iota
    AdminWorkflowsWrite Permission = iota
    AdminFunctionsPermissionsSet Permission = iota
    AdminWorkflowsCollaboratorsAdd Permission = iota
    AdminWorkflowsCollaboratorsRemove Permission = iota
    AdminWorkflowsUnpublish Permission = iota
    AdminInvitesWrite Permission = iota
    AdminInviterequestsApprove Permission = iota
    AdminInviterequestsDeny Permission = iota
    AdminInvitesRead Permission = iota
    AdminInviterequestsApprovedList Permission = iota
    AdminInviterequestsDeniedList Permission = iota
    AdminInviterequestsList Permission = iota
    AdminRolesWrite Permission = iota
    AdminRolesAddassignments Permission = iota
    AdminRolesRemoveassignments Permission = iota
    AdminRolesRead Permission = iota
    AdminRolesListassignments Permission = iota
    AdminUsergroupsWrite Permission = iota
    AdminUsergroupsAddchannels Permission = iota
    AdminUsergroupsRemovechannels Permission = iota
    AdminUsergroupsRead Permission = iota
    AdminUsergroupsListchannels Permission = iota
    HostingRead Permission = iota
    AppsActivitiesList Permission = iota
    ConnectionsWrite Permission = iota
    AppsConnectionsOpen Permission = iota
    Token Permission = iota
    AppsDatastoreBulkdelete Permission = iota
    AppsDatastoreBulkget Permission = iota
    AppsDatastoreBulkput Permission = iota
    AppsDatastoreDelete Permission = iota
    AppsDatastoreGet Permission = iota
    AppsDatastorePut Permission = iota
    AppsDatastoreQuery Permission = iota
    AppsDatastoreUpdate Permission = iota
    DatastoreRead Permission = iota
    AppsDatastoreCount Permission = iota
    AuthorizationsRead Permission = iota
    AppsEventAuthorizationsList Permission = iota
    Bot Permission = iota
    AuthRevoke Permission = iota
    AuthTest Permission = iota
    ChatGetpermalink Permission = iota
    ChatScheduledmessagesList Permission = iota
    DialogOpen Permission = iota
    FunctionsCompleteerror Permission = iota
    FunctionsCompletesuccess Permission = iota
    RtmConnect Permission = iota
    RtmStart Permission = iota
    ViewsOpen Permission = iota
    ViewsPublish Permission = iota
    ViewsPush Permission = iota
    ViewsUpdate Permission = iota
    BookmarksWrite Permission = iota
    BookmarksAdd Permission = iota
    BookmarksEdit Permission = iota
    BookmarksRemove Permission = iota
    BookmarksRead Permission = iota
    BookmarksList Permission = iota
    UsersRead Permission = iota
    BotsInfo Permission = iota
    UsersGetpresence Permission = iota
    UsersInfo Permission = iota
    UsersList Permission = iota
    CallsWrite Permission = iota
    CallsAdd Permission = iota
    CallsEnd Permission = iota
    CallsParticipantsAdd Permission = iota
    CallsParticipantsRemove Permission = iota
    CallsUpdate Permission = iota
    CallsRead Permission = iota
    CallsInfo Permission = iota
    ChannelsManage Permission = iota
    ChannelsCreate Permission = iota
    ChannelsMark Permission = iota
    ConversationsArchive Permission = iota
    ConversationsClose Permission = iota
    ConversationsCreate Permission = iota
    ConversationsKick Permission = iota
    ConversationsLeave Permission = iota
    ConversationsMark Permission = iota
    ConversationsOpen Permission = iota
    ConversationsRename Permission = iota
    ConversationsUnarchive Permission = iota
    GroupsCreate Permission = iota
    GroupsMark Permission = iota
    ImMark Permission = iota
    ImOpen Permission = iota
    MpimMark Permission = iota
    MpimOpen Permission = iota
    ChannelsRead Permission = iota
    ChannelsInfo Permission = iota
    ConversationsInfo Permission = iota
    ConversationsList Permission = iota
    ConversationsMembers Permission = iota
    GroupsInfo Permission = iota
    ImList Permission = iota
    MpimList Permission = iota
    UsersConversations Permission = iota
    ChannelsWriteInvites Permission = iota
    ChannelsInvite Permission = iota
    ConversationsInvite Permission = iota
    GroupsInvite Permission = iota
    ChatWrite Permission = iota
    ChatDelete Permission = iota
    ChatDeletescheduledmessage Permission = iota
    ChatMemessage Permission = iota
    ChatPostephemeral Permission = iota
    ChatPostmessage Permission = iota
    ChatSchedulemessage Permission = iota
    ChatUpdate Permission = iota
    LinksWrite Permission = iota
    ChatUnfurl Permission = iota
    ConversationsConnectWrite Permission = iota
    ConversationsAcceptsharedinvite Permission = iota
    ConversationsInviteshared Permission = iota
    ConversationsConnectManage Permission = iota
    ConversationsApprovesharedinvite Permission = iota
    ConversationsDeclinesharedinvite Permission = iota
    ConversationsListconnectinvites Permission = iota
    ChannelsHistory Permission = iota
    ConversationsHistory Permission = iota
    ConversationsReplies Permission = iota
    ChannelsJoin Permission = iota
    ConversationsJoin Permission = iota
    ChannelsWriteTopic Permission = iota
    ConversationsSetpurpose Permission = iota
    ConversationsSettopic Permission = iota
    DndWrite Permission = iota
    DndEnddnd Permission = iota
    DndEndsnooze Permission = iota
    DndSetsnooze Permission = iota
    DndRead Permission = iota
    DndInfo Permission = iota
    DndTeaminfo Permission = iota
    EmojiRead Permission = iota
    EmojiList Permission = iota
    FilesWrite Permission = iota
    FilesCommentsDelete Permission = iota
    FilesCompleteuploadexternal Permission = iota
    FilesDelete Permission = iota
    FilesGetuploadurlexternal Permission = iota
    FilesRevokepublicurl Permission = iota
    FilesSharedpublicurl Permission = iota
    FilesUpload Permission = iota
    FilesRead Permission = iota
    FilesInfo Permission = iota
    FilesList Permission = iota
    RemoteFilesWrite Permission = iota
    FilesRemoteAdd Permission = iota
    FilesRemoteRemove Permission = iota
    FilesRemoteUpdate Permission = iota
    RemoteFilesRead Permission = iota
    FilesRemoteInfo Permission = iota
    FilesRemoteList Permission = iota
    RemoteFilesShare Permission = iota
    FilesRemoteShare Permission = iota
    AppConfigurationsWrite Permission = iota
    FunctionsDistributionsPermissionsAdd Permission = iota
    FunctionsDistributionsPermissionsRemove Permission = iota
    FunctionsDistributionsPermissionsSet Permission = iota
    AppConfigurationsRead Permission = iota
    FunctionsDistributionsPermissionsList Permission = iota
    Conversations Permission = iota
    GroupsOpen Permission = iota
    TokensBasic Permission = iota
    MigrationExchange Permission = iota
    Email Permission = iota
    OpenidConnectUserinfo Permission = iota
    PinsWrite Permission = iota
    PinsAdd Permission = iota
    PinsRemove Permission = iota
    PinsRead Permission = iota
    PinsList Permission = iota
    ReactionsWrite Permission = iota
    ReactionsAdd Permission = iota
    ReactionsRemove Permission = iota
    ReactionsRead Permission = iota
    ReactionsGet Permission = iota
    ReactionsList Permission = iota
    RemindersWrite Permission = iota
    RemindersAdd Permission = iota
    RemindersComplete Permission = iota
    RemindersDelete Permission = iota
    RemindersRead Permission = iota
    RemindersInfo Permission = iota
    RemindersList Permission = iota
    SearchRead Permission = iota
    SearchAll Permission = iota
    SearchFiles Permission = iota
    SearchMessages Permission = iota
    StarsWrite Permission = iota
    StarsAdd Permission = iota
    StarsRemove Permission = iota
    StarsRead Permission = iota
    StarsList Permission = iota
    Admin Permission = iota
    TeamAccesslogs Permission = iota
    TeamBillableinfo Permission = iota
    TeamIntegrationlogs Permission = iota
    TeamBillingRead Permission = iota
    TeamBillingInfo Permission = iota
    TeamRead Permission = iota
    TeamInfo Permission = iota
    TeamPreferencesRead Permission = iota
    TeamPreferencesList Permission = iota
    UsersProfileRead Permission = iota
    TeamProfileGet Permission = iota
    UsersProfileGet Permission = iota
    UsergroupsWrite Permission = iota
    UsergroupsCreate Permission = iota
    UsergroupsDisable Permission = iota
    UsergroupsEnable Permission = iota
    UsergroupsUpdate Permission = iota
    UsergroupsUsersUpdate Permission = iota
    UsergroupsRead Permission = iota
    UsergroupsList Permission = iota
    UsergroupsUsersList Permission = iota
    UsersProfileWrite Permission = iota
    UsersDeletephoto Permission = iota
    UsersProfileSet Permission = iota
    UsersSetphoto Permission = iota
    IdentityBasic Permission = iota
    UsersIdentity Permission = iota
    UsersReadEmail Permission = iota
    UsersLookupbyemail Permission = iota
    UsersWrite Permission = iota
    UsersSetactive Permission = iota
    UsersSetpresence Permission = iota
    WorkflowStepsExecute Permission = iota
    WorkflowsStepcompleted Permission = iota
    WorkflowsStepfailed Permission = iota
    WorkflowsUpdatestep Permission = iota
    TriggersWrite Permission = iota
    WorkflowsTriggersPermissionsAdd Permission = iota
    WorkflowsTriggersPermissionsRemove Permission = iota
    WorkflowsTriggersPermissionsSet Permission = iota
    TriggersRead Permission = iota
    WorkflowsTriggersPermissionsList Permission = iota
)

var (
    PermissionStrings = map[Permission]string{
        AdminAnalyticsRead: "admin.analytics:read",
        AdminAnalyticsGetfile: "admin.analytics.getFile",
        AdminAppActivitiesRead: "admin.app_activities:read",
        AdminAppsActivitiesList: "admin.apps.activities.list",
        AdminAppsWrite: "admin.apps:write",
        AdminAppsApprove: "admin.apps.approve",
        AdminAppsClearresolution: "admin.apps.clearResolution",
        AdminAppsConfigSet: "admin.apps.config.set",
        AdminAppsRequestsCancel: "admin.apps.requests.cancel",
        AdminAppsRestrict: "admin.apps.restrict",
        AdminAppsUninstall: "admin.apps.uninstall",
        AdminAppsRead: "admin.apps:read",
        AdminAppsApprovedList: "admin.apps.approved.list",
        AdminAppsConfigLookup: "admin.apps.config.lookup",
        AdminAppsRequestsList: "admin.apps.requests.list",
        AdminAppsRestrictedList: "admin.apps.restricted.list",
        AdminUsersWrite: "admin.users:write",
        AdminAuthPolicyAssignentities: "admin.auth.policy.assignEntities",
        AdminAuthPolicyRemoveentities: "admin.auth.policy.removeEntities",
        AdminUsersAssign: "admin.users.assign",
        AdminUsersInvite: "admin.users.invite",
        AdminUsersRemove: "admin.users.remove",
        AdminUsersSessionClearsettings: "admin.users.session.clearSettings",
        AdminUsersSessionInvalidate: "admin.users.session.invalidate",
        AdminUsersSessionReset: "admin.users.session.reset",
        AdminUsersSessionResetbulk: "admin.users.session.resetBulk",
        AdminUsersSessionSetsettings: "admin.users.session.setSettings",
        AdminUsersSetadmin: "admin.users.setAdmin",
        AdminUsersSetexpiration: "admin.users.setExpiration",
        AdminUsersSetowner: "admin.users.setOwner",
        AdminUsersSetregular: "admin.users.setRegular",
        AdminUsersRead: "admin.users:read",
        AdminAuthPolicyGetentities: "admin.auth.policy.getEntities",
        AdminUsersList: "admin.users.list",
        AdminUsersSessionGetsettings: "admin.users.session.getSettings",
        AdminUsersSessionList: "admin.users.session.list",
        AdminUsersUnsupportedversionsExport: "admin.users.unsupportedVersions.export",
        AdminBarriersWrite: "admin.barriers:write",
        AdminBarriersCreate: "admin.barriers.create",
        AdminBarriersDelete: "admin.barriers.delete",
        AdminBarriersUpdate: "admin.barriers.update",
        AdminBarriersRead: "admin.barriers:read",
        AdminBarriersList: "admin.barriers.list",
        AdminConversationsWrite: "admin.conversations:write",
        AdminConversationsArchive: "admin.conversations.archive",
        AdminConversationsBulkarchive: "admin.conversations.bulkArchive",
        AdminConversationsBulkdelete: "admin.conversations.bulkDelete",
        AdminConversationsBulkmove: "admin.conversations.bulkMove",
        AdminConversationsConverttoprivate: "admin.conversations.convertToPrivate",
        AdminConversationsConverttopublic: "admin.conversations.convertToPublic",
        AdminConversationsCreate: "admin.conversations.create",
        AdminConversationsDelete: "admin.conversations.delete",
        AdminConversationsDisconnectshared: "admin.conversations.disconnectShared",
        AdminConversationsInvite: "admin.conversations.invite",
        AdminConversationsRemovecustomretention: "admin.conversations.removeCustomRetention",
        AdminConversationsRename: "admin.conversations.rename",
        AdminConversationsRestrictaccessAddgroup: "admin.conversations.restrictAccess.addGroup",
        AdminConversationsRestrictaccessRemovegroup: "admin.conversations.restrictAccess.removeGroup",
        AdminConversationsSetconversationprefs: "admin.conversations.setConversationPrefs",
        AdminConversationsSetcustomretention: "admin.conversations.setCustomRetention",
        AdminConversationsSetteams: "admin.conversations.setTeams",
        AdminConversationsUnarchive: "admin.conversations.unarchive",
        AdminConversationsRead: "admin.conversations:read",
        AdminConversationsEkmListoriginalconnectedchannelinfo: "admin.conversations.ekm.listOriginalConnectedChannelInfo",
        AdminConversationsGetconversationprefs: "admin.conversations.getConversationPrefs",
        AdminConversationsGetcustomretention: "admin.conversations.getCustomRetention",
        AdminConversationsGetteams: "admin.conversations.getTeams",
        AdminConversationsLookup: "admin.conversations.lookup",
        AdminConversationsRestrictaccessListgroups: "admin.conversations.restrictAccess.listGroups",
        AdminConversationsSearch: "admin.conversations.search",
        AdminTeamsWrite: "admin.teams:write",
        AdminEmojiAdd: "admin.emoji.add",
        AdminEmojiAddalias: "admin.emoji.addAlias",
        AdminEmojiRemove: "admin.emoji.remove",
        AdminTeamsCreate: "admin.teams.create",
        AdminTeamsSettingsSetdefaultchannels: "admin.teams.settings.setDefaultChannels",
        AdminTeamsSettingsSetdescription: "admin.teams.settings.setDescription",
        AdminTeamsSettingsSetdiscoverability: "admin.teams.settings.setDiscoverability",
        AdminTeamsSettingsSeticon: "admin.teams.settings.setIcon",
        AdminTeamsSettingsSetname: "admin.teams.settings.setName",
        AdminUsergroupsAddteams: "admin.usergroups.addTeams",
        AdminTeamsRead: "admin.teams:read",
        AdminEmojiList: "admin.emoji.list",
        AdminTeamsAdminsList: "admin.teams.admins.list",
        AdminTeamsList: "admin.teams.list",
        AdminTeamsOwnersList: "admin.teams.owners.list",
        AdminTeamsSettingsInfo: "admin.teams.settings.info",
        AdminWorkflowsRead: "admin.workflows:read",
        AdminFunctionsList: "admin.functions.list",
        AdminFunctionsPermissionsLookup: "admin.functions.permissions.lookup",
        AdminWorkflowsPermissionsLookup: "admin.workflows.permissions.lookup",
        AdminWorkflowsSearch: "admin.workflows.search",
        AdminWorkflowsWrite: "admin.workflows:write",
        AdminFunctionsPermissionsSet: "admin.functions.permissions.set",
        AdminWorkflowsCollaboratorsAdd: "admin.workflows.collaborators.add",
        AdminWorkflowsCollaboratorsRemove: "admin.workflows.collaborators.remove",
        AdminWorkflowsUnpublish: "admin.workflows.unpublish",
        AdminInvitesWrite: "admin.invites:write",
        AdminInviterequestsApprove: "admin.inviteRequests.approve",
        AdminInviterequestsDeny: "admin.inviteRequests.deny",
        AdminInvitesRead: "admin.invites:read",
        AdminInviterequestsApprovedList: "admin.inviteRequests.approved.list",
        AdminInviterequestsDeniedList: "admin.inviteRequests.denied.list",
        AdminInviterequestsList: "admin.inviteRequests.list",
        AdminRolesWrite: "admin.roles:write",
        AdminRolesAddassignments: "admin.roles.addAssignments",
        AdminRolesRemoveassignments: "admin.roles.removeAssignments",
        AdminRolesRead: "admin.roles:read",
        AdminRolesListassignments: "admin.roles.listAssignments",
        AdminUsergroupsWrite: "admin.usergroups:write",
        AdminUsergroupsAddchannels: "admin.usergroups.addChannels",
        AdminUsergroupsRemovechannels: "admin.usergroups.removeChannels",
        AdminUsergroupsRead: "admin.usergroups:read",
        AdminUsergroupsListchannels: "admin.usergroups.listChannels",
        HostingRead: "hosting:read",
        AppsActivitiesList: "apps.activities.list",
        ConnectionsWrite: "connections:write",
        AppsConnectionsOpen: "apps.connections.open",
        Token: "token",
        AppsDatastoreBulkdelete: "apps.datastore.bulkDelete",
        AppsDatastoreBulkget: "apps.datastore.bulkGet",
        AppsDatastoreBulkput: "apps.datastore.bulkPut",
        AppsDatastoreDelete: "apps.datastore.delete",
        AppsDatastoreGet: "apps.datastore.get",
        AppsDatastorePut: "apps.datastore.put",
        AppsDatastoreQuery: "apps.datastore.query",
        AppsDatastoreUpdate: "apps.datastore.update",
        DatastoreRead: "datastore:read",
        AppsDatastoreCount: "apps.datastore.count",
        AuthorizationsRead: "authorizations:read",
        AppsEventAuthorizationsList: "apps.event.authorizations.list",
        Bot: "bot",
        AuthRevoke: "auth.revoke",
        AuthTest: "auth.test",
        ChatGetpermalink: "chat.getPermalink",
        ChatScheduledmessagesList: "chat.scheduledMessages.list",
        DialogOpen: "dialog.open",
        FunctionsCompleteerror: "functions.completeError",
        FunctionsCompletesuccess: "functions.completeSuccess",
        RtmConnect: "rtm.connect",
        RtmStart: "rtm.start",
        ViewsOpen: "views.open",
        ViewsPublish: "views.publish",
        ViewsPush: "views.push",
        ViewsUpdate: "views.update",
        BookmarksWrite: "bookmarks:write",
        BookmarksAdd: "bookmarks.add",
        BookmarksEdit: "bookmarks.edit",
        BookmarksRemove: "bookmarks.remove",
        BookmarksRead: "bookmarks:read",
        BookmarksList: "bookmarks.list",
        UsersRead: "users:read",
        BotsInfo: "bots.info",
        UsersGetpresence: "users.getPresence",
        UsersInfo: "users.info",
        UsersList: "users.list",
        CallsWrite: "calls:write",
        CallsAdd: "calls.add",
        CallsEnd: "calls.end",
        CallsParticipantsAdd: "calls.participants.add",
        CallsParticipantsRemove: "calls.participants.remove",
        CallsUpdate: "calls.update",
        CallsRead: "calls:read",
        CallsInfo: "calls.info",
        ChannelsManage: "channels:manage",
        ChannelsCreate: "channels.create",
        ChannelsMark: "channels.mark",
        ConversationsArchive: "conversations.archive",
        ConversationsClose: "conversations.close",
        ConversationsCreate: "conversations.create",
        ConversationsKick: "conversations.kick",
        ConversationsLeave: "conversations.leave",
        ConversationsMark: "conversations.mark",
        ConversationsOpen: "conversations.open",
        ConversationsRename: "conversations.rename",
        ConversationsUnarchive: "conversations.unarchive",
        GroupsCreate: "groups.create",
        GroupsMark: "groups.mark",
        ImMark: "im.mark",
        ImOpen: "im.open",
        MpimMark: "mpim.mark",
        MpimOpen: "mpim.open",
        ChannelsRead: "channels:read",
        ChannelsInfo: "channels.info",
        ConversationsInfo: "conversations.info",
        ConversationsList: "conversations.list",
        ConversationsMembers: "conversations.members",
        GroupsInfo: "groups.info",
        ImList: "im.list",
        MpimList: "mpim.list",
        UsersConversations: "users.conversations",
        ChannelsWriteInvites: "channels:write.invites",
        ChannelsInvite: "channels.invite",
        ConversationsInvite: "conversations.invite",
        GroupsInvite: "groups.invite",
        ChatWrite: "chat:write",
        ChatDelete: "chat.delete",
        ChatDeletescheduledmessage: "chat.deleteScheduledMessage",
        ChatMemessage: "chat.meMessage",
        ChatPostephemeral: "chat.postEphemeral",
        ChatPostmessage: "chat.postMessage",
        ChatSchedulemessage: "chat.scheduleMessage",
        ChatUpdate: "chat.update",
        LinksWrite: "links:write",
        ChatUnfurl: "chat.unfurl",
        ConversationsConnectWrite: "conversations.connect:write",
        ConversationsAcceptsharedinvite: "conversations.acceptSharedInvite",
        ConversationsInviteshared: "conversations.inviteShared",
        ConversationsConnectManage: "conversations.connect:manage",
        ConversationsApprovesharedinvite: "conversations.approveSharedInvite",
        ConversationsDeclinesharedinvite: "conversations.declineSharedInvite",
        ConversationsListconnectinvites: "conversations.listConnectInvites",
        ChannelsHistory: "channels:history",
        ConversationsHistory: "conversations.history",
        ConversationsReplies: "conversations.replies",
        ChannelsJoin: "channels:join",
        ConversationsJoin: "conversations.join",
        ChannelsWriteTopic: "channels:write.topic",
        ConversationsSetpurpose: "conversations.setPurpose",
        ConversationsSettopic: "conversations.setTopic",
        DndWrite: "dnd:write",
        DndEnddnd: "dnd.endDnd",
        DndEndsnooze: "dnd.endSnooze",
        DndSetsnooze: "dnd.setSnooze",
        DndRead: "dnd:read",
        DndInfo: "dnd.info",
        DndTeaminfo: "dnd.teamInfo",
        EmojiRead: "emoji:read",
        EmojiList: "emoji.list",
        FilesWrite: "files:write",
        FilesCommentsDelete: "files.comments.delete",
        FilesCompleteuploadexternal: "files.completeUploadExternal",
        FilesDelete: "files.delete",
        FilesGetuploadurlexternal: "files.getUploadURLExternal",
        FilesRevokepublicurl: "files.revokePublicURL",
        FilesSharedpublicurl: "files.sharedPublicURL",
        FilesUpload: "files.upload",
        FilesRead: "files:read",
        FilesInfo: "files.info",
        FilesList: "files.list",
        RemoteFilesWrite: "remote_files:write",
        FilesRemoteAdd: "files.remote.add",
        FilesRemoteRemove: "files.remote.remove",
        FilesRemoteUpdate: "files.remote.update",
        RemoteFilesRead: "remote_files:read",
        FilesRemoteInfo: "files.remote.info",
        FilesRemoteList: "files.remote.list",
        RemoteFilesShare: "remote_files:share",
        FilesRemoteShare: "files.remote.share",
        AppConfigurationsWrite: "app_configurations:write",
        FunctionsDistributionsPermissionsAdd: "functions.distributions.permissions.add",
        FunctionsDistributionsPermissionsRemove: "functions.distributions.permissions.remove",
        FunctionsDistributionsPermissionsSet: "functions.distributions.permissions.set",
        AppConfigurationsRead: "app_configurations:read",
        FunctionsDistributionsPermissionsList: "functions.distributions.permissions.list",
        Conversations: "conversations",
        GroupsOpen: "groups.open",
        TokensBasic: "tokens.basic",
        MigrationExchange: "migration.exchange",
        Email: "email",
        OpenidConnectUserinfo: "openid.connect.userInfo",
        PinsWrite: "pins:write",
        PinsAdd: "pins.add",
        PinsRemove: "pins.remove",
        PinsRead: "pins:read",
        PinsList: "pins.list",
        ReactionsWrite: "reactions:write",
        ReactionsAdd: "reactions.add",
        ReactionsRemove: "reactions.remove",
        ReactionsRead: "reactions:read",
        ReactionsGet: "reactions.get",
        ReactionsList: "reactions.list",
        RemindersWrite: "reminders:write",
        RemindersAdd: "reminders.add",
        RemindersComplete: "reminders.complete",
        RemindersDelete: "reminders.delete",
        RemindersRead: "reminders:read",
        RemindersInfo: "reminders.info",
        RemindersList: "reminders.list",
        SearchRead: "search:read",
        SearchAll: "search.all",
        SearchFiles: "search.files",
        SearchMessages: "search.messages",
        StarsWrite: "stars:write",
        StarsAdd: "stars.add",
        StarsRemove: "stars.remove",
        StarsRead: "stars:read",
        StarsList: "stars.list",
        Admin: "admin",
        TeamAccesslogs: "team.accessLogs",
        TeamBillableinfo: "team.billableInfo",
        TeamIntegrationlogs: "team.integrationLogs",
        TeamBillingRead: "team.billing:read",
        TeamBillingInfo: "team.billing.info",
        TeamRead: "team:read",
        TeamInfo: "team.info",
        TeamPreferencesRead: "team.preferences:read",
        TeamPreferencesList: "team.preferences.list",
        UsersProfileRead: "users.profile:read",
        TeamProfileGet: "team.profile.get",
        UsersProfileGet: "users.profile.get",
        UsergroupsWrite: "usergroups:write",
        UsergroupsCreate: "usergroups.create",
        UsergroupsDisable: "usergroups.disable",
        UsergroupsEnable: "usergroups.enable",
        UsergroupsUpdate: "usergroups.update",
        UsergroupsUsersUpdate: "usergroups.users.update",
        UsergroupsRead: "usergroups:read",
        UsergroupsList: "usergroups.list",
        UsergroupsUsersList: "usergroups.users.list",
        UsersProfileWrite: "users.profile:write",
        UsersDeletephoto: "users.deletePhoto",
        UsersProfileSet: "users.profile.set",
        UsersSetphoto: "users.setPhoto",
        IdentityBasic: "identity.basic",
        UsersIdentity: "users.identity",
        UsersReadEmail: "users:read.email",
        UsersLookupbyemail: "users.lookupByEmail",
        UsersWrite: "users:write",
        UsersSetactive: "users.setActive",
        UsersSetpresence: "users.setPresence",
        WorkflowStepsExecute: "workflow.steps:execute",
        WorkflowsStepcompleted: "workflows.stepCompleted",
        WorkflowsStepfailed: "workflows.stepFailed",
        WorkflowsUpdatestep: "workflows.updateStep",
        TriggersWrite: "triggers:write",
        WorkflowsTriggersPermissionsAdd: "workflows.triggers.permissions.add",
        WorkflowsTriggersPermissionsRemove: "workflows.triggers.permissions.remove",
        WorkflowsTriggersPermissionsSet: "workflows.triggers.permissions.set",
        TriggersRead: "triggers:read",
        WorkflowsTriggersPermissionsList: "workflows.triggers.permissions.list",
    }

    StringToPermission = map[string]Permission{
        "admin.analytics:read": AdminAnalyticsRead,
        "admin.analytics.getFile": AdminAnalyticsGetfile,
        "admin.app_activities:read": AdminAppActivitiesRead,
        "admin.apps.activities.list": AdminAppsActivitiesList,
        "admin.apps:write": AdminAppsWrite,
        "admin.apps.approve": AdminAppsApprove,
        "admin.apps.clearResolution": AdminAppsClearresolution,
        "admin.apps.config.set": AdminAppsConfigSet,
        "admin.apps.requests.cancel": AdminAppsRequestsCancel,
        "admin.apps.restrict": AdminAppsRestrict,
        "admin.apps.uninstall": AdminAppsUninstall,
        "admin.apps:read": AdminAppsRead,
        "admin.apps.approved.list": AdminAppsApprovedList,
        "admin.apps.config.lookup": AdminAppsConfigLookup,
        "admin.apps.requests.list": AdminAppsRequestsList,
        "admin.apps.restricted.list": AdminAppsRestrictedList,
        "admin.users:write": AdminUsersWrite,
        "admin.auth.policy.assignEntities": AdminAuthPolicyAssignentities,
        "admin.auth.policy.removeEntities": AdminAuthPolicyRemoveentities,
        "admin.users.assign": AdminUsersAssign,
        "admin.users.invite": AdminUsersInvite,
        "admin.users.remove": AdminUsersRemove,
        "admin.users.session.clearSettings": AdminUsersSessionClearsettings,
        "admin.users.session.invalidate": AdminUsersSessionInvalidate,
        "admin.users.session.reset": AdminUsersSessionReset,
        "admin.users.session.resetBulk": AdminUsersSessionResetbulk,
        "admin.users.session.setSettings": AdminUsersSessionSetsettings,
        "admin.users.setAdmin": AdminUsersSetadmin,
        "admin.users.setExpiration": AdminUsersSetexpiration,
        "admin.users.setOwner": AdminUsersSetowner,
        "admin.users.setRegular": AdminUsersSetregular,
        "admin.users:read": AdminUsersRead,
        "admin.auth.policy.getEntities": AdminAuthPolicyGetentities,
        "admin.users.list": AdminUsersList,
        "admin.users.session.getSettings": AdminUsersSessionGetsettings,
        "admin.users.session.list": AdminUsersSessionList,
        "admin.users.unsupportedVersions.export": AdminUsersUnsupportedversionsExport,
        "admin.barriers:write": AdminBarriersWrite,
        "admin.barriers.create": AdminBarriersCreate,
        "admin.barriers.delete": AdminBarriersDelete,
        "admin.barriers.update": AdminBarriersUpdate,
        "admin.barriers:read": AdminBarriersRead,
        "admin.barriers.list": AdminBarriersList,
        "admin.conversations:write": AdminConversationsWrite,
        "admin.conversations.archive": AdminConversationsArchive,
        "admin.conversations.bulkArchive": AdminConversationsBulkarchive,
        "admin.conversations.bulkDelete": AdminConversationsBulkdelete,
        "admin.conversations.bulkMove": AdminConversationsBulkmove,
        "admin.conversations.convertToPrivate": AdminConversationsConverttoprivate,
        "admin.conversations.convertToPublic": AdminConversationsConverttopublic,
        "admin.conversations.create": AdminConversationsCreate,
        "admin.conversations.delete": AdminConversationsDelete,
        "admin.conversations.disconnectShared": AdminConversationsDisconnectshared,
        "admin.conversations.invite": AdminConversationsInvite,
        "admin.conversations.removeCustomRetention": AdminConversationsRemovecustomretention,
        "admin.conversations.rename": AdminConversationsRename,
        "admin.conversations.restrictAccess.addGroup": AdminConversationsRestrictaccessAddgroup,
        "admin.conversations.restrictAccess.removeGroup": AdminConversationsRestrictaccessRemovegroup,
        "admin.conversations.setConversationPrefs": AdminConversationsSetconversationprefs,
        "admin.conversations.setCustomRetention": AdminConversationsSetcustomretention,
        "admin.conversations.setTeams": AdminConversationsSetteams,
        "admin.conversations.unarchive": AdminConversationsUnarchive,
        "admin.conversations:read": AdminConversationsRead,
        "admin.conversations.ekm.listOriginalConnectedChannelInfo": AdminConversationsEkmListoriginalconnectedchannelinfo,
        "admin.conversations.getConversationPrefs": AdminConversationsGetconversationprefs,
        "admin.conversations.getCustomRetention": AdminConversationsGetcustomretention,
        "admin.conversations.getTeams": AdminConversationsGetteams,
        "admin.conversations.lookup": AdminConversationsLookup,
        "admin.conversations.restrictAccess.listGroups": AdminConversationsRestrictaccessListgroups,
        "admin.conversations.search": AdminConversationsSearch,
        "admin.teams:write": AdminTeamsWrite,
        "admin.emoji.add": AdminEmojiAdd,
        "admin.emoji.addAlias": AdminEmojiAddalias,
        "admin.emoji.remove": AdminEmojiRemove,
        "admin.teams.create": AdminTeamsCreate,
        "admin.teams.settings.setDefaultChannels": AdminTeamsSettingsSetdefaultchannels,
        "admin.teams.settings.setDescription": AdminTeamsSettingsSetdescription,
        "admin.teams.settings.setDiscoverability": AdminTeamsSettingsSetdiscoverability,
        "admin.teams.settings.setIcon": AdminTeamsSettingsSeticon,
        "admin.teams.settings.setName": AdminTeamsSettingsSetname,
        "admin.usergroups.addTeams": AdminUsergroupsAddteams,
        "admin.teams:read": AdminTeamsRead,
        "admin.emoji.list": AdminEmojiList,
        "admin.teams.admins.list": AdminTeamsAdminsList,
        "admin.teams.list": AdminTeamsList,
        "admin.teams.owners.list": AdminTeamsOwnersList,
        "admin.teams.settings.info": AdminTeamsSettingsInfo,
        "admin.workflows:read": AdminWorkflowsRead,
        "admin.functions.list": AdminFunctionsList,
        "admin.functions.permissions.lookup": AdminFunctionsPermissionsLookup,
        "admin.workflows.permissions.lookup": AdminWorkflowsPermissionsLookup,
        "admin.workflows.search": AdminWorkflowsSearch,
        "admin.workflows:write": AdminWorkflowsWrite,
        "admin.functions.permissions.set": AdminFunctionsPermissionsSet,
        "admin.workflows.collaborators.add": AdminWorkflowsCollaboratorsAdd,
        "admin.workflows.collaborators.remove": AdminWorkflowsCollaboratorsRemove,
        "admin.workflows.unpublish": AdminWorkflowsUnpublish,
        "admin.invites:write": AdminInvitesWrite,
        "admin.inviteRequests.approve": AdminInviterequestsApprove,
        "admin.inviteRequests.deny": AdminInviterequestsDeny,
        "admin.invites:read": AdminInvitesRead,
        "admin.inviteRequests.approved.list": AdminInviterequestsApprovedList,
        "admin.inviteRequests.denied.list": AdminInviterequestsDeniedList,
        "admin.inviteRequests.list": AdminInviterequestsList,
        "admin.roles:write": AdminRolesWrite,
        "admin.roles.addAssignments": AdminRolesAddassignments,
        "admin.roles.removeAssignments": AdminRolesRemoveassignments,
        "admin.roles:read": AdminRolesRead,
        "admin.roles.listAssignments": AdminRolesListassignments,
        "admin.usergroups:write": AdminUsergroupsWrite,
        "admin.usergroups.addChannels": AdminUsergroupsAddchannels,
        "admin.usergroups.removeChannels": AdminUsergroupsRemovechannels,
        "admin.usergroups:read": AdminUsergroupsRead,
        "admin.usergroups.listChannels": AdminUsergroupsListchannels,
        "hosting:read": HostingRead,
        "apps.activities.list": AppsActivitiesList,
        "connections:write": ConnectionsWrite,
        "apps.connections.open": AppsConnectionsOpen,
        "token": Token,
        "apps.datastore.bulkDelete": AppsDatastoreBulkdelete,
        "apps.datastore.bulkGet": AppsDatastoreBulkget,
        "apps.datastore.bulkPut": AppsDatastoreBulkput,
        "apps.datastore.delete": AppsDatastoreDelete,
        "apps.datastore.get": AppsDatastoreGet,
        "apps.datastore.put": AppsDatastorePut,
        "apps.datastore.query": AppsDatastoreQuery,
        "apps.datastore.update": AppsDatastoreUpdate,
        "datastore:read": DatastoreRead,
        "apps.datastore.count": AppsDatastoreCount,
        "authorizations:read": AuthorizationsRead,
        "apps.event.authorizations.list": AppsEventAuthorizationsList,
        "bot": Bot,
        "auth.revoke": AuthRevoke,
        "auth.test": AuthTest,
        "chat.getPermalink": ChatGetpermalink,
        "chat.scheduledMessages.list": ChatScheduledmessagesList,
        "dialog.open": DialogOpen,
        "functions.completeError": FunctionsCompleteerror,
        "functions.completeSuccess": FunctionsCompletesuccess,
        "rtm.connect": RtmConnect,
        "rtm.start": RtmStart,
        "views.open": ViewsOpen,
        "views.publish": ViewsPublish,
        "views.push": ViewsPush,
        "views.update": ViewsUpdate,
        "bookmarks:write": BookmarksWrite,
        "bookmarks.add": BookmarksAdd,
        "bookmarks.edit": BookmarksEdit,
        "bookmarks.remove": BookmarksRemove,
        "bookmarks:read": BookmarksRead,
        "bookmarks.list": BookmarksList,
        "users:read": UsersRead,
        "bots.info": BotsInfo,
        "users.getPresence": UsersGetpresence,
        "users.info": UsersInfo,
        "users.list": UsersList,
        "calls:write": CallsWrite,
        "calls.add": CallsAdd,
        "calls.end": CallsEnd,
        "calls.participants.add": CallsParticipantsAdd,
        "calls.participants.remove": CallsParticipantsRemove,
        "calls.update": CallsUpdate,
        "calls:read": CallsRead,
        "calls.info": CallsInfo,
        "channels:manage": ChannelsManage,
        "channels.create": ChannelsCreate,
        "channels.mark": ChannelsMark,
        "conversations.archive": ConversationsArchive,
        "conversations.close": ConversationsClose,
        "conversations.create": ConversationsCreate,
        "conversations.kick": ConversationsKick,
        "conversations.leave": ConversationsLeave,
        "conversations.mark": ConversationsMark,
        "conversations.open": ConversationsOpen,
        "conversations.rename": ConversationsRename,
        "conversations.unarchive": ConversationsUnarchive,
        "groups.create": GroupsCreate,
        "groups.mark": GroupsMark,
        "im.mark": ImMark,
        "im.open": ImOpen,
        "mpim.mark": MpimMark,
        "mpim.open": MpimOpen,
        "channels:read": ChannelsRead,
        "channels.info": ChannelsInfo,
        "conversations.info": ConversationsInfo,
        "conversations.list": ConversationsList,
        "conversations.members": ConversationsMembers,
        "groups.info": GroupsInfo,
        "im.list": ImList,
        "mpim.list": MpimList,
        "users.conversations": UsersConversations,
        "channels:write.invites": ChannelsWriteInvites,
        "channels.invite": ChannelsInvite,
        "conversations.invite": ConversationsInvite,
        "groups.invite": GroupsInvite,
        "chat:write": ChatWrite,
        "chat.delete": ChatDelete,
        "chat.deleteScheduledMessage": ChatDeletescheduledmessage,
        "chat.meMessage": ChatMemessage,
        "chat.postEphemeral": ChatPostephemeral,
        "chat.postMessage": ChatPostmessage,
        "chat.scheduleMessage": ChatSchedulemessage,
        "chat.update": ChatUpdate,
        "links:write": LinksWrite,
        "chat.unfurl": ChatUnfurl,
        "conversations.connect:write": ConversationsConnectWrite,
        "conversations.acceptSharedInvite": ConversationsAcceptsharedinvite,
        "conversations.inviteShared": ConversationsInviteshared,
        "conversations.connect:manage": ConversationsConnectManage,
        "conversations.approveSharedInvite": ConversationsApprovesharedinvite,
        "conversations.declineSharedInvite": ConversationsDeclinesharedinvite,
        "conversations.listConnectInvites": ConversationsListconnectinvites,
        "channels:history": ChannelsHistory,
        "conversations.history": ConversationsHistory,
        "conversations.replies": ConversationsReplies,
        "channels:join": ChannelsJoin,
        "conversations.join": ConversationsJoin,
        "channels:write.topic": ChannelsWriteTopic,
        "conversations.setPurpose": ConversationsSetpurpose,
        "conversations.setTopic": ConversationsSettopic,
        "dnd:write": DndWrite,
        "dnd.endDnd": DndEnddnd,
        "dnd.endSnooze": DndEndsnooze,
        "dnd.setSnooze": DndSetsnooze,
        "dnd:read": DndRead,
        "dnd.info": DndInfo,
        "dnd.teamInfo": DndTeaminfo,
        "emoji:read": EmojiRead,
        "emoji.list": EmojiList,
        "files:write": FilesWrite,
        "files.comments.delete": FilesCommentsDelete,
        "files.completeUploadExternal": FilesCompleteuploadexternal,
        "files.delete": FilesDelete,
        "files.getUploadURLExternal": FilesGetuploadurlexternal,
        "files.revokePublicURL": FilesRevokepublicurl,
        "files.sharedPublicURL": FilesSharedpublicurl,
        "files.upload": FilesUpload,
        "files:read": FilesRead,
        "files.info": FilesInfo,
        "files.list": FilesList,
        "remote_files:write": RemoteFilesWrite,
        "files.remote.add": FilesRemoteAdd,
        "files.remote.remove": FilesRemoteRemove,
        "files.remote.update": FilesRemoteUpdate,
        "remote_files:read": RemoteFilesRead,
        "files.remote.info": FilesRemoteInfo,
        "files.remote.list": FilesRemoteList,
        "remote_files:share": RemoteFilesShare,
        "files.remote.share": FilesRemoteShare,
        "app_configurations:write": AppConfigurationsWrite,
        "functions.distributions.permissions.add": FunctionsDistributionsPermissionsAdd,
        "functions.distributions.permissions.remove": FunctionsDistributionsPermissionsRemove,
        "functions.distributions.permissions.set": FunctionsDistributionsPermissionsSet,
        "app_configurations:read": AppConfigurationsRead,
        "functions.distributions.permissions.list": FunctionsDistributionsPermissionsList,
        "conversations": Conversations,
        "groups.open": GroupsOpen,
        "tokens.basic": TokensBasic,
        "migration.exchange": MigrationExchange,
        "email": Email,
        "openid.connect.userInfo": OpenidConnectUserinfo,
        "pins:write": PinsWrite,
        "pins.add": PinsAdd,
        "pins.remove": PinsRemove,
        "pins:read": PinsRead,
        "pins.list": PinsList,
        "reactions:write": ReactionsWrite,
        "reactions.add": ReactionsAdd,
        "reactions.remove": ReactionsRemove,
        "reactions:read": ReactionsRead,
        "reactions.get": ReactionsGet,
        "reactions.list": ReactionsList,
        "reminders:write": RemindersWrite,
        "reminders.add": RemindersAdd,
        "reminders.complete": RemindersComplete,
        "reminders.delete": RemindersDelete,
        "reminders:read": RemindersRead,
        "reminders.info": RemindersInfo,
        "reminders.list": RemindersList,
        "search:read": SearchRead,
        "search.all": SearchAll,
        "search.files": SearchFiles,
        "search.messages": SearchMessages,
        "stars:write": StarsWrite,
        "stars.add": StarsAdd,
        "stars.remove": StarsRemove,
        "stars:read": StarsRead,
        "stars.list": StarsList,
        "admin": Admin,
        "team.accessLogs": TeamAccesslogs,
        "team.billableInfo": TeamBillableinfo,
        "team.integrationLogs": TeamIntegrationlogs,
        "team.billing:read": TeamBillingRead,
        "team.billing.info": TeamBillingInfo,
        "team:read": TeamRead,
        "team.info": TeamInfo,
        "team.preferences:read": TeamPreferencesRead,
        "team.preferences.list": TeamPreferencesList,
        "users.profile:read": UsersProfileRead,
        "team.profile.get": TeamProfileGet,
        "users.profile.get": UsersProfileGet,
        "usergroups:write": UsergroupsWrite,
        "usergroups.create": UsergroupsCreate,
        "usergroups.disable": UsergroupsDisable,
        "usergroups.enable": UsergroupsEnable,
        "usergroups.update": UsergroupsUpdate,
        "usergroups.users.update": UsergroupsUsersUpdate,
        "usergroups:read": UsergroupsRead,
        "usergroups.list": UsergroupsList,
        "usergroups.users.list": UsergroupsUsersList,
        "users.profile:write": UsersProfileWrite,
        "users.deletePhoto": UsersDeletephoto,
        "users.profile.set": UsersProfileSet,
        "users.setPhoto": UsersSetphoto,
        "identity.basic": IdentityBasic,
        "users.identity": UsersIdentity,
        "users:read.email": UsersReadEmail,
        "users.lookupByEmail": UsersLookupbyemail,
        "users:write": UsersWrite,
        "users.setActive": UsersSetactive,
        "users.setPresence": UsersSetpresence,
        "workflow.steps:execute": WorkflowStepsExecute,
        "workflows.stepCompleted": WorkflowsStepcompleted,
        "workflows.stepFailed": WorkflowsStepfailed,
        "workflows.updateStep": WorkflowsUpdatestep,
        "triggers:write": TriggersWrite,
        "workflows.triggers.permissions.add": WorkflowsTriggersPermissionsAdd,
        "workflows.triggers.permissions.remove": WorkflowsTriggersPermissionsRemove,
        "workflows.triggers.permissions.set": WorkflowsTriggersPermissionsSet,
        "triggers:read": TriggersRead,
        "workflows.triggers.permissions.list": WorkflowsTriggersPermissionsList,
    }

    PermissionIDs = map[Permission]int{
        AdminAnalyticsRead: 1,
        AdminAnalyticsGetfile: 2,
        AdminAppActivitiesRead: 3,
        AdminAppsActivitiesList: 4,
        AdminAppsWrite: 5,
        AdminAppsApprove: 6,
        AdminAppsClearresolution: 7,
        AdminAppsConfigSet: 8,
        AdminAppsRequestsCancel: 9,
        AdminAppsRestrict: 10,
        AdminAppsUninstall: 11,
        AdminAppsRead: 12,
        AdminAppsApprovedList: 13,
        AdminAppsConfigLookup: 14,
        AdminAppsRequestsList: 15,
        AdminAppsRestrictedList: 16,
        AdminUsersWrite: 17,
        AdminAuthPolicyAssignentities: 18,
        AdminAuthPolicyRemoveentities: 19,
        AdminUsersAssign: 20,
        AdminUsersInvite: 21,
        AdminUsersRemove: 22,
        AdminUsersSessionClearsettings: 23,
        AdminUsersSessionInvalidate: 24,
        AdminUsersSessionReset: 25,
        AdminUsersSessionResetbulk: 26,
        AdminUsersSessionSetsettings: 27,
        AdminUsersSetadmin: 28,
        AdminUsersSetexpiration: 29,
        AdminUsersSetowner: 30,
        AdminUsersSetregular: 31,
        AdminUsersRead: 32,
        AdminAuthPolicyGetentities: 33,
        AdminUsersList: 34,
        AdminUsersSessionGetsettings: 35,
        AdminUsersSessionList: 36,
        AdminUsersUnsupportedversionsExport: 37,
        AdminBarriersWrite: 38,
        AdminBarriersCreate: 39,
        AdminBarriersDelete: 40,
        AdminBarriersUpdate: 41,
        AdminBarriersRead: 42,
        AdminBarriersList: 43,
        AdminConversationsWrite: 44,
        AdminConversationsArchive: 45,
        AdminConversationsBulkarchive: 46,
        AdminConversationsBulkdelete: 47,
        AdminConversationsBulkmove: 48,
        AdminConversationsConverttoprivate: 49,
        AdminConversationsConverttopublic: 50,
        AdminConversationsCreate: 51,
        AdminConversationsDelete: 52,
        AdminConversationsDisconnectshared: 53,
        AdminConversationsInvite: 54,
        AdminConversationsRemovecustomretention: 55,
        AdminConversationsRename: 56,
        AdminConversationsRestrictaccessAddgroup: 57,
        AdminConversationsRestrictaccessRemovegroup: 58,
        AdminConversationsSetconversationprefs: 59,
        AdminConversationsSetcustomretention: 60,
        AdminConversationsSetteams: 61,
        AdminConversationsUnarchive: 62,
        AdminConversationsRead: 63,
        AdminConversationsEkmListoriginalconnectedchannelinfo: 64,
        AdminConversationsGetconversationprefs: 65,
        AdminConversationsGetcustomretention: 66,
        AdminConversationsGetteams: 67,
        AdminConversationsLookup: 68,
        AdminConversationsRestrictaccessListgroups: 69,
        AdminConversationsSearch: 70,
        AdminTeamsWrite: 71,
        AdminEmojiAdd: 72,
        AdminEmojiAddalias: 73,
        AdminEmojiRemove: 74,
        AdminTeamsCreate: 75,
        AdminTeamsSettingsSetdefaultchannels: 76,
        AdminTeamsSettingsSetdescription: 77,
        AdminTeamsSettingsSetdiscoverability: 78,
        AdminTeamsSettingsSeticon: 79,
        AdminTeamsSettingsSetname: 80,
        AdminUsergroupsAddteams: 81,
        AdminTeamsRead: 82,
        AdminEmojiList: 83,
        AdminTeamsAdminsList: 84,
        AdminTeamsList: 85,
        AdminTeamsOwnersList: 86,
        AdminTeamsSettingsInfo: 87,
        AdminWorkflowsRead: 88,
        AdminFunctionsList: 89,
        AdminFunctionsPermissionsLookup: 90,
        AdminWorkflowsPermissionsLookup: 91,
        AdminWorkflowsSearch: 92,
        AdminWorkflowsWrite: 93,
        AdminFunctionsPermissionsSet: 94,
        AdminWorkflowsCollaboratorsAdd: 95,
        AdminWorkflowsCollaboratorsRemove: 96,
        AdminWorkflowsUnpublish: 97,
        AdminInvitesWrite: 98,
        AdminInviterequestsApprove: 99,
        AdminInviterequestsDeny: 100,
        AdminInvitesRead: 101,
        AdminInviterequestsApprovedList: 102,
        AdminInviterequestsDeniedList: 103,
        AdminInviterequestsList: 104,
        AdminRolesWrite: 105,
        AdminRolesAddassignments: 106,
        AdminRolesRemoveassignments: 107,
        AdminRolesRead: 108,
        AdminRolesListassignments: 109,
        AdminUsergroupsWrite: 110,
        AdminUsergroupsAddchannels: 111,
        AdminUsergroupsRemovechannels: 112,
        AdminUsergroupsRead: 113,
        AdminUsergroupsListchannels: 114,
        HostingRead: 115,
        AppsActivitiesList: 116,
        ConnectionsWrite: 117,
        AppsConnectionsOpen: 118,
        Token: 119,
        AppsDatastoreBulkdelete: 120,
        AppsDatastoreBulkget: 121,
        AppsDatastoreBulkput: 122,
        AppsDatastoreDelete: 123,
        AppsDatastoreGet: 124,
        AppsDatastorePut: 125,
        AppsDatastoreQuery: 126,
        AppsDatastoreUpdate: 127,
        DatastoreRead: 128,
        AppsDatastoreCount: 129,
        AuthorizationsRead: 130,
        AppsEventAuthorizationsList: 131,
        Bot: 132,
        AuthRevoke: 133,
        AuthTest: 134,
        ChatGetpermalink: 135,
        ChatScheduledmessagesList: 136,
        DialogOpen: 137,
        FunctionsCompleteerror: 138,
        FunctionsCompletesuccess: 139,
        RtmConnect: 140,
        RtmStart: 141,
        ViewsOpen: 142,
        ViewsPublish: 143,
        ViewsPush: 144,
        ViewsUpdate: 145,
        BookmarksWrite: 146,
        BookmarksAdd: 147,
        BookmarksEdit: 148,
        BookmarksRemove: 149,
        BookmarksRead: 150,
        BookmarksList: 151,
        UsersRead: 152,
        BotsInfo: 153,
        UsersGetpresence: 154,
        UsersInfo: 155,
        UsersList: 156,
        CallsWrite: 157,
        CallsAdd: 158,
        CallsEnd: 159,
        CallsParticipantsAdd: 160,
        CallsParticipantsRemove: 161,
        CallsUpdate: 162,
        CallsRead: 163,
        CallsInfo: 164,
        ChannelsManage: 165,
        ChannelsCreate: 166,
        ChannelsMark: 167,
        ConversationsArchive: 168,
        ConversationsClose: 169,
        ConversationsCreate: 170,
        ConversationsKick: 171,
        ConversationsLeave: 172,
        ConversationsMark: 173,
        ConversationsOpen: 174,
        ConversationsRename: 175,
        ConversationsUnarchive: 176,
        GroupsCreate: 177,
        GroupsMark: 178,
        ImMark: 179,
        ImOpen: 180,
        MpimMark: 181,
        MpimOpen: 182,
        ChannelsRead: 183,
        ChannelsInfo: 184,
        ConversationsInfo: 185,
        ConversationsList: 186,
        ConversationsMembers: 187,
        GroupsInfo: 188,
        ImList: 189,
        MpimList: 190,
        UsersConversations: 191,
        ChannelsWriteInvites: 192,
        ChannelsInvite: 193,
        ConversationsInvite: 194,
        GroupsInvite: 195,
        ChatWrite: 196,
        ChatDelete: 197,
        ChatDeletescheduledmessage: 198,
        ChatMemessage: 199,
        ChatPostephemeral: 200,
        ChatPostmessage: 201,
        ChatSchedulemessage: 202,
        ChatUpdate: 203,
        LinksWrite: 204,
        ChatUnfurl: 205,
        ConversationsConnectWrite: 206,
        ConversationsAcceptsharedinvite: 207,
        ConversationsInviteshared: 208,
        ConversationsConnectManage: 209,
        ConversationsApprovesharedinvite: 210,
        ConversationsDeclinesharedinvite: 211,
        ConversationsListconnectinvites: 212,
        ChannelsHistory: 213,
        ConversationsHistory: 214,
        ConversationsReplies: 215,
        ChannelsJoin: 216,
        ConversationsJoin: 217,
        ChannelsWriteTopic: 218,
        ConversationsSetpurpose: 219,
        ConversationsSettopic: 220,
        DndWrite: 221,
        DndEnddnd: 222,
        DndEndsnooze: 223,
        DndSetsnooze: 224,
        DndRead: 225,
        DndInfo: 226,
        DndTeaminfo: 227,
        EmojiRead: 228,
        EmojiList: 229,
        FilesWrite: 230,
        FilesCommentsDelete: 231,
        FilesCompleteuploadexternal: 232,
        FilesDelete: 233,
        FilesGetuploadurlexternal: 234,
        FilesRevokepublicurl: 235,
        FilesSharedpublicurl: 236,
        FilesUpload: 237,
        FilesRead: 238,
        FilesInfo: 239,
        FilesList: 240,
        RemoteFilesWrite: 241,
        FilesRemoteAdd: 242,
        FilesRemoteRemove: 243,
        FilesRemoteUpdate: 244,
        RemoteFilesRead: 245,
        FilesRemoteInfo: 246,
        FilesRemoteList: 247,
        RemoteFilesShare: 248,
        FilesRemoteShare: 249,
        AppConfigurationsWrite: 250,
        FunctionsDistributionsPermissionsAdd: 251,
        FunctionsDistributionsPermissionsRemove: 252,
        FunctionsDistributionsPermissionsSet: 253,
        AppConfigurationsRead: 254,
        FunctionsDistributionsPermissionsList: 255,
        Conversations: 256,
        GroupsOpen: 257,
        TokensBasic: 258,
        MigrationExchange: 259,
        Email: 260,
        OpenidConnectUserinfo: 261,
        PinsWrite: 262,
        PinsAdd: 263,
        PinsRemove: 264,
        PinsRead: 265,
        PinsList: 266,
        ReactionsWrite: 267,
        ReactionsAdd: 268,
        ReactionsRemove: 269,
        ReactionsRead: 270,
        ReactionsGet: 271,
        ReactionsList: 272,
        RemindersWrite: 273,
        RemindersAdd: 274,
        RemindersComplete: 275,
        RemindersDelete: 276,
        RemindersRead: 277,
        RemindersInfo: 278,
        RemindersList: 279,
        SearchRead: 280,
        SearchAll: 281,
        SearchFiles: 282,
        SearchMessages: 283,
        StarsWrite: 284,
        StarsAdd: 285,
        StarsRemove: 286,
        StarsRead: 287,
        StarsList: 288,
        Admin: 289,
        TeamAccesslogs: 290,
        TeamBillableinfo: 291,
        TeamIntegrationlogs: 292,
        TeamBillingRead: 293,
        TeamBillingInfo: 294,
        TeamRead: 295,
        TeamInfo: 296,
        TeamPreferencesRead: 297,
        TeamPreferencesList: 298,
        UsersProfileRead: 299,
        TeamProfileGet: 300,
        UsersProfileGet: 301,
        UsergroupsWrite: 302,
        UsergroupsCreate: 303,
        UsergroupsDisable: 304,
        UsergroupsEnable: 305,
        UsergroupsUpdate: 306,
        UsergroupsUsersUpdate: 307,
        UsergroupsRead: 308,
        UsergroupsList: 309,
        UsergroupsUsersList: 310,
        UsersProfileWrite: 311,
        UsersDeletephoto: 312,
        UsersProfileSet: 313,
        UsersSetphoto: 314,
        IdentityBasic: 315,
        UsersIdentity: 316,
        UsersReadEmail: 317,
        UsersLookupbyemail: 318,
        UsersWrite: 319,
        UsersSetactive: 320,
        UsersSetpresence: 321,
        WorkflowStepsExecute: 322,
        WorkflowsStepcompleted: 323,
        WorkflowsStepfailed: 324,
        WorkflowsUpdatestep: 325,
        TriggersWrite: 326,
        WorkflowsTriggersPermissionsAdd: 327,
        WorkflowsTriggersPermissionsRemove: 328,
        WorkflowsTriggersPermissionsSet: 329,
        TriggersRead: 330,
        WorkflowsTriggersPermissionsList: 331,
    }

    IdToPermission = map[int]Permission{
        1: AdminAnalyticsRead,
        2: AdminAnalyticsGetfile,
        3: AdminAppActivitiesRead,
        4: AdminAppsActivitiesList,
        5: AdminAppsWrite,
        6: AdminAppsApprove,
        7: AdminAppsClearresolution,
        8: AdminAppsConfigSet,
        9: AdminAppsRequestsCancel,
        10: AdminAppsRestrict,
        11: AdminAppsUninstall,
        12: AdminAppsRead,
        13: AdminAppsApprovedList,
        14: AdminAppsConfigLookup,
        15: AdminAppsRequestsList,
        16: AdminAppsRestrictedList,
        17: AdminUsersWrite,
        18: AdminAuthPolicyAssignentities,
        19: AdminAuthPolicyRemoveentities,
        20: AdminUsersAssign,
        21: AdminUsersInvite,
        22: AdminUsersRemove,
        23: AdminUsersSessionClearsettings,
        24: AdminUsersSessionInvalidate,
        25: AdminUsersSessionReset,
        26: AdminUsersSessionResetbulk,
        27: AdminUsersSessionSetsettings,
        28: AdminUsersSetadmin,
        29: AdminUsersSetexpiration,
        30: AdminUsersSetowner,
        31: AdminUsersSetregular,
        32: AdminUsersRead,
        33: AdminAuthPolicyGetentities,
        34: AdminUsersList,
        35: AdminUsersSessionGetsettings,
        36: AdminUsersSessionList,
        37: AdminUsersUnsupportedversionsExport,
        38: AdminBarriersWrite,
        39: AdminBarriersCreate,
        40: AdminBarriersDelete,
        41: AdminBarriersUpdate,
        42: AdminBarriersRead,
        43: AdminBarriersList,
        44: AdminConversationsWrite,
        45: AdminConversationsArchive,
        46: AdminConversationsBulkarchive,
        47: AdminConversationsBulkdelete,
        48: AdminConversationsBulkmove,
        49: AdminConversationsConverttoprivate,
        50: AdminConversationsConverttopublic,
        51: AdminConversationsCreate,
        52: AdminConversationsDelete,
        53: AdminConversationsDisconnectshared,
        54: AdminConversationsInvite,
        55: AdminConversationsRemovecustomretention,
        56: AdminConversationsRename,
        57: AdminConversationsRestrictaccessAddgroup,
        58: AdminConversationsRestrictaccessRemovegroup,
        59: AdminConversationsSetconversationprefs,
        60: AdminConversationsSetcustomretention,
        61: AdminConversationsSetteams,
        62: AdminConversationsUnarchive,
        63: AdminConversationsRead,
        64: AdminConversationsEkmListoriginalconnectedchannelinfo,
        65: AdminConversationsGetconversationprefs,
        66: AdminConversationsGetcustomretention,
        67: AdminConversationsGetteams,
        68: AdminConversationsLookup,
        69: AdminConversationsRestrictaccessListgroups,
        70: AdminConversationsSearch,
        71: AdminTeamsWrite,
        72: AdminEmojiAdd,
        73: AdminEmojiAddalias,
        74: AdminEmojiRemove,
        75: AdminTeamsCreate,
        76: AdminTeamsSettingsSetdefaultchannels,
        77: AdminTeamsSettingsSetdescription,
        78: AdminTeamsSettingsSetdiscoverability,
        79: AdminTeamsSettingsSeticon,
        80: AdminTeamsSettingsSetname,
        81: AdminUsergroupsAddteams,
        82: AdminTeamsRead,
        83: AdminEmojiList,
        84: AdminTeamsAdminsList,
        85: AdminTeamsList,
        86: AdminTeamsOwnersList,
        87: AdminTeamsSettingsInfo,
        88: AdminWorkflowsRead,
        89: AdminFunctionsList,
        90: AdminFunctionsPermissionsLookup,
        91: AdminWorkflowsPermissionsLookup,
        92: AdminWorkflowsSearch,
        93: AdminWorkflowsWrite,
        94: AdminFunctionsPermissionsSet,
        95: AdminWorkflowsCollaboratorsAdd,
        96: AdminWorkflowsCollaboratorsRemove,
        97: AdminWorkflowsUnpublish,
        98: AdminInvitesWrite,
        99: AdminInviterequestsApprove,
        100: AdminInviterequestsDeny,
        101: AdminInvitesRead,
        102: AdminInviterequestsApprovedList,
        103: AdminInviterequestsDeniedList,
        104: AdminInviterequestsList,
        105: AdminRolesWrite,
        106: AdminRolesAddassignments,
        107: AdminRolesRemoveassignments,
        108: AdminRolesRead,
        109: AdminRolesListassignments,
        110: AdminUsergroupsWrite,
        111: AdminUsergroupsAddchannels,
        112: AdminUsergroupsRemovechannels,
        113: AdminUsergroupsRead,
        114: AdminUsergroupsListchannels,
        115: HostingRead,
        116: AppsActivitiesList,
        117: ConnectionsWrite,
        118: AppsConnectionsOpen,
        119: Token,
        120: AppsDatastoreBulkdelete,
        121: AppsDatastoreBulkget,
        122: AppsDatastoreBulkput,
        123: AppsDatastoreDelete,
        124: AppsDatastoreGet,
        125: AppsDatastorePut,
        126: AppsDatastoreQuery,
        127: AppsDatastoreUpdate,
        128: DatastoreRead,
        129: AppsDatastoreCount,
        130: AuthorizationsRead,
        131: AppsEventAuthorizationsList,
        132: Bot,
        133: AuthRevoke,
        134: AuthTest,
        135: ChatGetpermalink,
        136: ChatScheduledmessagesList,
        137: DialogOpen,
        138: FunctionsCompleteerror,
        139: FunctionsCompletesuccess,
        140: RtmConnect,
        141: RtmStart,
        142: ViewsOpen,
        143: ViewsPublish,
        144: ViewsPush,
        145: ViewsUpdate,
        146: BookmarksWrite,
        147: BookmarksAdd,
        148: BookmarksEdit,
        149: BookmarksRemove,
        150: BookmarksRead,
        151: BookmarksList,
        152: UsersRead,
        153: BotsInfo,
        154: UsersGetpresence,
        155: UsersInfo,
        156: UsersList,
        157: CallsWrite,
        158: CallsAdd,
        159: CallsEnd,
        160: CallsParticipantsAdd,
        161: CallsParticipantsRemove,
        162: CallsUpdate,
        163: CallsRead,
        164: CallsInfo,
        165: ChannelsManage,
        166: ChannelsCreate,
        167: ChannelsMark,
        168: ConversationsArchive,
        169: ConversationsClose,
        170: ConversationsCreate,
        171: ConversationsKick,
        172: ConversationsLeave,
        173: ConversationsMark,
        174: ConversationsOpen,
        175: ConversationsRename,
        176: ConversationsUnarchive,
        177: GroupsCreate,
        178: GroupsMark,
        179: ImMark,
        180: ImOpen,
        181: MpimMark,
        182: MpimOpen,
        183: ChannelsRead,
        184: ChannelsInfo,
        185: ConversationsInfo,
        186: ConversationsList,
        187: ConversationsMembers,
        188: GroupsInfo,
        189: ImList,
        190: MpimList,
        191: UsersConversations,
        192: ChannelsWriteInvites,
        193: ChannelsInvite,
        194: ConversationsInvite,
        195: GroupsInvite,
        196: ChatWrite,
        197: ChatDelete,
        198: ChatDeletescheduledmessage,
        199: ChatMemessage,
        200: ChatPostephemeral,
        201: ChatPostmessage,
        202: ChatSchedulemessage,
        203: ChatUpdate,
        204: LinksWrite,
        205: ChatUnfurl,
        206: ConversationsConnectWrite,
        207: ConversationsAcceptsharedinvite,
        208: ConversationsInviteshared,
        209: ConversationsConnectManage,
        210: ConversationsApprovesharedinvite,
        211: ConversationsDeclinesharedinvite,
        212: ConversationsListconnectinvites,
        213: ChannelsHistory,
        214: ConversationsHistory,
        215: ConversationsReplies,
        216: ChannelsJoin,
        217: ConversationsJoin,
        218: ChannelsWriteTopic,
        219: ConversationsSetpurpose,
        220: ConversationsSettopic,
        221: DndWrite,
        222: DndEnddnd,
        223: DndEndsnooze,
        224: DndSetsnooze,
        225: DndRead,
        226: DndInfo,
        227: DndTeaminfo,
        228: EmojiRead,
        229: EmojiList,
        230: FilesWrite,
        231: FilesCommentsDelete,
        232: FilesCompleteuploadexternal,
        233: FilesDelete,
        234: FilesGetuploadurlexternal,
        235: FilesRevokepublicurl,
        236: FilesSharedpublicurl,
        237: FilesUpload,
        238: FilesRead,
        239: FilesInfo,
        240: FilesList,
        241: RemoteFilesWrite,
        242: FilesRemoteAdd,
        243: FilesRemoteRemove,
        244: FilesRemoteUpdate,
        245: RemoteFilesRead,
        246: FilesRemoteInfo,
        247: FilesRemoteList,
        248: RemoteFilesShare,
        249: FilesRemoteShare,
        250: AppConfigurationsWrite,
        251: FunctionsDistributionsPermissionsAdd,
        252: FunctionsDistributionsPermissionsRemove,
        253: FunctionsDistributionsPermissionsSet,
        254: AppConfigurationsRead,
        255: FunctionsDistributionsPermissionsList,
        256: Conversations,
        257: GroupsOpen,
        258: TokensBasic,
        259: MigrationExchange,
        260: Email,
        261: OpenidConnectUserinfo,
        262: PinsWrite,
        263: PinsAdd,
        264: PinsRemove,
        265: PinsRead,
        266: PinsList,
        267: ReactionsWrite,
        268: ReactionsAdd,
        269: ReactionsRemove,
        270: ReactionsRead,
        271: ReactionsGet,
        272: ReactionsList,
        273: RemindersWrite,
        274: RemindersAdd,
        275: RemindersComplete,
        276: RemindersDelete,
        277: RemindersRead,
        278: RemindersInfo,
        279: RemindersList,
        280: SearchRead,
        281: SearchAll,
        282: SearchFiles,
        283: SearchMessages,
        284: StarsWrite,
        285: StarsAdd,
        286: StarsRemove,
        287: StarsRead,
        288: StarsList,
        289: Admin,
        290: TeamAccesslogs,
        291: TeamBillableinfo,
        292: TeamIntegrationlogs,
        293: TeamBillingRead,
        294: TeamBillingInfo,
        295: TeamRead,
        296: TeamInfo,
        297: TeamPreferencesRead,
        298: TeamPreferencesList,
        299: UsersProfileRead,
        300: TeamProfileGet,
        301: UsersProfileGet,
        302: UsergroupsWrite,
        303: UsergroupsCreate,
        304: UsergroupsDisable,
        305: UsergroupsEnable,
        306: UsergroupsUpdate,
        307: UsergroupsUsersUpdate,
        308: UsergroupsRead,
        309: UsergroupsList,
        310: UsergroupsUsersList,
        311: UsersProfileWrite,
        312: UsersDeletephoto,
        313: UsersProfileSet,
        314: UsersSetphoto,
        315: IdentityBasic,
        316: UsersIdentity,
        317: UsersReadEmail,
        318: UsersLookupbyemail,
        319: UsersWrite,
        320: UsersSetactive,
        321: UsersSetpresence,
        322: WorkflowStepsExecute,
        323: WorkflowsStepcompleted,
        324: WorkflowsStepfailed,
        325: WorkflowsUpdatestep,
        326: TriggersWrite,
        327: WorkflowsTriggersPermissionsAdd,
        328: WorkflowsTriggersPermissionsRemove,
        329: WorkflowsTriggersPermissionsSet,
        330: TriggersRead,
        331: WorkflowsTriggersPermissionsList,
    }
)

// ToString converts a Permission enum to its string representation
func (p Permission) ToString() (string, error) {
    if str, ok := PermissionStrings[p]; ok {
        return str, nil
    }
    return "", errors.New("invalid permission")
}

// ToID converts a Permission enum to its ID
func (p Permission) ToID() (int, error) {
    if id, ok := PermissionIDs[p]; ok {
        return id, nil
    }
    return 0, errors.New("invalid permission")
}

// PermissionFromString converts a string representation to its Permission enum
func PermissionFromString(s string) (Permission, error) {
    if p, ok := StringToPermission[s]; ok {
        return p, nil
    }
    return 0, errors.New("invalid permission string")
}

// PermissionFromID converts an ID to its Permission enum
func PermissionFromID(id int) (Permission, error) {
    if p, ok := IdToPermission[id]; ok {
        return p, nil
    }
    return 0, errors.New("invalid permission ID")
}
