use conjure_http::endpoint;
/// Service for managing integrations with external services.
#[conjure_http::conjure_endpoints(
    name = "IntegrationsService",
    use_legacy_error_serialization
)]
pub trait IntegrationsService {
    /// Generates link to request permissions for Slack bot to join workspaces and use a webhook.
    #[endpoint(
        method = GET,
        path = "/scout/v2/integrations/slack-oauth/init-webhook",
        name = "generateSlackWebhookLink",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn generate_slack_webhook_link(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "workspace",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        workspace: Option<conjure_object::ResourceIdentifier>,
        #[query(
            name = "isGovSlack",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "isGovSlack"
        )]
        is_gov_slack: Option<bool>,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::GenerateSlackWebhookResponse,
        conjure_http::private::Error,
    >;
    /// Creates a new Slack integration. Called internally after Slack authorization.
    #[endpoint(
        method = GET,
        path = "/scout/v2/integrations/slack-oauth/redirect",
        name = "createSlackWebhook"
    )]
    fn create_slack_webhook(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "code",
            decoder = conjure_http::server::conjure::FromPlainDecoder
        )]
        code: String,
        #[query(
            name = "state",
            decoder = conjure_http::server::conjure::FromPlainDecoder
        )]
        state: String,
    ) -> Result<(), conjure_http::private::Error>;
    /// Creates a new integration.
    #[endpoint(
        method = POST,
        path = "/scout/v2/integrations",
        name = "createIntegration",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn create_integration(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "createIntegrationRequest"
        )]
        create_integration_request: super::super::super::super::super::objects::scout::integrations::api::CreateIntegrationRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::Integration,
        conjure_http::private::Error,
    >;
    /// Creates a new webhook integration with HMAC signing.
    /// Returns the integration and the server-generated signing key.
    /// The signing key is only returned once — store it securely.
    #[endpoint(
        method = POST,
        path = "/scout/v2/integrations/internal/secure-webhook",
        name = "createSecureWebhookIntegration",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn create_secure_webhook_integration(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::integrations::api::CreateSecureWebhookIntegrationRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::CreateSecureWebhookIntegrationResponse,
        conjure_http::private::Error,
    >;
    /// Sends a message to a secure webhook integration with HMAC-SHA256 signature.
    /// Implements retry logic with exponential backoff based on merged delivery configuration.
    /// Request configuration overrides take precedence over integration's stored configuration.
    #[endpoint(
        method = POST,
        path = "/scout/v2/integrations/internal/secure-webhook/{integrationRid}",
        name = "sendSecureWebhookMessage",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn send_secure_webhook_message(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::integrations::api::SendSecureWebhookMessageRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::SendSecureWebhookMessageResponse,
        conjure_http::private::Error,
    >;
    /// Deletes an integration by archiving.
    #[endpoint(
        method = DELETE,
        path = "/scout/v2/integrations/{integrationRid}",
        name = "deleteIntegration"
    )]
    fn delete_integration(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Updates the metadata of an integration.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/integrations/{integrationRid}",
        name = "updateIntegrationMetadata",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn update_integration_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::integrations::api::UpdateIntegrationRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::Integration,
        conjure_http::private::Error,
    >;
    /// Updates the integration details for an integration.
    /// Intended to allow changing webhooks or rotating API keys.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/integrations/{integrationRid}/details",
        name = "updateIntegrationDetails",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn update_integration_details(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::integrations::api::UpdateIntegrationDetailsRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::Integration,
        conjure_http::private::Error,
    >;
    /// Retrieves an integration with the specified integration RID.
    #[endpoint(
        method = GET,
        path = "/scout/v2/integrations/{integrationRid}",
        name = "getIntegration",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_integration(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::Integration,
        conjure_http::private::Error,
    >;
    /// Lists all integrations. Archived integrations are not included.
    #[endpoint(
        method = GET,
        path = "/scout/v2/integrations/list",
        name = "listIntegrations",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    fn list_integrations(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "workspaces",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
        )]
        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
    ) -> Result<
        Vec<
            super::super::super::super::super::objects::scout::integrations::api::Integration,
        >,
        conjure_http::private::Error,
    >;
    /// Sends a string message to the specified integration from a checklist execution.
    #[endpoint(
        method = POST,
        path = "/scout/v2/integrations/send-message",
        name = "sendMessage"
    )]
    fn send_message(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::integrations::api::SendMessageRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Rotates the HMAC signing key for a webhook integration.
    /// The old key is immediately invalidated and a new key is generated and returned.
    /// This is the only way to retrieve the signing key after initial creation.
    #[endpoint(
        method = POST,
        path = "/scout/v2/integrations/internal/{integrationRid}/rotate-signing-key",
        name = "rotateSecureWebhookIntegrationSigningKey",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn rotate_secure_webhook_integration_signing_key(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::RotateWebhookSigningKeyResponse,
        conjure_http::private::Error,
    >;
}
/// Service for managing integrations with external services.
#[conjure_http::conjure_endpoints(
    name = "IntegrationsService",
    use_legacy_error_serialization
)]
pub trait AsyncIntegrationsService {
    /// Generates link to request permissions for Slack bot to join workspaces and use a webhook.
    #[endpoint(
        method = GET,
        path = "/scout/v2/integrations/slack-oauth/init-webhook",
        name = "generateSlackWebhookLink",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn generate_slack_webhook_link(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "workspace",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        workspace: Option<conjure_object::ResourceIdentifier>,
        #[query(
            name = "isGovSlack",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "isGovSlack"
        )]
        is_gov_slack: Option<bool>,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::GenerateSlackWebhookResponse,
        conjure_http::private::Error,
    >;
    /// Creates a new Slack integration. Called internally after Slack authorization.
    #[endpoint(
        method = GET,
        path = "/scout/v2/integrations/slack-oauth/redirect",
        name = "createSlackWebhook"
    )]
    async fn create_slack_webhook(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "code",
            decoder = conjure_http::server::conjure::FromPlainDecoder
        )]
        code: String,
        #[query(
            name = "state",
            decoder = conjure_http::server::conjure::FromPlainDecoder
        )]
        state: String,
    ) -> Result<(), conjure_http::private::Error>;
    /// Creates a new integration.
    #[endpoint(
        method = POST,
        path = "/scout/v2/integrations",
        name = "createIntegration",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_integration(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "createIntegrationRequest"
        )]
        create_integration_request: super::super::super::super::super::objects::scout::integrations::api::CreateIntegrationRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::Integration,
        conjure_http::private::Error,
    >;
    /// Creates a new webhook integration with HMAC signing.
    /// Returns the integration and the server-generated signing key.
    /// The signing key is only returned once — store it securely.
    #[endpoint(
        method = POST,
        path = "/scout/v2/integrations/internal/secure-webhook",
        name = "createSecureWebhookIntegration",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_secure_webhook_integration(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::integrations::api::CreateSecureWebhookIntegrationRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::CreateSecureWebhookIntegrationResponse,
        conjure_http::private::Error,
    >;
    /// Sends a message to a secure webhook integration with HMAC-SHA256 signature.
    /// Implements retry logic with exponential backoff based on merged delivery configuration.
    /// Request configuration overrides take precedence over integration's stored configuration.
    #[endpoint(
        method = POST,
        path = "/scout/v2/integrations/internal/secure-webhook/{integrationRid}",
        name = "sendSecureWebhookMessage",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn send_secure_webhook_message(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::integrations::api::SendSecureWebhookMessageRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::SendSecureWebhookMessageResponse,
        conjure_http::private::Error,
    >;
    /// Deletes an integration by archiving.
    #[endpoint(
        method = DELETE,
        path = "/scout/v2/integrations/{integrationRid}",
        name = "deleteIntegration"
    )]
    async fn delete_integration(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Updates the metadata of an integration.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/integrations/{integrationRid}",
        name = "updateIntegrationMetadata",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_integration_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::integrations::api::UpdateIntegrationRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::Integration,
        conjure_http::private::Error,
    >;
    /// Updates the integration details for an integration.
    /// Intended to allow changing webhooks or rotating API keys.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/integrations/{integrationRid}/details",
        name = "updateIntegrationDetails",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_integration_details(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::integrations::api::UpdateIntegrationDetailsRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::Integration,
        conjure_http::private::Error,
    >;
    /// Retrieves an integration with the specified integration RID.
    #[endpoint(
        method = GET,
        path = "/scout/v2/integrations/{integrationRid}",
        name = "getIntegration",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_integration(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::Integration,
        conjure_http::private::Error,
    >;
    /// Lists all integrations. Archived integrations are not included.
    #[endpoint(
        method = GET,
        path = "/scout/v2/integrations/list",
        name = "listIntegrations",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn list_integrations(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "workspaces",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
        )]
        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
    ) -> Result<
        Vec<
            super::super::super::super::super::objects::scout::integrations::api::Integration,
        >,
        conjure_http::private::Error,
    >;
    /// Sends a string message to the specified integration from a checklist execution.
    #[endpoint(
        method = POST,
        path = "/scout/v2/integrations/send-message",
        name = "sendMessage"
    )]
    async fn send_message(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::integrations::api::SendMessageRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Rotates the HMAC signing key for a webhook integration.
    /// The old key is immediately invalidated and a new key is generated and returned.
    /// This is the only way to retrieve the signing key after initial creation.
    #[endpoint(
        method = POST,
        path = "/scout/v2/integrations/internal/{integrationRid}/rotate-signing-key",
        name = "rotateSecureWebhookIntegrationSigningKey",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn rotate_secure_webhook_integration_signing_key(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::RotateWebhookSigningKeyResponse,
        conjure_http::private::Error,
    >;
}
/// Service for managing integrations with external services.
#[conjure_http::conjure_endpoints(
    name = "IntegrationsService",
    use_legacy_error_serialization,
    local
)]
pub trait LocalAsyncIntegrationsService {
    /// Generates link to request permissions for Slack bot to join workspaces and use a webhook.
    #[endpoint(
        method = GET,
        path = "/scout/v2/integrations/slack-oauth/init-webhook",
        name = "generateSlackWebhookLink",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn generate_slack_webhook_link(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "workspace",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder
        )]
        workspace: Option<conjure_object::ResourceIdentifier>,
        #[query(
            name = "isGovSlack",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "isGovSlack"
        )]
        is_gov_slack: Option<bool>,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::GenerateSlackWebhookResponse,
        conjure_http::private::Error,
    >;
    /// Creates a new Slack integration. Called internally after Slack authorization.
    #[endpoint(
        method = GET,
        path = "/scout/v2/integrations/slack-oauth/redirect",
        name = "createSlackWebhook"
    )]
    async fn create_slack_webhook(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "code",
            decoder = conjure_http::server::conjure::FromPlainDecoder
        )]
        code: String,
        #[query(
            name = "state",
            decoder = conjure_http::server::conjure::FromPlainDecoder
        )]
        state: String,
    ) -> Result<(), conjure_http::private::Error>;
    /// Creates a new integration.
    #[endpoint(
        method = POST,
        path = "/scout/v2/integrations",
        name = "createIntegration",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_integration(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "createIntegrationRequest"
        )]
        create_integration_request: super::super::super::super::super::objects::scout::integrations::api::CreateIntegrationRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::Integration,
        conjure_http::private::Error,
    >;
    /// Creates a new webhook integration with HMAC signing.
    /// Returns the integration and the server-generated signing key.
    /// The signing key is only returned once — store it securely.
    #[endpoint(
        method = POST,
        path = "/scout/v2/integrations/internal/secure-webhook",
        name = "createSecureWebhookIntegration",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_secure_webhook_integration(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::integrations::api::CreateSecureWebhookIntegrationRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::CreateSecureWebhookIntegrationResponse,
        conjure_http::private::Error,
    >;
    /// Sends a message to a secure webhook integration with HMAC-SHA256 signature.
    /// Implements retry logic with exponential backoff based on merged delivery configuration.
    /// Request configuration overrides take precedence over integration's stored configuration.
    #[endpoint(
        method = POST,
        path = "/scout/v2/integrations/internal/secure-webhook/{integrationRid}",
        name = "sendSecureWebhookMessage",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn send_secure_webhook_message(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::integrations::api::SendSecureWebhookMessageRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::SendSecureWebhookMessageResponse,
        conjure_http::private::Error,
    >;
    /// Deletes an integration by archiving.
    #[endpoint(
        method = DELETE,
        path = "/scout/v2/integrations/{integrationRid}",
        name = "deleteIntegration"
    )]
    async fn delete_integration(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Updates the metadata of an integration.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/integrations/{integrationRid}",
        name = "updateIntegrationMetadata",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_integration_metadata(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::integrations::api::UpdateIntegrationRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::Integration,
        conjure_http::private::Error,
    >;
    /// Updates the integration details for an integration.
    /// Intended to allow changing webhooks or rotating API keys.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/integrations/{integrationRid}/details",
        name = "updateIntegrationDetails",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_integration_details(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::integrations::api::UpdateIntegrationDetailsRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::Integration,
        conjure_http::private::Error,
    >;
    /// Retrieves an integration with the specified integration RID.
    #[endpoint(
        method = GET,
        path = "/scout/v2/integrations/{integrationRid}",
        name = "getIntegration",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_integration(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::Integration,
        conjure_http::private::Error,
    >;
    /// Lists all integrations. Archived integrations are not included.
    #[endpoint(
        method = GET,
        path = "/scout/v2/integrations/list",
        name = "listIntegrations",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn list_integrations(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "workspaces",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
        )]
        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
    ) -> Result<
        Vec<
            super::super::super::super::super::objects::scout::integrations::api::Integration,
        >,
        conjure_http::private::Error,
    >;
    /// Sends a string message to the specified integration from a checklist execution.
    #[endpoint(
        method = POST,
        path = "/scout/v2/integrations/send-message",
        name = "sendMessage"
    )]
    async fn send_message(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::integrations::api::SendMessageRequest,
    ) -> Result<(), conjure_http::private::Error>;
    /// Rotates the HMAC signing key for a webhook integration.
    /// The old key is immediately invalidated and a new key is generated and returned.
    /// This is the only way to retrieve the signing key after initial creation.
    #[endpoint(
        method = POST,
        path = "/scout/v2/integrations/internal/{integrationRid}/rotate-signing-key",
        name = "rotateSecureWebhookIntegrationSigningKey",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn rotate_secure_webhook_integration_signing_key(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "integrationRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "integrationRid",
            safe
        )]
        integration_rid: super::super::super::super::super::objects::scout::integrations::api::IntegrationRid,
    ) -> Result<
        super::super::super::super::super::objects::scout::integrations::api::RotateWebhookSigningKeyResponse,
        conjure_http::private::Error,
    >;
}
