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_client(name = "ConnectionService")]
pub trait ConnectionService<
    #[response_body]
    I: Iterator<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Creates a new connection.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connections",
        name = "createConnection",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn create_connection(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn update_connection(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    fn update_connection_status(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn add_available_tags(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_connection(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn get_connections(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn list_connections(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "includeArchived",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        include_archived: Option<bool>,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn list_connections_v2(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "includeArchived",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        include_archived: Option<bool>,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        workspaces: &std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
        #[query(
            name = "pageSize",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        next_page_token: Option<&str>,
    ) -> 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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn list_connections_by_nominal_data_source(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "nominalDataSourceRids",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        nominal_data_source_rids: &std::collections::BTreeSet<
            conjure_object::ResourceIdentifier,
        >,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        workspaces: &std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
        #[query(
            name = "pageSize",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        next_page_token: Option<&str>,
    ) -> 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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    fn archive_connection(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    fn unarchive_connection(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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_client(name = "ConnectionService")]
pub trait AsyncConnectionService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Creates a new connection.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connections",
        name = "createConnection",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create_connection(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn update_connection(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn update_connection_status(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn add_available_tags(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_connection(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_connections(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn list_connections(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "includeArchived",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        include_archived: Option<bool>,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn list_connections_v2(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "includeArchived",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        include_archived: Option<bool>,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        workspaces: &std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
        #[query(
            name = "pageSize",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        next_page_token: Option<&str>,
    ) -> 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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn list_connections_by_nominal_data_source(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "nominalDataSourceRids",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        nominal_data_source_rids: &std::collections::BTreeSet<
            conjure_object::ResourceIdentifier,
        >,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        workspaces: &std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
        #[query(
            name = "pageSize",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        next_page_token: Option<&str>,
    ) -> 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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn archive_connection(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn unarchive_connection(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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_client(name = "ConnectionService", local)]
pub trait LocalAsyncConnectionService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Creates a new connection.
    #[endpoint(
        method = POST,
        path = "/data-source/connection/v1/connections",
        name = "createConnection",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create_connection(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn update_connection(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn update_connection_status(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn add_available_tags(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_connection(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_connections(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        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",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn list_connections(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "includeArchived",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        include_archived: Option<bool>,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn list_connections_v2(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "includeArchived",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        include_archived: Option<bool>,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        workspaces: &std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
        #[query(
            name = "pageSize",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        next_page_token: Option<&str>,
    ) -> 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",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn list_connections_by_nominal_data_source(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[query(
            name = "nominalDataSourceRids",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        nominal_data_source_rids: &std::collections::BTreeSet<
            conjure_object::ResourceIdentifier,
        >,
        #[query(
            name = "workspaces",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        workspaces: &std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
        #[query(
            name = "pageSize",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        page_size: Option<i32>,
        #[query(
            name = "nextPageToken",
            encoder = conjure_http::client::conjure::PlainSeqEncoder
        )]
        next_page_token: Option<&str>,
    ) -> 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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn archive_connection(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        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",
        accept = conjure_http::client::conjure::EmptyResponseDeserializer
    )]
    async fn unarchive_connection(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
        rid: &super::super::super::super::super::objects::scout::datasource::connection::api::ConnectionRid,
    ) -> Result<(), conjure_http::private::Error>;
}
