use conjure_http::endpoint;
/// A Connection contains the relevant metadata and information to be used as a data source for runs.
/// The Connection Service is responsible for creating, updating, and retrieving database connections.
#[conjure_http::conjure_endpoints(
    name = "ConnectionService",
    use_legacy_error_serialization
)]
pub trait ConnectionService {
    /// Creates a new connection.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connections",
        name = "createConnection",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn create_connection(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "createConnection"
        )]
        create_connection: super::super::super::super::super::objects::scout::datasource::connection::api::CreateConnection,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        conjure_http::private::Error,
    >;
    /// Updates an existing connection.
    #[endpoint(
        method = PUT,
        path = "/data-source/connection/v1/connection/{rid}/details",
        name = "updateConnection",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn update_connection(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::datasource::connection::api::UpdateConnectionRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        conjure_http::private::Error,
    >;
    /// Updates an existing connection status.
    #[endpoint(
        method = PUT,
        path = "/data-source/connection/v1/connection/{rid}/status",
        name = "updateConnectionStatus"
    )]
    fn update_connection_status(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionStatus,
    ) -> Result<(), conjure_http::private::Error>;
    /// Adds available tag key/value pairs to the connection. If a tag name already exists, the values will be merged.
    /// This is primarily an internal endpoint to update tags for external connections as they are periodically
    /// scraped. This endpoint should only be called by clients for Visual crossing connections. Throws if called for
    /// Nominal connections which have their tags automatically indexed in the underlying Database.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connection/{rid}/available-tags",
        name = "addAvailableTags",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn add_available_tags(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        tags: std::collections::BTreeMap<String, std::collections::BTreeSet<String>>,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        conjure_http::private::Error,
    >;
    /// Gets a connection by its RID.
    #[endpoint(
        method = GET,
        path = "/data-source/connection/v1/connection/{rid}",
        name = "getConnection",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn get_connection(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        conjure_http::private::Error,
    >;
    /// Gets a set of connections by their RIDs.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connection/multiple",
        name = "getConnections",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    fn get_connections(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        rids: std::collections::BTreeSet<
            super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        >,
        conjure_http::private::Error,
    >;
    /// Lists all connections.
    #[endpoint(
        method = GET,
        path = "/data-source/connection/v1/connections",
        name = "listConnections",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    fn list_connections(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "includeArchived",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "includeArchived"
        )]
        include_archived: Option<bool>,
        #[query(
            name = "workspaces",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
        )]
        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        >,
        conjure_http::private::Error,
    >;
    /// Lists connections with pagination. Returns connections ordered by creation time descending.
    #[endpoint(
        method = GET,
        path = "/data-source/connection/v2/connections",
        name = "listConnectionsV2",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn list_connections_v2(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "includeArchived",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "includeArchived"
        )]
        include_archived: Option<bool>,
        #[query(
            name = "workspaces",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
        )]
        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
        #[query(
            name = "pageSize",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "pageSize"
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "nextPageToken"
        )]
        next_page_token: Option<String>,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::ListConnectionsResponse,
        conjure_http::private::Error,
    >;
    /// Lists connections that reference the specified Nominal data sources, with pagination.
    /// Only returns connections within the caller's organization.
    #[endpoint(
        method = GET,
        path = "/data-source/connection/v2/connections/by-datasource",
        name = "listConnectionsByNominalDataSource",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn list_connections_by_nominal_data_source(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "nominalDataSourceRids",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>,
            log_as = "nominalDataSourceRids"
        )]
        nominal_data_source_rids: std::collections::BTreeSet<
            conjure_object::ResourceIdentifier,
        >,
        #[query(
            name = "workspaces",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
        )]
        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
        #[query(
            name = "pageSize",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "pageSize"
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "nextPageToken"
        )]
        next_page_token: Option<String>,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::ListConnectionsResponse,
        conjure_http::private::Error,
    >;
    /// Archives a connection, which simply tags the connection for a client to filter.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connections/{rid}/archive",
        name = "archiveConnection"
    )]
    fn archive_connection(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Undoes the archiving of a connection.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connections/{rid}/unarchive",
        name = "unarchiveConnection"
    )]
    fn unarchive_connection(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
    ) -> Result<(), conjure_http::private::Error>;
}
/// A Connection contains the relevant metadata and information to be used as a data source for runs.
/// The Connection Service is responsible for creating, updating, and retrieving database connections.
#[conjure_http::conjure_endpoints(
    name = "ConnectionService",
    use_legacy_error_serialization
)]
pub trait AsyncConnectionService {
    /// Creates a new connection.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connections",
        name = "createConnection",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_connection(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "createConnection"
        )]
        create_connection: super::super::super::super::super::objects::scout::datasource::connection::api::CreateConnection,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        conjure_http::private::Error,
    >;
    /// Updates an existing connection.
    #[endpoint(
        method = PUT,
        path = "/data-source/connection/v1/connection/{rid}/details",
        name = "updateConnection",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_connection(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::datasource::connection::api::UpdateConnectionRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        conjure_http::private::Error,
    >;
    /// Updates an existing connection status.
    #[endpoint(
        method = PUT,
        path = "/data-source/connection/v1/connection/{rid}/status",
        name = "updateConnectionStatus"
    )]
    async fn update_connection_status(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionStatus,
    ) -> Result<(), conjure_http::private::Error>;
    /// Adds available tag key/value pairs to the connection. If a tag name already exists, the values will be merged.
    /// This is primarily an internal endpoint to update tags for external connections as they are periodically
    /// scraped. This endpoint should only be called by clients for Visual crossing connections. Throws if called for
    /// Nominal connections which have their tags automatically indexed in the underlying Database.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connection/{rid}/available-tags",
        name = "addAvailableTags",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn add_available_tags(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        tags: std::collections::BTreeMap<String, std::collections::BTreeSet<String>>,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        conjure_http::private::Error,
    >;
    /// Gets a connection by its RID.
    #[endpoint(
        method = GET,
        path = "/data-source/connection/v1/connection/{rid}",
        name = "getConnection",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_connection(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        conjure_http::private::Error,
    >;
    /// Gets a set of connections by their RIDs.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connection/multiple",
        name = "getConnections",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn get_connections(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        rids: std::collections::BTreeSet<
            super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        >,
        conjure_http::private::Error,
    >;
    /// Lists all connections.
    #[endpoint(
        method = GET,
        path = "/data-source/connection/v1/connections",
        name = "listConnections",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn list_connections(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "includeArchived",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "includeArchived"
        )]
        include_archived: Option<bool>,
        #[query(
            name = "workspaces",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
        )]
        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        >,
        conjure_http::private::Error,
    >;
    /// Lists connections with pagination. Returns connections ordered by creation time descending.
    #[endpoint(
        method = GET,
        path = "/data-source/connection/v2/connections",
        name = "listConnectionsV2",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn list_connections_v2(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "includeArchived",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "includeArchived"
        )]
        include_archived: Option<bool>,
        #[query(
            name = "workspaces",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
        )]
        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
        #[query(
            name = "pageSize",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "pageSize"
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "nextPageToken"
        )]
        next_page_token: Option<String>,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::ListConnectionsResponse,
        conjure_http::private::Error,
    >;
    /// Lists connections that reference the specified Nominal data sources, with pagination.
    /// Only returns connections within the caller's organization.
    #[endpoint(
        method = GET,
        path = "/data-source/connection/v2/connections/by-datasource",
        name = "listConnectionsByNominalDataSource",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn list_connections_by_nominal_data_source(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "nominalDataSourceRids",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>,
            log_as = "nominalDataSourceRids"
        )]
        nominal_data_source_rids: std::collections::BTreeSet<
            conjure_object::ResourceIdentifier,
        >,
        #[query(
            name = "workspaces",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
        )]
        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
        #[query(
            name = "pageSize",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "pageSize"
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "nextPageToken"
        )]
        next_page_token: Option<String>,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::ListConnectionsResponse,
        conjure_http::private::Error,
    >;
    /// Archives a connection, which simply tags the connection for a client to filter.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connections/{rid}/archive",
        name = "archiveConnection"
    )]
    async fn archive_connection(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Undoes the archiving of a connection.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connections/{rid}/unarchive",
        name = "unarchiveConnection"
    )]
    async fn unarchive_connection(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
    ) -> Result<(), conjure_http::private::Error>;
}
/// A Connection contains the relevant metadata and information to be used as a data source for runs.
/// The Connection Service is responsible for creating, updating, and retrieving database connections.
#[conjure_http::conjure_endpoints(
    name = "ConnectionService",
    use_legacy_error_serialization,
    local
)]
pub trait LocalAsyncConnectionService {
    /// Creates a new connection.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connections",
        name = "createConnection",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_connection(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(
            deserializer = conjure_http::server::StdRequestDeserializer,
            log_as = "createConnection"
        )]
        create_connection: super::super::super::super::super::objects::scout::datasource::connection::api::CreateConnection,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        conjure_http::private::Error,
    >;
    /// Updates an existing connection.
    #[endpoint(
        method = PUT,
        path = "/data-source/connection/v1/connection/{rid}/details",
        name = "updateConnection",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_connection(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::datasource::connection::api::UpdateConnectionRequest,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        conjure_http::private::Error,
    >;
    /// Updates an existing connection status.
    #[endpoint(
        method = PUT,
        path = "/data-source/connection/v1/connection/{rid}/status",
        name = "updateConnectionStatus"
    )]
    async fn update_connection_status(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionStatus,
    ) -> Result<(), conjure_http::private::Error>;
    /// Adds available tag key/value pairs to the connection. If a tag name already exists, the values will be merged.
    /// This is primarily an internal endpoint to update tags for external connections as they are periodically
    /// scraped. This endpoint should only be called by clients for Visual crossing connections. Throws if called for
    /// Nominal connections which have their tags automatically indexed in the underlying Database.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connection/{rid}/available-tags",
        name = "addAvailableTags",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn add_available_tags(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        tags: std::collections::BTreeMap<String, std::collections::BTreeSet<String>>,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        conjure_http::private::Error,
    >;
    /// Gets a connection by its RID.
    #[endpoint(
        method = GET,
        path = "/data-source/connection/v1/connection/{rid}",
        name = "getConnection",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn get_connection(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        conjure_http::private::Error,
    >;
    /// Gets a set of connections by their RIDs.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connection/multiple",
        name = "getConnections",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn get_connections(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer, safe)]
        rids: std::collections::BTreeSet<
            super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        >,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        >,
        conjure_http::private::Error,
    >;
    /// Lists all connections.
    #[endpoint(
        method = GET,
        path = "/data-source/connection/v1/connections",
        name = "listConnections",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn list_connections(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "includeArchived",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "includeArchived"
        )]
        include_archived: Option<bool>,
        #[query(
            name = "workspaces",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
        )]
        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::super::super::objects::scout::datasource::connection::api::Connection,
        >,
        conjure_http::private::Error,
    >;
    /// Lists connections with pagination. Returns connections ordered by creation time descending.
    #[endpoint(
        method = GET,
        path = "/data-source/connection/v2/connections",
        name = "listConnectionsV2",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn list_connections_v2(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "includeArchived",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "includeArchived"
        )]
        include_archived: Option<bool>,
        #[query(
            name = "workspaces",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
        )]
        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
        #[query(
            name = "pageSize",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "pageSize"
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "nextPageToken"
        )]
        next_page_token: Option<String>,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::ListConnectionsResponse,
        conjure_http::private::Error,
    >;
    /// Lists connections that reference the specified Nominal data sources, with pagination.
    /// Only returns connections within the caller's organization.
    #[endpoint(
        method = GET,
        path = "/data-source/connection/v2/connections/by-datasource",
        name = "listConnectionsByNominalDataSource",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn list_connections_by_nominal_data_source(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[query(
            name = "nominalDataSourceRids",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>,
            log_as = "nominalDataSourceRids"
        )]
        nominal_data_source_rids: std::collections::BTreeSet<
            conjure_object::ResourceIdentifier,
        >,
        #[query(
            name = "workspaces",
            decoder = conjure_http::server::conjure::FromPlainSeqDecoder<_>
        )]
        workspaces: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
        #[query(
            name = "pageSize",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "pageSize"
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            decoder = conjure_http::server::conjure::FromPlainOptionDecoder,
            log_as = "nextPageToken"
        )]
        next_page_token: Option<String>,
    ) -> Result<
        super::super::super::super::super::objects::scout::datasource::connection::api::ListConnectionsResponse,
        conjure_http::private::Error,
    >;
    /// Archives a connection, which simply tags the connection for a client to filter.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connections/{rid}/archive",
        name = "archiveConnection"
    )]
    async fn archive_connection(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
    ) -> Result<(), conjure_http::private::Error>;
    /// Undoes the archiving of a connection.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connections/{rid}/unarchive",
        name = "unarchiveConnection"
    )]
    async fn unarchive_connection(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "rid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            safe
        )]
        rid: super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
    ) -> Result<(), conjure_http::private::Error>;
}
