Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

feat(rexctl): add generated admin api client and config schema

Hampus2a58d9ce0ff1
diff --git a/fluxer_rexctl/internal/adminapi/configschema.json b/fluxer_rexctl/internal/adminapi/configschema.json
new file mode 100644
index 000000000..41d4f4eb5
--- /dev/null
+++ b/fluxer_rexctl/internal/adminapi/configschema.json
@@ -0,0 +1,853 @@
+[
+ {
+ "key": "accounts.date_of_birth",
+ "type": "string",
+ "help": "Whether the instance asks for a date of birth, and who must enter one",
+ "options": [
+ "off",
+ "ask",
+ "require_new_accounts",
+ "require_all"
+ ]
+ },
+ {
+ "key": "accounts.dob_missing_cleanup.inactive_days",
+ "type": "integer",
+ "help": "Days without use before such an account is deleted"
+ },
+ {
+ "key": "accounts.dob_missing_cleanup.mode",
+ "type": "string",
+ "help": "Whether accounts that were created without a date of birth and never entered one are deleted",
+ "options": [
+ "off",
+ "after_inactivity"
+ ]
+ },
+ {
+ "key": "accounts.guild_join_gate",
+ "type": "string",
+ "help": "When joining a community needs a finished account. Applies only while the interaction tier is enforced and the person can preview communities",
+ "options": [
+ "off",
+ "visits_capable",
+ "always"
+ ]
+ },
+ {
+ "key": "accounts.inactivity_deletion.inactive_days",
+ "type": "integer",
+ "help": "Days without use before the warning email is sent"
+ },
+ {
+ "key": "accounts.inactivity_deletion.mode",
+ "type": "string",
+ "help": "Whether accounts unused for a long time are deleted. An account is only deleted after a warning email reached it",
+ "options": [
+ "off",
+ "after_inactivity"
+ ]
+ },
+ {
+ "key": "accounts.inactivity_deletion.warning_lead_days",
+ "type": "integer",
+ "help": "Days between the warning email and the deletion"
+ },
+ {
+ "key": "accounts.interaction_tier",
+ "type": "string",
+ "help": "Which limits apply to accounts that have not finished setting up",
+ "options": [
+ "legacy",
+ "enforced"
+ ]
+ },
+ {
+ "key": "accounts.unclaimed_account_cleanup.inactive_days",
+ "type": "integer",
+ "help": "Days without use before such an account is deleted"
+ },
+ {
+ "key": "accounts.unclaimed_account_cleanup.mode",
+ "type": "string",
+ "help": "Whether accounts that can never be signed in to again are deleted",
+ "options": [
+ "off",
+ "after_inactivity"
+ ]
+ },
+ {
+ "key": "accounts.unclaimed_account_cleanup.on_last_session_end",
+ "type": "string",
+ "help": "What happens when an account with no way back in signs out of its last session",
+ "options": [
+ "off",
+ "after_grace"
+ ]
+ },
+ {
+ "key": "accounts.verification_basis",
+ "type": "string",
+ "help": "What an account needs to finish setting up",
+ "options": [
+ "auto",
+ "confirmed_email",
+ "local_credential"
+ ]
+ },
+ {
+ "key": "app_public.branding.custom_css",
+ "type": "string",
+ "help": "Branding custom CSS",
+ "nullable": true
+ },
+ {
+ "key": "app_public.branding.favicon_dark_url",
+ "type": "string",
+ "help": "Branding favicon dark URL",
+ "nullable": true
+ },
+ {
+ "key": "app_public.branding.favicon_url",
+ "type": "string",
+ "help": "Branding favicon URL",
+ "nullable": true
+ },
+ {
+ "key": "app_public.branding.icon_url",
+ "type": "string",
+ "help": "Branding icon URL",
+ "nullable": true
+ },
+ {
+ "key": "app_public.branding.logo_url",
+ "type": "string",
+ "help": "Branding logo URL",
+ "nullable": true
+ },
+ {
+ "key": "app_public.branding.premium_info_url",
+ "type": "string",
+ "help": "Branding premium info URL",
+ "nullable": true
+ },
+ {
+ "key": "app_public.branding.premium_product_name",
+ "type": "string",
+ "help": "Branding premium product name",
+ "nullable": true
+ },
+ {
+ "key": "app_public.branding.product_name",
+ "type": "string",
+ "help": "Branding product name"
+ },
+ {
+ "key": "app_public.branding.sign_in_backdrop_url",
+ "type": "string",
+ "help": "Branding sign in backdrop URL",
+ "nullable": true
+ },
+ {
+ "key": "app_public.branding.status_page_incident_history_url",
+ "type": "string",
+ "help": "Branding status page incident history URL",
+ "nullable": true
+ },
+ {
+ "key": "app_public.branding.status_page_url",
+ "type": "string",
+ "help": "Branding status page URL",
+ "nullable": true
+ },
+ {
+ "key": "app_public.branding.symbol_url",
+ "type": "string",
+ "help": "Branding symbol URL",
+ "nullable": true
+ },
+ {
+ "key": "app_public.branding.theme_color",
+ "type": "string",
+ "help": "Branding theme color",
+ "nullable": true
+ },
+ {
+ "key": "app_public.branding.upload_limit_message",
+ "type": "string",
+ "help": "Branding upload limit message",
+ "nullable": true
+ },
+ {
+ "key": "app_public.branding.wordmark_url",
+ "type": "string",
+ "help": "Branding wordmark URL",
+ "nullable": true
+ },
+ {
+ "key": "app_public.legal.guidelines_url",
+ "type": "string",
+ "help": "Legal guidelines URL",
+ "nullable": true
+ },
+ {
+ "key": "app_public.legal.privacy_url",
+ "type": "string",
+ "help": "Legal privacy URL",
+ "nullable": true
+ },
+ {
+ "key": "app_public.legal.terms_url",
+ "type": "string",
+ "help": "Legal terms URL",
+ "nullable": true
+ },
+ {
+ "key": "auth.identifier_first",
+ "type": "string",
+ "help": "Whether clients show the single sign-in entry that starts with an email",
+ "options": [
+ "auto",
+ "on",
+ "off"
+ ]
+ },
+ {
+ "key": "auth.instant_accounts.enabled",
+ "type": "boolean",
+ "help": "Whether accounts can be created from just a display name. Needs the captcha to be on"
+ },
+ {
+ "key": "auth.instant_accounts.pow_escalation_per_hour",
+ "type": "integer",
+ "help": "Every this many accounts created from a display name in the current hour doubles the captcha cost"
+ },
+ {
+ "key": "billing.automatic_tax",
+ "type": "boolean",
+ "help": "Billing automatic tax",
+ "nullable": true
+ },
+ {
+ "key": "billing.country_currencies",
+ "type": "json",
+ "help": "Billing country currencies",
+ "nullable": true
+ },
+ {
+ "key": "billing.default_currency",
+ "type": "string",
+ "help": "Billing default currency",
+ "nullable": true
+ },
+ {
+ "key": "billing.enabled",
+ "type": "boolean",
+ "help": "Billing enabled",
+ "nullable": true
+ },
+ {
+ "key": "billing.legacy_prices",
+ "type": "json",
+ "help": "Billing legacy prices",
+ "nullable": true
+ },
+ {
+ "key": "billing.prices",
+ "type": "json",
+ "help": "Billing prices",
+ "nullable": true
+ },
+ {
+ "key": "billing.stripe_secret_key",
+ "type": "secret",
+ "help": "Billing stripe secret key",
+ "secret_set": "billing.stripe_secret_key_set",
+ "nullable": true
+ },
+ {
+ "key": "billing.stripe_webhook_secret",
+ "type": "secret",
+ "help": "Billing stripe webhook secret",
+ "secret_set": "billing.stripe_webhook_secret_set",
+ "nullable": true
+ },
+ {
+ "key": "billing.tax_id_collection",
+ "type": "boolean",
+ "help": "Billing tax ID collection",
+ "nullable": true
+ },
+ {
+ "key": "billing.terms_consent_required",
+ "type": "boolean",
+ "help": "Billing terms consent required",
+ "nullable": true
+ },
+ {
+ "key": "captcha.cost",
+ "type": "integer",
+ "help": "Captcha cost"
+ },
+ {
+ "key": "captcha.max_counter",
+ "type": "integer",
+ "help": "Captcha max counter"
+ },
+ {
+ "key": "captcha.provider",
+ "type": "string",
+ "help": "Captcha the instance asks for",
+ "options": [
+ "none",
+ "altcha"
+ ]
+ },
+ {
+ "key": "domain_migration.anonymous_rollout_basis_points",
+ "type": "integer",
+ "help": "Domain migration anonymous rollout basis points"
+ },
+ {
+ "key": "domain_migration.enabled",
+ "type": "boolean",
+ "help": "Domain migration enabled"
+ },
+ {
+ "key": "domain_migration.excluded_user_ids",
+ "type": "list",
+ "help": "Domain migration excluded user IDs"
+ },
+ {
+ "key": "domain_migration.include_premium_users",
+ "type": "boolean",
+ "help": "Domain migration include premium users"
+ },
+ {
+ "key": "domain_migration.included_guild_ids",
+ "type": "list",
+ "help": "Domain migration included guild IDs"
+ },
+ {
+ "key": "domain_migration.included_user_ids",
+ "type": "list",
+ "help": "Domain migration included user IDs"
+ },
+ {
+ "key": "domain_migration.rollout_basis_points",
+ "type": "integer",
+ "help": "Domain migration rollout basis points"
+ },
+ {
+ "key": "domain_migration.rollout_country_codes",
+ "type": "list",
+ "help": "Domain migration rollout country codes"
+ },
+ {
+ "key": "domain_migration.rollout_salt",
+ "type": "string",
+ "help": "Domain migration rollout salt"
+ },
+ {
+ "key": "domain_migration.standalone_forwarding",
+ "type": "boolean",
+ "help": "Domain migration standalone forwarding"
+ },
+ {
+ "key": "experiment_delivery.poll_interval_seconds",
+ "type": "integer",
+ "help": "Experiment delivery poll interval seconds"
+ },
+ {
+ "key": "experiment_delivery.poll_jitter_percent",
+ "type": "integer",
+ "help": "Experiment delivery poll jitter percent"
+ },
+ {
+ "key": "gateway_rollout.gateway_dispatch_relay_max_queue",
+ "type": "integer",
+ "help": "Gateway rollout gateway dispatch relay max queue"
+ },
+ {
+ "key": "gateway_rollout.gateway_dispatch_relay_shards",
+ "type": "integer",
+ "help": "Gateway rollout gateway dispatch relay shards"
+ },
+ {
+ "key": "gateway_rollout.guild_rollout_percentage",
+ "type": "number",
+ "help": "Gateway rollout guild rollout percentage"
+ },
+ {
+ "key": "gateway_rollout.max_concurrent_guild_starts",
+ "type": "integer",
+ "help": "Gateway rollout max concurrent guild starts"
+ },
+ {
+ "key": "gateway_rollout.max_concurrent_session_starts",
+ "type": "integer",
+ "help": "Gateway rollout max concurrent session starts"
+ },
+ {
+ "key": "gateway_rollout.rpc_request_timeout_ms",
+ "type": "integer",
+ "help": "Gateway rollout RPC request timeout ms"
+ },
+ {
+ "key": "gateway_rollout.session_rollout_mode",
+ "type": "string",
+ "help": "Gateway rollout session rollout mode",
+ "options": [
+ "modulo",
+ "random"
+ ]
+ },
+ {
+ "key": "gateway_rollout.session_rollout_percentage",
+ "type": "number",
+ "help": "Gateway rollout session rollout percentage"
+ },
+ {
+ "key": "gateway_rollout.voice_e2ee_scope",
+ "type": "string",
+ "help": "Gateway rollout voice E2EE scope",
+ "options": [
+ "guild_feature_only",
+ "platform_wide"
+ ]
+ },
+ {
+ "key": "guild_visits.enabled",
+ "type": "boolean",
+ "help": "Kill switch for visiting communities without joining"
+ },
+ {
+ "key": "guild_visits.excluded_user_ids",
+ "type": "list",
+ "help": "People never assigned, checked before the included list"
+ },
+ {
+ "key": "guild_visits.included_user_ids",
+ "type": "list",
+ "help": "People always assigned"
+ },
+ {
+ "key": "guild_visits.user_basis_points",
+ "type": "integer",
+ "help": "Share of people assigned, in basis points"
+ },
+ {
+ "key": "guild_visits.user_salt",
+ "type": "string",
+ "help": "Salt for the assignment bucket"
+ },
+ {
+ "key": "integrations.bluesky.client_name",
+ "type": "string",
+ "help": "Bluesky client name",
+ "nullable": true
+ },
+ {
+ "key": "integrations.bluesky.client_uri",
+ "type": "string",
+ "help": "Bluesky client URI",
+ "nullable": true
+ },
+ {
+ "key": "integrations.bluesky.enabled",
+ "type": "boolean",
+ "help": "Bluesky enabled",
+ "nullable": true
+ },
+ {
+ "key": "integrations.bluesky.keys",
+ "type": "json",
+ "help": "Bluesky keys"
+ },
+ {
+ "key": "integrations.bluesky.logo_uri",
+ "type": "string",
+ "help": "Bluesky logo URI",
+ "nullable": true
+ },
+ {
+ "key": "integrations.bluesky.policy_uri",
+ "type": "string",
+ "help": "Bluesky policy URI",
+ "nullable": true
+ },
+ {
+ "key": "integrations.bluesky.tos_uri",
+ "type": "string",
+ "help": "Bluesky terms URI",
+ "nullable": true
+ },
+ {
+ "key": "integrations.email.delivery",
+ "type": "string",
+ "help": "How the instance sends email, or null to use the environment",
+ "options": [
+ "off",
+ "smtp"
+ ],
+ "nullable": true
+ },
+ {
+ "key": "integrations.email.disable_new_ip_authorization",
+ "type": "boolean",
+ "help": "Email disable new IP authorization",
+ "nullable": true
+ },
+ {
+ "key": "integrations.email.from_email",
+ "type": "string",
+ "help": "Email from email",
+ "nullable": true
+ },
+ {
+ "key": "integrations.email.from_name",
+ "type": "string",
+ "help": "Email from name",
+ "nullable": true
+ },
+ {
+ "key": "integrations.email.smtp.host",
+ "type": "string",
+ "help": "SMTP host",
+ "nullable": true
+ },
+ {
+ "key": "integrations.email.smtp.password",
+ "type": "secret",
+ "help": "SMTP password",
+ "secret_set": "integrations.email.smtp.password_set",
+ "nullable": true
+ },
+ {
+ "key": "integrations.email.smtp.port",
+ "type": "integer",
+ "help": "SMTP port",
+ "nullable": true
+ },
+ {
+ "key": "integrations.email.smtp.tls_mode",
+ "type": "string",
+ "help": "How the SMTP connection is encrypted",
+ "options": [
+ "implicit",
+ "starttls",
+ "opportunistic",
+ "none"
+ ],
+ "nullable": true
+ },
+ {
+ "key": "integrations.email.smtp.username",
+ "type": "string",
+ "help": "SMTP username",
+ "nullable": true
+ },
+ {
+ "key": "integrations.gif.klipy_api_key",
+ "type": "secret",
+ "help": "GIF klipy API key",
+ "secret_set": "integrations.gif.klipy_api_key_set",
+ "nullable": true
+ },
+ {
+ "key": "integrations.youtube.api_key",
+ "type": "secret",
+ "help": "Youtube API key",
+ "secret_set": "integrations.youtube.api_key_set",
+ "nullable": true
+ },
+ {
+ "key": "media.attachment_decay.curve",
+ "type": "number",
+ "help": "Attachment decay curve",
+ "nullable": true
+ },
+ {
+ "key": "media.attachment_decay.enabled",
+ "type": "boolean",
+ "help": "Attachment decay enabled",
+ "nullable": true
+ },
+ {
+ "key": "media.attachment_decay.max_eligible_size_mb",
+ "type": "number",
+ "help": "Attachment decay max eligible size MB",
+ "nullable": true
+ },
+ {
+ "key": "media.attachment_decay.max_lifetime_days",
+ "type": "integer",
+ "help": "Attachment decay max lifetime days",
+ "nullable": true
+ },
+ {
+ "key": "media.attachment_decay.max_size_mb",
+ "type": "number",
+ "help": "Attachment decay max size MB",
+ "nullable": true
+ },
+ {
+ "key": "media.attachment_decay.min_lifetime_days",
+ "type": "integer",
+ "help": "Attachment decay min lifetime days",
+ "nullable": true
+ },
+ {
+ "key": "media.attachment_decay.min_size_mb",
+ "type": "number",
+ "help": "Attachment decay min size MB",
+ "nullable": true
+ },
+ {
+ "key": "media.attachment_decay.renew_threshold_days",
+ "type": "integer",
+ "help": "Attachment decay renew threshold days",
+ "nullable": true
+ },
+ {
+ "key": "media.attachment_decay.renew_window_days",
+ "type": "integer",
+ "help": "Attachment decay renew window days",
+ "nullable": true
+ },
+ {
+ "key": "notice",
+ "type": "json",
+ "help": "Notice shown to everyone on the instance, such as planned maintenance",
+ "nullable": true
+ },
+ {
+ "key": "policy.direct_messages_disabled",
+ "type": "boolean",
+ "help": "Policy direct messages disabled"
+ },
+ {
+ "key": "policy.direct_messages_locked",
+ "type": "boolean",
+ "help": "Policy direct messages locked"
+ },
+ {
+ "key": "policy.friends_disabled",
+ "type": "boolean",
+ "help": "Whether friend requests are disabled instance-wide. Left out while direct_messages_disabled changes, it takes the same value"
+ },
+ {
+ "key": "policy.guild_create_access",
+ "type": "boolean",
+ "help": "Policy guild create access"
+ },
+ {
+ "key": "policy.premium_mode",
+ "type": "string",
+ "help": "Policy premium mode",
+ "options": [
+ "mirror",
+ "everyone"
+ ]
+ },
+ {
+ "key": "policy.services.bluesky_enabled",
+ "type": "boolean",
+ "help": "Services bluesky enabled",
+ "nullable": true
+ },
+ {
+ "key": "policy.services.gif_enabled",
+ "type": "boolean",
+ "help": "Services GIF enabled",
+ "nullable": true
+ },
+ {
+ "key": "policy.services.youtube_enabled",
+ "type": "boolean",
+ "help": "Services youtube enabled",
+ "nullable": true
+ },
+ {
+ "key": "policy.single_community_add_members",
+ "type": "boolean",
+ "help": "Also add every existing account to the single community in the background"
+ },
+ {
+ "key": "policy.single_community_enabled",
+ "type": "boolean",
+ "help": "Policy single community enabled"
+ },
+ {
+ "key": "policy.single_community_guild_id",
+ "type": "string",
+ "help": "ID of an existing community to use as the single community. Turns the mode on with that community, or moves it there while the mode is on"
+ },
+ {
+ "key": "policy.single_community_name",
+ "type": "string",
+ "help": "Policy single community name"
+ },
+ {
+ "key": "push_relay.relay_consent_accepted",
+ "type": "boolean",
+ "help": "Push relay relay consent accepted"
+ },
+ {
+ "key": "registration.admin_registration_urls_enabled",
+ "type": "boolean",
+ "help": "Registration admin registration URLs enabled"
+ },
+ {
+ "key": "registration.allowed_email_domains",
+ "type": "list",
+ "help": "Email domains that public sign-ups and email changes must use. Empty allows any domain"
+ },
+ {
+ "key": "registration.mode",
+ "type": "string",
+ "help": "Registration mode",
+ "options": [
+ "open",
+ "approval",
+ "closed"
+ ]
+ },
+ {
+ "key": "sso.allowed_domains",
+ "type": "list",
+ "help": "SSO allowed domains"
+ },
+ {
+ "key": "sso.authorization_url",
+ "type": "string",
+ "help": "SSO authorization URL",
+ "nullable": true
+ },
+ {
+ "key": "sso.auto_provision",
+ "type": "boolean",
+ "help": "SSO auto provision"
+ },
+ {
+ "key": "sso.button_label",
+ "type": "string",
+ "help": "Text for the sign-in button. Trimmed, then up to 64 UTF-16 code units with at least one visible character and no control characters, line breaks or bidirectional formatting characters. Empty or null uses the default label",
+ "nullable": true
+ },
+ {
+ "key": "sso.client_id",
+ "type": "string",
+ "help": "SSO client ID",
+ "nullable": true
+ },
+ {
+ "key": "sso.client_secret",
+ "type": "secret",
+ "help": "SSO client secret",
+ "secret_set": "sso.client_secret_set",
+ "nullable": true
+ },
+ {
+ "key": "sso.display_name",
+ "type": "string",
+ "help": "SSO display name",
+ "nullable": true
+ },
+ {
+ "key": "sso.enabled",
+ "type": "boolean",
+ "help": "SSO enabled"
+ },
+ {
+ "key": "sso.enforced",
+ "type": "boolean",
+ "help": "SSO enforced"
+ },
+ {
+ "key": "sso.group_role_mappings",
+ "type": "json",
+ "help": "Groups whose members get a role in the single community. Every listed role is managed by single sign-on, and is added or removed to match the groups at each sign-in"
+ },
+ {
+ "key": "sso.groups_claim",
+ "type": "string",
+ "help": "The claim that lists the groups of a member. Empty or null uses `groups`",
+ "nullable": true
+ },
+ {
+ "key": "sso.issuer",
+ "type": "string",
+ "help": "SSO issuer",
+ "nullable": true
+ },
+ {
+ "key": "sso.jwks_url",
+ "type": "string",
+ "help": "SSO JWKS URL",
+ "nullable": true
+ },
+ {
+ "key": "sso.scope",
+ "type": "string",
+ "help": "SSO scope",
+ "nullable": true
+ },
+ {
+ "key": "sso.token_url",
+ "type": "string",
+ "help": "SSO token URL",
+ "nullable": true
+ },
+ {
+ "key": "sso.userinfo_url",
+ "type": "string",
+ "help": "SSO userinfo URL",
+ "nullable": true
+ },
+ {
+ "key": "voice_p2p.enabled",
+ "type": "boolean",
+ "help": "Voice P2P enabled"
+ },
+ {
+ "key": "voice_p2p.excluded_user_ids",
+ "type": "list",
+ "help": "Voice P2P excluded user IDs"
+ },
+ {
+ "key": "voice_p2p.include_premium_users",
+ "type": "boolean",
+ "help": "Voice P2P include premium users"
+ },
+ {
+ "key": "voice_p2p.included_guild_ids",
+ "type": "list",
+ "help": "Voice P2P included guild IDs"
+ },
+ {
+ "key": "voice_p2p.included_user_ids",
+ "type": "list",
+ "help": "Voice P2P included user IDs"
+ },
+ {
+ "key": "voice_p2p.max_participants",
+ "type": "integer",
+ "help": "Voice P2P max participants"
+ },
+ {
+ "key": "voice_p2p.rollout_basis_points",
+ "type": "integer",
+ "help": "Voice P2P rollout basis points"
+ },
+ {
+ "key": "voice_p2p.rollout_country_codes",
+ "type": "list",
+ "help": "Voice P2P rollout country codes"
+ },
+ {
+ "key": "voice_p2p.rollout_salt",
+ "type": "string",
+ "help": "Voice P2P rollout salt"
+ }
+]
diff --git a/fluxer_rexctl/internal/adminapi/gen.go b/fluxer_rexctl/internal/adminapi/gen.go
new file mode 100644
index 000000000..440bd3bb0
--- /dev/null
+++ b/fluxer_rexctl/internal/adminapi/gen.go
@@ -0,0 +1,3291 @@
+// Package adminapi provides primitives to interact with the openapi HTTP API.
+//
+// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.2 DO NOT EDIT.
+package adminapi
+
+import (
+ "encoding/json"
+ "fmt"
+ "time"
+
+ "github.com/oapi-codegen/runtime"
+)
+
+const (
+ AdminApiKeyScopes adminApiKeyContextKey = "adminApiKey.Scopes"
+)
+
+// Defines values for AccountIdentityLockReasonSchema.
+const (
+ ACCOUNTSEXIST AccountIdentityLockReasonSchema = "accounts_exist"
+ ADMINEXISTS AccountIdentityLockReasonSchema = "admin_exists"
+ EXISTINGINSTANCE AccountIdentityLockReasonSchema = "existing_instance"
+ SETUPCONFIGURED AccountIdentityLockReasonSchema = "setup_configured"
+)
+
+// Valid indicates whether the value is a known member of the AccountIdentityLockReasonSchema enum.
+func (e AccountIdentityLockReasonSchema) Valid() bool {
+ switch e {
+ case ACCOUNTSEXIST:
+ return true
+ case ADMINEXISTS:
+ return true
+ case EXISTINGINSTANCE:
+ return true
+ case SETUPCONFIGURED:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for AccountIdentityModeSchema.
+const (
+ EMAIL AccountIdentityModeSchema = "email"
+ USERNAME AccountIdentityModeSchema = "username"
+)
+
+// Valid indicates whether the value is a known member of the AccountIdentityModeSchema enum.
+func (e AccountIdentityModeSchema) Valid() bool {
+ switch e {
+ case EMAIL:
+ return true
+ case USERNAME:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for AccountTierSchema.
+const (
+ UNCLAIMED AccountTierSchema = "unclaimed"
+ UNVERIFIED AccountTierSchema = "unverified"
+ VERIFIED AccountTierSchema = "verified"
+)
+
+// Valid indicates whether the value is a known member of the AccountTierSchema enum.
+func (e AccountTierSchema) Valid() bool {
+ switch e {
+ case UNCLAIMED:
+ return true
+ case UNVERIFIED:
+ return true
+ case VERIFIED:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for AccountsConfigUpdateRequestDateOfBirthEnforcement.
+const (
+ All AccountsConfigUpdateRequestDateOfBirthEnforcement = "all"
+ NewAccounts AccountsConfigUpdateRequestDateOfBirthEnforcement = "new_accounts"
+ Off AccountsConfigUpdateRequestDateOfBirthEnforcement = "off"
+)
+
+// Valid indicates whether the value is a known member of the AccountsConfigUpdateRequestDateOfBirthEnforcement enum.
+func (e AccountsConfigUpdateRequestDateOfBirthEnforcement) Valid() bool {
+ switch e {
+ case All:
+ return true
+ case NewAccounts:
+ return true
+ case Off:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for AdminAclType.
+const (
+ AclSetUser AdminAclType = "acl:set:user"
+ AdminApiKeyManage AdminAclType = "admin_api_key:manage"
+ AdminAuthenticate AdminAclType = "admin:authenticate"
+ ApplicationListByOwner AdminAclType = "application:list:by_owner"
+ ApplicationLookup AdminAclType = "application:lookup"
+ ApplicationTransferOwnership AdminAclType = "application:transfer_ownership"
+ ArchiveTriggerGuild AdminAclType = "archive:trigger:guild"
+ ArchiveTriggerUser AdminAclType = "archive:trigger:user"
+ ArchiveViewAll AdminAclType = "archive:view_all"
+ AssetPurge AdminAclType = "asset:purge"
+ Asterisk AdminAclType = "*"
+ AuditLogView AdminAclType = "audit_log:view"
+ BanAvatarHashAdd AdminAclType = "ban:avatar_hash:add"
+ BanAvatarHashCheck AdminAclType = "ban:avatar_hash:check"
+ BanAvatarHashRemove AdminAclType = "ban:avatar_hash:remove"
+ BanEmailAdd AdminAclType = "ban:email:add"
+ BanEmailCheck AdminAclType = "ban:email:check"
+ BanEmailRemove AdminAclType = "ban:email:remove"
+ BanFileShaAdd AdminAclType = "ban:file_sha:add"
+ BanFileShaCheck AdminAclType = "ban:file_sha:check"
+ BanFileShaRemove AdminAclType = "ban:file_sha:remove"
+ BanIpAdd AdminAclType = "ban:ip:add"
+ BanIpCheck AdminAclType = "ban:ip:check"
+ BanIpRemove AdminAclType = "ban:ip:remove"
+ BanPhraseAdd AdminAclType = "ban:phrase:add"
+ BanPhraseCheck AdminAclType = "ban:phrase:check"
+ BanPhraseRemove AdminAclType = "ban:phrase:remove"
+ BanProfileSubstringAdd AdminAclType = "ban:profile_substring:add"
+ BanProfileSubstringCheck AdminAclType = "ban:profile_substring:check"
+ BanProfileSubstringRemove AdminAclType = "ban:profile_substring:remove"
+ BanUrlAdd AdminAclType = "ban:url:add"
+ BanUrlCheck AdminAclType = "ban:url:check"
+ BanUrlDomainAdd AdminAclType = "ban:url_domain:add"
+ BanUrlDomainCheck AdminAclType = "ban:url_domain:check"
+ BanUrlDomainRemove AdminAclType = "ban:url_domain:remove"
+ BanUrlRemove AdminAclType = "ban:url:remove"
+ BulkAddGuildMembers AdminAclType = "bulk:add:guild_members"
+ BulkDeleteUserMessages AdminAclType = "bulk:delete:user_messages"
+ BulkDeleteUsers AdminAclType = "bulk:delete:users"
+ BulkUpdateGuildFeatures AdminAclType = "bulk:update:guild_features"
+ BulkUpdateUserFlags AdminAclType = "bulk:update:user_flags"
+ DiscoveryRemove AdminAclType = "discovery:remove"
+ DiscoveryReview AdminAclType = "discovery:review"
+ EnforcementAnnotate AdminAclType = "enforcement:annotate"
+ EnforcementView AdminAclType = "enforcement:view"
+ GatewayMemoryStats AdminAclType = "gateway:memory_stats"
+ GatewayReloadAll AdminAclType = "gateway:reload_all"
+ GiftCodesGenerate AdminAclType = "gift_codes:generate"
+ GuildAuditLogView AdminAclType = "guild:audit_log:view"
+ GuildBanMember AdminAclType = "guild:ban_member"
+ GuildDelete AdminAclType = "guild:delete"
+ GuildForceAddMember AdminAclType = "guild:force_add_member"
+ GuildKickMember AdminAclType = "guild:kick_member"
+ GuildListMembers AdminAclType = "guild:list:members"
+ GuildLookup AdminAclType = "guild:lookup"
+ GuildReload AdminAclType = "guild:reload"
+ GuildShutdown AdminAclType = "guild:shutdown"
+ GuildTransferOwnership AdminAclType = "guild:transfer_ownership"
+ GuildUpdateFeatures AdminAclType = "guild:update:features"
+ GuildUpdateName AdminAclType = "guild:update:name"
+ GuildUpdateSettings AdminAclType = "guild:update:settings"
+ GuildUpdateVanity AdminAclType = "guild:update:vanity"
+ InstanceConfigUpdate AdminAclType = "instance:config:update"
+ InstanceConfigView AdminAclType = "instance:config:view"
+ InstanceLimitConfigUpdate AdminAclType = "instance:limit_config:update"
+ InstanceLimitConfigView AdminAclType = "instance:limit_config:view"
+ JobsCancel AdminAclType = "jobs:cancel"
+ JobsView AdminAclType = "jobs:view"
+ MessageDelete AdminAclType = "message:delete"
+ MessageDeleteAll AdminAclType = "message:delete_all"
+ MessageLookup AdminAclType = "message:lookup"
+ MessageShred AdminAclType = "message:shred"
+ OperatorPassWaitlistStats AdminAclType = "operator_pass:waitlist_stats"
+ RegistrationReview AdminAclType = "registration:review"
+ ReportDelete AdminAclType = "report:delete"
+ ReportResolve AdminAclType = "report:resolve"
+ ReportView AdminAclType = "report:view"
+ ReportViewReporterPii AdminAclType = "report:view:reporter_pii"
+ SystemDmSend AdminAclType = "system_dm:send"
+ UserCancelBulkMessageDeletion AdminAclType = "user:cancel:bulk_message_deletion"
+ UserCreatePasswordResetLink AdminAclType = "user:create:password_reset_link"
+ UserDelete AdminAclType = "user:delete"
+ UserDeleteRecoveryKit AdminAclType = "user:delete:recovery_kit"
+ UserListDmChannels AdminAclType = "user:list:dm_channels"
+ UserListGuilds AdminAclType = "user:list:guilds"
+ UserListRelationships AdminAclType = "user:list:relationships"
+ UserListSessions AdminAclType = "user:list:sessions"
+ UserLookup AdminAclType = "user:lookup"
+ UserRemoveRelationship AdminAclType = "user:remove:relationship"
+ UserTempBan AdminAclType = "user:temp_ban"
+ UserUpdateBotStatus AdminAclType = "user:update:bot_status"
+ UserUpdateDob AdminAclType = "user:update:dob"
+ UserUpdateEmail AdminAclType = "user:update:email"
+ UserUpdateFlags AdminAclType = "user:update:flags"
+ UserUpdateMfa AdminAclType = "user:update:mfa"
+ UserUpdateProfile AdminAclType = "user:update:profile"
+ UserUpdateTraits AdminAclType = "user:update:traits"
+ UserUpdateUsername AdminAclType = "user:update:username"
+ UserViewContactLog AdminAclType = "user:view:contact_log"
+ UserViewDob AdminAclType = "user:view:dob"
+ UserViewEmail AdminAclType = "user:view:email"
+ UserViewIp AdminAclType = "user:view:ip"
+ VoiceRegionCreate AdminAclType = "voice:region:create"
+ VoiceRegionDelete AdminAclType = "voice:region:delete"
+ VoiceRegionList AdminAclType = "voice:region:list"
+ VoiceRegionUpdate AdminAclType = "voice:region:update"
+ VoiceServerCreate AdminAclType = "voice:server:create"
+ VoiceServerDelete AdminAclType = "voice:server:delete"
+ VoiceServerList AdminAclType = "voice:server:list"
+ VoiceServerUpdate AdminAclType = "voice:server:update"
+)
+
+// Valid indicates whether the value is a known member of the AdminAclType enum.
+func (e AdminAclType) Valid() bool {
+ switch e {
+ case AclSetUser:
+ return true
+ case AdminApiKeyManage:
+ return true
+ case AdminAuthenticate:
+ return true
+ case ApplicationListByOwner:
+ return true
+ case ApplicationLookup:
+ return true
+ case ApplicationTransferOwnership:
+ return true
+ case ArchiveTriggerGuild:
+ return true
+ case ArchiveTriggerUser:
+ return true
+ case ArchiveViewAll:
+ return true
+ case AssetPurge:
+ return true
+ case Asterisk:
+ return true
+ case AuditLogView:
+ return true
+ case BanAvatarHashAdd:
+ return true
+ case BanAvatarHashCheck:
+ return true
+ case BanAvatarHashRemove:
+ return true
+ case BanEmailAdd:
+ return true
+ case BanEmailCheck:
+ return true
+ case BanEmailRemove:
+ return true
+ case BanFileShaAdd:
+ return true
+ case BanFileShaCheck:
+ return true
+ case BanFileShaRemove:
+ return true
+ case BanIpAdd:
+ return true
+ case BanIpCheck:
+ return true
+ case BanIpRemove:
+ return true
+ case BanPhraseAdd:
+ return true
+ case BanPhraseCheck:
+ return true
+ case BanPhraseRemove:
+ return true
+ case BanProfileSubstringAdd:
+ return true
+ case BanProfileSubstringCheck:
+ return true
+ case BanProfileSubstringRemove:
+ return true
+ case BanUrlAdd:
+ return true
+ case BanUrlCheck:
+ return true
+ case BanUrlDomainAdd:
+ return true
+ case BanUrlDomainCheck:
+ return true
+ case BanUrlDomainRemove:
+ return true
+ case BanUrlRemove:
+ return true
+ case BulkAddGuildMembers:
+ return true
+ case BulkDeleteUserMessages:
+ return true
+ case BulkDeleteUsers:
+ return true
+ case BulkUpdateGuildFeatures:
+ return true
+ case BulkUpdateUserFlags:
+ return true
+ case DiscoveryRemove:
+ return true
+ case DiscoveryReview:
+ return true
+ case EnforcementAnnotate:
+ return true
+ case EnforcementView:
+ return true
+ case GatewayMemoryStats:
+ return true
+ case GatewayReloadAll:
+ return true
+ case GiftCodesGenerate:
+ return true
+ case GuildAuditLogView:
+ return true
+ case GuildBanMember:
+ return true
+ case GuildDelete:
+ return true
+ case GuildForceAddMember:
+ return true
+ case GuildKickMember:
+ return true
+ case GuildListMembers:
+ return true
+ case GuildLookup:
+ return true
+ case GuildReload:
+ return true
+ case GuildShutdown:
+ return true
+ case GuildTransferOwnership:
+ return true
+ case GuildUpdateFeatures:
+ return true
+ case GuildUpdateName:
+ return true
+ case GuildUpdateSettings:
+ return true
+ case GuildUpdateVanity:
+ return true
+ case InstanceConfigUpdate:
+ return true
+ case InstanceConfigView:
+ return true
+ case InstanceLimitConfigUpdate:
+ return true
+ case InstanceLimitConfigView:
+ return true
+ case JobsCancel:
+ return true
+ case JobsView:
+ return true
+ case MessageDelete:
+ return true
+ case MessageDeleteAll:
+ return true
+ case MessageLookup:
+ return true
+ case MessageShred:
+ return true
+ case OperatorPassWaitlistStats:
+ return true
+ case RegistrationReview:
+ return true
+ case ReportDelete:
+ return true
+ case ReportResolve:
+ return true
+ case ReportView:
+ return true
+ case ReportViewReporterPii:
+ return true
+ case SystemDmSend:
+ return true
+ case UserCancelBulkMessageDeletion:
+ return true
+ case UserCreatePasswordResetLink:
+ return true
+ case UserDelete:
+ return true
+ case UserDeleteRecoveryKit:
+ return true
+ case UserListDmChannels:
+ return true
+ case UserListGuilds:
+ return true
+ case UserListRelationships:
+ return true
+ case UserListSessions:
+ return true
+ case UserLookup:
+ return true
+ case UserRemoveRelationship:
+ return true
+ case UserTempBan:
+ return true
+ case UserUpdateBotStatus:
+ return true
+ case UserUpdateDob:
+ return true
+ case UserUpdateEmail:
+ return true
+ case UserUpdateFlags:
+ return true
+ case UserUpdateMfa:
+ return true
+ case UserUpdateProfile:
+ return true
+ case UserUpdateTraits:
+ return true
+ case UserUpdateUsername:
+ return true
+ case UserViewContactLog:
+ return true
+ case UserViewDob:
+ return true
+ case UserViewEmail:
+ return true
+ case UserViewIp:
+ return true
+ case VoiceRegionCreate:
+ return true
+ case VoiceRegionDelete:
+ return true
+ case VoiceRegionList:
+ return true
+ case VoiceRegionUpdate:
+ return true
+ case VoiceServerCreate:
+ return true
+ case VoiceServerDelete:
+ return true
+ case VoiceServerList:
+ return true
+ case VoiceServerUpdate:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for BillingCatalogModeSchema.
+const (
+ Env BillingCatalogModeSchema = "env"
+ Operator BillingCatalogModeSchema = "operator"
+)
+
+// Valid indicates whether the value is a known member of the BillingCatalogModeSchema enum.
+func (e BillingCatalogModeSchema) Valid() bool {
+ switch e {
+ case Env:
+ return true
+ case Operator:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for BrandingAssetUploadRequestKind.
+const (
+ Favicon BrandingAssetUploadRequestKind = "favicon"
+ FaviconDark BrandingAssetUploadRequestKind = "favicon_dark"
+ Icon BrandingAssetUploadRequestKind = "icon"
+ Logo BrandingAssetUploadRequestKind = "logo"
+ SignInBackdrop BrandingAssetUploadRequestKind = "sign_in_backdrop"
+ Symbol BrandingAssetUploadRequestKind = "symbol"
+ Wordmark BrandingAssetUploadRequestKind = "wordmark"
+)
+
+// Valid indicates whether the value is a known member of the BrandingAssetUploadRequestKind enum.
+func (e BrandingAssetUploadRequestKind) Valid() bool {
+ switch e {
+ case Favicon:
+ return true
+ case FaviconDark:
+ return true
+ case Icon:
+ return true
+ case Logo:
+ return true
+ case SignInBackdrop:
+ return true
+ case Symbol:
+ return true
+ case Wordmark:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CaptchaProviderSchema.
+const (
+ CaptchaProviderSchemaALTCHA CaptchaProviderSchema = "altcha"
+ CaptchaProviderSchemaNONE CaptchaProviderSchema = "none"
+)
+
+// Valid indicates whether the value is a known member of the CaptchaProviderSchema enum.
+func (e CaptchaProviderSchema) Valid() bool {
+ switch e {
+ case CaptchaProviderSchemaALTCHA:
+ return true
+ case CaptchaProviderSchemaNONE:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for CleanupModeSchema.
+const (
+ CleanupModeSchemaAFTERINACTIVITY CleanupModeSchema = "after_inactivity"
+ CleanupModeSchemaOFF CleanupModeSchema = "off"
+)
+
+// Valid indicates whether the value is a known member of the CleanupModeSchema enum.
+func (e CleanupModeSchema) Valid() bool {
+ switch e {
+ case CleanupModeSchemaAFTERINACTIVITY:
+ return true
+ case CleanupModeSchemaOFF:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for DateOfBirthPolicySchema.
+const (
+ DateOfBirthPolicySchemaASK DateOfBirthPolicySchema = "ask"
+ DateOfBirthPolicySchemaOFF DateOfBirthPolicySchema = "off"
+ DateOfBirthPolicySchemaREQUIREALL DateOfBirthPolicySchema = "require_all"
+ DateOfBirthPolicySchemaREQUIRENEWACCOUNTS DateOfBirthPolicySchema = "require_new_accounts"
+)
+
+// Valid indicates whether the value is a known member of the DateOfBirthPolicySchema enum.
+func (e DateOfBirthPolicySchema) Valid() bool {
+ switch e {
+ case DateOfBirthPolicySchemaASK:
+ return true
+ case DateOfBirthPolicySchemaOFF:
+ return true
+ case DateOfBirthPolicySchemaREQUIREALL:
+ return true
+ case DateOfBirthPolicySchemaREQUIRENEWACCOUNTS:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for DeleteAllUserMessagesResponseSuccess.
+const (
+ True DeleteAllUserMessagesResponseSuccess = true
+)
+
+// Valid indicates whether the value is a known member of the DeleteAllUserMessagesResponseSuccess enum.
+func (e DeleteAllUserMessagesResponseSuccess) Valid() bool {
+ switch e {
+ case True:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for DeletionReasonCode.
+const (
+ DeletionReasonCodeAUTOMATIONORSELFBOT DeletionReasonCode = 6
+ DeletionReasonCodeBANEVASION DeletionReasonCode = 17
+ DeletionReasonCodeBELOWMINIMUMAGE DeletionReasonCode = 32
+ DeletionReasonCodeBILLINGDISPUTEORABUSE DeletionReasonCode = 14
+ DeletionReasonCodeCHEATINGOREXPLOITATION DeletionReasonCode = 4
+ DeletionReasonCodeCHILDSAFETYVIOLATION DeletionReasonCode = 13
+ DeletionReasonCodeCHILDSEXUALCONTENT DeletionReasonCode = 9
+ DeletionReasonCodeCOORDINATEDRAIDING DeletionReasonCode = 5
+ DeletionReasonCodeCOPYRIGHT DeletionReasonCode = 31
+ DeletionReasonCodeGRAPHICVIOLENCE DeletionReasonCode = 16
+ DeletionReasonCodeHARASSMENTORBULLYING DeletionReasonCode = 11
+ DeletionReasonCodeHARMFULDECEPTION DeletionReasonCode = 28
+ DeletionReasonCodeHATESPEECHOREXTREMISTCONTENT DeletionReasonCode = 20
+ DeletionReasonCodeILLEGALGOODSORACTIVITY DeletionReasonCode = 27
+ DeletionReasonCodeIMPERSONATIONORFAKEIDENTITY DeletionReasonCode = 22
+ DeletionReasonCodeINACTIVITY DeletionReasonCode = 19
+ DeletionReasonCodeMALICIOUSLINKSORMALWARE DeletionReasonCode = 21
+ DeletionReasonCodeNONCONSENSUALSEXUALCONTENT DeletionReasonCode = 7
+ DeletionReasonCodeOPERATORPASSPAYMENTDISPUTE DeletionReasonCode = 34
+ DeletionReasonCodeOTHER DeletionReasonCode = 2
+ DeletionReasonCodePAYMENTFRAUD DeletionReasonCode = 12
+ DeletionReasonCodePRIVACYVIOLATIONORDOXXING DeletionReasonCode = 10
+ DeletionReasonCodeREPORTINGABUSE DeletionReasonCode = 29
+ DeletionReasonCodeSCAMORSOCIALENGINEERING DeletionReasonCode = 8
+ DeletionReasonCodeSELFHARMPROMOTION DeletionReasonCode = 25
+ DeletionReasonCodeSEXUALCONTENTPLACEMENT DeletionReasonCode = 26
+ DeletionReasonCodeSPAM DeletionReasonCode = 3
+ DeletionReasonCodeTHREATSORVIOLENTSPEECH DeletionReasonCode = 23
+ DeletionReasonCodeTOKENORCREDENTIALSCAM DeletionReasonCode = 18
+ DeletionReasonCodeUNCLAIMEDACCOUNTABANDONED DeletionReasonCode = 33
+ DeletionReasonCodeUNDERAGEACCOUNT DeletionReasonCode = 30
+ DeletionReasonCodeUNSOLICITEDEXPLICITCONTENT DeletionReasonCode = 15
+ DeletionReasonCodeUSERREQUESTED DeletionReasonCode = 1
+ DeletionReasonCodeVIOLENTEXTREMISM DeletionReasonCode = 24
+)
+
+// Valid indicates whether the value is a known member of the DeletionReasonCode enum.
+func (e DeletionReasonCode) Valid() bool {
+ switch e {
+ case DeletionReasonCodeAUTOMATIONORSELFBOT:
+ return true
+ case DeletionReasonCodeBANEVASION:
+ return true
+ case DeletionReasonCodeBELOWMINIMUMAGE:
+ return true
+ case DeletionReasonCodeBILLINGDISPUTEORABUSE:
+ return true
+ case DeletionReasonCodeCHEATINGOREXPLOITATION:
+ return true
+ case DeletionReasonCodeCHILDSAFETYVIOLATION:
+ return true
+ case DeletionReasonCodeCHILDSEXUALCONTENT:
+ return true
+ case DeletionReasonCodeCOORDINATEDRAIDING:
+ return true
+ case DeletionReasonCodeCOPYRIGHT:
+ return true
+ case DeletionReasonCodeGRAPHICVIOLENCE:
+ return true
+ case DeletionReasonCodeHARASSMENTORBULLYING:
+ return true
+ case DeletionReasonCodeHARMFULDECEPTION:
+ return true
+ case DeletionReasonCodeHATESPEECHOREXTREMISTCONTENT:
+ return true
+ case DeletionReasonCodeILLEGALGOODSORACTIVITY:
+ return true
+ case DeletionReasonCodeIMPERSONATIONORFAKEIDENTITY:
+ return true
+ case DeletionReasonCodeINACTIVITY:
+ return true
+ case DeletionReasonCodeMALICIOUSLINKSORMALWARE:
+ return true
+ case DeletionReasonCodeNONCONSENSUALSEXUALCONTENT:
+ return true
+ case DeletionReasonCodeOPERATORPASSPAYMENTDISPUTE:
+ return true
+ case DeletionReasonCodeOTHER:
+ return true
+ case DeletionReasonCodePAYMENTFRAUD:
+ return true
+ case DeletionReasonCodePRIVACYVIOLATIONORDOXXING:
+ return true
+ case DeletionReasonCodeREPORTINGABUSE:
+ return true
+ case DeletionReasonCodeSCAMORSOCIALENGINEERING:
+ return true
+ case DeletionReasonCodeSELFHARMPROMOTION:
+ return true
+ case DeletionReasonCodeSEXUALCONTENTPLACEMENT:
+ return true
+ case DeletionReasonCodeSPAM:
+ return true
+ case DeletionReasonCodeTHREATSORVIOLENTSPEECH:
+ return true
+ case DeletionReasonCodeTOKENORCREDENTIALSCAM:
+ return true
+ case DeletionReasonCodeUNCLAIMEDACCOUNTABANDONED:
+ return true
+ case DeletionReasonCodeUNDERAGEACCOUNT:
+ return true
+ case DeletionReasonCodeUNSOLICITEDEXPLICITCONTENT:
+ return true
+ case DeletionReasonCodeUSERREQUESTED:
+ return true
+ case DeletionReasonCodeVIOLENTEXTREMISM:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for EmailDeliveryModeSchema.
+const (
+ EmailDeliveryModeSchemaOFF EmailDeliveryModeSchema = "off"
+ EmailDeliveryModeSchemaSMTP EmailDeliveryModeSchema = "smtp"
+)
+
+// Valid indicates whether the value is a known member of the EmailDeliveryModeSchema enum.
+func (e EmailDeliveryModeSchema) Valid() bool {
+ switch e {
+ case EmailDeliveryModeSchemaOFF:
+ return true
+ case EmailDeliveryModeSchemaSMTP:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for EmailDeliveryStateSchema.
+const (
+ EmailDeliveryStateSchemaOFFDISABLED EmailDeliveryStateSchema = "off_disabled"
+ EmailDeliveryStateSchemaOFFINCOMPLETE EmailDeliveryStateSchema = "off_incomplete"
+ EmailDeliveryStateSchemaOFFUSERNAMEMODE EmailDeliveryStateSchema = "off_username_mode"
+ EmailDeliveryStateSchemaON EmailDeliveryStateSchema = "on"
+)
+
+// Valid indicates whether the value is a known member of the EmailDeliveryStateSchema enum.
+func (e EmailDeliveryStateSchema) Valid() bool {
+ switch e {
+ case EmailDeliveryStateSchemaOFFDISABLED:
+ return true
+ case EmailDeliveryStateSchemaOFFINCOMPLETE:
+ return true
+ case EmailDeliveryStateSchemaOFFUSERNAMEMODE:
+ return true
+ case EmailDeliveryStateSchemaON:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for EnforcementDecisionInputAutomation.
+const (
+ EnforcementDecisionInputAutomationFlagged EnforcementDecisionInputAutomation = "flagged"
+ EnforcementDecisionInputAutomationNone EnforcementDecisionInputAutomation = "none"
+)
+
+// Valid indicates whether the value is a known member of the EnforcementDecisionInputAutomation enum.
+func (e EnforcementDecisionInputAutomation) Valid() bool {
+ switch e {
+ case EnforcementDecisionInputAutomationFlagged:
+ return true
+ case EnforcementDecisionInputAutomationNone:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for EnforcementDecisionInputConfirmations.
+const (
+ EvidencePreserved EnforcementDecisionInputConfirmations = "evidence_preserved"
+ ReportsFiledOrNotRequired EnforcementDecisionInputConfirmations = "reports_filed_or_not_required"
+)
+
+// Valid indicates whether the value is a known member of the EnforcementDecisionInputConfirmations enum.
+func (e EnforcementDecisionInputConfirmations) Valid() bool {
+ switch e {
+ case EvidencePreserved:
+ return true
+ case ReportsFiledOrNotRequired:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for EnforcementDecisionInputSource.
+const (
+ OwnReview EnforcementDecisionInputSource = "own_review"
+ Report EnforcementDecisionInputSource = "report"
+)
+
+// Valid indicates whether the value is a known member of the EnforcementDecisionInputSource enum.
+func (e EnforcementDecisionInputSource) Valid() bool {
+ switch e {
+ case OwnReview:
+ return true
+ case Report:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for EnforcementReasonCodeType.
+const (
+ EnforcementReasonCodeTypeAUTOMATIONORSELFBOT EnforcementReasonCodeType = 6
+ EnforcementReasonCodeTypeBANEVASION EnforcementReasonCodeType = 17
+ EnforcementReasonCodeTypeBILLINGDISPUTEORABUSE EnforcementReasonCodeType = 14
+ EnforcementReasonCodeTypeCHEATINGOREXPLOITATION EnforcementReasonCodeType = 4
+ EnforcementReasonCodeTypeCHILDSAFETYVIOLATION EnforcementReasonCodeType = 13
+ EnforcementReasonCodeTypeCHILDSEXUALCONTENT EnforcementReasonCodeType = 9
+ EnforcementReasonCodeTypeCOORDINATEDRAIDING EnforcementReasonCodeType = 5
+ EnforcementReasonCodeTypeCOPYRIGHT EnforcementReasonCodeType = 31
+ EnforcementReasonCodeTypeGRAPHICVIOLENCE EnforcementReasonCodeType = 16
+ EnforcementReasonCodeTypeHARASSMENTORBULLYING EnforcementReasonCodeType = 11
+ EnforcementReasonCodeTypeHARMFULDECEPTION EnforcementReasonCodeType = 28
+ EnforcementReasonCodeTypeHATESPEECHOREXTREMISTCONTENT EnforcementReasonCodeType = 20
+ EnforcementReasonCodeTypeILLEGALGOODSORACTIVITY EnforcementReasonCodeType = 27
+ EnforcementReasonCodeTypeIMPERSONATIONORFAKEIDENTITY EnforcementReasonCodeType = 22
+ EnforcementReasonCodeTypeMALICIOUSLINKSORMALWARE EnforcementReasonCodeType = 21
+ EnforcementReasonCodeTypeNONCONSENSUALSEXUALCONTENT EnforcementReasonCodeType = 7
+ EnforcementReasonCodeTypeOPERATORPASSPAYMENTDISPUTE EnforcementReasonCodeType = 34
+ EnforcementReasonCodeTypePAYMENTFRAUD EnforcementReasonCodeType = 12
+ EnforcementReasonCodeTypePRIVACYVIOLATIONORDOXXING EnforcementReasonCodeType = 10
+ EnforcementReasonCodeTypeREPORTINGABUSE EnforcementReasonCodeType = 29
+ EnforcementReasonCodeTypeSCAMORSOCIALENGINEERING EnforcementReasonCodeType = 8
+ EnforcementReasonCodeTypeSELFHARMPROMOTION EnforcementReasonCodeType = 25
+ EnforcementReasonCodeTypeSEXUALCONTENTPLACEMENT EnforcementReasonCodeType = 26
+ EnforcementReasonCodeTypeSPAM EnforcementReasonCodeType = 3
+ EnforcementReasonCodeTypeTHREATSORVIOLENTSPEECH EnforcementReasonCodeType = 23
+ EnforcementReasonCodeTypeTOKENORCREDENTIALSCAM EnforcementReasonCodeType = 18
+ EnforcementReasonCodeTypeUNDERAGEACCOUNT EnforcementReasonCodeType = 30
+ EnforcementReasonCodeTypeUNSOLICITEDEXPLICITCONTENT EnforcementReasonCodeType = 15
+ EnforcementReasonCodeTypeVIOLENTEXTREMISM EnforcementReasonCodeType = 24
+)
+
+// Valid indicates whether the value is a known member of the EnforcementReasonCodeType enum.
+func (e EnforcementReasonCodeType) Valid() bool {
+ switch e {
+ case EnforcementReasonCodeTypeAUTOMATIONORSELFBOT:
+ return true
+ case EnforcementReasonCodeTypeBANEVASION:
+ return true
+ case EnforcementReasonCodeTypeBILLINGDISPUTEORABUSE:
+ return true
+ case EnforcementReasonCodeTypeCHEATINGOREXPLOITATION:
+ return true
+ case EnforcementReasonCodeTypeCHILDSAFETYVIOLATION:
+ return true
+ case EnforcementReasonCodeTypeCHILDSEXUALCONTENT:
+ return true
+ case EnforcementReasonCodeTypeCOORDINATEDRAIDING:
+ return true
+ case EnforcementReasonCodeTypeCOPYRIGHT:
+ return true
+ case EnforcementReasonCodeTypeGRAPHICVIOLENCE:
+ return true
+ case EnforcementReasonCodeTypeHARASSMENTORBULLYING:
+ return true
+ case EnforcementReasonCodeTypeHARMFULDECEPTION:
+ return true
+ case EnforcementReasonCodeTypeHATESPEECHOREXTREMISTCONTENT:
+ return true
+ case EnforcementReasonCodeTypeILLEGALGOODSORACTIVITY:
+ return true
+ case EnforcementReasonCodeTypeIMPERSONATIONORFAKEIDENTITY:
+ return true
+ case EnforcementReasonCodeTypeMALICIOUSLINKSORMALWARE:
+ return true
+ case EnforcementReasonCodeTypeNONCONSENSUALSEXUALCONTENT:
+ return true
+ case EnforcementReasonCodeTypeOPERATORPASSPAYMENTDISPUTE:
+ return true
+ case EnforcementReasonCodeTypePAYMENTFRAUD:
+ return true
+ case EnforcementReasonCodeTypePRIVACYVIOLATIONORDOXXING:
+ return true
+ case EnforcementReasonCodeTypeREPORTINGABUSE:
+ return true
+ case EnforcementReasonCodeTypeSCAMORSOCIALENGINEERING:
+ return true
+ case EnforcementReasonCodeTypeSELFHARMPROMOTION:
+ return true
+ case EnforcementReasonCodeTypeSEXUALCONTENTPLACEMENT:
+ return true
+ case EnforcementReasonCodeTypeSPAM:
+ return true
+ case EnforcementReasonCodeTypeTHREATSORVIOLENTSPEECH:
+ return true
+ case EnforcementReasonCodeTypeTOKENORCREDENTIALSCAM:
+ return true
+ case EnforcementReasonCodeTypeUNDERAGEACCOUNT:
+ return true
+ case EnforcementReasonCodeTypeUNSOLICITEDEXPLICITCONTENT:
+ return true
+ case EnforcementReasonCodeTypeVIOLENTEXTREMISM:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GatewayRolloutConfigResponseSessionRolloutMode.
+const (
+ GatewayRolloutConfigResponseSessionRolloutModeModulo GatewayRolloutConfigResponseSessionRolloutMode = "modulo"
+ GatewayRolloutConfigResponseSessionRolloutModeRandom GatewayRolloutConfigResponseSessionRolloutMode = "random"
+)
+
+// Valid indicates whether the value is a known member of the GatewayRolloutConfigResponseSessionRolloutMode enum.
+func (e GatewayRolloutConfigResponseSessionRolloutMode) Valid() bool {
+ switch e {
+ case GatewayRolloutConfigResponseSessionRolloutModeModulo:
+ return true
+ case GatewayRolloutConfigResponseSessionRolloutModeRandom:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GatewayRolloutConfigResponseVoiceE2eeScope.
+const (
+ GatewayRolloutConfigResponseVoiceE2eeScopeGuildFeatureOnly GatewayRolloutConfigResponseVoiceE2eeScope = "guild_feature_only"
+ GatewayRolloutConfigResponseVoiceE2eeScopePlatformWide GatewayRolloutConfigResponseVoiceE2eeScope = "platform_wide"
+)
+
+// Valid indicates whether the value is a known member of the GatewayRolloutConfigResponseVoiceE2eeScope enum.
+func (e GatewayRolloutConfigResponseVoiceE2eeScope) Valid() bool {
+ switch e {
+ case GatewayRolloutConfigResponseVoiceE2eeScopeGuildFeatureOnly:
+ return true
+ case GatewayRolloutConfigResponseVoiceE2eeScopePlatformWide:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GatewayRolloutConfigUpdateRequestSessionRolloutMode.
+const (
+ GatewayRolloutConfigUpdateRequestSessionRolloutModeModulo GatewayRolloutConfigUpdateRequestSessionRolloutMode = "modulo"
+ GatewayRolloutConfigUpdateRequestSessionRolloutModeRandom GatewayRolloutConfigUpdateRequestSessionRolloutMode = "random"
+)
+
+// Valid indicates whether the value is a known member of the GatewayRolloutConfigUpdateRequestSessionRolloutMode enum.
+func (e GatewayRolloutConfigUpdateRequestSessionRolloutMode) Valid() bool {
+ switch e {
+ case GatewayRolloutConfigUpdateRequestSessionRolloutModeModulo:
+ return true
+ case GatewayRolloutConfigUpdateRequestSessionRolloutModeRandom:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GatewayRolloutConfigUpdateRequestVoiceE2eeScope.
+const (
+ GatewayRolloutConfigUpdateRequestVoiceE2eeScopeGuildFeatureOnly GatewayRolloutConfigUpdateRequestVoiceE2eeScope = "guild_feature_only"
+ GatewayRolloutConfigUpdateRequestVoiceE2eeScopePlatformWide GatewayRolloutConfigUpdateRequestVoiceE2eeScope = "platform_wide"
+)
+
+// Valid indicates whether the value is a known member of the GatewayRolloutConfigUpdateRequestVoiceE2eeScope enum.
+func (e GatewayRolloutConfigUpdateRequestVoiceE2eeScope) Valid() bool {
+ switch e {
+ case GatewayRolloutConfigUpdateRequestVoiceE2eeScopeGuildFeatureOnly:
+ return true
+ case GatewayRolloutConfigUpdateRequestVoiceE2eeScopePlatformWide:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for GuildJoinGateSchema.
+const (
+ GuildJoinGateSchemaALWAYS GuildJoinGateSchema = "always"
+ GuildJoinGateSchemaOFF GuildJoinGateSchema = "off"
+ GuildJoinGateSchemaVISITSCAPABLE GuildJoinGateSchema = "visits_capable"
+)
+
+// Valid indicates whether the value is a known member of the GuildJoinGateSchema enum.
+func (e GuildJoinGateSchema) Valid() bool {
+ switch e {
+ case GuildJoinGateSchemaALWAYS:
+ return true
+ case GuildJoinGateSchemaOFF:
+ return true
+ case GuildJoinGateSchemaVISITSCAPABLE:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for IdentifierFirstModeSchema.
+const (
+ IdentifierFirstModeSchemaAUTO IdentifierFirstModeSchema = "auto"
+ IdentifierFirstModeSchemaOFF IdentifierFirstModeSchema = "off"
+ IdentifierFirstModeSchemaON IdentifierFirstModeSchema = "on"
+)
+
+// Valid indicates whether the value is a known member of the IdentifierFirstModeSchema enum.
+func (e IdentifierFirstModeSchema) Valid() bool {
+ switch e {
+ case IdentifierFirstModeSchemaAUTO:
+ return true
+ case IdentifierFirstModeSchemaOFF:
+ return true
+ case IdentifierFirstModeSchemaON:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for InstanceConfigResponseIntegrationsEmailEffectiveProvider.
+const (
+ InstanceConfigResponseIntegrationsEmailEffectiveProviderNone InstanceConfigResponseIntegrationsEmailEffectiveProvider = "none"
+ InstanceConfigResponseIntegrationsEmailEffectiveProviderSmtp InstanceConfigResponseIntegrationsEmailEffectiveProvider = "smtp"
+)
+
+// Valid indicates whether the value is a known member of the InstanceConfigResponseIntegrationsEmailEffectiveProvider enum.
+func (e InstanceConfigResponseIntegrationsEmailEffectiveProvider) Valid() bool {
+ switch e {
+ case InstanceConfigResponseIntegrationsEmailEffectiveProviderNone:
+ return true
+ case InstanceConfigResponseIntegrationsEmailEffectiveProviderSmtp:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for InstanceConfigResponseIntegrationsEmailProvider.
+const (
+ InstanceConfigResponseIntegrationsEmailProviderNone InstanceConfigResponseIntegrationsEmailProvider = "none"
+ InstanceConfigResponseIntegrationsEmailProviderSmtp InstanceConfigResponseIntegrationsEmailProvider = "smtp"
+)
+
+// Valid indicates whether the value is a known member of the InstanceConfigResponseIntegrationsEmailProvider enum.
+func (e InstanceConfigResponseIntegrationsEmailProvider) Valid() bool {
+ switch e {
+ case InstanceConfigResponseIntegrationsEmailProviderNone:
+ return true
+ case InstanceConfigResponseIntegrationsEmailProviderSmtp:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsMode.
+const (
+ InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsModeIMPLICIT InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsMode = "implicit"
+ InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsModeNONE InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsMode = "none"
+ InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsModeOPPORTUNISTIC InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsMode = "opportunistic"
+ InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsModeSTARTTLS InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsMode = "starttls"
+)
+
+// Valid indicates whether the value is a known member of the InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsMode enum.
+func (e InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsMode) Valid() bool {
+ switch e {
+ case InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsModeIMPLICIT:
+ return true
+ case InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsModeNONE:
+ return true
+ case InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsModeOPPORTUNISTIC:
+ return true
+ case InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsModeSTARTTLS:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for InstanceConfigResponseIntegrationsEmailSmtpTlsMode.
+const (
+ InstanceConfigResponseIntegrationsEmailSmtpTlsModeIMPLICIT InstanceConfigResponseIntegrationsEmailSmtpTlsMode = "implicit"
+ InstanceConfigResponseIntegrationsEmailSmtpTlsModeNONE InstanceConfigResponseIntegrationsEmailSmtpTlsMode = "none"
+ InstanceConfigResponseIntegrationsEmailSmtpTlsModeOPPORTUNISTIC InstanceConfigResponseIntegrationsEmailSmtpTlsMode = "opportunistic"
+ InstanceConfigResponseIntegrationsEmailSmtpTlsModeSTARTTLS InstanceConfigResponseIntegrationsEmailSmtpTlsMode = "starttls"
+)
+
+// Valid indicates whether the value is a known member of the InstanceConfigResponseIntegrationsEmailSmtpTlsMode enum.
+func (e InstanceConfigResponseIntegrationsEmailSmtpTlsMode) Valid() bool {
+ switch e {
+ case InstanceConfigResponseIntegrationsEmailSmtpTlsModeIMPLICIT:
+ return true
+ case InstanceConfigResponseIntegrationsEmailSmtpTlsModeNONE:
+ return true
+ case InstanceConfigResponseIntegrationsEmailSmtpTlsModeOPPORTUNISTIC:
+ return true
+ case InstanceConfigResponseIntegrationsEmailSmtpTlsModeSTARTTLS:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for InstanceConfigResponsePolicyPremiumMode.
+const (
+ InstanceConfigResponsePolicyPremiumModeEveryone InstanceConfigResponsePolicyPremiumMode = "everyone"
+ InstanceConfigResponsePolicyPremiumModeMirror InstanceConfigResponsePolicyPremiumMode = "mirror"
+)
+
+// Valid indicates whether the value is a known member of the InstanceConfigResponsePolicyPremiumMode enum.
+func (e InstanceConfigResponsePolicyPremiumMode) Valid() bool {
+ switch e {
+ case InstanceConfigResponsePolicyPremiumModeEveryone:
+ return true
+ case InstanceConfigResponsePolicyPremiumModeMirror:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for InstanceConfigUpdateRequestIntegrationsEmailProvider.
+const (
+ InstanceConfigUpdateRequestIntegrationsEmailProviderNone InstanceConfigUpdateRequestIntegrationsEmailProvider = "none"
+ InstanceConfigUpdateRequestIntegrationsEmailProviderSmtp InstanceConfigUpdateRequestIntegrationsEmailProvider = "smtp"
+)
+
+// Valid indicates whether the value is a known member of the InstanceConfigUpdateRequestIntegrationsEmailProvider enum.
+func (e InstanceConfigUpdateRequestIntegrationsEmailProvider) Valid() bool {
+ switch e {
+ case InstanceConfigUpdateRequestIntegrationsEmailProviderNone:
+ return true
+ case InstanceConfigUpdateRequestIntegrationsEmailProviderSmtp:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsMode.
+const (
+ InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsModeIMPLICIT InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsMode = "implicit"
+ InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsModeNONE InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsMode = "none"
+ InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsModeOPPORTUNISTIC InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsMode = "opportunistic"
+ InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsModeSTARTTLS InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsMode = "starttls"
+)
+
+// Valid indicates whether the value is a known member of the InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsMode enum.
+func (e InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsMode) Valid() bool {
+ switch e {
+ case InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsModeIMPLICIT:
+ return true
+ case InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsModeNONE:
+ return true
+ case InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsModeOPPORTUNISTIC:
+ return true
+ case InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsModeSTARTTLS:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for InstanceConfigUpdateRequestPolicyDirectMessagesLocked.
+const (
+ False InstanceConfigUpdateRequestPolicyDirectMessagesLocked = false
+)
+
+// Valid indicates whether the value is a known member of the InstanceConfigUpdateRequestPolicyDirectMessagesLocked enum.
+func (e InstanceConfigUpdateRequestPolicyDirectMessagesLocked) Valid() bool {
+ switch e {
+ case False:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for InstanceConfigUpdateRequestPolicyPremiumMode.
+const (
+ InstanceConfigUpdateRequestPolicyPremiumModeEveryone InstanceConfigUpdateRequestPolicyPremiumMode = "everyone"
+ InstanceConfigUpdateRequestPolicyPremiumModeMirror InstanceConfigUpdateRequestPolicyPremiumMode = "mirror"
+)
+
+// Valid indicates whether the value is a known member of the InstanceConfigUpdateRequestPolicyPremiumMode enum.
+func (e InstanceConfigUpdateRequestPolicyPremiumMode) Valid() bool {
+ switch e {
+ case InstanceConfigUpdateRequestPolicyPremiumModeEveryone:
+ return true
+ case InstanceConfigUpdateRequestPolicyPremiumModeMirror:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for InstanceEmailSmtpTestRequestTlsMode.
+const (
+ InstanceEmailSmtpTestRequestTlsModeIMPLICIT InstanceEmailSmtpTestRequestTlsMode = "implicit"
+ InstanceEmailSmtpTestRequestTlsModeNONE InstanceEmailSmtpTestRequestTlsMode = "none"
+ InstanceEmailSmtpTestRequestTlsModeOPPORTUNISTIC InstanceEmailSmtpTestRequestTlsMode = "opportunistic"
+ InstanceEmailSmtpTestRequestTlsModeSTARTTLS InstanceEmailSmtpTestRequestTlsMode = "starttls"
+)
+
+// Valid indicates whether the value is a known member of the InstanceEmailSmtpTestRequestTlsMode enum.
+func (e InstanceEmailSmtpTestRequestTlsMode) Valid() bool {
+ switch e {
+ case InstanceEmailSmtpTestRequestTlsModeIMPLICIT:
+ return true
+ case InstanceEmailSmtpTestRequestTlsModeNONE:
+ return true
+ case InstanceEmailSmtpTestRequestTlsModeOPPORTUNISTIC:
+ return true
+ case InstanceEmailSmtpTestRequestTlsModeSTARTTLS:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for InstanceRegistrationModeSchema.
+const (
+ Approval InstanceRegistrationModeSchema = "approval"
+ Closed InstanceRegistrationModeSchema = "closed"
+ Open InstanceRegistrationModeSchema = "open"
+)
+
+// Valid indicates whether the value is a known member of the InstanceRegistrationModeSchema enum.
+func (e InstanceRegistrationModeSchema) Valid() bool {
+ switch e {
+ case Approval:
+ return true
+ case Closed:
+ return true
+ case Open:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for InstantAccountAvailabilitySchema.
+const (
+ APPROVALREQUIRED InstantAccountAvailabilitySchema = "approval_required"
+ AVAILABLE InstantAccountAvailabilitySchema = "available"
+ CAPTCHAOFF InstantAccountAvailabilitySchema = "captcha_off"
+ DISABLED InstantAccountAvailabilitySchema = "disabled"
+ REGISTRATIONCLOSED InstantAccountAvailabilitySchema = "registration_closed"
+)
+
+// Valid indicates whether the value is a known member of the InstantAccountAvailabilitySchema enum.
+func (e InstantAccountAvailabilitySchema) Valid() bool {
+ switch e {
+ case APPROVALREQUIRED:
+ return true
+ case AVAILABLE:
+ return true
+ case CAPTCHAOFF:
+ return true
+ case DISABLED:
+ return true
+ case REGISTRATIONCLOSED:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for InteractionTierModeSchema.
+const (
+ ENFORCED InteractionTierModeSchema = "enforced"
+ LEGACY InteractionTierModeSchema = "legacy"
+)
+
+// Valid indicates whether the value is a known member of the InteractionTierModeSchema enum.
+func (e InteractionTierModeSchema) Valid() bool {
+ switch e {
+ case ENFORCED:
+ return true
+ case LEGACY:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for LastSessionCleanupModeSchema.
+const (
+ AFTERGRACE LastSessionCleanupModeSchema = "after_grace"
+ OFF LastSessionCleanupModeSchema = "off"
+)
+
+// Valid indicates whether the value is a known member of the LastSessionCleanupModeSchema enum.
+func (e LastSessionCleanupModeSchema) Valid() bool {
+ switch e {
+ case AFTERGRACE:
+ return true
+ case OFF:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for ModerationBasis0Type.
+const (
+ Enforcement ModerationBasis0Type = "enforcement"
+)
+
+// Valid indicates whether the value is a known member of the ModerationBasis0Type enum.
+func (e ModerationBasis0Type) Valid() bool {
+ switch e {
+ case Enforcement:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for ModerationBasis1Type.
+const (
+ HolderRequest ModerationBasis1Type = "holder_request"
+)
+
+// Valid indicates whether the value is a known member of the ModerationBasis1Type enum.
+func (e ModerationBasis1Type) Valid() bool {
+ switch e {
+ case HolderRequest:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for ModerationBasis2Type.
+const (
+ Housekeeping ModerationBasis2Type = "housekeeping"
+)
+
+// Valid indicates whether the value is a known member of the ModerationBasis2Type enum.
+func (e ModerationBasis2Type) Valid() bool {
+ switch e {
+ case Housekeeping:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for PendingRegistrationActionRequestStatus.
+const (
+ Approved PendingRegistrationActionRequestStatus = "approved"
+ Rejected PendingRegistrationActionRequestStatus = "rejected"
+)
+
+// Valid indicates whether the value is a known member of the PendingRegistrationActionRequestStatus enum.
+func (e PendingRegistrationActionRequestStatus) Valid() bool {
+ switch e {
+ case Approved:
+ return true
+ case Rejected:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for SkippedNetworkBlockReason.
+const (
+ AlreadyBlocked SkippedNetworkBlockReason = "already_blocked"
+ Exempt SkippedNetworkBlockReason = "exempt"
+ SpecialPurpose SkippedNetworkBlockReason = "special_purpose"
+)
+
+// Valid indicates whether the value is a known member of the SkippedNetworkBlockReason enum.
+func (e SkippedNetworkBlockReason) Valid() bool {
+ switch e {
+ case AlreadyBlocked:
+ return true
+ case Exempt:
+ return true
+ case SpecialPurpose:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for TagStyleSchema.
+const (
+ TagStyleSchemaNONE TagStyleSchema = "none"
+ TagStyleSchemaRANDOM TagStyleSchema = "random"
+)
+
+// Valid indicates whether the value is a known member of the TagStyleSchema enum.
+func (e TagStyleSchema) Valid() bool {
+ switch e {
+ case TagStyleSchemaNONE:
+ return true
+ case TagStyleSchemaRANDOM:
+ return true
+ default:
+ return false
+ }
+}
+
+// Defines values for VerificationBasisSchema.
+const (
+ AUTO VerificationBasisSchema = "auto"
+ CONFIRMEDEMAIL VerificationBasisSchema = "confirmed_email"
+ LOCALCREDENTIAL VerificationBasisSchema = "local_credential"
+)
+
+// Valid indicates whether the value is a known member of the VerificationBasisSchema enum.
+func (e VerificationBasisSchema) Valid() bool {
+ switch e {
+ case AUTO:
+ return true
+ case CONFIRMEDEMAIL:
+ return true
+ case LOCALCREDENTIAL:
+ return true
+ default:
+ return false
+ }
+}
+
+// AccountIdentityLockReasonSchema Why the sign-in method can no longer change
+type AccountIdentityLockReasonSchema string
+
+// AccountIdentityModeSchema How people identify themselves when they sign in
+type AccountIdentityModeSchema string
+
+// AccountTierSchema How far the account has got with setting up a way to sign in
+type AccountTierSchema string
+
+// AccountsConfigSchema defines model for AccountsConfigSchema.
+type AccountsConfigSchema struct {
+ DateOfBirth DateOfBirthPolicySchema `json:"date_of_birth"`
+ DobMissingCleanup struct {
+ // InactiveDays Days without use before such an account is deleted
+ InactiveDays int `json:"inactive_days"`
+
+ // Mode Whether accounts that were created without a date of birth and never entered one are deleted
+ Mode CleanupModeSchema `json:"mode"`
+ } `json:"dob_missing_cleanup"`
+ GuildJoinGate GuildJoinGateSchema `json:"guild_join_gate"`
+ InactivityDeletion struct {
+ // InactiveDays Days without use before the warning email is sent
+ InactiveDays int `json:"inactive_days"`
+
+ // Mode Whether accounts unused for a long time are deleted. An account is only deleted after a warning email reached it
+ Mode CleanupModeSchema `json:"mode"`
+
+ // WarningLeadDays Days between the warning email and the deletion
+ WarningLeadDays int `json:"warning_lead_days"`
+ } `json:"inactivity_deletion"`
+ InteractionTier InteractionTierModeSchema `json:"interaction_tier"`
+ UnclaimedAccountCleanup struct {
+ // InactiveDays Days without use before such an account is deleted
+ InactiveDays int `json:"inactive_days"`
+
+ // Mode Whether accounts that can never be signed in to again are deleted
+ Mode CleanupModeSchema `json:"mode"`
+ OnLastSessionEnd LastSessionCleanupModeSchema `json:"on_last_session_end"`
+ } `json:"unclaimed_account_cleanup"`
+ VerificationBasis VerificationBasisSchema `json:"verification_basis"`
+}
+
+// AccountsConfigUpdateRequest defines model for AccountsConfigUpdateRequest.
+type AccountsConfigUpdateRequest struct {
+ // AbandonedAccountCleanup Deprecated, use unclaimed_account_cleanup and dob_missing_cleanup
+ AbandonedAccountCleanup *bool `json:"abandoned_account_cleanup,omitempty"`
+ DateOfBirth *DateOfBirthPolicySchema `json:"date_of_birth,omitempty"`
+
+ // DateOfBirthEnforcement Deprecated, use date_of_birth
+ DateOfBirthEnforcement *AccountsConfigUpdateRequestDateOfBirthEnforcement `json:"date_of_birth_enforcement,omitempty"`
+ DobMissingCleanup *struct {
+ // InactiveDays Days without use before such an account is deleted
+ InactiveDays *int `json:"inactive_days,omitempty"`
+
+ // Mode Whether accounts that were created without a date of birth and never entered one are deleted
+ Mode *CleanupModeSchema `json:"mode,omitempty"`
+ } `json:"dob_missing_cleanup,omitempty"`
+ GuildJoinGate *GuildJoinGateSchema `json:"guild_join_gate,omitempty"`
+ InactivityDeletion *struct {
+ // InactiveDays Days without use before the warning email is sent
+ InactiveDays *int `json:"inactive_days,omitempty"`
+
+ // Mode Whether accounts unused for a long time are deleted. An account is only deleted after a warning email reached it
+ Mode *CleanupModeSchema `json:"mode,omitempty"`
+
+ // WarningLeadDays Days between the warning email and the deletion
+ WarningLeadDays *int `json:"warning_lead_days,omitempty"`
+ } `json:"inactivity_deletion,omitempty"`
+ InteractionTier *InteractionTierModeSchema `json:"interaction_tier,omitempty"`
+ UnclaimedAccountCleanup *struct {
+ // InactiveDays Days without use before such an account is deleted
+ InactiveDays *int `json:"inactive_days,omitempty"`
+
+ // Mode Whether accounts that can never be signed in to again are deleted
+ Mode *CleanupModeSchema `json:"mode,omitempty"`
+ OnLastSessionEnd *LastSessionCleanupModeSchema `json:"on_last_session_end,omitempty"`
+ } `json:"unclaimed_account_cleanup,omitempty"`
+ VerificationBasis *VerificationBasisSchema `json:"verification_basis,omitempty"`
+}
+
+// AccountsConfigUpdateRequestDateOfBirthEnforcement Deprecated, use date_of_birth
+type AccountsConfigUpdateRequestDateOfBirthEnforcement string
+
+// AdminAclType defines model for AdminAclType.
+type AdminAclType string
+
+// AdminPasswordResetLinkResponse defines model for AdminPasswordResetLinkResponse.
+type AdminPasswordResetLinkResponse struct {
+ // ExpiresAt ISO 8601 timestamp when the link stops working
+ ExpiresAt time.Time `json:"expires_at"`
+
+ // Url Password reset link to hand to the user. It is shown only once
+ Url string `json:"url"`
+}
+
+// AdminProfileBadgeResponse defines model for AdminProfileBadgeResponse.
+type AdminProfileBadgeResponse struct {
+ // AccessibleLabel Label for screen readers with the full count, used instead of label when present
+ AccessibleLabel *string `json:"accessible_label,omitempty"`
+
+ // AspectRatio Image width divided by its height. Render the image at the badge height and this many times as wide. Null for square badges
+ AspectRatio *float32 `json:"aspect_ratio"`
+
+ // Asset Badge image hash. The image is served at {static_cdn}/badges/{asset}.webp. Null for text badges
+ Asset *HexString16Type `json:"asset"`
+
+ // Caption Short text for the badge, such as #42. A badge with an image uses it as alt text, and a badge without one shows it as text. Null when the label covers it
+ Caption *string `json:"caption"`
+
+ // Count How many passes the badge stands for, from 2. The badge art already carries the number, so clients never draw it on top. Absent below 2 and when the holder hides the number from other people
+ Count *int `json:"count,omitempty"`
+
+ // Details Content for the richer vertical tooltip, null or absent when label is the whole tooltip
+ Details *struct {
+ // Lines Further tooltip lines, in order
+ Lines []string `json:"lines"`
+
+ // Title First line of the tooltip under the larger badge art
+ Title string `json:"title"`
+ } `json:"details,omitempty"`
+
+ // Href Absolute URL to open when the badge is clicked, or null
+ Href *string `json:"href"`
+
+ // Kind Stable badge key. Known values: staff, partner, bug_hunter, operator_pass, visionary, visionary_number, plutonium, and premium on self-hosted instances. Clients must render unknown values from the other fields.
+ Kind string `json:"kind"`
+
+ // Label Full badge description, localized for the viewer. Use it as the tooltip, and as alt text when there is no caption
+ Label string `json:"label"`
+
+ // SmallAsset Image hash drawn for 20 pixels and smaller, served like asset. Use it instead of asset at those sizes. Absent when asset reads well small
+ SmallAsset *HexString16Type `json:"small_asset,omitempty"`
+
+ // Suppressed True when the public profile does not show this badge, because of a privacy setting or account state
+ Suppressed bool `json:"suppressed"`
+}
+
+// AdminSignInLinkResponse defines model for AdminSignInLinkResponse.
+type AdminSignInLinkResponse struct {
+ // ExpiresAt ISO 8601 timestamp when the link stops working
+ ExpiresAt time.Time `json:"expires_at"`
+
+ // Url Sign-in link to open in a browser. It works once and is shown only once
+ Url string `json:"url"`
+}
+
+// AdminUserAclsRequest defines model for AdminUserAclsRequest.
+type AdminUserAclsRequest struct {
+ // Acls List of access control permissions to assign
+ Acls []AdminAclType `json:"acls"`
+}
+
+// AdminUserBanRequest defines model for AdminUserBanRequest.
+type AdminUserBanRequest struct {
+ BlockNetworks *NetworkBlockRequest `json:"block_networks,omitempty"`
+ Decision EnforcementDecisionInput `json:"decision"`
+
+ // DurationHours Duration of the suspension in hours. Use 0 for a permanent suspension
+ DurationHours int `json:"duration_hours"`
+
+ // RemoveEvidence Remove the evidence messages after they are snapshotted into the decision
+ RemoveEvidence *bool `json:"remove_evidence,omitempty"`
+}
+
+// AdminUserCreateRequest defines model for AdminUserCreateRequest.
+type AdminUserCreateRequest struct {
+ // Admin Whether to give the new account full admin access
+ Admin *bool `json:"admin,omitempty"`
+
+ // Email Email address for the new account. Required on an instance where people sign in with email, and refused where they sign in with a username
+ Email *EmailType `json:"email,omitempty"`
+
+ // Username Username for the new account
+ Username UsernameType `json:"username"`
+}
+
+// AdminUserCreateResponse defines model for AdminUserCreateResponse.
+type AdminUserCreateResponse struct {
+ // PasswordReset One-time link the new user opens to choose a password. Hand it to them yourself
+ PasswordReset AdminPasswordResetLinkResponse `json:"password_reset"`
+ User UserAdminResponseSchema `json:"user"`
+}
+
+// AdminUserDeletionScheduleRequest defines model for AdminUserDeletionScheduleRequest.
+type AdminUserDeletionScheduleRequest struct {
+ Basis ModerationBasis `json:"basis"`
+ BlockNetworks *NetworkBlockRequest `json:"block_networks,omitempty"`
+
+ // DaysUntilDeletion Days until the account is deleted. Raised to 14, or to 74 when a rule was broken so an appeal can be reviewed first. Self-hosted instances have no appeals and raise every basis to 14
+ DaysUntilDeletion int `json:"days_until_deletion"`
+
+ // Immediate Self-hosted instances only. Delete the account now instead of after days_until_deletion, with no notice email. This cannot be undone
+ Immediate *bool `json:"immediate,omitempty"`
+
+ // RemoveEvidence Remove the evidence messages after they are snapshotted into the decision. Enforcement basis only
+ RemoveEvidence *bool `json:"remove_evidence,omitempty"`
+
+ // ReplacePendingDeletionAt pending_deletion_at of the deletion this request replaces. Required when a deletion is already scheduled for the account
+ ReplacePendingDeletionAt *time.Time `json:"replace_pending_deletion_at,omitempty"`
+}
+
+// AdminUserMessageDeleteRequest defines model for AdminUserMessageDeleteRequest.
+type AdminUserMessageDeleteRequest struct {
+ // Basis Why the messages are removed. Required unless dry_run is true. An enforcement basis refuses child safety and violent extremism reasons
+ Basis *ModerationBasis `json:"basis,omitempty"`
+}
+
+// AuthConfigUpdateRequest defines model for AuthConfigUpdateRequest.
+type AuthConfigUpdateRequest struct {
+ IdentifierFirst *AuthConfigUpdateRequest_IdentifierFirst `json:"identifier_first,omitempty"`
+ InstantAccounts *struct {
+ // Enabled Whether accounts can be created from just a display name. Needs the captcha to be on
+ Enabled *bool `json:"enabled,omitempty"`
+
+ // PowEscalationPerHour Every this many accounts created from a display name in the current hour doubles the captcha cost
+ PowEscalationPerHour *int `json:"pow_escalation_per_hour,omitempty"`
+ } `json:"instant_accounts,omitempty"`
+}
+
+// AuthConfigUpdateRequestIdentifierFirst0 Whether clients show the single sign-in entry that starts with an email
+type AuthConfigUpdateRequestIdentifierFirst0 = IdentifierFirstModeSchema
+
+// AuthConfigUpdateRequestIdentifierFirst1 Deprecated: true means on and false means off
+type AuthConfigUpdateRequestIdentifierFirst1 = bool
+
+// AuthConfigUpdateRequest_IdentifierFirst defines model for AuthConfigUpdateRequest.IdentifierFirst.
+type AuthConfigUpdateRequest_IdentifierFirst struct {
+ union json.RawMessage
+}
+
+// BillingCatalogModeSchema defines model for BillingCatalogModeSchema.
+type BillingCatalogModeSchema string
+
+// BillingCountryCurrenciesSchema defines model for BillingCountryCurrenciesSchema.
+type BillingCountryCurrenciesSchema map[string]PremiumCurrency
+
+// BillingLegacyPricesSchema defines model for BillingLegacyPricesSchema.
+type BillingLegacyPricesSchema map[string][]StripePriceIdSchema
+
+// BillingPriceSetResponse defines model for BillingPriceSetResponse.
+type BillingPriceSetResponse struct {
+ Gift1Month *StripePriceIdSchema `json:"gift_1_month"`
+ Gift1Year *StripePriceIdSchema `json:"gift_1_year"`
+ Monthly *StripePriceIdSchema `json:"monthly"`
+ Yearly *StripePriceIdSchema `json:"yearly"`
+}
+
+// BillingPriceSetUpdateRequest defines model for BillingPriceSetUpdateRequest.
+type BillingPriceSetUpdateRequest struct {
+ Gift1Month *StripePriceIdSchema `json:"gift_1_month,omitempty"`
+ Gift1Year *StripePriceIdSchema `json:"gift_1_year,omitempty"`
+ Monthly *StripePriceIdSchema `json:"monthly,omitempty"`
+ Yearly *StripePriceIdSchema `json:"yearly,omitempty"`
+}
+
+// BrandingAssetUploadRequest defines model for BrandingAssetUploadRequest.
+type BrandingAssetUploadRequest struct {
+ Image *string `json:"image,omitempty"`
+ Kind BrandingAssetUploadRequestKind `json:"kind"`
+}
+
+// BrandingAssetUploadRequestKind defines model for BrandingAssetUploadRequest.Kind.
+type BrandingAssetUploadRequestKind string
+
+// CaptchaConfigResponse defines model for CaptchaConfigResponse.
+type CaptchaConfigResponse struct {
+ Cost int `json:"cost"`
+
+ // Enabled Deprecated, use provider. Whether any captcha is asked for
+ Enabled bool `json:"enabled"`
+ MaxCounter int `json:"max_counter"`
+ Provider CaptchaProviderSchema `json:"provider"`
+}
+
+// CaptchaConfigUpdateRequest defines model for CaptchaConfigUpdateRequest.
+type CaptchaConfigUpdateRequest struct {
+ Cost *int `json:"cost,omitempty"`
+
+ // Enabled Deprecated, use provider. false means none and true means altcha
+ Enabled *bool `json:"enabled,omitempty"`
+ MaxCounter *int `json:"max_counter,omitempty"`
+ Provider *CaptchaProviderSchema `json:"provider,omitempty"`
+}
+
+// CaptchaProviderSchema Captcha the instance asks for
+type CaptchaProviderSchema string
+
+// CleanupModeSchema Whether a cleanup policy deletes accounts
+type CleanupModeSchema string
+
+// CreateRegistrationUrlRequest defines model for CreateRegistrationUrlRequest.
+type CreateRegistrationUrlRequest struct {
+ ApprovalRequired *bool `json:"approval_required,omitempty"`
+ ExpiresAt *time.Time `json:"expires_at,omitempty"`
+
+ // InviteCode Code of an invite that people who sign up through the link accept once their account exists
+ InviteCode *string `json:"invite_code,omitempty"`
+ Label *string `json:"label,omitempty"`
+ MaxUses *int `json:"max_uses,omitempty"`
+}
+
+// CreateRegistrationUrlResponse defines model for CreateRegistrationUrlResponse.
+type CreateRegistrationUrlResponse struct {
+ Code string `json:"code"`
+ RegistrationUrl struct {
+ ApprovalRequired bool `json:"approval_required"`
+ CreatedAt time.Time `json:"created_at"`
+ CreatedByUserId SnowflakeStringType `json:"created_by_user_id"`
+ ExpiresAt *time.Time `json:"expires_at"`
+ Id string `json:"id"`
+
+ // InviteCode Invite that people who sign up through the link accept
+ InviteCode *string `json:"invite_code"`
+ Label *string `json:"label"`
+ LastUsedAt *time.Time `json:"last_used_at"`
+ LastUsedByUserId *SnowflakeStringType `json:"last_used_by_user_id"`
+ MaxUses *int `json:"max_uses"`
+ RevokedAt *time.Time `json:"revoked_at"`
+ UseCount int `json:"use_count"`
+ } `json:"registration_url"`
+ Url string `json:"url"`
+}
+
+// DateOfBirthPolicySchema Whether the instance asks for a date of birth, and who must enter one
+type DateOfBirthPolicySchema string
+
+// DeleteAllUserMessagesResponse defines model for DeleteAllUserMessagesResponse.
+type DeleteAllUserMessagesResponse struct {
+ ChannelCount Int32Type `json:"channel_count"`
+
+ // DecisionId The content removal decision, for an enforcement basis
+ DecisionId *SnowflakeStringType `json:"decision_id,omitempty"`
+ DryRun bool `json:"dry_run"`
+ JobId *string `json:"job_id,omitempty"`
+ MessageCount Int32Type `json:"message_count"`
+ Success DeleteAllUserMessagesResponseSuccess `json:"success"`
+}
+
+// DeleteAllUserMessagesResponseSuccess defines model for DeleteAllUserMessagesResponse.Success.
+type DeleteAllUserMessagesResponseSuccess bool
+
+// DeletionReasonCode Reason the account was scheduled for deletion
+type DeletionReasonCode int32
+
+// DomainMigrationConfigResponse defines model for DomainMigrationConfigResponse.
+type DomainMigrationConfigResponse struct {
+ AnonymousRolloutBasisPoints int `json:"anonymous_rollout_basis_points"`
+ ConfigVersion int `json:"config_version"`
+ Enabled bool `json:"enabled"`
+ ExcludedUserIds []string `json:"excluded_user_ids"`
+ IncludePremiumUsers bool `json:"include_premium_users"`
+ IncludedGuildIds []string `json:"included_guild_ids"`
+ IncludedUserIds []string `json:"included_user_ids"`
+ RolloutBasisPoints int `json:"rollout_basis_points"`
+ RolloutCountryCodes ExperimentRolloutCountryCodesSchema `json:"rollout_country_codes"`
+ RolloutSalt string `json:"rollout_salt"`
+ StandaloneForwarding bool `json:"standalone_forwarding"`
+}
+
+// DomainMigrationConfigUpdateRequest defines model for DomainMigrationConfigUpdateRequest.
+type DomainMigrationConfigUpdateRequest struct {
+ AnonymousRolloutBasisPoints *int `json:"anonymous_rollout_basis_points,omitempty"`
+ Enabled *bool `json:"enabled,omitempty"`
+ ExcludedUserIds *[]string `json:"excluded_user_ids,omitempty"`
+ IncludePremiumUsers *bool `json:"include_premium_users,omitempty"`
+ IncludedGuildIds *[]string `json:"included_guild_ids,omitempty"`
+ IncludedUserIds *[]string `json:"included_user_ids,omitempty"`
+ RolloutBasisPoints *int `json:"rollout_basis_points,omitempty"`
+ RolloutCountryCodes *ExperimentRolloutCountryCodesSchema `json:"rollout_country_codes,omitempty"`
+ RolloutSalt *string `json:"rollout_salt,omitempty"`
+ StandaloneForwarding *bool `json:"standalone_forwarding,omitempty"`
+}
+
+// EmailDeliveryModeSchema How the instance sends email
+type EmailDeliveryModeSchema string
+
+// EmailDeliveryStateSchema Whether the instance sends email, and why not
+type EmailDeliveryStateSchema string
+
+// EmailType defines model for EmailType.
+type EmailType = string
+
+// EnforcementDecisionInput Why the restriction is applied. The X-Audit-Log-Reason header is required and becomes the first note
+type EnforcementDecisionInput struct {
+ // Automation Whether automated tools flagged this before a person on the team decided
+ Automation EnforcementDecisionInputAutomation `json:"automation"`
+
+ // Confirmations Required for child safety and violent extremism decisions
+ Confirmations *[]EnforcementDecisionInputConfirmations `json:"confirmations,omitempty"`
+
+ // Evidence Messages from the subject that the decision relies on. They are snapshotted when the decision is made
+ Evidence *[]struct {
+ ChannelId SnowflakeType `json:"channel_id"`
+ MessageId SnowflakeType `json:"message_id"`
+ } `json:"evidence,omitempty"`
+ ReasonCode EnforcementReasonCodeType `json:"reason_code"`
+
+ // ReportIds Reports about the subject that this decision resolves. Required when the source is a report
+ ReportIds *[]SnowflakeType `json:"report_ids,omitempty"`
+
+ // RightsHolder The rights holder or the right concerned. Required for copyright decisions and refused otherwise
+ RightsHolder *string `json:"rights_holder,omitempty"`
+
+ // Source Whether the team reviewed this after a report or found it in its own review
+ Source EnforcementDecisionInputSource `json:"source"`
+
+ // Statement Note to the user, shown in the notice. Never name or describe other people
+ Statement *string `json:"statement,omitempty"`
+}
+
+// EnforcementDecisionInputAutomation Whether automated tools flagged this before a person on the team decided
+type EnforcementDecisionInputAutomation string
+
+// EnforcementDecisionInputConfirmations defines model for EnforcementDecisionInput.Confirmations.
+type EnforcementDecisionInputConfirmations string
+
+// EnforcementDecisionInputSource Whether the team reviewed this after a report or found it in its own review
+type EnforcementDecisionInputSource string
+
+// EnforcementReasonCodeType Reason code of an enforcement decision
+type EnforcementReasonCodeType int32
+
+// Error defines model for Error.
+type Error struct {
+ // Code Machine-readable error code. Known values are listed in the APIErrorCode schema
+ Code string `json:"code"`
+
+ // Errors Field-specific validation errors
+ Errors *[]struct {
+ // Code Machine-readable validation error code
+ Code *string `json:"code,omitempty"`
+
+ // Message Human-readable validation error message
+ Message string `json:"message"`
+
+ // Path Field path that failed validation
+ Path string `json:"path"`
+ } `json:"errors,omitempty"`
+
+ // Message Human-readable error message
+ Message string `json:"message"`
+ AdditionalProperties map[string]interface{} `json:"-"`
+}
+
+// ExperimentDeliveryConfigResponse defines model for ExperimentDeliveryConfigResponse.
+type ExperimentDeliveryConfigResponse struct {
+ PollIntervalSeconds int `json:"poll_interval_seconds"`
+ PollJitterPercent int `json:"poll_jitter_percent"`
+}
+
+// ExperimentDeliveryConfigUpdateRequest defines model for ExperimentDeliveryConfigUpdateRequest.
+type ExperimentDeliveryConfigUpdateRequest struct {
+ PollIntervalSeconds *int `json:"poll_interval_seconds,omitempty"`
+ PollJitterPercent *int `json:"poll_jitter_percent,omitempty"`
+}
+
+// ExperimentRolloutCountryCodesSchema defines model for ExperimentRolloutCountryCodesSchema.
+type ExperimentRolloutCountryCodesSchema = []string
+
+// GatewayRolloutConfigResponse defines model for GatewayRolloutConfigResponse.
+type GatewayRolloutConfigResponse struct {
+ GatewayDispatchRelayMaxQueue int `json:"gateway_dispatch_relay_max_queue"`
+ GatewayDispatchRelayShards int `json:"gateway_dispatch_relay_shards"`
+ GuildRolloutPercentage float32 `json:"guild_rollout_percentage"`
+ MaxConcurrentGuildStarts int `json:"max_concurrent_guild_starts"`
+ MaxConcurrentSessionStarts int `json:"max_concurrent_session_starts"`
+ RpcRequestTimeoutMs int `json:"rpc_request_timeout_ms"`
+ SessionRolloutMode GatewayRolloutConfigResponseSessionRolloutMode `json:"session_rollout_mode"`
+ SessionRolloutPercentage float32 `json:"session_rollout_percentage"`
+ VoiceE2eeScope GatewayRolloutConfigResponseVoiceE2eeScope `json:"voice_e2ee_scope"`
+}
+
+// GatewayRolloutConfigResponseSessionRolloutMode defines model for GatewayRolloutConfigResponse.SessionRolloutMode.
+type GatewayRolloutConfigResponseSessionRolloutMode string
+
+// GatewayRolloutConfigResponseVoiceE2eeScope defines model for GatewayRolloutConfigResponse.VoiceE2eeScope.
+type GatewayRolloutConfigResponseVoiceE2eeScope string
+
+// GatewayRolloutConfigUpdateRequest defines model for GatewayRolloutConfigUpdateRequest.
+type GatewayRolloutConfigUpdateRequest struct {
+ GatewayDispatchRelayMaxQueue *int `json:"gateway_dispatch_relay_max_queue,omitempty"`
+ GatewayDispatchRelayShards *int `json:"gateway_dispatch_relay_shards,omitempty"`
+ GuildRolloutPercentage *float32 `json:"guild_rollout_percentage,omitempty"`
+ MaxConcurrentGuildStarts *int `json:"max_concurrent_guild_starts,omitempty"`
+ MaxConcurrentSessionStarts *int `json:"max_concurrent_session_starts,omitempty"`
+ RpcRequestTimeoutMs *int `json:"rpc_request_timeout_ms,omitempty"`
+ SessionRolloutMode *GatewayRolloutConfigUpdateRequestSessionRolloutMode `json:"session_rollout_mode,omitempty"`
+ SessionRolloutPercentage *float32 `json:"session_rollout_percentage,omitempty"`
+ VoiceE2eeScope *GatewayRolloutConfigUpdateRequestVoiceE2eeScope `json:"voice_e2ee_scope,omitempty"`
+}
+
+// GatewayRolloutConfigUpdateRequestSessionRolloutMode defines model for GatewayRolloutConfigUpdateRequest.SessionRolloutMode.
+type GatewayRolloutConfigUpdateRequestSessionRolloutMode string
+
+// GatewayRolloutConfigUpdateRequestVoiceE2eeScope defines model for GatewayRolloutConfigUpdateRequest.VoiceE2eeScope.
+type GatewayRolloutConfigUpdateRequestVoiceE2eeScope string
+
+// GuildJoinGateSchema When joining a community needs a finished account. Applies only while the interaction tier is enforced and the person can preview communities
+type GuildJoinGateSchema string
+
+// GuildVisitsConfigResponse defines model for GuildVisitsConfigResponse.
+type GuildVisitsConfigResponse struct {
+ // Enabled Kill switch for visiting communities without joining
+ Enabled bool `json:"enabled"`
+
+ // ExcludedUserIds People never assigned, checked before the included list
+ ExcludedUserIds []string `json:"excluded_user_ids"`
+
+ // IncludedUserIds People always assigned
+ IncludedUserIds []string `json:"included_user_ids"`
+
+ // UserBasisPoints Share of people assigned, in basis points
+ UserBasisPoints int `json:"user_basis_points"`
+
+ // UserSalt Salt for the assignment bucket
+ UserSalt string `json:"user_salt"`
+}
+
+// GuildVisitsConfigUpdateRequest defines model for GuildVisitsConfigUpdateRequest.
+type GuildVisitsConfigUpdateRequest struct {
+ // Enabled Kill switch for visiting communities without joining
+ Enabled *bool `json:"enabled,omitempty"`
+
+ // ExcludedUserIds People never assigned, checked before the included list
+ ExcludedUserIds *[]string `json:"excluded_user_ids,omitempty"`
+
+ // IncludedUserIds People always assigned
+ IncludedUserIds *[]string `json:"included_user_ids,omitempty"`
+
+ // UserBasisPoints Share of people assigned, in basis points
+ UserBasisPoints *int `json:"user_basis_points,omitempty"`
+
+ // UserSalt Salt for the assignment bucket
+ UserSalt *string `json:"user_salt,omitempty"`
+}
+
+// HexString16Type defines model for HexString16Type.
+type HexString16Type = string
+
+// IdentifierFirstModeSchema Whether clients show the single sign-in entry that starts with an email
+type IdentifierFirstModeSchema string
+
+// InstanceBillingResponse defines model for InstanceBillingResponse.
+type InstanceBillingResponse struct {
+ AutomaticTax *bool `json:"automatic_tax"`
+ BillingActive bool `json:"billing_active"`
+ CatalogMode BillingCatalogModeSchema `json:"catalog_mode"`
+ CountryCurrencies *map[string]string `json:"country_currencies"`
+ DefaultCurrency *PremiumCurrency `json:"default_currency"`
+ EffectiveAutomaticTax bool `json:"effective_automatic_tax"`
+ EffectiveEnabled bool `json:"effective_enabled"`
+ EffectiveTaxIdCollection bool `json:"effective_tax_id_collection"`
+ EffectiveTermsConsentRequired bool `json:"effective_terms_consent_required"`
+ Enabled *bool `json:"enabled"`
+ LegacyPrices *map[string][]string `json:"legacy_prices"`
+ Prices *map[string]BillingPriceSetResponse `json:"prices"`
+ StripeSecretKeySet bool `json:"stripe_secret_key_set"`
+ StripeSecretKeyStored bool `json:"stripe_secret_key_stored"`
+ StripeServiceable bool `json:"stripe_serviceable"`
+ StripeWebhookSecretSet bool `json:"stripe_webhook_secret_set"`
+ StripeWebhookSecretStored bool `json:"stripe_webhook_secret_stored"`
+ TaxIdCollection *bool `json:"tax_id_collection"`
+ TermsConsentRequired *bool `json:"terms_consent_required"`
+ WebhookUrl string `json:"webhook_url"`
+}
+
+// InstanceBillingUpdateRequest defines model for InstanceBillingUpdateRequest.
+type InstanceBillingUpdateRequest struct {
+ AutomaticTax *bool `json:"automatic_tax,omitempty"`
+ CountryCurrencies *BillingCountryCurrenciesSchema `json:"country_currencies,omitempty"`
+ DefaultCurrency *PremiumCurrency `json:"default_currency,omitempty"`
+ Enabled *bool `json:"enabled,omitempty"`
+ LegacyPrices *BillingLegacyPricesSchema `json:"legacy_prices,omitempty"`
+ Prices *map[string]BillingPriceSetUpdateRequest `json:"prices,omitempty"`
+ StripeSecretKey *string `json:"stripe_secret_key,omitempty"`
+ StripeWebhookSecret *string `json:"stripe_webhook_secret,omitempty"`
+ TaxIdCollection *bool `json:"tax_id_collection,omitempty"`
+ TermsConsentRequired *bool `json:"terms_consent_required,omitempty"`
+}
+
+// InstanceConfigResponse defines model for InstanceConfigResponse.
+type InstanceConfigResponse struct {
+ AccountIdentity struct {
+ // LockReason Why the sign-in method can no longer change, or null while it still can
+ LockReason *AccountIdentityLockReasonSchema `json:"lock_reason"`
+
+ // Locked Whether the sign-in method can no longer change
+ Locked bool `json:"locked"`
+
+ // Mode Sign-in method in effect on this instance
+ Mode AccountIdentityModeSchema `json:"mode"`
+ TagStyle TagStyleSchema `json:"tag_style"`
+ } `json:"account_identity"`
+ Accounts AccountsConfigSchema `json:"accounts"`
+ AppPublic struct {
+ Branding struct {
+ CustomCss *string `json:"custom_css"`
+ FaviconDarkUrl *string `json:"favicon_dark_url"`
+ FaviconUrl *string `json:"favicon_url"`
+ IconUrl *string `json:"icon_url"`
+ LogoUrl *string `json:"logo_url"`
+ PremiumInfoUrl *string `json:"premium_info_url"`
+ PremiumProductName string `json:"premium_product_name"`
+ ProductName string `json:"product_name"`
+ SignInBackdropUrl *string `json:"sign_in_backdrop_url"`
+ StatusPageIncidentHistoryUrl *string `json:"status_page_incident_history_url"`
+ StatusPageUrl *string `json:"status_page_url"`
+ SymbolUrl *string `json:"symbol_url"`
+ ThemeColor *string `json:"theme_color"`
+ UploadLimitMessage *string `json:"upload_limit_message"`
+ WordmarkUrl *string `json:"wordmark_url"`
+ } `json:"branding"`
+ Legal struct {
+ GuidelinesUrl *string `json:"guidelines_url"`
+ PrivacyUrl *string `json:"privacy_url"`
+ TermsUrl *string `json:"terms_url"`
+ } `json:"legal"`
+ Registration struct {
+ // CollectDateOfBirth Deprecated, derived from accounts.date_of_birth not being off
+ CollectDateOfBirth bool `json:"collect_date_of_birth"`
+ } `json:"registration"`
+ Setup struct {
+ Configured bool `json:"configured"`
+ } `json:"setup"`
+ } `json:"app_public"`
+ Auth struct {
+ IdentifierFirst IdentifierFirstModeSchema `json:"identifier_first"`
+
+ // InstantAccountAvailability Whether accounts can be created from just a display name through public sign-up right now, and why not
+ InstantAccountAvailability InstantAccountAvailabilitySchema `json:"instant_account_availability"`
+ InstantAccounts struct {
+ // Enabled Whether accounts can be created from just a display name. Needs the captcha to be on
+ Enabled bool `json:"enabled"`
+
+ // PowEscalationPerHour Every this many accounts created from a display name in the current hour doubles the captcha cost
+ PowEscalationPerHour int `json:"pow_escalation_per_hour"`
+ } `json:"instant_accounts"`
+ } `json:"auth"`
+ Billing InstanceBillingResponse `json:"billing"`
+ Captcha CaptchaConfigResponse `json:"captcha"`
+ DomainMigration DomainMigrationConfigResponse `json:"domain_migration"`
+ ExperimentDelivery ExperimentDeliveryConfigResponse `json:"experiment_delivery"`
+ GatewayRollout GatewayRolloutConfigResponse `json:"gateway_rollout"`
+ GuildVisits GuildVisitsConfigResponse `json:"guild_visits"`
+ Integrations struct {
+ Bluesky struct {
+ ClientName *string `json:"client_name"`
+ ClientUri *string `json:"client_uri"`
+ EffectiveEnabled bool `json:"effective_enabled"`
+ Enabled *bool `json:"enabled"`
+ KeyCount int `json:"key_count"`
+ LogoUri *string `json:"logo_uri"`
+ PolicyUri *string `json:"policy_uri"`
+ TosUri *string `json:"tos_uri"`
+ } `json:"bluesky"`
+ Email struct {
+ // Delivery Saved delivery mode, or null to use the environment
+ Delivery *EmailDeliveryModeSchema `json:"delivery"`
+ DeliveryState EmailDeliveryStateSchema `json:"delivery_state"`
+ DisableNewIpAuthorization bool `json:"disable_new_ip_authorization"`
+ EffectiveDelivery EmailDeliveryModeSchema `json:"effective_delivery"`
+ EffectiveDisableNewIpAuthorization bool `json:"effective_disable_new_ip_authorization"`
+
+ // EffectiveEnabled Whether the instance sends email, same as delivery_state being on
+ EffectiveEnabled bool `json:"effective_enabled"`
+
+ // EffectiveProvider Deprecated, use delivery
+ EffectiveProvider InstanceConfigResponseIntegrationsEmailEffectiveProvider `json:"effective_provider"`
+
+ // Enabled Deprecated, use delivery
+ Enabled *bool `json:"enabled"`
+ FromEmail *string `json:"from_email"`
+ FromName *string `json:"from_name"`
+
+ // Provider Deprecated, use delivery
+ Provider *InstanceConfigResponseIntegrationsEmailProvider `json:"provider"`
+ Smtp struct {
+ // EffectiveTlsMode How the SMTP connection is encrypted
+ EffectiveTlsMode *InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsMode `json:"effective_tls_mode"`
+ Host *string `json:"host"`
+ PasswordSet bool `json:"password_set"`
+ Port *int `json:"port"`
+
+ // TlsMode Saved TLS mode, or null to pick one from the port
+ TlsMode *InstanceConfigResponseIntegrationsEmailSmtpTlsMode `json:"tls_mode"`
+ Username *string `json:"username"`
+ } `json:"smtp"`
+ } `json:"email"`
+ Gif struct {
+ EffectiveAvailable bool `json:"effective_available"`
+ KlipyApiKeySet bool `json:"klipy_api_key_set"`
+ } `json:"gif"`
+ Youtube struct {
+ ApiKeySet bool `json:"api_key_set"`
+ EffectiveAvailable bool `json:"effective_available"`
+ } `json:"youtube"`
+ } `json:"integrations"`
+ Media struct {
+ AttachmentDecay struct {
+ Curve *float32 `json:"curve"`
+ Effective struct {
+ Curve float32 `json:"curve"`
+ Enabled bool `json:"enabled"`
+ MaxEligibleSizeMb float32 `json:"max_eligible_size_mb"`
+ MaxLifetimeDays int `json:"max_lifetime_days"`
+ MaxSizeMb float32 `json:"max_size_mb"`
+ MinLifetimeDays int `json:"min_lifetime_days"`
+ MinSizeMb float32 `json:"min_size_mb"`
+ RenewThresholdDays int `json:"renew_threshold_days"`
+ RenewWindowDays int `json:"renew_window_days"`
+ } `json:"effective"`
+ Enabled *bool `json:"enabled"`
+ MaxEligibleSizeMb *float32 `json:"max_eligible_size_mb"`
+ MaxLifetimeDays *int `json:"max_lifetime_days"`
+ MaxSizeMb *float32 `json:"max_size_mb"`
+ MinLifetimeDays *int `json:"min_lifetime_days"`
+ MinSizeMb *float32 `json:"min_size_mb"`
+ RenewThresholdDays *int `json:"renew_threshold_days"`
+ RenewWindowDays *int `json:"renew_window_days"`
+ } `json:"attachment_decay"`
+ } `json:"media"`
+
+ // Notice Notice shown to everyone on the instance, or null
+ Notice *InstanceNoticeSchema `json:"notice"`
+ Policy struct {
+ DirectMessagesDisabled bool `json:"direct_messages_disabled"`
+ DirectMessagesLocked bool `json:"direct_messages_locked"`
+
+ // FriendsDisabled Whether friend requests are disabled instance-wide
+ FriendsDisabled bool `json:"friends_disabled"`
+ GuildCreateAccess bool `json:"guild_create_access"`
+ PremiumMode InstanceConfigResponsePolicyPremiumMode `json:"premium_mode"`
+ Services struct {
+ BlueskyEnabled *bool `json:"bluesky_enabled"`
+ GifEnabled *bool `json:"gif_enabled"`
+ YoutubeEnabled *bool `json:"youtube_enabled"`
+ } `json:"services"`
+ ServicesAvailable struct {
+ Bluesky bool `json:"bluesky"`
+ Gif bool `json:"gif"`
+ Youtube bool `json:"youtube"`
+ } `json:"services_available"`
+ ServicesResolved struct {
+ BlueskyEnabled bool `json:"bluesky_enabled"`
+ GifEnabled bool `json:"gif_enabled"`
+ YoutubeEnabled bool `json:"youtube_enabled"`
+ } `json:"services_resolved"`
+ SingleCommunityEnabled bool `json:"single_community_enabled"`
+ SingleCommunityGuildId *string `json:"single_community_guild_id"`
+ } `json:"policy"`
+ PushRelay PushRelayConfigResponse `json:"push_relay"`
+ Registration struct {
+ AdminRegistrationUrlsEnabled bool `json:"admin_registration_urls_enabled"`
+
+ // AllowedEmailDomains Email domains that public sign-ups and email changes must use. Empty allows any domain
+ AllowedEmailDomains []string `json:"allowed_email_domains"`
+ Mode InstanceRegistrationModeSchema `json:"mode"`
+ Urls []struct {
+ ApprovalRequired bool `json:"approval_required"`
+ CreatedAt time.Time `json:"created_at"`
+ CreatedByUserId SnowflakeStringType `json:"created_by_user_id"`
+ ExpiresAt *time.Time `json:"expires_at"`
+ Id string `json:"id"`
+
+ // InviteCode Invite that people who sign up through the link accept
+ InviteCode *string `json:"invite_code"`
+ Label *string `json:"label"`
+ LastUsedAt *time.Time `json:"last_used_at"`
+ LastUsedByUserId *SnowflakeStringType `json:"last_used_by_user_id"`
+ MaxUses *int `json:"max_uses"`
+ RevokedAt *time.Time `json:"revoked_at"`
+ UseCount int `json:"use_count"`
+ } `json:"urls"`
+ } `json:"registration"`
+ SelfHosted bool `json:"self_hosted"`
+ Sso struct {
+ AllowedDomains []string `json:"allowed_domains"`
+ AuthorizationUrl *string `json:"authorization_url"`
+ AutoProvision bool `json:"auto_provision"`
+ ButtonLabel *string `json:"button_label"`
+ ClientId *string `json:"client_id"`
+ ClientSecretSet bool `json:"client_secret_set"`
+ DisplayName *string `json:"display_name"`
+ Enabled bool `json:"enabled"`
+ Enforced bool `json:"enforced"`
+
+ // GroupRoleMappings Groups whose members get a role in the single community. Every listed role is managed by single sign-on, and is added or removed to match the groups at each sign-in
+ GroupRoleMappings []struct {
+ // Group A group name exactly as the provider sends it in the groups claim, such as `staff` or `/engineering/devs`
+ Group string `json:"group"`
+
+ // RoleId The role in the single community that members of the group get
+ RoleId SnowflakeStringType `json:"role_id"`
+ } `json:"group_role_mappings"`
+
+ // GroupsClaim The claim that lists the groups of a member. Empty or null uses `groups`
+ GroupsClaim *string `json:"groups_claim"`
+ Issuer *string `json:"issuer"`
+ JwksUrl *string `json:"jwks_url"`
+ RedirectUri *string `json:"redirect_uri"`
+ Scope *string `json:"scope"`
+ TokenUrl *string `json:"token_url"`
+ UserinfoUrl *string `json:"userinfo_url"`
+ } `json:"sso"`
+ VoiceP2p VoiceP2pConfigResponse `json:"voice_p2p"`
+}
+
+// InstanceConfigResponseIntegrationsEmailEffectiveProvider Deprecated, use delivery
+type InstanceConfigResponseIntegrationsEmailEffectiveProvider string
+
+// InstanceConfigResponseIntegrationsEmailProvider Deprecated, use delivery
+type InstanceConfigResponseIntegrationsEmailProvider string
+
+// InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsMode How the SMTP connection is encrypted
+type InstanceConfigResponseIntegrationsEmailSmtpEffectiveTlsMode string
+
+// InstanceConfigResponseIntegrationsEmailSmtpTlsMode Saved TLS mode, or null to pick one from the port
+type InstanceConfigResponseIntegrationsEmailSmtpTlsMode string
+
+// InstanceConfigResponsePolicyPremiumMode defines model for InstanceConfigResponse.Policy.PremiumMode.
+type InstanceConfigResponsePolicyPremiumMode string
+
+// InstanceConfigUpdateRequest defines model for InstanceConfigUpdateRequest.
+type InstanceConfigUpdateRequest struct {
+ Accounts *AccountsConfigUpdateRequest `json:"accounts,omitempty"`
+ AppPublic *struct {
+ Branding *struct {
+ CustomCss *string `json:"custom_css,omitempty"`
+ FaviconDarkUrl *string `json:"favicon_dark_url,omitempty"`
+ FaviconUrl *string `json:"favicon_url,omitempty"`
+ IconUrl *string `json:"icon_url,omitempty"`
+ LogoUrl *string `json:"logo_url,omitempty"`
+ PremiumInfoUrl *string `json:"premium_info_url,omitempty"`
+ PremiumProductName *string `json:"premium_product_name,omitempty"`
+ ProductName *string `json:"product_name,omitempty"`
+ SignInBackdropUrl *string `json:"sign_in_backdrop_url,omitempty"`
+ StatusPageIncidentHistoryUrl *string `json:"status_page_incident_history_url,omitempty"`
+ StatusPageUrl *string `json:"status_page_url,omitempty"`
+ SymbolUrl *string `json:"symbol_url,omitempty"`
+ ThemeColor *string `json:"theme_color,omitempty"`
+ UploadLimitMessage *string `json:"upload_limit_message,omitempty"`
+ WordmarkUrl *string `json:"wordmark_url,omitempty"`
+ } `json:"branding,omitempty"`
+ Legal *struct {
+ GuidelinesUrl *string `json:"guidelines_url,omitempty"`
+ PrivacyUrl *string `json:"privacy_url,omitempty"`
+ TermsUrl *string `json:"terms_url,omitempty"`
+ } `json:"legal,omitempty"`
+ Registration *struct {
+ // CollectDateOfBirth Deprecated, use accounts.date_of_birth. false sets it to off
+ CollectDateOfBirth *bool `json:"collect_date_of_birth,omitempty"`
+ } `json:"registration,omitempty"`
+ Setup *struct {
+ Configured *bool `json:"configured,omitempty"`
+ } `json:"setup,omitempty"`
+ } `json:"app_public,omitempty"`
+ Auth *AuthConfigUpdateRequest `json:"auth,omitempty"`
+ Billing *InstanceBillingUpdateRequest `json:"billing,omitempty"`
+ Captcha *CaptchaConfigUpdateRequest `json:"captcha,omitempty"`
+ DomainMigration *DomainMigrationConfigUpdateRequest `json:"domain_migration,omitempty"`
+ ExperimentDelivery *ExperimentDeliveryConfigUpdateRequest `json:"experiment_delivery,omitempty"`
+ GatewayRollout *GatewayRolloutConfigUpdateRequest `json:"gateway_rollout,omitempty"`
+ GuildVisits *GuildVisitsConfigUpdateRequest `json:"guild_visits,omitempty"`
+ Integrations *struct {
+ Bluesky *struct {
+ ClientName *string `json:"client_name,omitempty"`
+ ClientUri *string `json:"client_uri,omitempty"`
+ Enabled *bool `json:"enabled,omitempty"`
+ Keys *[]struct {
+ Kid string `json:"kid"`
+ PrivateKey *string `json:"private_key,omitempty"`
+ } `json:"keys,omitempty"`
+ LogoUri *string `json:"logo_uri,omitempty"`
+ PolicyUri *string `json:"policy_uri,omitempty"`
+ TosUri *string `json:"tos_uri,omitempty"`
+ } `json:"bluesky,omitempty"`
+ Email *struct {
+ // Delivery How the instance sends email, or null to use the environment
+ Delivery *EmailDeliveryModeSchema `json:"delivery,omitempty"`
+ DisableNewIpAuthorization *bool `json:"disable_new_ip_authorization,omitempty"`
+
+ // Enabled Deprecated, use delivery
+ Enabled *bool `json:"enabled,omitempty"`
+ FromEmail *string `json:"from_email,omitempty"`
+ FromName *string `json:"from_name,omitempty"`
+
+ // Provider Deprecated, use delivery
+ Provider *InstanceConfigUpdateRequestIntegrationsEmailProvider `json:"provider,omitempty"`
+ Smtp *struct {
+ Host *string `json:"host,omitempty"`
+ Password *string `json:"password,omitempty"`
+ Port *int `json:"port,omitempty"`
+
+ // Secure Deprecated, use tls_mode
+ Secure *bool `json:"secure,omitempty"`
+
+ // TlsMode How the SMTP connection is encrypted
+ TlsMode *InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsMode `json:"tls_mode,omitempty"`
+ Username *string `json:"username,omitempty"`
+ } `json:"smtp,omitempty"`
+ } `json:"email,omitempty"`
+ Gif *struct {
+ KlipyApiKey *string `json:"klipy_api_key,omitempty"`
+ } `json:"gif,omitempty"`
+ Youtube *struct {
+ ApiKey *string `json:"api_key,omitempty"`
+ } `json:"youtube,omitempty"`
+ } `json:"integrations,omitempty"`
+ Media *struct {
+ AttachmentDecay *struct {
+ Curve *float32 `json:"curve,omitempty"`
+ Enabled *bool `json:"enabled,omitempty"`
+ MaxEligibleSizeMb *float32 `json:"max_eligible_size_mb,omitempty"`
+ MaxLifetimeDays *int `json:"max_lifetime_days,omitempty"`
+ MaxSizeMb *float32 `json:"max_size_mb,omitempty"`
+ MinLifetimeDays *int `json:"min_lifetime_days,omitempty"`
+ MinSizeMb *float32 `json:"min_size_mb,omitempty"`
+ RenewThresholdDays *int `json:"renew_threshold_days,omitempty"`
+ RenewWindowDays *int `json:"renew_window_days,omitempty"`
+ } `json:"attachment_decay,omitempty"`
+ } `json:"media,omitempty"`
+
+ // Notice Notice shown to everyone on the instance, such as planned maintenance
+ Notice *struct {
+ // EndsAt When clients stop showing the notice
+ EndsAt *time.Time `json:"ends_at,omitempty"`
+
+ // Message Notice text. Empty or null removes the notice and ignores the other fields
+ Message *string `json:"message"`
+
+ // StartsAt When clients start showing the notice
+ StartsAt *time.Time `json:"starts_at,omitempty"`
+
+ // Url Optional http or https link
+ Url *string `json:"url,omitempty"`
+ } `json:"notice,omitempty"`
+ Policy *struct {
+ DirectMessagesDisabled *bool `json:"direct_messages_disabled,omitempty"`
+ DirectMessagesLocked *InstanceConfigUpdateRequestPolicyDirectMessagesLocked `json:"direct_messages_locked,omitempty"`
+
+ // FriendsDisabled Whether friend requests are disabled instance-wide. Left out while direct_messages_disabled changes, it takes the same value
+ FriendsDisabled *bool `json:"friends_disabled,omitempty"`
+ GuildCreateAccess *bool `json:"guild_create_access,omitempty"`
+ PremiumMode *InstanceConfigUpdateRequestPolicyPremiumMode `json:"premium_mode,omitempty"`
+ Services *struct {
+ BlueskyEnabled *bool `json:"bluesky_enabled,omitempty"`
+ GifEnabled *bool `json:"gif_enabled,omitempty"`
+ YoutubeEnabled *bool `json:"youtube_enabled,omitempty"`
+ } `json:"services,omitempty"`
+
+ // SingleCommunityAddMembers Also add every existing account to the single community in the background
+ SingleCommunityAddMembers *bool `json:"single_community_add_members,omitempty"`
+ SingleCommunityEnabled *bool `json:"single_community_enabled,omitempty"`
+
+ // SingleCommunityGuildId ID of an existing community to use as the single community. Turns the mode on with that community, or moves it there while the mode is on
+ SingleCommunityGuildId *SnowflakeStringType `json:"single_community_guild_id,omitempty"`
+ SingleCommunityName *string `json:"single_community_name,omitempty"`
+ } `json:"policy,omitempty"`
+ PushRelay *PushRelayConfigUpdateRequest `json:"push_relay,omitempty"`
+ Registration *struct {
+ AdminRegistrationUrlsEnabled *bool `json:"admin_registration_urls_enabled,omitempty"`
+ AllowedEmailDomains *[]string `json:"allowed_email_domains,omitempty"`
+ Mode *InstanceRegistrationModeSchema `json:"mode,omitempty"`
+ } `json:"registration,omitempty"`
+ Sso *struct {
+ AllowedDomains *[]string `json:"allowed_domains,omitempty"`
+ AuthorizationUrl *string `json:"authorization_url,omitempty"`
+ AutoProvision *bool `json:"auto_provision,omitempty"`
+
+ // ButtonLabel Text for the sign-in button. Trimmed, then up to 64 UTF-16 code units with at least one visible character and no control characters, line breaks or bidirectional formatting characters. Empty or null uses the default label
+ ButtonLabel *string `json:"button_label,omitempty"`
+ ClientId *string `json:"client_id,omitempty"`
+ ClientSecret *string `json:"client_secret,omitempty"`
+ DisplayName *string `json:"display_name,omitempty"`
+ Enabled *bool `json:"enabled,omitempty"`
+ Enforced *bool `json:"enforced,omitempty"`
+
+ // GroupRoleMappings Groups whose members get a role in the single community. Every listed role is managed by single sign-on, and is added or removed to match the groups at each sign-in
+ GroupRoleMappings *[]struct {
+ // Group A group name exactly as the provider sends it in the groups claim, such as `staff` or `/engineering/devs`
+ Group string `json:"group"`
+
+ // RoleId The role in the single community that members of the group get
+ RoleId SnowflakeStringType `json:"role_id"`
+ } `json:"group_role_mappings,omitempty"`
+
+ // GroupsClaim The claim that lists the groups of a member. Empty or null uses `groups`
+ GroupsClaim *string `json:"groups_claim,omitempty"`
+ Issuer *string `json:"issuer,omitempty"`
+ JwksUrl *string `json:"jwks_url,omitempty"`
+ Scope *string `json:"scope,omitempty"`
+ TokenUrl *string `json:"token_url,omitempty"`
+ UserinfoUrl *string `json:"userinfo_url,omitempty"`
+ } `json:"sso,omitempty"`
+ VoiceP2p *VoiceP2pConfigUpdateRequest `json:"voice_p2p,omitempty"`
+}
+
+// InstanceConfigUpdateRequestIntegrationsEmailProvider Deprecated, use delivery
+type InstanceConfigUpdateRequestIntegrationsEmailProvider string
+
+// InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsMode How the SMTP connection is encrypted
+type InstanceConfigUpdateRequestIntegrationsEmailSmtpTlsMode string
+
+// InstanceConfigUpdateRequestPolicyDirectMessagesLocked defines model for InstanceConfigUpdateRequest.Policy.DirectMessagesLocked.
+type InstanceConfigUpdateRequestPolicyDirectMessagesLocked bool
+
+// InstanceConfigUpdateRequestPolicyPremiumMode defines model for InstanceConfigUpdateRequest.Policy.PremiumMode.
+type InstanceConfigUpdateRequestPolicyPremiumMode string
+
+// InstanceEmailSmtpTestRequest defines model for InstanceEmailSmtpTestRequest.
+type InstanceEmailSmtpTestRequest struct {
+ // FromEmail The from address for the test message, in place of the saved one
+ FromEmail *EmailType `json:"from_email,omitempty"`
+
+ // FromName The from name for the test message, in place of the saved one
+ FromName *string `json:"from_name,omitempty"`
+ Host *string `json:"host,omitempty"`
+ Password *string `json:"password,omitempty"`
+ Port *int `json:"port,omitempty"`
+
+ // SendTo When set, the test also sends a short message to this address and reports what the server answered
+ SendTo *EmailType `json:"send_to,omitempty"`
+
+ // TlsMode How the SMTP connection is encrypted
+ TlsMode *InstanceEmailSmtpTestRequestTlsMode `json:"tls_mode,omitempty"`
+ Username *string `json:"username,omitempty"`
+}
+
+// InstanceEmailSmtpTestRequestTlsMode How the SMTP connection is encrypted
+type InstanceEmailSmtpTestRequestTlsMode string
+
+// InstanceEmailSmtpTestResponse defines model for InstanceEmailSmtpTestResponse.
+type InstanceEmailSmtpTestResponse struct {
+ Error *string `json:"error"`
+ Ok bool `json:"ok"`
+
+ // ServerResponse What the server answered when it accepted the test message, present only when send_to was set
+ ServerResponse *string `json:"server_response,omitempty"`
+}
+
+// InstanceNoticeSchema Notice from the instance administrator shown to everyone, such as planned maintenance
+type InstanceNoticeSchema struct {
+ // EndsAt When clients stop showing the notice, or null for no end
+ EndsAt *time.Time `json:"ends_at"`
+
+ // Id Changes whenever the notice text changes, so clients can remember a dismissal
+ Id string `json:"id"`
+
+ // Message Notice text written by the instance administrator
+ Message string `json:"message"`
+
+ // StartsAt When clients start showing the notice, or null for now
+ StartsAt *time.Time `json:"starts_at"`
+
+ // Url Optional link shown with the notice
+ Url *string `json:"url"`
+}
+
+// InstanceRegistrationModeSchema Registration mode
+type InstanceRegistrationModeSchema string
+
+// InstantAccountAvailabilitySchema Whether accounts can be created from just a display name, and why not
+type InstantAccountAvailabilitySchema string
+
+// Int32Type defines model for Int32Type.
+type Int32Type = int32
+
+// InteractionTierModeSchema Which limits apply to accounts that have not finished setting up
+type InteractionTierModeSchema string
+
+// LastSessionCleanupModeSchema What happens when an account with no way back in signs out of its last session
+type LastSessionCleanupModeSchema string
+
+// ListUserSessionsResponse defines model for ListUserSessionsResponse.
+type ListUserSessionsResponse struct {
+ Sessions []struct {
+ // ApproxLastUsedAt ISO timestamp of the session last usage (approximate)
+ ApproxLastUsedAt string `json:"approx_last_used_at"`
+
+ // ClientIp Client IP address
+ ClientIp string `json:"client_ip"`
+
+ // ClientIpReverse Reverse DNS hostname for the client IP (PTR), if available
+ ClientIpReverse *string `json:"client_ip_reverse"`
+
+ // ClientLocation Approximate geo location label for the client IP, if available
+ ClientLocation *string `json:"client_location"`
+
+ // ClientOs Client operating system, if detected
+ ClientOs *string `json:"client_os"`
+
+ // ClientPlatform Client platform, if detected
+ ClientPlatform *string `json:"client_platform"`
+
+ // CreatedAt ISO timestamp when the session was created
+ CreatedAt string `json:"created_at"`
+
+ // DeletedAt ISO timestamp when the session was terminated, or null if still active
+ DeletedAt *string `json:"deleted_at"`
+
+ // SessionIdHash Hashed session identifier (base64url)
+ SessionIdHash string `json:"session_id_hash"`
+ } `json:"sessions"`
+}
+
+// LookupUserResponse defines model for LookupUserResponse.
+type LookupUserResponse struct {
+ Users []UserAdminResponseSchema `json:"users"`
+}
+
+// ModerationBasis Why the action is taken
+type ModerationBasis struct {
+ union json.RawMessage
+}
+
+// ModerationBasis0 A rule was broken. Records an enforcement decision and sends its notice
+type ModerationBasis0 struct {
+ Decision EnforcementDecisionInput `json:"decision"`
+ Type ModerationBasis0Type `json:"type"`
+}
+
+// ModerationBasis0Type defines model for ModerationBasis.0.Type.
+type ModerationBasis0Type string
+
+// ModerationBasis1 The account holder or community owner asked
+type ModerationBasis1 struct {
+ Type ModerationBasis1Type `json:"type"`
+}
+
+// ModerationBasis1Type defines model for ModerationBasis.1.Type.
+type ModerationBasis1Type string
+
+// ModerationBasis2 Nobody's conduct is involved, such as inactivity or cleanup
+type ModerationBasis2 struct {
+ Type ModerationBasis2Type `json:"type"`
+}
+
+// ModerationBasis2Type defines model for ModerationBasis.2.Type.
+type ModerationBasis2Type string
+
+// NetworkBlockRequest Block networks the account used. Only with a permanent suspension or a closure for a broken rule. Requires BAN_IP_ADD and USER_VIEW_IP
+type NetworkBlockRequest struct {
+ // Days How many days the blocks last. Ending the decision or deleting the account removes them sooner. Defaults to 90
+ Days *int `json:"days,omitempty"`
+
+ // Ips Addresses the account used in the last 30 days. An address on which another account that is not suspended or closed was last active is refused
+ Ips []string `json:"ips"`
+}
+
+// PendingRegistrationActionRequest defines model for PendingRegistrationActionRequest.
+type PendingRegistrationActionRequest struct {
+ // Status Pending registration decision
+ Status PendingRegistrationActionRequestStatus `json:"status"`
+}
+
+// PendingRegistrationActionRequestStatus Pending registration decision
+type PendingRegistrationActionRequestStatus string
+
+// PendingRegistrationListResponse defines model for PendingRegistrationListResponse.
+type PendingRegistrationListResponse struct {
+ PendingRegistrations []PendingRegistrationResponse `json:"pending_registrations"`
+}
+
+// PendingRegistrationResponse defines model for PendingRegistrationResponse.
+type PendingRegistrationResponse struct {
+ ClientIp *string `json:"client_ip"`
+ Discriminator int `json:"discriminator"`
+ Email *string `json:"email"`
+ GlobalName *string `json:"global_name"`
+ InviteCode *string `json:"invite_code"`
+ RegistrationUrlId *string `json:"registration_url_id"`
+ RequestedAt time.Time `json:"requested_at"`
+ UserId SnowflakeStringType `json:"user_id"`
+ Username string `json:"username"`
+}
+
+// PremiumCurrency defines model for PremiumCurrency.
+type PremiumCurrency = string
+
+// PremiumFlags User premium-related flags (32-bit)
+type PremiumFlags = int32
+
+// PushRelayConfigResponse defines model for PushRelayConfigResponse.
+type PushRelayConfigResponse struct {
+ RelayConsentAccepted bool `json:"relay_consent_accepted"`
+ RelayConsentAcceptedAt *time.Time `json:"relay_consent_accepted_at"`
+ RelayConsentAcceptedBy *string `json:"relay_consent_accepted_by"`
+}
+
+// PushRelayConfigUpdateRequest defines model for PushRelayConfigUpdateRequest.
+type PushRelayConfigUpdateRequest struct {
+ RelayConsentAccepted *bool `json:"relay_consent_accepted,omitempty"`
+}
+
+// SearchUsersResponse defines model for SearchUsersResponse.
+type SearchUsersResponse struct {
+ Total float32 `json:"total"`
+ Users []UserAdminResponseSchema `json:"users"`
+}
+
+// SkippedNetworkBlock defines model for SkippedNetworkBlock.
+type SkippedNetworkBlock struct {
+ Ip string `json:"ip"`
+
+ // Reason Exempt addresses and special-purpose ranges such as private, shared carrier and documentation ranges are never blocked. An address that is already blocked permanently or by another decision is left as it is
+ Reason SkippedNetworkBlockReason `json:"reason"`
+}
+
+// SkippedNetworkBlockReason Exempt addresses and special-purpose ranges such as private, shared carrier and documentation ranges are never blocked. An address that is already blocked permanently or by another decision is left as it is
+type SkippedNetworkBlockReason string
+
+// SnowflakeStringType defines model for SnowflakeStringType.
+type SnowflakeStringType = string
+
+// SnowflakeType defines model for SnowflakeType.
+type SnowflakeType struct {
+ union json.RawMessage
+}
+
+// SnowflakeType0 defines model for .
+type SnowflakeType0 = string
+
+// SnowflakeType1 defines model for .
+type SnowflakeType1 = int
+
+// StripePriceIdSchema defines model for StripePriceIdSchema.
+type StripePriceIdSchema = string
+
+// TagStyleSchema How usernames are tagged
+type TagStyleSchema string
+
+// TerminateSessionsResponse defines model for TerminateSessionsResponse.
+type TerminateSessionsResponse struct {
+ TerminatedCount Int32Type `json:"terminated_count"`
+}
+
+// ThrottledError defines model for ThrottledError.
+type ThrottledError struct {
+ // Code Machine-readable error code. Known values are listed in the APIErrorCode schema
+ Code string `json:"code"`
+
+ // Errors Field-specific validation errors
+ Errors *[]struct {
+ // Code Machine-readable validation error code
+ Code *string `json:"code,omitempty"`
+
+ // Message Human-readable validation error message
+ Message string `json:"message"`
+
+ // Path Field path that failed validation
+ Path string `json:"path"`
+ } `json:"errors,omitempty"`
+
+ // Global Whether this is a global rate limit
+ Global *bool `json:"global,omitempty"`
+
+ // Message Human-readable error message
+ Message string `json:"message"`
+
+ // RetryAfter Seconds to wait before retrying
+ RetryAfter *float32 `json:"retry_after,omitempty"`
+ AdditionalProperties map[string]interface{} `json:"-"`
+}
+
+// UserAdminResponseSchema defines model for UserAdminResponseSchema.
+type UserAdminResponseSchema struct {
+ AccentColor *Int32Type `json:"accent_color"`
+ AccountTier AccountTierSchema `json:"account_tier"`
+ Acls []string `json:"acls"`
+ AuthenticatorTypes []Int32Type `json:"authenticator_types"`
+ Avatar *string `json:"avatar"`
+ Banner *string `json:"banner"`
+ Bio *string `json:"bio"`
+ Bot bool `json:"bot"`
+
+ // Claimed Whether the account can be signed in to from another device
+ Claimed bool `json:"claimed"`
+ DateOfBirth *string `json:"date_of_birth"`
+
+ // DateOfBirthRequired Whether the account still has to enter its date of birth, which clients ask for before anything else
+ DateOfBirthRequired bool `json:"date_of_birth_required"`
+
+ // DeletionAuditLogReason Private reason recorded with the pending deletion, null without the audit log view permission
+ DeletionAuditLogReason *string `json:"deletion_audit_log_reason"`
+
+ // DeletionPublicReason Public reason of a deletion scheduled before enforcement decisions existed. No longer written
+ DeletionPublicReason *string `json:"deletion_public_reason"`
+ DeletionReasonCode *DeletionReasonCode `json:"deletion_reason_code"`
+
+ // DeletionScheduledAt ISO 8601 timestamp when the pending deletion was scheduled
+ DeletionScheduledAt *string `json:"deletion_scheduled_at"`
+
+ // DeletionScheduledBy ID of the account that scheduled the pending deletion, null when it was not recorded
+ DeletionScheduledBy *SnowflakeStringType `json:"deletion_scheduled_by"`
+ Discriminator Int32Type `json:"discriminator"`
+ Email *string `json:"email"`
+ EmailBounced bool `json:"email_bounced"`
+ EmailVerified bool `json:"email_verified"`
+
+ // EnforcementDecisionId The enforcement decision behind the current suspension or closure, null when none owns it
+ EnforcementDecisionId *SnowflakeStringType `json:"enforcement_decision_id"`
+ Flags UserFlags `json:"flags"`
+ GlobalName *string `json:"global_name"`
+
+ // HasPassword Whether the account has a password
+ HasPassword bool `json:"has_password"`
+ HasTotp bool `json:"has_totp"`
+ Id SnowflakeStringType `json:"id"`
+ LastActiveAt *string `json:"last_active_at"`
+ LastActiveIp *string `json:"last_active_ip"`
+ LastActiveIpReverse *string `json:"last_active_ip_reverse"`
+ LastActiveLocation *string `json:"last_active_location"`
+ Locale *string `json:"locale"`
+ PendingBulkMessageDeletionAt *string `json:"pending_bulk_message_deletion_at"`
+ PendingDeletionAt *string `json:"pending_deletion_at"`
+ PremiumFlags PremiumFlags `json:"premium_flags"`
+ PremiumGraceEndsAt *string `json:"premium_grace_ends_at"`
+ PremiumLifetimeSequence *Int32Type `json:"premium_lifetime_sequence"`
+ PremiumSince *string `json:"premium_since"`
+ PremiumType *Int32Type `json:"premium_type"`
+ PremiumUntil *string `json:"premium_until"`
+
+ // ProfileBadges Every badge the account qualifies for in display order, including ones hidden from the public
+ ProfileBadges []AdminProfileBadgeResponse `json:"profile_badges"`
+ Pronouns *string `json:"pronouns"`
+ System bool `json:"system"`
+ TempBannedUntil *string `json:"temp_banned_until"`
+ Traits []string `json:"traits"`
+ Username string `json:"username"`
+}
+
+// UserFlags User account flags (64-bit)
+type UserFlags = string
+
+// UserMutationResponse defines model for UserMutationResponse.
+type UserMutationResponse struct {
+ User UserAdminResponseSchema `json:"user"`
+}
+
+// UserRestrictionResponse defines model for UserRestrictionResponse.
+type UserRestrictionResponse struct {
+ // SkippedIps Requested network blocks that were not written, with the reason
+ SkippedIps []SkippedNetworkBlock `json:"skipped_ips"`
+ User UserAdminResponseSchema `json:"user"`
+}
+
+// UsernameType defines model for UsernameType.
+type UsernameType = string
+
+// VerificationBasisSchema What an account needs to finish setting up
+type VerificationBasisSchema string
+
+// VoiceP2pConfigResponse defines model for VoiceP2pConfigResponse.
+type VoiceP2pConfigResponse struct {
+ ConfigVersion int `json:"config_version"`
+ Enabled bool `json:"enabled"`
+ ExcludedUserIds []string `json:"excluded_user_ids"`
+ IncludePremiumUsers bool `json:"include_premium_users"`
+ IncludedGuildIds []string `json:"included_guild_ids"`
+ IncludedUserIds []string `json:"included_user_ids"`
+ MaxParticipants int `json:"max_participants"`
+ RolloutBasisPoints int `json:"rollout_basis_points"`
+ RolloutCountryCodes ExperimentRolloutCountryCodesSchema `json:"rollout_country_codes"`
+ RolloutSalt string `json:"rollout_salt"`
+}
+
+// VoiceP2pConfigUpdateRequest defines model for VoiceP2pConfigUpdateRequest.
+type VoiceP2pConfigUpdateRequest struct {
+ Enabled *bool `json:"enabled,omitempty"`
+ ExcludedUserIds *[]string `json:"excluded_user_ids,omitempty"`
+ IncludePremiumUsers *bool `json:"include_premium_users,omitempty"`
+ IncludedGuildIds *[]string `json:"included_guild_ids,omitempty"`
+ IncludedUserIds *[]string `json:"included_user_ids,omitempty"`
+ MaxParticipants *int `json:"max_participants,omitempty"`
+ RolloutBasisPoints *int `json:"rollout_basis_points,omitempty"`
+ RolloutCountryCodes *ExperimentRolloutCountryCodesSchema `json:"rollout_country_codes,omitempty"`
+ RolloutSalt *string `json:"rollout_salt,omitempty"`
+}
+
+// adminApiKeyContextKey is the context key for adminApiKey security scheme
+type adminApiKeyContextKey string
+
+// bearerTokenContextKey is the context key for bearerToken security scheme
+type bearerTokenContextKey string
+
+// botTokenContextKey is the context key for botToken security scheme
+type botTokenContextKey string
+
+// oauth2TokenContextKey is the context key for oauth2Token security scheme
+type oauth2TokenContextKey string
+
+// sessionTokenContextKey is the context key for sessionToken security scheme
+type sessionTokenContextKey string
+
+// ListAdminUsersParams defines parameters for ListAdminUsers.
+type ListAdminUsersParams struct {
+ // Q Restrict the results to the users matching this free-text query
+ Q *string `form:"q,omitempty" json:"q,omitempty"`
+
+ // UserId Restrict the results to these users. Repeat the parameter to pass more than one.
+ UserId *struct {
+ union json.RawMessage
+ } `form:"user_id,omitempty" json:"user_id,omitempty"`
+
+ // Resolve Resolve one exact identifier: a username#discriminator tag, a user ID, an email address, or a Stripe subscription ID
+ Resolve *string `form:"resolve,omitempty" json:"resolve,omitempty"`
+
+ // Email Restrict the results to the user with this exact email address
+ Email *string `form:"email,omitempty" json:"email,omitempty"`
+
+ // LastActiveIp Restrict the results to the users whose last active IP address matches this one exactly
+ LastActiveIp *string `form:"last_active_ip,omitempty" json:"last_active_ip,omitempty"`
+
+ // Acl Restrict the results to the users granted this admin permission, ordered by user ID. Pass * to list the admins with full access
+ Acl *AdminAclType `form:"acl,omitempty" json:"acl,omitempty"`
+
+ // Limit Maximum number of users to return
+ Limit *string `form:"limit,omitempty" json:"limit,omitempty"`
+
+ // Offset Number of users to skip before returning results
+ Offset *string `form:"offset,omitempty" json:"offset,omitempty"`
+}
+
+// ListAdminUsersParamsUserId1 defines parameters for ListAdminUsers.
+type ListAdminUsersParamsUserId1 = []SnowflakeStringType
+
+// DeleteAdminUserMessagesParams defines parameters for DeleteAdminUserMessages.
+type DeleteAdminUserMessagesParams struct {
+ // DryRun Count the messages that would be deleted without deleting anything (default true)
+ DryRun *string `form:"dry_run,omitempty" json:"dry_run,omitempty"`
+}
+
+// UpdateAdminInstanceConfigJSONRequestBody defines body for UpdateAdminInstanceConfig for application/json ContentType.
+type UpdateAdminInstanceConfigJSONRequestBody = InstanceConfigUpdateRequest
+
+// CreateAdminInstanceBrandingAssetJSONRequestBody defines body for CreateAdminInstanceBrandingAsset for application/json ContentType.
+type CreateAdminInstanceBrandingAssetJSONRequestBody = BrandingAssetUploadRequest
+
+// CreateAdminInstanceSmtpTestJSONRequestBody defines body for CreateAdminInstanceSmtpTest for application/json ContentType.
+type CreateAdminInstanceSmtpTestJSONRequestBody = InstanceEmailSmtpTestRequest
+
+// UpdateAdminPendingRegistrationJSONRequestBody defines body for UpdateAdminPendingRegistration for application/json ContentType.
+type UpdateAdminPendingRegistrationJSONRequestBody = PendingRegistrationActionRequest
+
+// CreateAdminRegistrationUrlJSONRequestBody defines body for CreateAdminRegistrationUrl for application/json ContentType.
+type CreateAdminRegistrationUrlJSONRequestBody = CreateRegistrationUrlRequest
+
+// CreateAdminUserJSONRequestBody defines body for CreateAdminUser for application/json ContentType.
+type CreateAdminUserJSONRequestBody = AdminUserCreateRequest
+
+// SetAdminUserAclsJSONRequestBody defines body for SetAdminUserAcls for application/json ContentType.
+type SetAdminUserAclsJSONRequestBody = AdminUserAclsRequest
+
+// BanAdminUserJSONRequestBody defines body for BanAdminUser for application/json ContentType.
+type BanAdminUserJSONRequestBody = AdminUserBanRequest
+
+// ScheduleAdminUserDeletionJSONRequestBody defines body for ScheduleAdminUserDeletion for application/json ContentType.
+type ScheduleAdminUserDeletionJSONRequestBody = AdminUserDeletionScheduleRequest
+
+// DeleteAdminUserMessagesJSONRequestBody defines body for DeleteAdminUserMessages for application/json ContentType.
+type DeleteAdminUserMessagesJSONRequestBody = AdminUserMessageDeleteRequest
+
+// Getter for additional properties for Error. Returns the specified
+// element and whether it was found
+func (a Error) Get(fieldName string) (value interface{}, found bool) {
+ if a.AdditionalProperties != nil {
+ value, found = a.AdditionalProperties[fieldName]
+ }
+ return
+}
+
+// Setter for additional properties for Error
+func (a *Error) Set(fieldName string, value interface{}) {
+ if a.AdditionalProperties == nil {
+ a.AdditionalProperties = make(map[string]interface{})
+ }
+ a.AdditionalProperties[fieldName] = value
+}
+
+// Override default JSON handling for Error to handle AdditionalProperties
+func (a *Error) UnmarshalJSON(b []byte) error {
+ object := make(map[string]json.RawMessage)
+ err := json.Unmarshal(b, &object)
+ if err != nil {
+ return err
+ }
+
+ if raw, found := object["code"]; found {
+ err = json.Unmarshal(raw, &a.Code)
+ if err != nil {
+ return fmt.Errorf("error reading 'code': %w", err)
+ }
+ delete(object, "code")
+ }
+
+ if raw, found := object["errors"]; found {
+ err = json.Unmarshal(raw, &a.Errors)
+ if err != nil {
+ return fmt.Errorf("error reading 'errors': %w", err)
+ }
+ delete(object, "errors")
+ }
+
+ if raw, found := object["message"]; found {
+ err = json.Unmarshal(raw, &a.Message)
+ if err != nil {
+ return fmt.Errorf("error reading 'message': %w", err)
+ }
+ delete(object, "message")
+ }
+
+ if len(object) != 0 {
+ a.AdditionalProperties = make(map[string]interface{})
+ for fieldName, fieldBuf := range object {
+ var fieldVal interface{}
+ err := json.Unmarshal(fieldBuf, &fieldVal)
+ if err != nil {
+ return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err)
+ }
+ a.AdditionalProperties[fieldName] = fieldVal
+ }
+ }
+ return nil
+}
+
+// Override default JSON handling for Error to handle AdditionalProperties
+func (a Error) MarshalJSON() ([]byte, error) {
+ var err error
+ object := make(map[string]json.RawMessage)
+
+ object["code"], err = json.Marshal(a.Code)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling 'code': %w", err)
+ }
+
+ if a.Errors != nil {
+ object["errors"], err = json.Marshal(a.Errors)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling 'errors': %w", err)
+ }
+ }
+
+ object["message"], err = json.Marshal(a.Message)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling 'message': %w", err)
+ }
+
+ for fieldName, field := range a.AdditionalProperties {
+ object[fieldName], err = json.Marshal(field)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err)
+ }
+ }
+ return json.Marshal(object)
+}
+
+// Getter for additional properties for ThrottledError. Returns the specified
+// element and whether it was found
+func (a ThrottledError) Get(fieldName string) (value interface{}, found bool) {
+ if a.AdditionalProperties != nil {
+ value, found = a.AdditionalProperties[fieldName]
+ }
+ return
+}
+
+// Setter for additional properties for ThrottledError
+func (a *ThrottledError) Set(fieldName string, value interface{}) {
+ if a.AdditionalProperties == nil {
+ a.AdditionalProperties = make(map[string]interface{})
+ }
+ a.AdditionalProperties[fieldName] = value
+}
+
+// Override default JSON handling for ThrottledError to handle AdditionalProperties
+func (a *ThrottledError) UnmarshalJSON(b []byte) error {
+ object := make(map[string]json.RawMessage)
+ err := json.Unmarshal(b, &object)
+ if err != nil {
+ return err
+ }
+
+ if raw, found := object["code"]; found {
+ err = json.Unmarshal(raw, &a.Code)
+ if err != nil {
+ return fmt.Errorf("error reading 'code': %w", err)
+ }
+ delete(object, "code")
+ }
+
+ if raw, found := object["errors"]; found {
+ err = json.Unmarshal(raw, &a.Errors)
+ if err != nil {
+ return fmt.Errorf("error reading 'errors': %w", err)
+ }
+ delete(object, "errors")
+ }
+
+ if raw, found := object["global"]; found {
+ err = json.Unmarshal(raw, &a.Global)
+ if err != nil {
+ return fmt.Errorf("error reading 'global': %w", err)
+ }
+ delete(object, "global")
+ }
+
+ if raw, found := object["message"]; found {
+ err = json.Unmarshal(raw, &a.Message)
+ if err != nil {
+ return fmt.Errorf("error reading 'message': %w", err)
+ }
+ delete(object, "message")
+ }
+
+ if raw, found := object["retry_after"]; found {
+ err = json.Unmarshal(raw, &a.RetryAfter)
+ if err != nil {
+ return fmt.Errorf("error reading 'retry_after': %w", err)
+ }
+ delete(object, "retry_after")
+ }
+
+ if len(object) != 0 {
+ a.AdditionalProperties = make(map[string]interface{})
+ for fieldName, fieldBuf := range object {
+ var fieldVal interface{}
+ err := json.Unmarshal(fieldBuf, &fieldVal)
+ if err != nil {
+ return fmt.Errorf("error unmarshaling field %s: %w", fieldName, err)
+ }
+ a.AdditionalProperties[fieldName] = fieldVal
+ }
+ }
+ return nil
+}
+
+// Override default JSON handling for ThrottledError to handle AdditionalProperties
+func (a ThrottledError) MarshalJSON() ([]byte, error) {
+ var err error
+ object := make(map[string]json.RawMessage)
+
+ object["code"], err = json.Marshal(a.Code)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling 'code': %w", err)
+ }
+
+ if a.Errors != nil {
+ object["errors"], err = json.Marshal(a.Errors)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling 'errors': %w", err)
+ }
+ }
+
+ if a.Global != nil {
+ object["global"], err = json.Marshal(a.Global)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling 'global': %w", err)
+ }
+ }
+
+ object["message"], err = json.Marshal(a.Message)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling 'message': %w", err)
+ }
+
+ if a.RetryAfter != nil {
+ object["retry_after"], err = json.Marshal(a.RetryAfter)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling 'retry_after': %w", err)
+ }
+ }
+
+ for fieldName, field := range a.AdditionalProperties {
+ object[fieldName], err = json.Marshal(field)
+ if err != nil {
+ return nil, fmt.Errorf("error marshaling '%s': %w", fieldName, err)
+ }
+ }
+ return json.Marshal(object)
+}
+
+// AsAuthConfigUpdateRequestIdentifierFirst0 returns the union data inside the AuthConfigUpdateRequest_IdentifierFirst as a AuthConfigUpdateRequestIdentifierFirst0
+func (t AuthConfigUpdateRequest_IdentifierFirst) AsAuthConfigUpdateRequestIdentifierFirst0() (AuthConfigUpdateRequestIdentifierFirst0, error) {
+ var body AuthConfigUpdateRequestIdentifierFirst0
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromAuthConfigUpdateRequestIdentifierFirst0 overwrites any union data inside the AuthConfigUpdateRequest_IdentifierFirst as the provided AuthConfigUpdateRequestIdentifierFirst0
+func (t *AuthConfigUpdateRequest_IdentifierFirst) FromAuthConfigUpdateRequestIdentifierFirst0(v AuthConfigUpdateRequestIdentifierFirst0) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeAuthConfigUpdateRequestIdentifierFirst0 performs a merge with any union data inside the AuthConfigUpdateRequest_IdentifierFirst, using the provided AuthConfigUpdateRequestIdentifierFirst0
+func (t *AuthConfigUpdateRequest_IdentifierFirst) MergeAuthConfigUpdateRequestIdentifierFirst0(v AuthConfigUpdateRequestIdentifierFirst0) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsAuthConfigUpdateRequestIdentifierFirst1 returns the union data inside the AuthConfigUpdateRequest_IdentifierFirst as a AuthConfigUpdateRequestIdentifierFirst1
+func (t AuthConfigUpdateRequest_IdentifierFirst) AsAuthConfigUpdateRequestIdentifierFirst1() (AuthConfigUpdateRequestIdentifierFirst1, error) {
+ var body AuthConfigUpdateRequestIdentifierFirst1
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromAuthConfigUpdateRequestIdentifierFirst1 overwrites any union data inside the AuthConfigUpdateRequest_IdentifierFirst as the provided AuthConfigUpdateRequestIdentifierFirst1
+func (t *AuthConfigUpdateRequest_IdentifierFirst) FromAuthConfigUpdateRequestIdentifierFirst1(v AuthConfigUpdateRequestIdentifierFirst1) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeAuthConfigUpdateRequestIdentifierFirst1 performs a merge with any union data inside the AuthConfigUpdateRequest_IdentifierFirst, using the provided AuthConfigUpdateRequestIdentifierFirst1
+func (t *AuthConfigUpdateRequest_IdentifierFirst) MergeAuthConfigUpdateRequestIdentifierFirst1(v AuthConfigUpdateRequestIdentifierFirst1) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+func (t AuthConfigUpdateRequest_IdentifierFirst) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *AuthConfigUpdateRequest_IdentifierFirst) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}
+
+// AsModerationBasis0 returns the union data inside the ModerationBasis as a ModerationBasis0
+func (t ModerationBasis) AsModerationBasis0() (ModerationBasis0, error) {
+ var body ModerationBasis0
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromModerationBasis0 overwrites any union data inside the ModerationBasis as the provided ModerationBasis0
+func (t *ModerationBasis) FromModerationBasis0(v ModerationBasis0) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeModerationBasis0 performs a merge with any union data inside the ModerationBasis, using the provided ModerationBasis0
+func (t *ModerationBasis) MergeModerationBasis0(v ModerationBasis0) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsModerationBasis1 returns the union data inside the ModerationBasis as a ModerationBasis1
+func (t ModerationBasis) AsModerationBasis1() (ModerationBasis1, error) {
+ var body ModerationBasis1
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromModerationBasis1 overwrites any union data inside the ModerationBasis as the provided ModerationBasis1
+func (t *ModerationBasis) FromModerationBasis1(v ModerationBasis1) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeModerationBasis1 performs a merge with any union data inside the ModerationBasis, using the provided ModerationBasis1
+func (t *ModerationBasis) MergeModerationBasis1(v ModerationBasis1) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsModerationBasis2 returns the union data inside the ModerationBasis as a ModerationBasis2
+func (t ModerationBasis) AsModerationBasis2() (ModerationBasis2, error) {
+ var body ModerationBasis2
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromModerationBasis2 overwrites any union data inside the ModerationBasis as the provided ModerationBasis2
+func (t *ModerationBasis) FromModerationBasis2(v ModerationBasis2) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeModerationBasis2 performs a merge with any union data inside the ModerationBasis, using the provided ModerationBasis2
+func (t *ModerationBasis) MergeModerationBasis2(v ModerationBasis2) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+func (t ModerationBasis) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *ModerationBasis) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}
+
+// AsSnowflakeType0 returns the union data inside the SnowflakeType as a SnowflakeType0
+func (t SnowflakeType) AsSnowflakeType0() (SnowflakeType0, error) {
+ var body SnowflakeType0
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromSnowflakeType0 overwrites any union data inside the SnowflakeType as the provided SnowflakeType0
+func (t *SnowflakeType) FromSnowflakeType0(v SnowflakeType0) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeSnowflakeType0 performs a merge with any union data inside the SnowflakeType, using the provided SnowflakeType0
+func (t *SnowflakeType) MergeSnowflakeType0(v SnowflakeType0) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsSnowflakeType1 returns the union data inside the SnowflakeType as a SnowflakeType1
+func (t SnowflakeType) AsSnowflakeType1() (SnowflakeType1, error) {
+ var body SnowflakeType1
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromSnowflakeType1 overwrites any union data inside the SnowflakeType as the provided SnowflakeType1
+func (t *SnowflakeType) FromSnowflakeType1(v SnowflakeType1) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeSnowflakeType1 performs a merge with any union data inside the SnowflakeType, using the provided SnowflakeType1
+func (t *SnowflakeType) MergeSnowflakeType1(v SnowflakeType1) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+func (t SnowflakeType) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *SnowflakeType) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}