use conjure_http::endpoint;
/// Modules define collections of compute logic that can be shared and used across different contexts.
/// The Modules Service provides the API for managing these collections of functions.
#[conjure_http::conjure_client(name = "ModuleService")]
pub trait ModuleService<
    #[response_body]
    I: Iterator<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Create a new module.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module",
        name = "createModule",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn create_module(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::CreateModuleRequest,
    ) -> Result<
        super::super::super::objects::module::Module,
        conjure_http::private::Error,
    >;
    /// Update an existing module.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/module/{moduleRid}",
        name = "updateModule",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn update_module(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "moduleRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        module_rid: &conjure_object::ResourceIdentifier,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::UpdateModuleRequest,
    ) -> Result<
        super::super::super::objects::module::Module,
        conjure_http::private::Error,
    >;
    /// Get a list of modules by their RIDs and version specifiers if provided.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module/batch-get",
        name = "batchGetModules",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn batch_get_modules(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::BatchGetModulesRequest,
    ) -> Result<
        Vec<super::super::super::objects::module::Module>,
        conjure_http::private::Error,
    >;
    /// Search for modules.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module/search",
        name = "searchModules",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn search_modules(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::SearchModulesRequest,
    ) -> Result<
        super::super::super::objects::module::SearchModulesResponse,
        conjure_http::private::Error,
    >;
    /// Archive a set of modules.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module/archive",
        name = "batchArchiveModules",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn batch_archive_modules(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::BatchArchiveModulesRequest,
    ) -> Result<
        super::super::super::objects::module::BatchArchiveModulesResponse,
        conjure_http::private::Error,
    >;
    /// Unarchive a set of modules.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module/unarchive",
        name = "batchUnarchiveModules",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn batch_unarchive_modules(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::BatchUnarchiveModulesRequest,
    ) -> Result<
        super::super::super::objects::module::BatchUnarchiveModulesResponse,
        conjure_http::private::Error,
    >;
}
/// Modules define collections of compute logic that can be shared and used across different contexts.
/// The Modules Service provides the API for managing these collections of functions.
#[conjure_http::conjure_client(name = "ModuleService")]
pub trait AsyncModuleService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Create a new module.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module",
        name = "createModule",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create_module(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::CreateModuleRequest,
    ) -> Result<
        super::super::super::objects::module::Module,
        conjure_http::private::Error,
    >;
    /// Update an existing module.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/module/{moduleRid}",
        name = "updateModule",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn update_module(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "moduleRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        module_rid: &conjure_object::ResourceIdentifier,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::UpdateModuleRequest,
    ) -> Result<
        super::super::super::objects::module::Module,
        conjure_http::private::Error,
    >;
    /// Get a list of modules by their RIDs and version specifiers if provided.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module/batch-get",
        name = "batchGetModules",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn batch_get_modules(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::BatchGetModulesRequest,
    ) -> Result<
        Vec<super::super::super::objects::module::Module>,
        conjure_http::private::Error,
    >;
    /// Search for modules.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module/search",
        name = "searchModules",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search_modules(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::SearchModulesRequest,
    ) -> Result<
        super::super::super::objects::module::SearchModulesResponse,
        conjure_http::private::Error,
    >;
    /// Archive a set of modules.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module/archive",
        name = "batchArchiveModules",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn batch_archive_modules(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::BatchArchiveModulesRequest,
    ) -> Result<
        super::super::super::objects::module::BatchArchiveModulesResponse,
        conjure_http::private::Error,
    >;
    /// Unarchive a set of modules.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module/unarchive",
        name = "batchUnarchiveModules",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn batch_unarchive_modules(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::BatchUnarchiveModulesRequest,
    ) -> Result<
        super::super::super::objects::module::BatchUnarchiveModulesResponse,
        conjure_http::private::Error,
    >;
}
/// Modules define collections of compute logic that can be shared and used across different contexts.
/// The Modules Service provides the API for managing these collections of functions.
#[conjure_http::conjure_client(name = "ModuleService", local)]
pub trait LocalAsyncModuleService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Create a new module.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module",
        name = "createModule",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn create_module(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::CreateModuleRequest,
    ) -> Result<
        super::super::super::objects::module::Module,
        conjure_http::private::Error,
    >;
    /// Update an existing module.
    #[endpoint(
        method = PUT,
        path = "/scout/v2/module/{moduleRid}",
        name = "updateModule",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn update_module(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[path(
            name = "moduleRid",
            encoder = conjure_http::client::conjure::PlainEncoder
        )]
        module_rid: &conjure_object::ResourceIdentifier,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::UpdateModuleRequest,
    ) -> Result<
        super::super::super::objects::module::Module,
        conjure_http::private::Error,
    >;
    /// Get a list of modules by their RIDs and version specifiers if provided.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module/batch-get",
        name = "batchGetModules",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn batch_get_modules(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::BatchGetModulesRequest,
    ) -> Result<
        Vec<super::super::super::objects::module::Module>,
        conjure_http::private::Error,
    >;
    /// Search for modules.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module/search",
        name = "searchModules",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn search_modules(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::SearchModulesRequest,
    ) -> Result<
        super::super::super::objects::module::SearchModulesResponse,
        conjure_http::private::Error,
    >;
    /// Archive a set of modules.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module/archive",
        name = "batchArchiveModules",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn batch_archive_modules(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::BatchArchiveModulesRequest,
    ) -> Result<
        super::super::super::objects::module::BatchArchiveModulesResponse,
        conjure_http::private::Error,
    >;
    /// Unarchive a set of modules.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module/unarchive",
        name = "batchUnarchiveModules",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn batch_unarchive_modules(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        request: &super::super::super::objects::module::BatchUnarchiveModulesRequest,
    ) -> Result<
        super::super::super::objects::module::BatchUnarchiveModulesResponse,
        conjure_http::private::Error,
    >;
}
