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_endpoints(
    name = "ModuleService",
    use_legacy_error_serialization
)]
pub trait ModuleService {
    /// Create a new module.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module",
        name = "createModule",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn create_module(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn update_module(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "moduleRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "moduleRid"
        )]
        module_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    fn batch_get_modules(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn search_modules(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn batch_archive_modules(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    fn batch_unarchive_modules(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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_endpoints(
    name = "ModuleService",
    use_legacy_error_serialization
)]
pub trait AsyncModuleService {
    /// Create a new module.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module",
        name = "createModule",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_module(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_module(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "moduleRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "moduleRid"
        )]
        module_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn batch_get_modules(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn search_modules(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_archive_modules(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_unarchive_modules(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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_endpoints(
    name = "ModuleService",
    use_legacy_error_serialization,
    local
)]
pub trait LocalAsyncModuleService {
    /// Create a new module.
    #[endpoint(
        method = POST,
        path = "/scout/v2/module",
        name = "createModule",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn create_module(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn update_module(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[path(
            name = "moduleRid",
            decoder = conjure_http::server::conjure::FromPlainDecoder,
            log_as = "moduleRid"
        )]
        module_rid: conjure_object::ResourceIdentifier,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::conjure::CollectionResponseSerializer
    )]
    async fn batch_get_modules(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn search_modules(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_archive_modules(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        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",
        produces = conjure_http::server::StdResponseSerializer
    )]
    async fn batch_unarchive_modules(
        &self,
        #[auth]
        auth_: conjure_object::BearerToken,
        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
        request: super::super::super::objects::module::BatchUnarchiveModulesRequest,
    ) -> Result<
        super::super::super::objects::module::BatchUnarchiveModulesResponse,
        conjure_http::private::Error,
    >;
}
